[Oberon] N-O: HOW2 SelectTextStretch given beg, end ?
Bernhard Egger
bernhard at aces.snu.ac.kr
Sat Jan 13 05:51:27 MET 2007
For me, the following code works in Bluebottle Oberon:
moving the current selection by 5 characters:
PROCEDURE MoveSelection*;
VAR M: Oberon.SelectMsg;
BEGIN
(* get current selection *)
M.F := NIL; M.id := Oberon.get; M.time := -1; M.text := NIL;
Display.Broadcast(M);
(* move selection by 5 characters *)
M.id := Oberon.set; M.beg := M.beg+5; M.end := M.end+5;
Display.Broadcast(M)
END MoveSelection;
setting a new selection in the marked (*) text:
PROCEDURE SetSelection*;
VAR M: Oberon.SelectMsg;
BEGIN
(* get marked text and select chars 5..10 *)
M.sel := Oberon.MarkedFrame(); M.text := Oberon.MarkedText();
M.id := Oberon.set; M.time := -1; M.beg := 5; M.end := 10;
Display.Broadcast(M)
END SetSelection;
The complete source follows below.
--Bernhard
http://aces.snu.ac.kr/~bernhard/bluebottle/Select.Mod
AsciiCoder.DecodeFiles Select.Mod ~
gO0EUQ7M4mfHciRCUM7A_=60000000b0B1`m8H4000`@3m6K_9703h0000PA\56M0400<mfH[E6I
04003mVKd9gK\=7010`CbM6038Z00000K;DB595H0000R100000000000>30`7`800001lTHU9gK
^53<^<eH^iRA^A70?00230000P`000 at C?ADE<E48CE6KU=6Mk02:ZX281E5E8mTDP8RHU9b>P0EE
B1eCCE48R<GId1bLUaFISAGJ_i68TEFK_9b>PXB:=d at B=1eCBA58?9FIbmVK\02EUQ7Mca284UfL
`aFHi]C3=0UD?=DA4EUD51BC_IGICE6KU=6MYmVKZ\C3F5TDPdT>PlTHU9gK^ibDUaFISAGCcMf>
=8DA7UTC=T0:Z0bIUA78SEWLbEVKd1bLUaFISAGJ_i68ZTB39dT;61R>m0RC9ad>PdT;YA68jd38
?9FIbmVK^LFId]38=i2MYeFIPXC?PdB<k0BC^@GIhA78jd38>U4Ck02AY=7L\5FN^8TL_56IS5fL
dQBCY\C39d at 2XX28]mVMU1bLUaFISAGJ_i68RU78e0b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