]> git.saurik.com Git - wxWidgets.git/blame - include/wx/osx/radiobox.h
wxRTC: fixed guidelines overwriting adjacent cell borders; corrected capitalisation...
[wxWidgets.git] / include / wx / osx / radiobox.h
CommitLineData
6762286d 1/////////////////////////////////////////////////////////////////////////////
233f5738 2// Name: wx/osx/radiobox.h
6762286d
SC
3// Purpose: wxRadioBox class
4// Author: Stefan Csomor
5// Modified by:
6// Created: 1998-01-01
6762286d
SC
7// Copyright: (c) Stefan Csomor
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_RADIOBOX_H_
12#define _WX_RADIOBOX_H_
13
14// List box item
15class WXDLLIMPEXP_FWD_CORE wxBitmap ;
16
17class WXDLLIMPEXP_FWD_CORE wxRadioButton ;
18
19class WXDLLIMPEXP_CORE wxRadioBox: public wxControl, public wxRadioBoxBase
20{
21 DECLARE_DYNAMIC_CLASS(wxRadioBox)
22public:
23// Constructors & destructor
24 wxRadioBox();
25 inline wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
26 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
27 int n = 0, const wxString choices[] = NULL,
3998c74b 28 int majorDim = 0, long style = wxRA_SPECIFY_COLS,
6762286d
SC
29 const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
30 {
31 Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
32 }
33 inline wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
34 const wxPoint& pos, const wxSize& size,
35 const wxArrayString& choices,
3998c74b 36 int majorDim = 0, long style = wxRA_SPECIFY_COLS,
6762286d
SC
37 const wxValidator& val = wxDefaultValidator,
38 const wxString& name = wxRadioBoxNameStr)
39 {
40 Create(parent, id, title, pos, size, choices,
41 majorDim, style, val, name);
42 }
43 virtual ~wxRadioBox();
44 bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
45 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
46 int n = 0, const wxString choices[] = NULL,
3998c74b 47 int majorDim = 0, long style = wxRA_SPECIFY_COLS,
6762286d
SC
48 const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
49 bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
50 const wxPoint& pos, const wxSize& size,
51 const wxArrayString& choices,
3998c74b 52 int majorDim = 0, long style = wxRA_SPECIFY_COLS,
6762286d
SC
53 const wxValidator& val = wxDefaultValidator,
54 const wxString& name = wxRadioBoxNameStr);
55
56 // Enabling
57 virtual bool Enable(bool enable = true);
58 virtual bool Enable(unsigned int item, bool enable = true);
59 virtual bool IsItemEnabled(unsigned int item) const;
60
61 // Showing
62 virtual bool Show(bool show = true);
63 virtual bool Show(unsigned int item, bool show = true);
64 virtual bool IsItemShown(unsigned int item) const;
65
66 // Specific functions (in wxWidgets2 reference)
67 virtual void SetSelection(int item);
68 virtual int GetSelection() const;
69
70 virtual unsigned int GetCount() const { return m_noItems; }
71
72 virtual wxString GetString(unsigned int item) const;
73 virtual void SetString(unsigned int item, const wxString& label);
74
75 virtual wxString GetLabel() const;
76 virtual void SetLabel(const wxString& label) ;
77
78 // protect native font of box
79 virtual bool SetFont( const wxFont &font );
80// Other external functions
81 void Command(wxCommandEvent& event);
82 void SetFocus();
83
84// Other variable access functions
85 inline int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; }
86 inline void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
87
88 void OnRadioButton( wxCommandEvent& event ) ;
89
90protected:
e94d46a6
RD
91 // resolve ambiguity in base classes
92 virtual wxBorder GetDefaultBorder() const { return wxRadioBoxBase::GetDefaultBorder(); }
93
6762286d
SC
94 wxRadioButton *m_radioButtonCycle;
95
96 unsigned int m_noItems;
97 int m_noRowsOrCols;
98
99// Internal functions
100 virtual wxSize DoGetBestSize() const ;
101 virtual void DoSetSize(int x, int y,
102 int width, int height,
103 int sizeFlags = wxSIZE_AUTO);
104
105 DECLARE_EVENT_TABLE()
106};
107
5c6eb3a8 108#endif
6762286d 109 // _WX_RADIOBOX_H_