> I have been reading into the scintilla code a bit with the purpose of
> implementing a basic subset of VIM commands. You can think of it as a
> sort of "VIM compatibility" mode so that die hard VIM enthusiasts can
> still use IDEs based on scintilla with out sacrificing VIMs text
> editing shortcuts.
Only a very small subset of VIM could be embedded in Scintilla as a
change only to key handling. Even for simple searching, VIM needs a
visible command line and status display.
A command line then introduces a set of policy decisions like:
Where does it go? Does it auto-resize for long commands? How is it
styled? This would expand the scope of Scintilla significantly so I
see it as not belonging inside Scintilla.
The functionality could be implemented in the application but that
would limit its reuse. Perhaps you could implement a composite widget
that contained Scintilla functionality along with a command line.
Neil
> --
> You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
> To post to this group, send email to scintilla...@googlegroups.com.
> To unsubscribe from this group, send email to scintilla-inter...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/scintilla-interest?hl=en.
>
>
> Were I to write such a composite widget would you consider adding it
> to the scintilla code base?
It is unlikely - I wouldn't want to be responsible for its maintenance.
Neil
Neil
However, I do not have access to this interface in order to write a
derivative class, since ScintillaGTK's interface is defined within the
CXX file. Would it be possible to decouple the interface from the .cpp
file? I can submit patches if you'd like.
Best,
Ali
> It looks like however that in
> order to intercept keystrokes to the ScintillaGTK widget, I will need
> to subclass it, and override the class_init() function.
I thought you'd be able to hook keyboard input through the GTK+ API
similar to control subclassing on Windows.
> However, I do not have access to this interface in order to write a
> derivative class, since ScintillaGTK's interface is defined within the
> CXX file. Would it be possible to decouple the interface from the .cpp
> file? I can submit patches if you'd like.
Not sure quite what this would entail but moving the ScintillaGTK
class definition into a header is fine. It is likely that the class
definition will change over time.
Neil
> I thought you'd be able to hook keyboard input through the GTK+ API
I played around with something like this in the GeanyLua plugin, but
my idea at the time was to display the keystrokes in a calltip rather
than creating a full-fledged edit line. It's been a while (several years ago)
but it looks the the trick is something called "gdk_window_add_filter".
Not sure if it would help but you can check out the code here:
http://tinyurl.com/39nd2qj
(See glspi_keygrab() function around line 559.)
Documentation of what it is supposed to do is here:
http://tinyurl.com/25x79lj
- Jeff