00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _FL_INPUT_BROWSER_H_
00023 #define _FL_INPUT_BROWSER_H_
00024
00025 #include "Fl_Input.h"
00026 #include "Fl_Menu_.h"
00027 #include "Fl_Menu_Window.h"
00028
00029 class ComboBrowser;
00030 class ComboWindow;
00031
00033 class Fl_Input_Browser : public Fl_Menu_ {
00034 public:
00035 static Fl_Named_Style* default_style;
00036 enum {
00037 NORMAL = 0,
00038 NONEDITABLE = 1,
00039 INDENTED = 2,
00040 NONEDITABLE_INDENTED = 3
00041 };
00042
00044 Fl_Input_Browser(int,int,int,int,const char * = 0);
00045
00047 Fl_Input_Browser(const char* l = 0,int layout_size=30,Fl_Align layout_al=FL_ALIGN_TOP,int label_w=100);
00048
00050 virtual ~Fl_Input_Browser();
00051
00052 void popup();
00053 void hide_popup();
00054 virtual int popup(int x, int y, int w, int h) { Fl_Input_Browser::popup(); return Fl_Menu_::popup(x,y,w,h); }
00055
00056 virtual void draw();
00057 virtual int handle(int);
00058 virtual void preferred_size(int& w,int &h) const;
00059
00060 void clear() { Fl_Menu_::clear(); item(0); }
00061
00062 void value(const char *v) { input()->value(v); }
00063 const char *value() { return input()->value(); }
00064
00065 Fl_Input *input() { return &m_input; }
00066
00067 private:
00068 Fl_Input m_input;
00069
00070 ComboWindow *win;
00071 ComboBrowser *list;
00072
00073 friend class ComboWindow;
00074 friend class ComboBrowser;
00075
00076 bool over_now, over_last;
00077
00078 void ctor_init();
00079 static void input_cb(Fl_Input *in, Fl_Input_Browser *d);
00080 };
00081
00082 #endif