+ return (wxCheckBoxState) ::GetControl32BitValue( (ControlHandle) m_macControl );
+}
+
+void wxCheckBox::DoSet3StateValue(wxCheckBoxState val)
+{
+ ::SetControl32BitValue( (ControlHandle) m_macControl , (int) val) ;
+ MacRedrawControl() ;
+}
+
+void wxCheckBox::MacHandleControlClick( WXWidget WXUNUSED(control), wxInt16 WXUNUSED(controlpart) , bool WXUNUSED(mouseStillDown) )
+{
+ wxCommandEvent event(wxEVT_COMMAND_CHECKBOX_CLICKED, m_windowId );
+ wxCheckBoxState state = Get3StateValue();
+
+ if (state == wxCHK_UNCHECKED)
+ {
+ state = wxCHK_CHECKED;
+ }
+ else if (state == wxCHK_CHECKED)
+ {
+ // If the style flag to allow the user setting the undetermined state
+ // is set, then set the state to undetermined. Otherwise set state to
+ // unchecked.
+ if ( Is3rdStateAllowedForUser() )
+ {
+ state = wxCHK_UNDETERMINED;
+ }
+ else
+ {
+ state = wxCHK_UNCHECKED;
+ }
+ }
+ else if (state == wxCHK_UNDETERMINED)
+ {
+ state = wxCHK_UNCHECKED;
+ }
+ Set3StateValue(state);
+
+ event.SetInt(state);
+ event.SetEventObject(this);
+ ProcessCommand(event);