]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/radiobox.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/os2/radiobox.h
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 virtual bool Enable(int nItem
, bool bEnable
= true);
107 virtual WXHBRUSH
OnCtlColor( WXHDC hDC
114 virtual bool OS2Command( WXUINT uParam
117 void SendNotificationEvent(void);
118 virtual bool Show(int nItem
, bool bShow
= true);
119 virtual bool Show(bool bShow
= true);
120 MRESULT
WindowProc( WXUINT uMsg
128 virtual size_t GetCount() const;
129 inline WXHWND
* GetRadioButtons(void) const { return m_ahRadioButtons
; }
130 int GetSelection(void) const;
131 void GetSize( int* pnX
134 inline int GetSizeFlags(void) const { return m_nSizeFlags
; }
135 wxString
GetString(int nIndex
) const;
136 virtual wxString
GetStringSelection(void) const;
138 inline void SetButtonFont(const wxFont
& rFont
) { SetFont(rFont
); }
140 virtual bool SetFont(const wxFont
& rFont
);
141 inline void SetLabelFont(const wxFont
& WXUNUSED(font
)) {};
142 void SetSelection(int nIndex
);
143 virtual void SetString( int nNum
144 ,const wxString
& rsLabel
146 virtual bool SetStringSelection(const wxString
& rsStr
);
148 virtual void SetLabel(const wxString
& rsLabel
)
149 { wxControl::SetLabel(rsLabel
); }
150 virtual wxString
GetLabel() const
151 { return wxControl::GetLabel(); }
153 void SetLabel( int nItem
, const wxString
& rsLabel
);
154 void SetLabel( int item
, wxBitmap
* pBitmap
);
155 wxString
GetLabel(int nItem
) const;
158 virtual wxSize
DoGetBestSize(void) const;
159 virtual void DoSetSize( int nX
163 ,int nSizeFlags
= wxSIZE_AUTO
165 wxSize
GetMaxButtonSize(void) const;
166 wxSize
GetTotalButtonSize(const wxSize
& rSizeBtn
) const;
167 void SubclassRadioButton(WXHWND hWndBtn
);
170 WXHWND
* m_ahRadioButtons
;
171 int* m_pnRadioWidth
; // for bitmaps
172 int* m_pnRadioHeight
;
173 int m_nSelectedButton
;
180 DECLARE_DYNAMIC_CLASS(wxRadioBox
)
181 }; // end of wxRadioBox
183 #endif // _WX_RADIOBOX_H_