Discussion:
Text selection question
(too old to reply)
Guido Mersmann
2014-07-24 23:02:49 UTC
Permalink
Hello,

I am new to this group, so I hope not to break any rules. :)

We are using Scintilla as a text class for the MorphOS SDKs Editor ( http://www.morphos.de ) and it works quite well.

I have a general question related to selection handling.

Is there any way to *disable* the auto deselection behavior?

What I want to achieve is an selection which is independent from any text edit functions.

Currently there are two modes.

A) Holding shift and move cursor to drag selection boundary.
B) The sticky way, where you move just the cursor to kind of drag the selection boundary.

For me the preferred way is to have the marked part completely separated from editing.
Defining a selection is done by using some cursor position generated start/end points at cursor position. Important is that moving the cursor or typing outside this selected area does not deselect the selection area.

Personally I use this behavior for around 30 years now. I press F1 at selection start, F2 at the end. So changing start or end is possible at any time. This allows even to edit some text, before moving or copying the selected area as the text stays selected until the person using the keyboard decides to kill it. Also the selected area can be used to highlight stuff for easy pickup, when writing stuff above or below.

Currently everything is there, but we cannot figure how to prevent a selection from being deselected.

I hope you can help


Guido

http://www.geit.de

--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
Neil Hodgson
2014-07-24 23:55:35 UTC
Permalink
Guido Mersmann:

> For me the preferred way is to have the marked part completely separated from editing.
> Defining a selection is done by using some cursor position generated start/end points at cursor position. Important is that moving the cursor or typing outside this selected area does not deselect the selection area.

That goes against the standard way editing has been done in GUI text editors and which is built into Scintilla.

> Personally I use this behavior for around 30 years now. I press F1 at selection start, F2 at the end. So changing start or end is possible at any time. This allows even to edit some text, before moving or copying the selected area as the text stays selected until the person using the keyboard decides to kill it. Also the selected area can be used to highlight stuff for easy pickup, when writing stuff above or below.

You may be able to use an indictor to mark a range that you then use for your range based commands like copy. Hide Scintilla's selection by turning off both the foreground and background colours.

Neil

--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
Nicholai Benalal
2014-07-25 09:54:44 UTC
Permalink
Hello Neil,

On July 25, 2014, Neil Hodgson <***@me.com> wrote:
>
> That goes against the standard way editing has been done in GUI text editors and which is built into Scintilla.
>
> >
> >
> > The issue is that I'm developing an editor (Scribble for MorphOS) for a platform with a very long legacy of GUI editors from well before there was a well defined standard practice across platforms. People have very strong preferences not to change their habits (and in some cases alternative methods do have advantages). I see that all the time and Guido is just an example :-)
>
> You may be able to use an indictor to mark a range that you then use for your range based commands like copy. Hide Scintilla's selection by turning off both the foreground and background colours.
>

> > Using indicators sounds like feasible way forward. I'll see about implementing such operations in parallel with the normal Scintilla selections (which are still the preferred way for most of my users).

Nicholai


--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
Guido Mersmann
2014-07-25 14:57:19 UTC
Permalink
Hello,
 
> That goes against the standard way editing has been done in GUI text editors and which is built into Scintilla. 

I use that selection theme I described since 1985, so from my point in the timeline you (and other editors) violated the standard way GUI text editing has been done before. :D

Guido

http://www.geit.de

--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
Neil Hodgson
2014-07-26 00:16:44 UTC
Permalink
Guido Mersmann:

>> That goes against the standard way editing has been done in GUI text editors and which is built into Scintilla.
>
> I use that selection theme I described since 1985, so from my point in the timeline you (and other editors) violated the standard way GUI text editing has been done before. :D

Larry Tesler and colleagues at Xerox developed 'modeless editing' from 1973 to 1980. It was first widely publicised in the August 1981 edition of Byte magazine that also introduced most of the work to Smalltalk and thus object orientation. Then it was included in commercial GUI systems such as the Apple Lisa in 1983 and the Macintosh in 1984.

http://www.nomodes.com/Larry_Tesler_Consulting/1962-1980.html

https://archive.org/stream/byte-magazine-1981-08/1981_08_BYTE_06-08_Smalltalk#page/n115/mode/2up

Neil

--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
Guido Mersmann
2014-07-26 14:16:05 UTC
Permalink
Hello,

> Larry Tesler and colleagues at Xerox developed 'modeless editing' from 1973 to 1980.

Well, with my solution you don´t need another mode. It is even handy for disabled people as you just need one finger (or toe) to type a text and you are still able to mark and move text blocks inside the editor, as you don´t need a qualifier (to enable some temp mode) or activate a sticky *mode* to get the same effect.

It feels like luck that you were not involved in computer development back then, or we would still use punchcards for data storage and printers as displays, as that was the way computers worked back then and why (optional) change the standard and working way things are used?

Guido

http://www.geit.de

--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
Philippe Lhoste
2014-07-29 12:37:49 UTC
Permalink
Your way might be better in some ways, but would go against the usage and expectation of
millions of text editor users, as the Scintilla way is the one implemented in nearly all
editors in Windows, Mac, Linux, Web browsers, etc.

And Neil suggested a way to do what you describe. Apparently, what you want is not a real
selection, but a way to highlight some portion of text. Using indicators might be a way to
do it. A complete implementation could include a way to set the selection to the currently
highlighted section, or to do some actions on it, like copy / cut it to the clipboard, or
move it to the current selection.

--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --

--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
johnsonj
2014-07-26 09:27:27 UTC
Permalink
Standard is in users not in tradition.

One of the aspect of scintilla I like is to almost freely redefine the
mapping between functions and keys.
Why not just provide those functions:
SetStartSelection and SetEndSelection.

Leave Its key redefinition up to users.


--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
Neil Hodgson
2014-07-27 00:45:26 UTC
Permalink
johnsonj:

> One of the aspect of scintilla I like is to almost freely redefine the mapping between functions and keys.
> Why not just provide those functions:
> SetStartSelection and SetEndSelection.
>
> Leave Its key redefinition up to users.

That isn't sufficient for Guido's preferred functionality since you would have to redefine all of the movement keys to not change the selection.

Neil

--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
Loading...