- m_parent->DoAddChild(this);
-
- PostCreation(size);
-
- return true;
-}
-
-// void SetValue(bool state)
-// Set the value of the toggle button.
-void wxToggleBitmapButton::SetValue(bool state)
-{
- wxCHECK_RET(m_widget != NULL, wxT("invalid toggle button"));
-
- if (state == GetValue())
- return;
-
- m_blockEvent = true;
-
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_widget), state);
-
- m_blockEvent = false;
-}
-
-// bool GetValue() const
-// Get the value of the toggle button.
-bool wxToggleBitmapButton::GetValue() const
-{
- wxCHECK_MSG(m_widget != NULL, false, wxT("invalid toggle button"));
-
- return gtk_toggle_button_get_active((GtkToggleButton*)m_widget);
-}
-
-void wxToggleBitmapButton::SetLabel(const wxBitmap& label)
-{
- wxCHECK_RET(m_widget != NULL, wxT("invalid toggle button"));
-
- m_bitmap = label;
- InvalidateBestSize();
-
- OnSetBitmap();
-}
-
-void wxToggleBitmapButton::OnSetBitmap()
-{
- if (!m_bitmap.Ok()) return;
-
- GtkWidget* image = ((GtkBin*)m_widget)->child;
- if (image == NULL)