+void wxCheckBox::DoSet3StateValue(wxCheckBoxState state)
+{
+ Status status;
+ switch ( state )
+ {
+ case wxCHK_UNCHECKED: status = Status_Unchecked; break;
+ case wxCHK_CHECKED: status = Status_Checked; break;
+ default: wxFAIL_MSG(wxT("Unknown checkbox state"));
+ case wxCHK_UNDETERMINED: status = Status_3rdState; break;
+ }
+ if ( status != m_status )
+ {
+ m_status = status;
+
+ if ( m_status == Status_Checked )
+ {
+ // invoke the hook
+ OnCheck();
+ }
+
+ Refresh();
+ }
+}
+
+wxCheckBoxState wxCheckBox::DoGet3StateValue() const
+{
+ switch ( m_status )
+ {
+ case Status_Checked: return wxCHK_CHECKED;
+ case Status_Unchecked: return wxCHK_UNCHECKED;
+ default: /* go further */ break;
+ }
+ return wxCHK_UNDETERMINED;
+}
+