FLTK 1.4.0
Loading...
Searching...
No Matches
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
104class FL_EXPORT Fl_Choice : public Fl_Menu_ {
105protected:
106 void draw() FL_OVERRIDE;
107public:
108 int handle(int) FL_OVERRIDE;
109
110 Fl_Choice(int X, int Y, int W, int H, const char *L = 0);
111
116 int value() const {return Fl_Menu_::value();}
117
118 int value(int v);
119
120 int value(const Fl_Menu_Item* v);
121};
122
123#endif
A button that is used to pop up a menu.
Definition Fl_Choice.H:104
int value() const
Gets the index of the last item chosen by the user.
Definition Fl_Choice.H:116
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:168
virtual void draw()=0
Draws the widget.
virtual int handle(int event)
Handles the specified event.
Definition Fl_Widget.cxx:102
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46
The Fl_Menu_Item structure defines a single menu item that is used by the Fl_Menu_ class.
Definition Fl_Menu_Item.H:115