+ GTKDisableEvents();
+
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(m_widgetCheckbox), state );
+
+ GTKEnableEvents();
+}
+
+bool wxCheckBox::GetValue() const
+{
+ wxCHECK_MSG( m_widgetCheckbox != NULL, false, wxT("invalid checkbox") );
+
+ return gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(m_widgetCheckbox));
+}
+
+void wxCheckBox::DoSet3StateValue(wxCheckBoxState state)
+{
+ SetValue(state != wxCHK_UNCHECKED);
+ gtk_toggle_button_set_inconsistent(GTK_TOGGLE_BUTTON(m_widgetCheckbox),
+ state == wxCHK_UNDETERMINED);
+}
+
+wxCheckBoxState wxCheckBox::DoGet3StateValue() const
+{
+ if (gtk_toggle_button_get_inconsistent(GTK_TOGGLE_BUTTON(m_widgetCheckbox)))
+ {
+ return wxCHK_UNDETERMINED;
+ }
+ else
+ {
+ return GetValue() ? wxCHK_CHECKED : wxCHK_UNCHECKED;
+ }
+}
+
+void wxCheckBox::SetLabel( const wxString& label )
+{
+ wxCHECK_RET( m_widgetLabel != NULL, wxT("invalid checkbox") );
+
+ // save the label inside m_label in case user calls GetLabel() later
+ wxControl::SetLabel(label);
+
+ GTKSetLabelForLabel(GTK_LABEL(m_widgetLabel), label);
+}
+
+bool wxCheckBox::Enable( bool enable )
+{
+ if (!base_type::Enable(enable))
+ return false;
+
+ gtk_widget_set_sensitive( m_widgetLabel, enable );
+
+ if (enable)
+ GTKFixSensitivity();
+
+ return true;
+}
+
+void wxCheckBox::DoApplyWidgetStyle(GtkRcStyle *style)
+{
+ gtk_widget_modify_style(m_widgetCheckbox, style);
+ gtk_widget_modify_style(m_widgetLabel, style);
+}
+
+GdkWindow *wxCheckBox::GTKGetWindow(wxArrayGdkWindows& WXUNUSED(windows)) const
+{
+ return GTK_BUTTON(m_widgetCheckbox)->event_window;
+}
+
+// static
+wxVisualAttributes
+wxCheckBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
+{
+ return GetDefaultAttributesFromGTKWidget(gtk_check_button_new);
+}
+
+#endif