]>
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
33 ,const wxValidator
& rVal
= wxDefaultValidator
35 ,const wxString
& rsName
= wxRadioBoxNameStr
56 bool Create( wxWindow
* pParent
58 ,const wxString
& rsTitle
59 ,const wxPoint
& rPos
= wxDefaultPosition
60 ,const wxSize
& rSize
= wxDefaultSize
62 ,const wxString asChoices
[] = NULL
64 ,long lStyle
= wxRA_HORIZONTAL
66 ,const wxValidator
& rVal
= wxDefaultValidator
68 ,const wxString
& rsName
= wxRadioBoxNameStr
71 void Command(wxCommandEvent
& rEvent
);
72 bool ContainsHWND(WXHWND hWnd
) const;
73 virtual bool Enable(bool bEnable
= TRUE
);
74 void Enable( int nItem
77 int FindString(const wxString
& sStr
) const;
79 virtual WXHBRUSH
OnCtlColor( WXHDC hDC
86 virtual bool OS2Command( WXUINT uParam
89 void SendNotificationEvent(void);
90 virtual void Show( int nItem
93 bool Show(bool bShow
);
94 MRESULT
WindowProc( WXUINT uMsg
102 virtual int GetColumnCount(void) const;
103 virtual int GetCount(void) const;
104 inline int GetNumberOfRowsOrCols(void) const { return m_nNoRowsOrCols
; }
105 int GetNumHor(void) const;
106 int GetNumVer(void) const;
107 void GetPosition( int* pnX
110 inline WXHWND
* GetRadioButtons(void) const { return m_ahRadioButtons
; }
111 virtual int GetRowCount(void) const;
112 int GetSelection(void) const;
113 void GetSize( int* pnX
116 inline int GetSizeFlags(void) const { return m_nSizeFlags
; }
117 void AdjustButtons( int nX
123 wxString
GetString(int nIndex
) const;
124 virtual wxString
GetStringSelection(void) const;
126 inline void SetButtonFont(const wxFont
& rFont
) { SetFont(rFont
); }
128 virtual bool SetFont(const wxFont
& rFont
);
129 inline void SetLabelFont(const wxFont
& WXUNUSED(font
)) {};
130 inline void SetNumberOfRowsOrCols(int nNum
) { m_nNoRowsOrCols
= nNum
; }
131 void SetSelection(int nIndex
);
132 virtual void SetString( int nNum
133 ,const wxString
& rsLabel
135 virtual bool SetStringSelection(const wxString
& rsStr
);
137 void SetLabel( int nItem
138 ,const wxString
& rsLabel
140 void SetLabel( int item
143 wxString
GetLabel(int nItem
) const;
147 virtual wxSize
DoGetBestSize(void) const;
148 virtual void DoSetSize( int nX
152 ,int nSizeFlags
= wxSIZE_AUTO
154 wxSize
GetMaxButtonSize(void) const;
155 wxSize
GetTotalButtonSize(const wxSize
& rSizeBtn
) const;
156 void SubclassRadioButton(WXHWND hWndBtn
);
159 WXHWND
* m_ahRadioButtons
;
161 int* m_pnRadioWidth
; // for bitmaps
162 int* m_pnRadioHeight
;
165 int m_nSelectedButton
;
169 inline wxString
GetLabel() const
170 { return wxWindowBase::GetLabel(); }
171 inline void SetLabel(const wxString
& rsLabel
)
172 { wxWindowBase::SetLabel(rsLabel
); }
174 DECLARE_DYNAMIC_CLASS(wxRadioBox
)
175 }; // end of wxRadioBox