virtual void DoSetBitmapPosition(wxDirection dir);
private:
+ typedef wxButtonBase base_type;
+
// common part of all ctors
void Init()
{
// show the given bitmap (must be valid)
void GTKDoShowBitmap(const wxBitmap& bitmap);
-
// the bitmaps for the different state of the buttons, all of them may be
// invalid and the button only shows a bitmap at all if State_Normal bitmap
// is valid
// true iff the button is in pressed state
bool m_isPressed;
-
DECLARE_DYNAMIC_CLASS(wxButton)
};
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
+ // implementation
+ void GTKDisableEvents();
+ void GTKEnableEvents();
+
protected:
virtual wxSize DoGetBestSize() const;
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
void DoSet3StateValue(wxCheckBoxState state);
wxCheckBoxState DoGet3StateValue() const;
-public:
- // implementation
- void GTKDisableEvents();
- void GTKEnableEvents();
+private:
+ typedef wxCheckBoxBase base_type;
GtkWidget *m_widgetCheckbox;
GtkWidget *m_widgetLabel;
-private:
DECLARE_DYNAMIC_CLASS(wxCheckBox)
};
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
+private:
+ typedef wxControl base_type;
+
DECLARE_DYNAMIC_CLASS(wxRadioButton)
};
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
private:
+ typedef wxSpinButtonBase base_type;
+
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxSpinButton)
};
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
private:
+ typedef wxToggleButtonBase base_type;
+
DECLARE_DYNAMIC_CLASS(wxBitmapToggleButton)
};
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
private:
+ typedef wxToggleButtonBase base_type;
+
DECLARE_DYNAMIC_CLASS(wxToggleButton)
};
bool wxButton::Enable( bool enable )
{
- bool isEnabled = IsEnabled();
-
- if ( !wxControl::Enable( enable ) )
+ if (!base_type::Enable(enable))
return false;
gtk_widget_set_sensitive(GTK_BIN(m_widget)->child, enable);
- if (!isEnabled && enable)
- {
+ if (enable)
GTKFixSensitivity();
- }
GTKUpdateBitmap();
bool wxCheckBox::Enable( bool enable )
{
- bool isEnabled = IsEnabled();
-
- if ( !wxControl::Enable( enable ) )
+ if (!base_type::Enable(enable))
return false;
gtk_widget_set_sensitive( m_widgetLabel, enable );
- if (!isEnabled && enable)
- {
+ if (enable)
GTKFixSensitivity();
- }
return true;
}
bool wxRadioBox::Enable( bool enable )
{
- bool isEnabled = IsEnabled();
-
if ( !wxControl::Enable( enable ) )
return false;
node = node->GetNext();
}
- if (!isEnabled && enable)
- {
+ if (enable)
GTKFixSensitivity();
- }
return true;
}
bool wxRadioButton::Enable( bool enable )
{
- bool isEnabled = IsEnabled();
-
- if ( !wxControl::Enable( enable ) )
+ if (!base_type::Enable(enable))
return false;
gtk_widget_set_sensitive(GTK_BIN(m_widget)->child, enable);
- if (!isEnabled && enable)
- {
+ if (enable)
GTKFixSensitivity();
- }
return true;
}
bool wxSpinButton::Enable( bool enable )
{
- bool isEnabled = IsEnabled();
-
- if ( !wxControl::Enable( enable ) )
+ if (!base_type::Enable(enable))
return false;
// Work around lack of visual update when enabling
- if (!isEnabled && enable)
+ if (enable)
GTKFixSensitivity(false /* fix even if not under mouse */);
return true;
bool wxToggleButton::Enable(bool enable /*=true*/)
{
- bool isEnabled = IsEnabled();
-
- if (!wxControl::Enable(enable))
+ if (!base_type::Enable(enable))
return false;
gtk_widget_set_sensitive(GTK_BIN(m_widget)->child, enable);
- if (!isEnabled && enable)
- {
+ if (enable)
GTKFixSensitivity();
- }
return true;
}