]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/radiobox.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __GTKRADIOBOXH__
13 #define __GTKRADIOBOXH__
20 #include "wx/object.h"
22 #include "wx/control.h"
23 #include "wx/bitmap.h"
25 //-----------------------------------------------------------------------------
27 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
33 //-----------------------------------------------------------------------------
35 extern const char *wxRadioBoxNameStr
;
37 //-----------------------------------------------------------------------------
39 //-----------------------------------------------------------------------------
41 class wxRadioBox
: public wxControl
44 DECLARE_DYNAMIC_CLASS(wxRadioBox
)
49 inline wxRadioBox( wxWindow
*parent
, wxWindowID id
, const wxString
& title
,
50 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
51 int n
= 0, const wxString choices
[] = (const wxString
*) NULL
,
52 int majorDim
= 0, long style
= wxRA_HORIZONTAL
,
53 const wxValidator
& val
= wxDefaultValidator
,
54 const wxString
& name
= wxRadioBoxNameStr
)
56 Create( parent
, id
, title
, pos
, size
, n
, choices
, majorDim
, style
, val
, name
);
58 bool Create( wxWindow
*parent
, wxWindowID id
, const wxString
& title
,
59 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
60 int n
= 0, const wxString choices
[] = (const wxString
*) NULL
,
61 int majorDim
= 0, long style
= wxRA_HORIZONTAL
,
62 const wxValidator
& val
= wxDefaultValidator
,
63 const wxString
& name
= wxRadioBoxNameStr
);
64 int FindString( const wxString
& s
) const;
65 void SetSelection( int n
);
66 int GetSelection(void) const;
67 wxString
GetString( int n
) const;
68 wxString
GetLabel(void) const;
69 void SetLabel( const wxString
& label
);
70 void SetLabel( int item
, const wxString
& label
);
71 void SetLabel( int item
, wxBitmap
*bitmap
);
72 wxString
GetLabel( int item
) const;
73 bool Show( bool show
);
74 void Enable( bool enable
);
75 void Enable( int item
, bool enable
);
76 void Show( int item
, bool show
);
77 virtual wxString
GetStringSelection(void) const;
78 virtual bool SetStringSelection( const wxString
& s
);
79 virtual int Number(void) const;
80 int GetNumberOfRowsOrCols(void) const;
81 void SetNumberOfRowsOrCols( int n
);
82 void SetFont( const wxFont
&font
);
84 void OnSize( wxSizeEvent
&event
);
92 GtkRadioButton
*m_radio
;
98 #endif // __GTKRADIOBOXH__