Added bitmaps and icons to samples

Fixed event handling in all controls
  Add some missing functions to wxRadioBox
  Fixed clientData stuff to Choice (Combo?)
  No more gtk warning in Combo
  Fixed toolbar sample and mdi sample
  Fixed bug in AddChild resulting from mdi changes
  Fixed wxFrame::GetPosition()
  Changed order of notification calls in wxListCtrl
  to prevent what I think is a reentry bug
  The usual compile fixes here and there


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1998-07-31 20:04:04 +00:00
parent 110f32055e
commit 47908e25f9
62 changed files with 1352 additions and 194 deletions

View File

@@ -19,15 +19,14 @@
// wxChoice
//-----------------------------------------------------------------------------
void gtk_choice_clicked_callback( GtkWidget *WXUNUSED(widget), gpointer data )
void gtk_choice_clicked_callback( GtkWidget *WXUNUSED(widget), wxChoice *choice )
{
wxChoice *choice = (wxChoice*)data;
wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, choice->GetId());
wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, choice->GetId() );
event.SetInt( choice->GetSelection() );
wxString tmp( choice->GetStringSelection() );
event.SetString( WXSTRINGCAST(tmp) );
event.SetEventObject(choice);
choice->ProcessEvent(event);
choice->GetEventHandler()->ProcessEvent(event);
};
//-----------------------------------------------------------------------------
@@ -103,8 +102,8 @@ void wxChoice::Clear(void)
int wxChoice::FindString( const wxString &string ) const
{
// If you read this code once and you think you undestand
// it, then you are very wrong. RR
// If you read this code once and you think you understand
// it, then you are very wrong. Robert Roebling.
GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) );
int count = 0;
@@ -112,7 +111,8 @@ int wxChoice::FindString( const wxString &string ) const
while (child)
{
GtkBin *bin = GTK_BIN( child->data );
GtkLabel *label = GTK_LABEL(bin->child);
GtkLabel *label = NULL;
if (bin->child) label = GTK_LABEL(bin->child);
if (!label) label = GTK_LABEL( GTK_BUTTON(m_widget)->child );
if (string == label->label) return count;
child = child->next;
@@ -151,7 +151,8 @@ wxString wxChoice::GetString( int n ) const
GtkBin *bin = GTK_BIN( child->data );
if (count == n)
{
GtkLabel *label = GTK_LABEL(bin->child);
GtkLabel *label = NULL;
if (bin->child) label = GTK_LABEL(bin->child);
if (!label) label = GTK_LABEL( GTK_BUTTON(m_widget)->child );
return label->label;
};
@@ -188,6 +189,8 @@ void wxChoice::SetSelection( int n )
{
int tmp = n;
gtk_option_menu_set_history( GTK_OPTION_MENU(m_widget), (gint)tmp );
gtk_choice_clicked_callback( NULL, this );
};
void wxChoice::SetStringSelection( const wxString &string )