texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] [TeXmacs] minibuffer support in Qt version


From: Miguel de Benito Delgado
Subject: Re: [Texmacs-dev] [TeXmacs] minibuffer support in Qt version
Date: Tue, 14 Jan 2014 21:45:51 +0100

On Tue, Jan 14, 2014 at 2:58 PM, Michael Lachmann <address@hidden> wrote:
Wouldn't it be possible to implement a widget based on QTMTreeModel, so that 
text entry to it is a tree, and then (maybe) keys would work like in TeXmacs, and
one could also enter trees into other dialogs (e.g. search/replace)?

QTMTreeModel is just a proxy for a tree observer and is intended to be used in conjunction with a view like QTMTreeView (which I implemented for a super-secret project of mine yet in my private git repo only). So to be pedantic (sorry), one cannot base a widget on it although one could of course use it as a model.

However, this wouldn't help at all with the issue at hand. Currently, QTMWidget (which more or less implements the TeXmacs canvas) catches QKeyEvents and rewrites and queues them in our own event queue as QP_KEYPRESS. After a while they are sent to the TeXmacs editor itself in edit_interface_rep::handle_keypress (), where scheme code is called and kbd-maps are taken into account.

Therefore what we need is writing QTMLineWidget::keyPressEvent() to catch keypresses and then respond to them either

 * using hardcoded keymaps
 * or reading the keymaps from scheme, possibly using kbd-find-rev-binding.

I'd obviously go for the second one.

Best,
--
Miguel de  Benito.
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]