+ NULL);
+}
+
+void wxCheckBox::DoSet3StateValue(wxCheckBoxState state)
+{
+ m_inSetValue = true;
+
+#if wxHAS_3STATE
+ unsigned char value;
+
+ switch (state)
+ {
+ case wxCHK_UNCHECKED: value = XmUNSET; break;
+ case wxCHK_CHECKED: value = XmSET; break;
+ case wxCHK_UNDETERMINED: value = XmINDETERMINATE; break;
+ default: wxASSERT(0); return;
+ }
+
+ XtVaSetValues( (Widget) m_mainWidget,
+ XmNset, value,
+ NULL );
+#else
+ XmToggleButtonSetState ((Widget) m_mainWidget,
+ state == wxCHK_CHECKED, True);
+#endif
+
+ m_inSetValue = false;
+}
+
+wxCheckBoxState wxCheckBox::DoGet3StateValue() const
+{
+#if wxHAS_3STATE
+ unsigned char value = 0;
+
+ XtVaGetValues( (Widget) m_mainWidget,
+ XmNset, &value,
+ NULL );
+
+ switch (value)
+ {
+ case XmUNSET: return wxCHK_UNCHECKED;
+ case XmSET: return wxCHK_CHECKED;
+ case XmINDETERMINATE: return wxCHK_UNDETERMINED;
+ }
+
+ // impossible...
+ return wxCHK_UNDETERMINED;
+#else
+ return wxCheckBoxState(XmToggleButtonGetState ((Widget) m_mainWidget));
+#endif