]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/radiobox.h
First pass at adding MicroWindows support
[wxWidgets.git] / include / wx / mac / radiobox.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: radiobox.h
3 // Purpose: wxRadioBox class
4 // Author: AUTHOR
5 // Modified by:
6 // Created: ??/??/98
7 // RCS-ID: $Id$
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_RADIOBOX_H_
13 #define _WX_RADIOBOX_H_
14
15 #ifdef __GNUG__
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 ~wxRadioBox();
39 bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
40 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
41 int n = 0, const wxString choices[] = NULL,
42 int majorDim = 0, long style = wxRA_HORIZONTAL,
43 const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
44
45 // Specific functions (in wxWindows2 reference)
46 bool Enable(bool enable);
47 void Enable(int item, bool enable);
48 int FindString(const wxString& s) const;
49 wxString GetLabel() const;
50 wxString GetLabel(int item) const;
51 int GetSelection() const;
52 wxString GetString(int item) const;
53 virtual wxString GetStringSelection() const;
54 inline virtual int GetCount() const { return m_noItems; } ;
55 void SetLabel(const wxString& label) ;
56 void SetLabel(int item, const wxString& label) ;
57 void SetSelection(int item);
58 virtual bool SetStringSelection(const wxString& s);
59 bool Show(bool show);
60 void Show(int item, bool show) ;
61
62 // Other external functions
63 void Command(wxCommandEvent& event);
64 void SetFocus();
65
66 // Other variable access functions
67 inline int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; }
68 inline void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
69
70 void OnRadioButton( wxCommandEvent& event ) ;
71 protected:
72 wxRadioButton *m_radioButtonCycle;
73
74 int m_majorDim ;
75 int m_noItems;
76 int m_noRowsOrCols;
77
78 // Internal functions
79 virtual void DoSetSize(int x, int y,
80 int width, int height,
81 int sizeFlags = wxSIZE_AUTO);
82 int GetNumHor() const;
83 int GetNumVer() const;
84
85 DECLARE_EVENT_TABLE()
86 };
87
88 #endif
89 // _WX_RADIOBOX_H_