Added wxDC:DrawPolygone

Corrected wxBitmap::SetLabel
  Added wxASSERT here and there
  wxDropSource:DoDrop() now returns Cancel when supposed to


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1998-08-08 13:11:54 +00:00
parent 7c23a0b01b
commit b6af8d80dc
23 changed files with 243 additions and 46 deletions

View File

@@ -122,11 +122,17 @@ int wxChoice::FindString( const wxString &string ) const
GtkBin *bin = GTK_BIN( child->data );
GtkLabel *label = NULL;
if (bin->child) label = GTK_LABEL(bin->child);
wxASSERT_MSG( label != NULL , "wxChoice: invalid label" );
if (!label) label = GTK_LABEL( GTK_BUTTON(m_widget)->child );
if (string == label->label) return count;
child = child->next;
count++;
};
wxFAIL_MSG( "wxChoice: string not found" );
return -1;
};
@@ -147,6 +153,9 @@ int wxChoice::GetSelection(void)
child = child->next;
count++;
};
wxFAIL_MSG( "wxChoice: no selection" );
return -1;
};
@@ -162,18 +171,27 @@ wxString wxChoice::GetString( int n ) const
{
GtkLabel *label = NULL;
if (bin->child) label = GTK_LABEL(bin->child);
wxASSERT_MSG( label != NULL , "wxChoice: invalid label" );
if (!label) label = GTK_LABEL( GTK_BUTTON(m_widget)->child );
return label->label;
};
child = child->next;
count++;
};
wxFAIL_MSG( "wxChoice: string not found" );
return "";
};
wxString wxChoice::GetStringSelection(void) const
{
GtkLabel *label = GTK_LABEL( GTK_BUTTON(m_widget)->child );
wxASSERT_MSG( label != NULL , "wxChoice: invalid label" );
return label->label;
};