]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/checkbox.cpp
Added graying out of menus and buttons
[wxWidgets.git] / src / gtk / checkbox.cpp
index 42c8b4167a52b4acf3df37a2774903342cc68b2b..f42ef1867dde9b8c92e785cda71a16a7d49da0fb 100644 (file)
@@ -34,7 +34,7 @@ static void gtk_checkbox_clicked_callback( GtkWidget *WXUNUSED(widget), wxCheckB
   event.SetInt( cb->GetValue() );
   event.SetEventObject(cb);
   cb->GetEventHandler()->ProcessEvent(event);
-};
+}
 
 //-----------------------------------------------------------------------------
 
@@ -42,23 +42,20 @@ IMPLEMENT_DYNAMIC_CLASS(wxCheckBox,wxControl)
 
 wxCheckBox::wxCheckBox(void)
 {
-};
-
-wxCheckBox::wxCheckBox( wxWindow *parent, wxWindowID id, const wxString &label,
-      const wxPoint &pos, const wxSize &size, 
-      long style, const wxString &name )
-{
-  Create( parent, id, label, pos, size, style, name );
-};
+}
 
 bool wxCheckBox::Create(  wxWindow *parent, wxWindowID id, const wxString &label,
       const wxPoint &pos, const wxSize &size, 
-      long style, const wxString &name )
+      long style, const wxValidator& validator, const wxString &name )
 {
   m_needParent = TRUE;
   
   PreCreation( parent, id, pos, size, style, name );
 
+  SetValidator( validator );
+
+  SetLabel( label );
+
   m_widget = gtk_check_button_new_with_label( label );
  
   wxSize newSize = size;
@@ -74,7 +71,7 @@ bool wxCheckBox::Create(  wxWindow *parent, wxWindowID id, const wxString &label
   Show( TRUE );
     
   return TRUE;
-};
+}
 
 void wxCheckBox::SetValue( bool state )
 {
@@ -82,11 +79,11 @@ void wxCheckBox::SetValue( bool state )
     gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_widget), GTK_STATE_ACTIVE );
   else
     gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_widget), GTK_STATE_NORMAL );
-};
+}
 
 bool wxCheckBox::GetValue(void) const
 {
   GtkToggleButton *tb = GTK_TOGGLE_BUTTON(m_widget);
   return tb->active;
-};
+}