I'm trying to ascertain how a generic xforms "input combox" widget should 
work. Essentially I envisage encoding the generic part of the xforms 
minibuffer as a widget. Here's how I think it should work:

* The "input combox" widget consists of both an input widget and a browser. 
The widget "knows" about possible completions to the typed command and pops 
up the browser with these when so requested (the user would hit <TAB> to 
pop up the browser).

* This means that the widget must be initialised with a collection of all 
possible commands. On receipt of <TAB> it fills the browser with those 
commands that satisfy the current contents of the input widget. The browser 
is then displayed and can be naviaged as it is now (this last bit is done 
already). For example:
        The user has typed "in" in the input widget.
        The list of all possible commands known to the "inbut combox":
                goto-paragraph
                close-buffer
                insert-citation
                insert-minipage
                include-file
        The browser would be filled with
                insert-citation
                insert-minipage
                include-file

* <Escape> should clear the currently typed contents of the input widget, 
"in" in the above example. Should a callback be emitted in this case?

* The "input combox" widget emits a callback when the Return/Enter and 
Up/Down arrows are pressed.
        Return/Enter: here's the completed command. I guess that if the comm
and is incomplete when <Return> is pressed then the widget should behave
 as if <Escape> had been pressed.
        Up/Down: used by the minibuffer to tell LyX to use the Next/Pr
evious command. I guess that the widget doesn't need to know this histo
ry but should return the key press. The minibuffer could then fill the
 input widget with this Next/Previous command. A further <Return> from th
e user would emit another callback, enabling the minibuffer to dispatch this
 thing to LyX.

I think that describes the widget I envisage totally. I have been encoding 
it as a specialisation of the Combox widget I posted the other day. Ie I 
currently have a single Combox widget with two possible "flavours":
        FL_COMBOX_BUTTON (yesterday's posting)
        FL_COMBOX_INPUT (this proposal)
However, the two have such different user semantics that I wonder whether it 
would not be better to have two totally separate widgets? Ie Combox and 
InputCombox widgets rather that a single Combox widget with two flavours, 
FL_COMBOX_BUTTON and FL_COMBOX_INPUT.

Any/all feedback would be much appreciated.

-- 
Angus

Reply via email to