/** * Copyright Mikael Högdahl - triyana@users.sourceforge.net * * This source is distributed under the terms of the Q Public License version 1.0, * created by Trolltech (www.trolltech.com). */ #ifndef Fl_Choice2_h #define Fl_Choice2_h #include #include "Fl_Table_Data.h" /** * An extended Fl_Choice component which moves automatically in the list when user types */ class Fl_Choice2 : public Fl_Choice { public: Fl_Choice2 (Fl_Table_Data* datafeed, int x, int y, int w, int h, const char* s = 0); void cb1 (); static void cb1_ (Fl_Widget* w, void* data) {((Fl_Choice2*)data)->cb1 ();} int handle (int event); void interactive (bool onoff) {aInteractive = onoff;} bool populate (int row, int col); private: bool aInteractive; char aBuffer[256]; const char** aList; Fl_Table_Data* aDataFeed; int aBufferPos; int aSize; }; #endif