]>
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_
15 WXDLLEXPORT_DATA(extern const char*) wxRadioBoxNameStr
;
18 class WXDLLEXPORT wxBitmap
;
20 class WXDLLEXPORT wxRadioBox
: public wxControl
, public wxRadioBoxBase
25 inline wxRadioBox( wxWindow
* pParent
27 ,const wxString
& rsTitle
28 ,const wxPoint
& rPos
= wxDefaultPosition
29 ,const wxSize
& rSize
= wxDefaultSize
31 ,const wxString asChoices
[] = NULL
33 ,long lStyle
= wxRA_HORIZONTAL
35 ,const wxValidator
& rVal
= wxDefaultValidator
37 ,const wxString
& rsName
= wxRadioBoxNameStr
58 bool Create( wxWindow
* pParent
60 ,const wxString
& rsTitle
61 ,const wxPoint
& rPos
= wxDefaultPosition
62 ,const wxSize
& rSize
= wxDefaultSize
64 ,const wxString asChoices
[] = NULL
66 ,long lStyle
= wxRA_HORIZONTAL
68 ,const wxValidator
& rVal
= wxDefaultValidator
70 ,const wxString
& rsName
= wxRadioBoxNameStr
73 void Command(wxCommandEvent
& rEvent
);
74 bool ContainsHWND(WXHWND hWnd
) const;
75 bool Enable(bool bEnable
);
76 void Enable( int nItem
79 int FindString(const wxString
& sStr
) const;
81 virtual WXHBRUSH
OnCtlColor( WXHDC hDC
88 virtual bool OS2Command( WXUINT uParam
91 void SendNotificationEvent(void);
95 bool Show(bool bShow
);
96 MRESULT
WindowProc( WXUINT uMsg
104 virtual int GetColumnCount(void) const;
105 virtual int GetCount(void) const;
106 inline int GetNumberOfRowsOrCols(void) const { return m_nNoRowsOrCols
; }
107 int GetNumHor(void) const;
108 int GetNumVer(void) const;
109 void GetPosition( int* pnX
112 inline WXHWND
* GetRadioButtons(void) const { return m_ahRadioButtons
; }
113 virtual int GetRowCount(void) const;
114 int GetSelection(void) const;
115 void GetSize( int* pnX
118 inline int GetSizeFlags(void) const { return m_nSizeFlags
; }
119 void AdjustButtons( int nX
125 wxString
GetString(int nIndex
) const;
126 virtual wxString
GetStringSelection(void) const;
128 inline void SetButtonFont(const wxFont
& rFont
) { SetFont(rFont
); }
130 virtual bool SetFont(const wxFont
& rFont
);
131 inline void SetLabelFont(const wxFont
& WXUNUSED(font
)) {};
132 inline void SetNumberOfRowsOrCols(int nNum
) { m_nNoRowsOrCols
= nNum
; }
133 void SetSelection(int nIndex
);
134 virtual void SetString( int nNum
135 ,const wxString
& rsLabel
137 virtual bool SetStringSelection(const wxString
& rsStr
);
139 void SetLabel( int nItem
140 ,const wxString
& rsLabel
142 void SetLabel( int item
145 wxString
GetLabel(int nItem
) const;
149 virtual wxSize
DoGetBestSize(void) const;
150 virtual void DoSetSize( int nX
154 ,int nSizeFlags
= wxSIZE_AUTO
156 wxSize
GetMaxButtonSize(void) const;
157 wxSize
GetTotalButtonSize(const wxSize
& rSizeBtn
) const;
158 void SubclassRadioButton(WXHWND hWndBtn
);
161 WXHWND
* m_ahRadioButtons
;
163 int* m_pnRadioWidth
; // for bitmaps
164 int* m_pnRadioHeight
;
167 int m_nSelectedButton
;
171 inline wxString
GetLabel() const
172 { return wxWindowBase::GetLabel(); }
173 inline void SetLabel(const wxString
& rsLabel
)
174 { wxWindowBase::SetLabel(rsLabel
); }
176 DECLARE_DYNAMIC_CLASS(wxRadioBox
)
177 }; // end of wxRadioBox