1 /**
2 *  Copyright Mikael H�gdahl - triyana@users.sourceforge.net
3 *
4 *  This source is distributed under the terms of the Q Public License version 1.0,
5 *  created by Trolltech (www.trolltech.com).
6 */
7 
8 #ifndef Fl_Select_h
9 #define Fl_Select_h
10 
11 #include "Fl_Dialog.h"
12 #include <FL/Fl_Button.H>
13 #include <FL/Fl_Input.H>
14 #include <FL/Fl_Return_Button.H>
15 #include <FL/Fl_Browser.H>
16 
17 
18 /**
19 *  A list choice dialog. Call row to return the selected row.
20 */
21 class Fl_Select : public Fl_Dialog {
22 public:
23                             Fl_Select (const char** data, int size, int sel);
24 
cb1()25     void                    cb1 () {aInput->value (aBrowser->text (aBrowser->value ()));}
cb2()26     void                    cb2 () {aRetVal = 0;}
27     void                    cb3 ();
cb4()28     void                    cb4 () {aRetVal = 1;}
row()29     int                     row () {return aBrowser->value();}
30 
31 private:
32     const char**            aData;
33     int                     aSize;
34 
35     Fl_Browser*             aBrowser;
36     Fl_Return_Button*       aSelect;
37     Fl_Button*              aCancel;
38     Fl_Input*               aInput;
39 };
40 
41 #endif
42