]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/radiobox.h
intel pict fixes
[wxWidgets.git] / include / wx / mac / carbon / radiobox.h
CommitLineData
8cf73271 1/////////////////////////////////////////////////////////////////////////////
8228b893 2// Name: wx/mac/carbon/radiobox.h
8cf73271
SC
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
65571936 9// Licence: wxWindows licence
8cf73271
SC
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_RADIOBOX_H_
13#define _WX_RADIOBOX_H_
14
8cf73271
SC
15// List box item
16class WXDLLEXPORT wxBitmap ;
17
18class WXDLLEXPORT wxRadioButton ;
19
20class WXDLLEXPORT wxRadioBox: public wxControl, public wxRadioBoxBase
21{
22 DECLARE_DYNAMIC_CLASS(wxRadioBox)
23public:
24// Constructors & destructor
25 wxRadioBox();
26 inline wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
27 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
28 int n = 0, const wxString choices[] = NULL,
29 int majorDim = 0, long style = wxRA_HORIZONTAL,
30 const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
31 {
32 Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
33 }
34 inline wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
35 const wxPoint& pos, const wxSize& size,
36 const wxArrayString& choices,
37 int majorDim = 0, long style = wxRA_HORIZONTAL,
38 const wxValidator& val = wxDefaultValidator,
39 const wxString& name = wxRadioBoxNameStr)
40 {
41 Create(parent, id, title, pos, size, choices,
42 majorDim, style, val, name);
43 }
44 ~wxRadioBox();
45 bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
46 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
47 int n = 0, const wxString choices[] = NULL,
48 int majorDim = 0, long style = wxRA_HORIZONTAL,
49 const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
50 bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
51 const wxPoint& pos, const wxSize& size,
52 const wxArrayString& choices,
53 int majorDim = 0, long style = wxRA_HORIZONTAL,
54 const wxValidator& val = wxDefaultValidator,
55 const wxString& name = wxRadioBoxNameStr);
56
77ffb593 57// Specific functions (in wxWidgets2 reference)
8cf73271
SC
58 virtual void SetSelection(int item);
59 virtual int GetSelection() const;
60
8228b893 61 virtual size_t GetCount() const { return m_noItems; } ;
8cf73271
SC
62
63 virtual wxString GetString(int item) const;
64 virtual void SetString(int item, const wxString& label) ;
65
1a87edf2 66 virtual bool Enable(int item, bool enable = true);
6cb0bfdf 67 virtual bool Show(int item, bool show = true);
8cf73271 68
1a87edf2 69 virtual bool Enable(bool enable = true);
8cf73271
SC
70 virtual wxString GetLabel() const;
71 virtual void SetLabel(const wxString& label) ;
1a87edf2 72 virtual bool Show(bool show = true);
8cf73271 73
1a87edf2 74// Other external functions
8cf73271
SC
75 void Command(wxCommandEvent& event);
76 void SetFocus();
77
78// Other variable access functions
79 inline int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; }
80 inline void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
81
82 void OnRadioButton( wxCommandEvent& event ) ;
8228b893 83
8cf73271 84protected:
8228b893 85 wxRadioButton *m_radioButtonCycle;
8cf73271 86
8228b893 87 size_t m_noItems;
8cf73271
SC
88 int m_noRowsOrCols;
89
1a87edf2 90// Internal functions
8cf73271
SC
91 virtual wxSize DoGetBestSize() const ;
92 virtual void DoSetSize(int x, int y,
93 int width, int height,
94 int sizeFlags = wxSIZE_AUTO);
95
96 DECLARE_EVENT_TABLE()
97};
98
99#endif
100 // _WX_RADIOBOX_H_