// Name: checkbox.cpp
// Purpose:
// Author: Robert Roebling
-// Id: $id$
+// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
gtk_signal_connect( GTK_OBJECT(m_widget), "clicked",
GTK_SIGNAL_FUNC(gtk_checkbox_clicked_callback), (gpointer*)this );
+ m_parent->AddChild( this );
+
+ (m_parent->m_insertCallback)( m_parent, this );
+
PostCreation();
gtk_widget_realize( GTK_BUTTON( m_widget )->child );
SetLabel( label );
SetBackgroundColour( parent->GetBackgroundColour() );
+ SetForegroundColour( parent->GetForegroundColour() );
Show( TRUE );
gtk_widget_set_sensitive( GTK_BUTTON(m_widget)->child, enable );
}
-void wxCheckBox::SetFont( const wxFont &font )
+void wxCheckBox::ApplyWidgetStyle()
{
- wxCHECK_RET( m_widget != NULL, "invalid checkbox" );
-
- wxControl::SetFont( font );
-
- gtk_widget_set_style( GTK_BUTTON(m_widget)->child,
- gtk_style_ref(
- gtk_widget_get_style( m_widget ) ) );
+ SetWidgetStyle();
+ gtk_widget_set_style( m_widget, m_widgetStyle );
+ gtk_widget_set_style( GTK_BUTTON(m_widget)->child, m_widgetStyle );
}
-void wxCheckBox::SetBackgroundColour( const wxColour &colour )
-{
- return;
-
- wxCHECK_RET( m_widget != NULL, "invalid checkbox" );
-
- wxControl::SetBackgroundColour( colour );
-
- if (!m_backgroundColour.Ok()) return;
-
- gtk_widget_set_style( GTK_BUTTON(m_widget)->child,
- gtk_style_ref(
- gtk_widget_get_style( m_widget ) ) );
-}