wxProp now intercepts EVT_TEXT_ENTER instead of EVT_TEXT

Added Checkbox::SetLabel


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1998-09-07 14:44:38 +00:00
parent b4071e913e
commit 83058c584f
8 changed files with 34 additions and 11 deletions

View File

@@ -38,5 +38,6 @@ Implement wxPalette
Implement wxDirDialog
Implement CopyOnWrite (unshare) for GDI objects
Support cooperation between Qt and wxWindows
Fix toolbar tips
TrueType support (just kidding)

View File

@@ -58,7 +58,9 @@ class wxCheckBox: public wxControl
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr );
void SetValue( bool state );
bool GetValue(void) const;
bool GetValue() const;
void SetLabel( const wxString& label );
void SetFont( const wxFont &font );
void Enable( bool enable );
};

View File

@@ -58,7 +58,9 @@ class wxCheckBox: public wxControl
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr );
void SetValue( bool state );
bool GetValue(void) const;
bool GetValue() const;
void SetLabel( const wxString& label );
void SetFont( const wxFont &font );
void Enable( bool enable );
};

View File

@@ -83,12 +83,20 @@ void wxCheckBox::SetValue( bool state )
gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_widget), GTK_STATE_NORMAL );
}
bool wxCheckBox::GetValue(void) const
bool wxCheckBox::GetValue() const
{
GtkToggleButton *tb = GTK_TOGGLE_BUTTON(m_widget);
return tb->active;
}
void wxCheckBox::SetLabel( const wxString& label )
{
wxControl::SetLabel( label );
GtkButton *bin = GTK_BUTTON( m_widget );
GtkLabel *g_label = GTK_LABEL( bin->child );
gtk_label_set( g_label, GetLabel() );
}
void wxCheckBox::Enable( bool enable )
{
wxControl::Enable( enable );

View File

@@ -78,7 +78,7 @@ static gint gtk_toolbar_enter_callback( GtkWidget *WXUNUSED(widget),
tool->m_owner->OnMouseEnter( tool->m_index );
return TRUE;
return FALSE;
}
//-----------------------------------------------------------------------------
@@ -188,8 +188,9 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap,
GtkToolbarChildType ctype = GTK_TOOLBAR_CHILD_BUTTON;
if (toggle) ctype = GTK_TOOLBAR_CHILD_TOGGLEBUTTON;
tool->m_item = gtk_toolbar_append_element( m_toolbar, ctype, (GtkWidget *) NULL, (const char *) NULL, helpString1, "", tool_pixmap,
(GtkSignalFunc)gtk_toolbar_callback, (gpointer)tool );
tool->m_item = gtk_toolbar_append_element(
m_toolbar, ctype, (GtkWidget *) NULL, (const char *) NULL, helpString1, "",
tool_pixmap, (GtkSignalFunc)gtk_toolbar_callback, (gpointer)tool );
gtk_signal_connect( GTK_OBJECT(tool->m_item), "enter_notify_event",
GTK_SIGNAL_FUNC(gtk_toolbar_enter_callback), (gpointer)tool );

View File

@@ -83,12 +83,20 @@ void wxCheckBox::SetValue( bool state )
gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_widget), GTK_STATE_NORMAL );
}
bool wxCheckBox::GetValue(void) const
bool wxCheckBox::GetValue() const
{
GtkToggleButton *tb = GTK_TOGGLE_BUTTON(m_widget);
return tb->active;
}
void wxCheckBox::SetLabel( const wxString& label )
{
wxControl::SetLabel( label );
GtkButton *bin = GTK_BUTTON( m_widget );
GtkLabel *g_label = GTK_LABEL( bin->child );
gtk_label_set( g_label, GetLabel() );
}
void wxCheckBox::Enable( bool enable )
{
wxControl::Enable( enable );

View File

@@ -78,7 +78,7 @@ static gint gtk_toolbar_enter_callback( GtkWidget *WXUNUSED(widget),
tool->m_owner->OnMouseEnter( tool->m_index );
return TRUE;
return FALSE;
}
//-----------------------------------------------------------------------------
@@ -188,8 +188,9 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap,
GtkToolbarChildType ctype = GTK_TOOLBAR_CHILD_BUTTON;
if (toggle) ctype = GTK_TOOLBAR_CHILD_TOGGLEBUTTON;
tool->m_item = gtk_toolbar_append_element( m_toolbar, ctype, (GtkWidget *) NULL, (const char *) NULL, helpString1, "", tool_pixmap,
(GtkSignalFunc)gtk_toolbar_callback, (gpointer)tool );
tool->m_item = gtk_toolbar_append_element(
m_toolbar, ctype, (GtkWidget *) NULL, (const char *) NULL, helpString1, "",
tool_pixmap, (GtkSignalFunc)gtk_toolbar_callback, (gpointer)tool );
gtk_signal_connect( GTK_OBJECT(tool->m_item), "enter_notify_event",
GTK_SIGNAL_FUNC(gtk_toolbar_enter_callback), (gpointer)tool );

View File

@@ -1719,7 +1719,7 @@ BEGIN_EVENT_TABLE(wxPropertyStringListEditorDialog, wxDialog)
EVT_BUTTON(wxID_PROP_SL_ADD, wxPropertyStringListEditorDialog::OnAdd)
EVT_BUTTON(wxID_PROP_SL_DELETE, wxPropertyStringListEditorDialog::OnDelete)
EVT_LISTBOX(wxID_PROP_SL_STRINGS, wxPropertyStringListEditorDialog::OnStrings)
EVT_TEXT(wxID_PROP_SL_TEXT, wxPropertyStringListEditorDialog::OnText)
EVT_TEXT_ENTER(wxID_PROP_SL_TEXT, wxPropertyStringListEditorDialog::OnText)
END_EVENT_TABLE()
class wxPropertyStringListEditorText: public wxTextCtrl