Sorry - I was a bit trigger-happy with the send button. Pseudo-code 
updated/finished:

> In short, I have something like the pseudo-code below. I'm happy to post my 
> full test/draft if that helps.
>
> Maybe someone else has been through this before?
>
> Denton
>
>
> // a 'drop down or popup' box with suggested text completions
> class SuggestionsBox : public Fl_Menu_Window {
>
>   Fl_Select_Browser *browser_; // ideally ...
>
> public:
>     SuggestionsBox(...) : Fl_Menu_Window( ... ){
>        create browser_;
>        end();
>     }
>    ...
>    etc.
>
> }
>
> // input box that displays "suggested completions" as dropdown/popup
> class SuggestionsInput : public Fl_Input {
>
> ...
>
>   Fl_Input *input_;
>   SuggestionsBox *browser_;
>   ... etc etc ...
>
>   browser_cb_() {
>    // when user clicks a browser item, add to input_
>    // then, hide browser_
>   }
>
>   int handle(int event) {
>
>   // on keypress, take input_->value() as prefix. Use client fxn
>   // to search db/tree of terms, send those to browser_.
>   // show browser_ just below this input, but keep
>   // focus in the text input.
>
>   }
>
> public:
>
>   InputWithSuggestionsBox(..) {
>
>    // always display input_
>
>    Fl_Group::end();
>    browser_ = new SuggestionsBox(...);
>      browser_->callback(browser_cb_, this);
>
>
>    ... etc
>
>   }
>
>   // etc etc
>
> };
>
>

_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to