/[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

--- trunk/common/include/Utilities/pxCheckBox.h	2010/09/07 06:28:05	61
+++ trunk/common/include/Utilities/pxCheckBox.h	2010/09/07 11:08:22	62
@@ -32,20 +32,30 @@
 	wxCheckBox*		m_checkbox;
 	pxStaticText*	m_subtext;
 
+	// padding below the subtext (if there's subtext).  If there's no subtext, this value is unused.
+	int				m_subPadding;
+
+	wxSizerItem*	m_sizerItem_subtext;
 public:
-	pxCheckBox( wxWindow* parent, const wxString& label, const wxString& subtext=wxEmptyString );
+	pxCheckBox( wxWindow* parent, const wxString& label, const wxString& subtext=wxEmptyString, int flags = wxCHK_2STATE );
+	pxCheckBox( wxWindow* parent, const wxString& label, int flags );
 	virtual ~pxCheckBox() throw() {}
 
 	bool HasSubText() const { return m_subtext != NULL; }
 	const pxStaticText* GetSubText() const { return m_subtext; }
 
+	pxCheckBox& SetSubPadding( int pad );
 	pxCheckBox& SetToolTip( const wxString& tip );
 	pxCheckBox& SetValue( bool val );
-	bool GetValue() const;
-	bool IsChecked() const { pxAssert( m_checkbox != NULL ); return m_checkbox->IsChecked(); }
+	pxCheckBox& SetIndeterminate();
+	pxCheckBox& SetState( wxCheckBoxState state );
 
-	operator wxCheckBox&() { pxAssert( m_checkbox != NULL ); return *m_checkbox; }
-	operator const wxCheckBox&() const { pxAssert( m_checkbox != NULL ); return *m_checkbox; }
+	wxCheckBoxState GetState() const	{ pxAssume( m_checkbox != NULL ); return m_checkbox->Get3StateValue(); }
+	bool GetValue() const				{ pxAssume( m_checkbox != NULL ); return m_checkbox->GetValue(); }
+	bool IsChecked() const				{ pxAssume( m_checkbox != NULL ); return m_checkbox->IsChecked(); }
+	bool IsIndeterminate() const		{ pxAssume( m_checkbox != NULL ); return m_checkbox->Get3StateValue() == wxCHK_UNDETERMINED; }
+	operator wxCheckBox&()				{ pxAssume( m_checkbox != NULL ); return *m_checkbox; }
+	operator const wxCheckBox&() const	{ pxAssume( m_checkbox != NULL ); return *m_checkbox; }
 
 	wxCheckBox* GetWxPtr() { return m_checkbox; }
 	const wxCheckBox* GetWxPtr() const { return m_checkbox; }
@@ -53,7 +63,7 @@
 	//wxWindowID GetId() const { pxAssert( m_checkbox != NULL ); return m_checkbox->GetId(); }
 
 protected:
-	void Init( const wxString& label, const wxString& subtext );
+	void Init( const wxString& label, const wxString& subtext, int flags );
 	void OnCheckpartCommand( wxCommandEvent& evt );
 	void OnSubtextClicked( wxCommandEvent& evt );
 };

 

  ViewVC Help
Powered by ViewVC 1.1.22