Lisp HUG Maillist Archive

in-place editing?

Can anyone suggest a reasonable way to do in-place text editing on a pane that 
mixes graphics and text (output-pane)?  Obviously, I can use gp:draw-string 
and build code to handle all keyboard input explicitly.  Just wondering if 
I'm missing a cheat (e.g. something like stealing the editing functionality 
from capi:multi-line-text-input-pane and somehow using it on an output pane?, 
inherit from something?, fake out capi:contain (how?) and use a capi 
widget?).
thanx
pt


Re: in-place editing?

Hello Paul,

| Can anyone suggest a reasonable way to do in-place text editing on a
| pane that mixes graphics and text (output-pane)?  Obviously, I can use
| gp:draw-string and build code to handle all keyboard input explicitly.
| Just wondering if I'm missing a cheat (e.g. something like stealing the
| editing functionality from capi:multi-line-text-input-pane and somehow
| using it on an output pane?, inherit from something?, fake out
| capi:contain (how?) and use a capi widget?).

That is rather tedious to handle all input in a pane mixing graphics and
text. I would suggest a floating capi:editor-pane over a pinboard layout.
You would draw both graphics and text on the layout directly, but reposition
the editor-pane to perform in-place editing. For example, have a look at
YGrid sources on my Web site.

You can probably use an instance of text-input-pane or its subclass, but it
provides less flexibility in event handling. So I do not recommend that.
--
Sincerely,
Dmitri Ivanov
www.aha.ru/~divanov


Updated at: 2020-12-10 09:00 UTC