vdk 2.4.0
Main Page
Related Pages
Classes
Files
File List
vdk
radiobtngroup.h
1
/*
2
* ===========================
3
* VDK Visual Development Kit
4
* Version 0.4
5
* October 1998
6
* ===========================
7
*
8
* Copyright (C) 1998, Mario Motta
9
* Developed by Mario Motta <mmotta@guest.net>
10
*
11
* This library is free software; you can redistribute it and/or
12
* modify it under the terms of the GNU Library General Public
13
* License as published by the Free Software Foundation; either
14
* version 2 of the License, or (at your option) any later version.
15
*
16
* This library is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
* Library General Public License for more details.
20
*
21
* You should have received a copy of the GNU Library General Public
22
* License along with this library; if not, write to the Free Software
23
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24
* 02111-1307, USA.
25
*/
26
27
28
#ifndef RADIOBTNGROUP_H
29
#define RADIOBTNGROUP_H
30
#include <vdk/widcontain.h>
31
#include <vdk/checkbutton.h>
32
#include <vdk/eventbox.h>
33
#include <vdk/vdkprops.h>
34
class
VDKRadioButton
;
35
36
typedef
VDKList<VDKRadioButton>
RadioButtonList
;
37
typedef
VDKListiterator<VDKRadioButton>
RadioButtonListIterator
;
38
39
class
VDKRadioButtonGroup
;
49
class
VDKRadioButtonGroup
:
public
VDKObjectContainer
50
{
51
protected
:
52
VDKEventBox
*box;
53
GSList* gs_group;
54
public
:
55
56
// properties
63
VDKReadWriteValueProp<VDKRadioButtonGroup,int>
Selected
;
64
65
76
RadioButtonList
Buttons
;
80
VDKReadOnlyValueProp<VDKRadioButtonGroup, RadioButtonList*>
ButtonList
;
86
VDKRadioButtonGroup
(
VDKForm
* owner,
int
mode = v_box);
90
~VDKRadioButtonGroup
(){}
96
void
SetDefault
(
int
buttonNumber);
97
void
SetSelected(
int
index);
98
int
GetSelected() {
return
Selected
; }
99
void
Add
(
VDKObject
* obj,
int
j = l_justify,
100
int
e =
false
,
int
f =
false
,
int
p =
false
);
105
void
RemoveButton
(
VDKRadioButton
* button);
106
GSList* GsGroup(GSList* gs = NULL)
107
{
if
(gs) gs_group = gs;
return
gs_group; }
111
VDKEventBox
*
GBox
() {
return
box; }
112
static
void
ToggleEvent(GtkWidget *wid, gpointer bn);
113
};
114
129
class
VDKRadioButton
:
public
VDKCheckButton
130
{
131
protected
:
132
int
buttonId;
133
VDKRadioButtonGroup
*rbgroup;
134
friend
class
VDKRadioButtonGroup
;
135
public
:
141
VDKRadioButton
(
VDKRadioButtonGroup
* group,
char
* label = NULL);
145
VDKRadioButton
(
VDKForm
* owner,
char
* label);
149
virtual
~VDKRadioButton
() {}
153
VDKRadioButtonGroup
*
Group
(
VDKRadioButtonGroup
* g = NULL)
154
{
if
(g) rbgroup = g;
return
rbgroup; }
155
156
};
157
158
#endif
159
160
161
162
163
164
165
166
167
168
Generated on Wed Mar 12 2014 15:03:43 for vdk 2.4.0 by
1.8.1.2