27 #ifndef Fl_Input_Choice_H 
   28 #define Fl_Input_Choice_H 
   31 #include <FL/Fl_Group.H> 
   32 #include <FL/Fl_Input.H> 
   33 #include <FL/Fl_Menu_Button.H> 
   57       int xc = x()+w()/2, yc=y()+h()/2;
 
   62     InputMenuButton(
int X,
int Y,
int W,
int H,
const char*L=0) : 
 
   67   InputMenuButton *menu_;
 
   69   static void menu_cb(
Fl_Widget*, 
void *data) { 
 
   73     if (item && item->
flags & (FL_SUBMENU|FL_SUBMENU_POINTER)) 
return;  
 
   74     if (!strcmp(o->inp_->
value(), o->menu_->text()))
 
   76       o->Fl_Widget::clear_changed();
 
   82       o->inp_->
value(o->menu_->text());
 
   84       o->Fl_Widget::set_changed();
 
   93       o->Fl_Widget::clear_changed();
 
   98   static void inp_cb(
Fl_Widget*, 
void *data) { 
 
  102       o->Fl_Widget::set_changed();
 
  106       o->Fl_Widget::clear_changed();
 
  114       o->Fl_Widget::clear_changed();
 
  125   inline int menu_w() { 
return(20); }
 
  147   void add(
const char *s) { menu_->add(s);  }
 
  171   void resize(
int X, 
int Y, 
int W, 
int H) {
 
  173     inp_->
resize(inp_x(), inp_y(), inp_w(), inp_h());
 
  174     menu_->resize(menu_x(), menu_y(), menu_w(), menu_h());
 
  197     inp_->
value(menu_->text(val));
 
  218 #endif // !Fl_Input_Choice_H 
Do the callback when the button or key is released and the value changes. 
Definition: Enumerations.H:313
static Fl_Widget * focus()
Gets the current Fl::focus() widget. 
Definition: Fl.H:783
static int box_dw(Fl_Boxtype)
Returns the width offset for the given boxtype. 
Definition: fl_boxtype.cxx:341
Do the callback whenever the user interacts with the widget. 
Definition: Enumerations.H:312
void fl_color(Fl_Color c)
Sets the color for all subsequent drawing operations. 
Definition: fl_draw.H:52
static int box_dy(Fl_Boxtype)
Returns the Y offset for the given boxtype. 
Definition: fl_boxtype.cxx:335
Do the callback only when the widget value changes. 
Definition: Enumerations.H:311
Fl_Boxtype
Definition: Enumerations.H:473
see figure 1 
Definition: Enumerations.H:477
The Fl_Group class is the FLTK container widget. 
Definition: Fl_Group.H:41
static int box_dx(Fl_Boxtype)
Returns the X offset for the given boxtype. 
Definition: fl_boxtype.cxx:310
FL_EXPORT Fl_Color fl_inactive(Fl_Color c)
Returns the inactive, dimmed version of the given color. 
Definition: fl_color.cxx:423
int Fl_Fontsize
Size of a font in pixels. 
Definition: Enumerations.H:768
static int box_dh(Fl_Boxtype)
Returns the height offset for the given boxtype. 
Definition: fl_boxtype.cxx:347
void resize(int, int, int, int)
Resizes the Fl_Group widget and all of its children. 
Definition: Fl_Group.cxx:634
utility header to pull drawing functions together 
unsigned int Fl_Color
An FLTK color value; see also Colors. 
Definition: Enumerations.H:796
int Fl_Font
A font number is an index into the internal font table. 
Definition: Enumerations.H:739
void fl_polygon(int x, int y, int x1, int y1, int x2, int y2)
Fills a 3-sided polygon. 
Definition: fl_draw.H:244