]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/classic/radiobox.h
Update for new event handler stuff
[wxWidgets.git] / include / wx / mac / classic / radiobox.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: radiobox.h
3 // Purpose: wxRadioBox class
4 // Author: Stefan Csomor
5 // Modified by:
6 // Created: 1998-01-01
7 // RCS-ID: $Id$
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_RADIOBOX_H_
13 #define _WX_RADIOBOX_H_
14
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "radiobox.h"
17 #endif
18
19 // List box item
20 class WXDLLEXPORT wxBitmap ;
21
22 class WXDLLEXPORT wxRadioButton ;
23
24 class WXDLLEXPORT wxRadioBox: public wxControl, public wxRadioBoxBase
25 {
26 DECLARE_DYNAMIC_CLASS(wxRadioBox)
27 public:
28 // Constructors & destructor
29 wxRadioBox();
30 inline wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
31 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
32 int n = 0, const wxString choices[] = NULL,
33 int majorDim = 0, long style = wxRA_HORIZONTAL,
34 const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
35 {
36 Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
37 }
38 inline wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
39 const wxPoint& pos, const wxSize& size,
40 const wxArrayString& choices,
41 int majorDim = 0, long style = wxRA_HORIZONTAL,
42 const wxValidator& val = wxDefaultValidator,
43 const wxString& name = wxRadioBoxNameStr)
44 {
45 Create(parent, id, title, pos, size, choices,
46 majorDim, style, val, name);
47 }
48 ~wxRadioBox();
49 bool Create(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,
53 const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
54 bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
55 const wxPoint& pos, const wxSize& size,
56 const wxArrayString& choices,
57 int majorDim = 0, long style = wxRA_HORIZONTAL,
58 const wxValidator& val = wxDefaultValidator,
59 const wxString& name = wxRadioBoxNameStr);
60
61 // Specific functions (in wxWidgets2 reference)
62 virtual void SetSelection(int item);
63 virtual int GetSelection() const;
64
65 inline virtual int GetCount() const { return m_noItems; } ;
66
67 virtual wxString GetString(int item) const;
68 virtual void SetString(int item, const wxString& label) ;
69
70 virtual bool Enable(int item, bool enable = true);
71 virtual bool Show(int item, bool show = true);
72
73 virtual int GetColumnCount() const ;
74 virtual int GetRowCount() const ;
75
76 virtual bool Enable(bool enable = true);
77 virtual wxString GetLabel() const;
78 virtual void SetLabel(const wxString& label) ;
79 virtual bool Show(bool show = true);
80
81 // Other external functions
82 void Command(wxCommandEvent& event);
83 void SetFocus();
84
85 // Other variable access functions
86 inline int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; }
87 inline void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
88
89 void OnRadioButton( wxCommandEvent& event ) ;
90 protected:
91 wxRadioButton *m_radioButtonCycle;
92
93 int m_majorDim ;
94 int m_noItems;
95 int m_noRowsOrCols;
96
97 // Internal functions
98 virtual wxSize DoGetBestSize() const ;
99 virtual void DoSetSize(int x, int y,
100 int width, int height,
101 int sizeFlags = wxSIZE_AUTO);
102
103 DECLARE_EVENT_TABLE()
104 };
105
106 #endif
107 // _WX_RADIOBOX_H_