1 /* BurrTools
2  *
3  * BurrTools is the legal property of its developers, whose
4  * names are listed in the COPYRIGHT file, which is included
5  * within the source distribution.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (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, write to the Free Software
19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
20  */
21 #ifndef __BUTTON_GROUP_H__
22 #define __BUTTON_GROUP_H__
23 
24 #include "Layouter.h"
25 
26 // a group that can contain only buttons and one button is
27 // pressed while others are not
28 class ButtonGroup_c : public layouter_c {
29 
30   unsigned int currentButton;
31 
32 public:
33 
34   ButtonGroup_c(int x, int y, int w, int h);
35 
36   LFl_Button * addButton(void);
37 
38   void cb_Push(Fl_Button * btn);
39 
getSelected(void)40   unsigned int getSelected(void) const { return currentButton; }
41   void select(int num);
42 };
43 
44 #endif
45