Dillo v3.1.1-14-g8f67d6e0
Loading...
Searching...
No Matches
fltkcomplexbutton.hh
Go to the documentation of this file.
1
2// fltkcomplexbutton.hh is derived from FL/Fl_Button.H from FLTK's 1.3 branch
3// at http://fltk.org in early 2011.
4// FL/Fl_Button.H is Copyright 1998-2010 by Bill Spitzak and others.
5
6/*
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef __FLTK_COMPLEX_BUTTON_HH__
22#define __FLTK_COMPLEX_BUTTON_HH__
23
24#include <FL/Fl_Group.H>
25
26namespace dw {
27namespace fltk {
28namespace ui {
29
30class ComplexButton : public Fl_Group {
31 char value_;
32 char oldval;
33 uchar down_box_;
34
35protected:
36 virtual void draw();
37
38public:
39 virtual int handle(int);
40
41 ComplexButton(int X, int Y, int W, int H, const char *L = 0);
43
44 int value(int v);
45
49 char value() const {return value_;}
50
55 Fl_Boxtype down_box() const {return (Fl_Boxtype)down_box_;}
56
62 void down_box(Fl_Boxtype b) {down_box_ = b;}
63};
64
65} // namespace ui
66} // namespace fltk
67} // namespace dw
68
69#endif
70
71//
72//
char value() const
Returns the current value of the button (0 or 1).
void down_box(Fl_Boxtype b)
Sets the down box type.
int value(int v)
Sets the current value of the button.
Fl_Boxtype down_box() const
Returns the current down box type, which is drawn when value() is non-zero.
#define H(x, y, z)
Dw is in this namespace, or sub namespaces of this one.