projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
No changes, just correct a wrong trailing comment in #else.
[wxWidgets.git]
/
src
/
gtk
/
checkbox.cpp
diff --git
a/src/gtk/checkbox.cpp
b/src/gtk/checkbox.cpp
index 82606be7ffda18fb9c6874a8b30b37fc9caf0a27..415b5c4e647c4fc209da434fbbcc4c544d88482d 100644
(file)
--- a/
src/gtk/checkbox.cpp
+++ b/
src/gtk/checkbox.cpp
@@
-90,8
+90,6
@@
static void gtk_checkbox_toggled_callback(GtkWidget *widget, wxCheckBox *cb)
// wxCheckBox
//-----------------------------------------------------------------------------
// wxCheckBox
//-----------------------------------------------------------------------------
-IMPLEMENT_DYNAMIC_CLASS(wxCheckBox,wxControl)
-
wxCheckBox::wxCheckBox()
{
}
wxCheckBox::wxCheckBox()
{
}
@@
-105,6
+103,7
@@
bool wxCheckBox::Create(wxWindow *parent,
const wxValidator& validator,
const wxString &name )
{
const wxValidator& validator,
const wxString &name )
{
+ WXValidateStyle( &style );
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, validator, name ))
{
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, validator, name ))
{
@@
-112,11
+111,6
@@
bool wxCheckBox::Create(wxWindow *parent,
return false;
}
return false;
}
- wxASSERT_MSG( (style & wxCHK_ALLOW_3RD_STATE_FOR_USER) == 0 ||
- (style & wxCHK_3STATE) != 0,
- wxT("Using wxCHK_ALLOW_3RD_STATE_FOR_USER")
- wxT(" style flag for a 2-state checkbox is useless") );
-
if ( style & wxALIGN_RIGHT )
{
// VZ: as I don't know a way to create a right aligned checkbox with
if ( style & wxALIGN_RIGHT )
{
// VZ: as I don't know a way to create a right aligned checkbox with
@@
-217,17
+211,13
@@
void wxCheckBox::SetLabel( const wxString& label )
bool wxCheckBox::Enable( bool enable )
{
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 );
return false;
gtk_widget_set_sensitive( m_widgetLabel, enable );
- if (!isEnabled && enable)
- {
+ if (enable)
GTKFixSensitivity();
GTKFixSensitivity();
- }
return true;
}
return true;
}
@@
-243,11
+233,6
@@
GdkWindow *wxCheckBox::GTKGetWindow(wxArrayGdkWindows& WXUNUSED(windows)) const
return GTK_BUTTON(m_widgetCheckbox)->event_window;
}
return GTK_BUTTON(m_widgetCheckbox)->event_window;
}
-wxSize wxCheckBox::DoGetBestSize() const
-{
- return wxControl::DoGetBestSize();
-}
-
// static
wxVisualAttributes
wxCheckBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
// static
wxVisualAttributes
wxCheckBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))