]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/radiobox.h
added more HP-UX charset names
[wxWidgets.git] / include / wx / os2 / radiobox.h
CommitLineData
0e320a79 1/////////////////////////////////////////////////////////////////////////////
853dcc57 2// Name: wx/os2/radiobox.h
0e320a79 3// Purpose: wxRadioBox class
cdf1e714 4// Author: David Webster
0e320a79 5// Modified by:
cdf1e714 6// Created: 10/12/99
0e320a79 7// RCS-ID: $Id$
cdf1e714 8// Copyright: (c) David Webster
65571936 9// Licence: wxWindows licence
0e320a79
DW
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_RADIOBOX_H_
13#define _WX_RADIOBOX_H_
14
0e320a79 15// List box item
54da4255 16class WXDLLEXPORT wxBitmap ;
0e320a79 17
210a651b 18class WXDLLEXPORT wxRadioBox: public wxControl, public wxRadioBoxBase
0e320a79 19{
0e320a79 20public:
3c299c3a
DW
21 wxRadioBox();
22
23 inline wxRadioBox( wxWindow* pParent
24 ,wxWindowID vId
25 ,const wxString& rsTitle
26 ,const wxPoint& rPos = wxDefaultPosition
27 ,const wxSize& rSize = wxDefaultSize
28 ,int nNum = 0
29 ,const wxString asChoices[] = NULL
30 ,int nMajorDim = 0
31 ,long lStyle = wxRA_HORIZONTAL
3c299c3a 32 ,const wxValidator& rVal = wxDefaultValidator
3c299c3a
DW
33 ,const wxString& rsName = wxRadioBoxNameStr
34 )
35 {
36 Create( pParent
37 ,vId
38 ,rsTitle
39 ,rPos
40 ,rSize
41 ,nNum
42 ,asChoices
43 ,nMajorDim
44 ,lStyle
3c299c3a 45 ,rVal
3c299c3a
DW
46 ,rsName
47 );
48 }
49
584ad2a3
MB
50 inline wxRadioBox( wxWindow* pParent
51 ,wxWindowID vId
52 ,const wxString& rsTitle
53 ,const wxPoint& rPos
54 ,const wxSize& rSize
55 ,const wxArrayString& asChoices
56 ,int nMajorDim = 0
57 ,long lStyle = wxRA_HORIZONTAL
58 ,const wxValidator& rVal = wxDefaultValidator
59 ,const wxString& rsName = wxRadioBoxNameStr
60 )
61 {
62 Create( pParent
63 ,vId
64 ,rsTitle
65 ,rPos
66 ,rSize
67 ,asChoices
68 ,nMajorDim
69 ,lStyle
70 ,rVal
71 ,rsName
72 );
73 }
74
3c299c3a
DW
75 ~wxRadioBox();
76
77 bool Create( wxWindow* pParent
78 ,wxWindowID vId
79 ,const wxString& rsTitle
80 ,const wxPoint& rPos = wxDefaultPosition
81 ,const wxSize& rSize = wxDefaultSize
82 ,int nNum = 0
83 ,const wxString asChoices[] = NULL
84 ,int nMajorDim = 0
85 ,long lStyle = wxRA_HORIZONTAL
3c299c3a 86 ,const wxValidator& rVal = wxDefaultValidator
3c299c3a
DW
87 ,const wxString& rsName = wxRadioBoxNameStr
88 );
89
584ad2a3
MB
90 bool Create( wxWindow* pParent
91 ,wxWindowID vId
92 ,const wxString& rsTitle
93 ,const wxPoint& rPos
94 ,const wxSize& rSize
95 ,const wxArrayString& asChoices
96 ,int nMajorDim = 0
97 ,long lStyle = wxRA_HORIZONTAL
98 ,const wxValidator& rVal = wxDefaultValidator
99 ,const wxString& rsName = wxRadioBoxNameStr
100 );
101
853dcc57
WS
102 void Command(wxCommandEvent& rEvent);
103 bool ContainsHWND(WXHWND hWnd) const;
104 virtual bool Enable(bool bEnable = true);
105 virtual bool Enable(int nItem, bool bEnable = true);
3c299c3a
DW
106
107 virtual WXHBRUSH OnCtlColor( WXHDC hDC
108 ,WXHWND hWnd
109 ,WXUINT uCtlColor
110 ,WXUINT uMessage
111 ,WXWPARAM wParam
112 ,WXLPARAM lParam
113 );
114 virtual bool OS2Command( WXUINT uParam
115 ,WXWORD wId
116 );
117 void SendNotificationEvent(void);
fa50c0e3
WS
118 virtual bool Show(int nItem, bool bShow = true);
119 virtual bool Show(bool bShow = true);
3c299c3a
DW
120 MRESULT WindowProc( WXUINT uMsg
121 ,WXWPARAM wParam
122 ,WXLPARAM lParam
123 );
124
125
126
127
128 virtual int GetColumnCount(void) const;
129 virtual int GetCount(void) const;
130 inline int GetNumberOfRowsOrCols(void) const { return m_nNoRowsOrCols; }
131 int GetNumHor(void) const;
132 int GetNumVer(void) const;
133 void GetPosition( int* pnX
134 ,int* pnY
135 ) const;
136 inline WXHWND* GetRadioButtons(void) const { return m_ahRadioButtons; }
137 virtual int GetRowCount(void) const;
138 int GetSelection(void) const;
139 void GetSize( int* pnX
140 ,int* pnY
141 ) const;
3a50d19c 142 inline int GetSizeFlags(void) const { return m_nSizeFlags; }
3c299c3a
DW
143 void AdjustButtons( int nX
144 ,int nY
145 ,int nWidth
146 ,int nHeight
3a50d19c 147 ,int nSizeFlags
3c299c3a
DW
148 );
149 wxString GetString(int nIndex) const;
150 virtual wxString GetStringSelection(void) const;
151
152 inline void SetButtonFont(const wxFont& rFont) { SetFont(rFont); }
153 void SetFocus(void);
154 virtual bool SetFont(const wxFont& rFont);
155 inline void SetLabelFont(const wxFont& WXUNUSED(font)) {};
156 inline void SetNumberOfRowsOrCols(int nNum) { m_nNoRowsOrCols = nNum; }
157 void SetSelection(int nIndex);
158 virtual void SetString( int nNum
159 ,const wxString& rsLabel
160 );
161 virtual bool SetStringSelection(const wxString& rsStr);
162
163 void SetLabel( int nItem
164 ,const wxString& rsLabel
165 );
166 void SetLabel( int item
167 ,wxBitmap* pBitmap
168 );
169 wxString GetLabel(int nItem) const;
54da4255 170
11e59d47 171
0e320a79 172protected:
3c299c3a
DW
173 virtual wxSize DoGetBestSize(void) const;
174 virtual void DoSetSize( int nX
175 ,int nY
176 ,int nWidth
177 ,int nHeight
178 ,int nSizeFlags = wxSIZE_AUTO
179 );
180 wxSize GetMaxButtonSize(void) const;
181 wxSize GetTotalButtonSize(const wxSize& rSizeBtn) const;
182 void SubclassRadioButton(WXHWND hWndBtn);
183
184
185 WXHWND* m_ahRadioButtons;
186 int m_nMajorDim ;
187 int* m_pnRadioWidth; // for bitmaps
188 int* m_pnRadioHeight;
189 int m_nNoItems;
190 int m_nNoRowsOrCols;
191 int m_nSelectedButton;
192 int m_nSizeFlags;
cdf1e714 193
11e59d47 194private:
3c299c3a
DW
195 inline wxString GetLabel() const
196 { return wxWindowBase::GetLabel(); }
197 inline void SetLabel(const wxString& rsLabel)
198 { wxWindowBase::SetLabel(rsLabel); }
199
200 DECLARE_DYNAMIC_CLASS(wxRadioBox)
201}; // end of wxRadioBox
0e320a79
DW
202
203#endif
204 // _WX_RADIOBOX_H_