/[pcsx2_0.9.7]/trunk/common/include/Utilities/pxCheckBox.h
ViewVC logotype

Diff of /trunk/common/include/Utilities/pxCheckBox.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 61 by william, Tue Sep 7 03:24:11 2010 UTC revision 62 by william, Tue Sep 7 11:08:22 2010 UTC
# Line 32  protected: Line 32  protected:
32          wxCheckBox*             m_checkbox;          wxCheckBox*             m_checkbox;
33          pxStaticText*   m_subtext;          pxStaticText*   m_subtext;
34    
35            // padding below the subtext (if there's subtext).  If there's no subtext, this value is unused.
36            int                             m_subPadding;
37    
38            wxSizerItem*    m_sizerItem_subtext;
39  public:  public:
40          pxCheckBox( wxWindow* parent, const wxString& label, const wxString& subtext=wxEmptyString );          pxCheckBox( wxWindow* parent, const wxString& label, const wxString& subtext=wxEmptyString, int flags = wxCHK_2STATE );
41            pxCheckBox( wxWindow* parent, const wxString& label, int flags );
42          virtual ~pxCheckBox() throw() {}          virtual ~pxCheckBox() throw() {}
43    
44          bool HasSubText() const { return m_subtext != NULL; }          bool HasSubText() const { return m_subtext != NULL; }
45          const pxStaticText* GetSubText() const { return m_subtext; }          const pxStaticText* GetSubText() const { return m_subtext; }
46    
47            pxCheckBox& SetSubPadding( int pad );
48          pxCheckBox& SetToolTip( const wxString& tip );          pxCheckBox& SetToolTip( const wxString& tip );
49          pxCheckBox& SetValue( bool val );          pxCheckBox& SetValue( bool val );
50          bool GetValue() const;          pxCheckBox& SetIndeterminate();
51          bool IsChecked() const { pxAssert( m_checkbox != NULL ); return m_checkbox->IsChecked(); }          pxCheckBox& SetState( wxCheckBoxState state );
52    
53          operator wxCheckBox&() { pxAssert( m_checkbox != NULL ); return *m_checkbox; }          wxCheckBoxState GetState() const        { pxAssume( m_checkbox != NULL ); return m_checkbox->Get3StateValue(); }
54          operator const wxCheckBox&() const { pxAssert( m_checkbox != NULL ); return *m_checkbox; }          bool GetValue() const                           { pxAssume( m_checkbox != NULL ); return m_checkbox->GetValue(); }
55            bool IsChecked() const                          { pxAssume( m_checkbox != NULL ); return m_checkbox->IsChecked(); }
56            bool IsIndeterminate() const            { pxAssume( m_checkbox != NULL ); return m_checkbox->Get3StateValue() == wxCHK_UNDETERMINED; }
57            operator wxCheckBox&()                          { pxAssume( m_checkbox != NULL ); return *m_checkbox; }
58            operator const wxCheckBox&() const      { pxAssume( m_checkbox != NULL ); return *m_checkbox; }
59    
60          wxCheckBox* GetWxPtr() { return m_checkbox; }          wxCheckBox* GetWxPtr() { return m_checkbox; }
61          const wxCheckBox* GetWxPtr() const { return m_checkbox; }          const wxCheckBox* GetWxPtr() const { return m_checkbox; }
# Line 53  public: Line 63  public:
63          //wxWindowID GetId() const { pxAssert( m_checkbox != NULL ); return m_checkbox->GetId(); }          //wxWindowID GetId() const { pxAssert( m_checkbox != NULL ); return m_checkbox->GetId(); }
64    
65  protected:  protected:
66          void Init( const wxString& label, const wxString& subtext );          void Init( const wxString& label, const wxString& subtext, int flags );
67          void OnCheckpartCommand( wxCommandEvent& evt );          void OnCheckpartCommand( wxCommandEvent& evt );
68          void OnSubtextClicked( wxCommandEvent& evt );          void OnSubtextClicked( wxCommandEvent& evt );
69  };  };

Legend:
Removed from v.61  
changed lines
  Added in v.62

  ViewVC Help
Powered by ViewVC 1.1.22