]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/radiobox.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxRadioBox class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_RADIOBOX_H_
13 #define _WX_RADIOBOX_H_
16 class WXDLLEXPORT wxBitmap
;
18 class WXDLLEXPORT wxRadioBox
: public wxControl
, public wxRadioBoxBase
23 inline wxRadioBox( wxWindow
* pParent
25 ,const wxString
& rsTitle
26 ,const wxPoint
& rPos
= wxDefaultPosition
27 ,const wxSize
& rSize
= wxDefaultSize
29 ,const wxString asChoices
[] = NULL
31 ,long lStyle
= wxRA_HORIZONTAL
32 ,const wxValidator
& rVal
= wxDefaultValidator
33 ,const wxString
& rsName
= wxRadioBoxNameStr
50 inline wxRadioBox( wxWindow
* pParent
52 ,const wxString
& rsTitle
55 ,const wxArrayString
& asChoices
57 ,long lStyle
= wxRA_HORIZONTAL
58 ,const wxValidator
& rVal
= wxDefaultValidator
59 ,const wxString
& rsName
= wxRadioBoxNameStr
77 bool Create( wxWindow
* pParent
79 ,const wxString
& rsTitle
80 ,const wxPoint
& rPos
= wxDefaultPosition
81 ,const wxSize
& rSize
= wxDefaultSize
83 ,const wxString asChoices
[] = NULL
85 ,long lStyle
= wxRA_HORIZONTAL
86 ,const wxValidator
& rVal
= wxDefaultValidator
87 ,const wxString
& rsName
= wxRadioBoxNameStr
90 bool Create( wxWindow
* pParent
92 ,const wxString
& rsTitle
95 ,const wxArrayString
& asChoices
97 ,long lStyle
= wxRA_HORIZONTAL
98 ,const wxValidator
& rVal
= wxDefaultValidator
99 ,const wxString
& rsName
= wxRadioBoxNameStr
102 void Command(wxCommandEvent
& rEvent
);
103 bool ContainsHWND(WXHWND hWnd
) const;
104 virtual bool Enable(bool bEnable
= TRUE
);
105 void Enable( int nItem
108 int FindString(const wxString
& sStr
) const;
110 virtual WXHBRUSH
OnCtlColor( WXHDC hDC
117 virtual bool OS2Command( WXUINT uParam
120 void SendNotificationEvent(void);
121 virtual void Show( int nItem
124 bool Show(bool bShow
);
125 MRESULT
WindowProc( WXUINT uMsg
133 virtual int GetColumnCount(void) const;
134 virtual int GetCount(void) const;
135 inline int GetNumberOfRowsOrCols(void) const { return m_nNoRowsOrCols
; }
136 int GetNumHor(void) const;
137 int GetNumVer(void) const;
138 void GetPosition( int* pnX
141 inline WXHWND
* GetRadioButtons(void) const { return m_ahRadioButtons
; }
142 virtual int GetRowCount(void) const;
143 int GetSelection(void) const;
144 void GetSize( int* pnX
147 inline int GetSizeFlags(void) const { return m_nSizeFlags
; }
148 void AdjustButtons( int nX
154 wxString
GetString(int nIndex
) const;
155 virtual wxString
GetStringSelection(void) const;
157 inline void SetButtonFont(const wxFont
& rFont
) { SetFont(rFont
); }
159 virtual bool SetFont(const wxFont
& rFont
);
160 inline void SetLabelFont(const wxFont
& WXUNUSED(font
)) {};
161 inline void SetNumberOfRowsOrCols(int nNum
) { m_nNoRowsOrCols
= nNum
; }
162 void SetSelection(int nIndex
);
163 virtual void SetString( int nNum
164 ,const wxString
& rsLabel
166 virtual bool SetStringSelection(const wxString
& rsStr
);
168 void SetLabel( int nItem
169 ,const wxString
& rsLabel
171 void SetLabel( int item
174 wxString
GetLabel(int nItem
) const;
178 virtual wxSize
DoGetBestSize(void) const;
179 virtual void DoSetSize( int nX
183 ,int nSizeFlags
= wxSIZE_AUTO
185 wxSize
GetMaxButtonSize(void) const;
186 wxSize
GetTotalButtonSize(const wxSize
& rSizeBtn
) const;
187 void SubclassRadioButton(WXHWND hWndBtn
);
190 WXHWND
* m_ahRadioButtons
;
192 int* m_pnRadioWidth
; // for bitmaps
193 int* m_pnRadioHeight
;
196 int m_nSelectedButton
;
200 inline wxString
GetLabel() const
201 { return wxWindowBase::GetLabel(); }
202 inline void SetLabel(const wxString
& rsLabel
)
203 { wxWindowBase::SetLabel(rsLabel
); }
205 DECLARE_DYNAMIC_CLASS(wxRadioBox
)
206 }; // end of wxRadioBox