]>
Commit | Line | Data |
---|---|---|
c801d85f KB |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: radiobox.h | |
3 | // Purpose: | |
4 | // Author: Robert Roebling | |
5 | // Created: 01/02/97 | |
6 | // Id: | |
7 | // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem | |
8 | // Licence: wxWindows licence | |
9 | ///////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | ||
12 | #ifndef __GTKRADIOBOXH__ | |
13 | #define __GTKRADIOBOXH__ | |
14 | ||
15 | #ifdef __GNUG__ | |
16 | #pragma interface | |
17 | #endif | |
18 | ||
19 | #include "wx/defs.h" | |
20 | #include "wx/object.h" | |
21 | #include "wx/list.h" | |
22 | #include "wx/control.h" | |
23 | #include "wx/bitmap.h" | |
24 | ||
25 | //----------------------------------------------------------------------------- | |
26 | // classes | |
27 | //----------------------------------------------------------------------------- | |
28 | ||
29 | class wxRadioBox; | |
30 | ||
31 | //----------------------------------------------------------------------------- | |
32 | // global data | |
33 | //----------------------------------------------------------------------------- | |
34 | ||
35 | extern const char *wxRadioBoxNameStr; | |
36 | ||
37 | //----------------------------------------------------------------------------- | |
38 | // wxRadioBox | |
39 | //----------------------------------------------------------------------------- | |
40 | ||
41 | class wxRadioBox: public wxControl | |
42 | { | |
43 | ||
44 | DECLARE_DYNAMIC_CLASS(wxRadioBox) | |
45 | ||
46 | public: | |
47 | ||
48 | wxRadioBox(void); | |
debe6624 JS |
49 | wxRadioBox( wxWindow *parent, wxWindowID id, const wxString& title, |
50 | const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, | |
51 | int n = 0, const wxString choices[] = NULL, | |
52 | int majorDim = 0, long style = wxRA_HORIZONTAL, | |
c801d85f | 53 | const wxString &name = wxRadioBoxNameStr ); |
debe6624 JS |
54 | bool Create( wxWindow *parent, wxWindowID id, const wxString& title, |
55 | const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, | |
56 | int n = 0, const wxString choices[] = NULL, | |
57 | int majorDim = 0, long style = wxRA_HORIZONTAL, | |
c801d85f KB |
58 | const wxString &name = wxRadioBoxNameStr ); |
59 | int FindString( const wxString& s) const; | |
debe6624 | 60 | void SetSelection( int n ); |
c801d85f | 61 | int GetSelection(void) const; |
debe6624 | 62 | wxString GetString( int n ) const; |
c801d85f KB |
63 | wxString GetLabel(void) const; |
64 | void SetLabel( const wxString& label ); | |
debe6624 JS |
65 | void SetLabel( int item, const wxString& label ); |
66 | void SetLabel( int item, wxBitmap *bitmap ); | |
67 | wxString GetLabel( int item ) const; | |
68 | bool Show( bool show ); | |
69 | void Enable( bool enable ); | |
70 | void Enable( int item, bool enable ); | |
71 | void Show( int item, bool show ); | |
c801d85f KB |
72 | virtual wxString GetStringSelection(void) const; |
73 | virtual bool SetStringSelection( const wxString& s ); | |
74 | virtual int Number(void) const; | |
75 | int GetNumberOfRowsOrCols(void) const; | |
debe6624 JS |
76 | void SetNumberOfRowsOrCols( int n ); |
77 | ||
c801d85f KB |
78 | private: |
79 | ||
80 | GtkRadioButton *m_radio; | |
81 | ||
47908e25 RR |
82 | public: |
83 | ||
84 | bool m_alreadySent; | |
c801d85f KB |
85 | }; |
86 | ||
87 | #endif // __GTKRADIOBOXH__ |