FLTK 1.4.0
Fl_Choice.H
1 //
2 // Choice header file for the Fast Light Tool Kit (FLTK).
3 //
4 // Copyright 1998-2010 by Bill Spitzak and others.
5 //
6 // This library is free software. Distribution and use rights are outlined in
7 // the file "COPYING" which should have been included with this file. If this
8 // file is missing or damaged, see the license at:
9 //
10 // https://www.fltk.org/COPYING.php
11 //
12 // Please see the following page on how to report bugs and issues:
13 //
14 // https://www.fltk.org/bugs.php
15 //
16 
17 /* \file
18  Fl_Choice widget . */
19 
20 #ifndef Fl_Choice_H
21 #define Fl_Choice_H
22 
23 #include "Fl_Menu_.H"
24 
103 class FL_EXPORT Fl_Choice : public Fl_Menu_ {
104 protected:
105  void draw();
106 public:
107  int handle(int);
108 
109  Fl_Choice(int X, int Y, int W, int H, const char *L = 0);
110 
115  int value() const {return Fl_Menu_::value();}
116 
117  int value(int v);
118 
119  int value(const Fl_Menu_Item* v);
120 };
121 
122 #endif
A button that is used to pop up a menu.
Definition: Fl_Choice.H:103
int value() const
Gets the index of the last item chosen by the user.
Definition: Fl_Choice.H:115
Base class of all widgets that have a menu in FLTK.
Definition: Fl_Menu_.H:53
int value() const
Returns the index into menu() of the last item chosen by the user.
Definition: Fl_Menu_.H:160
virtual void draw()=0
Draws the widget.
virtual int handle(int event)
Handles the specified event.
Definition: Fl_Widget.cxx:102
The Fl_Menu_Item structure defines a single menu item that is used by the Fl_Menu_ class.
Definition: Fl_Menu_Item.H:114