]>
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
 
  52     bool Create( wxWindow
*          pParent
 
  54                 ,const wxString
&    rsTitle
 
  55                 ,const wxPoint
&     rPos 
= wxDefaultPosition
 
  56                 ,const wxSize
&      rSize 
= wxDefaultSize
 
  58                 ,const wxString     asChoices
[] = NULL
 
  60                 ,long               lStyle 
= wxRA_HORIZONTAL
 
  61                 ,const wxValidator
& rVal 
= wxDefaultValidator
 
  62                 ,const wxString
&    rsName 
= wxRadioBoxNameStr
 
  65     void             Command(wxCommandEvent
& rEvent
); 
  66     bool             ContainsHWND(WXHWND hWnd
) const; 
  67     virtual bool     Enable(bool bEnable 
= TRUE
); 
  68     void             Enable( int  nItem
 
  71     int              FindString(const wxString
& sStr
) const; 
  73     virtual WXHBRUSH 
OnCtlColor( WXHDC    hDC
 
  80     virtual bool     OS2Command( WXUINT uParam
 
  83     void             SendNotificationEvent(void); 
  84     virtual void     Show( int  nItem
 
  87     bool             Show(bool bShow
); 
  88     MRESULT          
WindowProc( WXUINT   uMsg
 
  96            virtual int      GetColumnCount(void) const; 
  97            virtual int      GetCount(void) const; 
  98     inline         int      GetNumberOfRowsOrCols(void) const { return m_nNoRowsOrCols
; } 
  99                    int      GetNumHor(void) const; 
 100                    int      GetNumVer(void) const; 
 101                    void     GetPosition( int* pnX
 
 104     inline         WXHWND
*  GetRadioButtons(void) const { return m_ahRadioButtons
; } 
 105            virtual int      GetRowCount(void) const; 
 106                    int      GetSelection(void) const; 
 107                    void     GetSize( int* pnX
 
 110     inline         int      GetSizeFlags(void) const { return m_nSizeFlags
; } 
 111                    void     AdjustButtons( int nX
 
 117                    wxString 
GetString(int nIndex
) const; 
 118            virtual wxString 
GetStringSelection(void) const; 
 120     inline         void     SetButtonFont(const wxFont
& rFont
) { SetFont(rFont
); } 
 122            virtual bool     SetFont(const wxFont
& rFont
); 
 123     inline         void     SetLabelFont(const wxFont
& WXUNUSED(font
)) {}; 
 124     inline         void     SetNumberOfRowsOrCols(int nNum
) { m_nNoRowsOrCols 
= nNum
; } 
 125                    void     SetSelection(int nIndex
); 
 126            virtual void     SetString( int             nNum
 
 127                                       ,const wxString
& rsLabel
 
 129            virtual bool     SetStringSelection(const wxString
& rsStr
); 
 131                    void     SetLabel( int             nItem
 
 132                                      ,const wxString
& rsLabel
 
 134                    void     SetLabel( int       item
 
 137                    wxString 
GetLabel(int nItem
) const; 
 141     virtual wxSize 
DoGetBestSize(void) const; 
 142     virtual void   DoSetSize( int nX
 
 146                              ,int nSizeFlags 
= wxSIZE_AUTO
 
 148     wxSize         
GetMaxButtonSize(void) const; 
 149     wxSize         
GetTotalButtonSize(const wxSize
& rSizeBtn
) const; 
 150     void           SubclassRadioButton(WXHWND hWndBtn
); 
 153     WXHWND
*                         m_ahRadioButtons
; 
 155     int*                            m_pnRadioWidth
;  // for bitmaps 
 156     int*                            m_pnRadioHeight
; 
 159     int                             m_nSelectedButton
; 
 163     inline wxString 
GetLabel() const 
 164     { return wxWindowBase::GetLabel(); } 
 165     inline void     SetLabel(const wxString
& rsLabel
) 
 166     { wxWindowBase::SetLabel(rsLabel
); } 
 168     DECLARE_DYNAMIC_CLASS(wxRadioBox
) 
 169 }; // end of wxRadioBox