STL-ification patch for wxMSW and wxGTK.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -156,7 +156,7 @@ void wxChoice::DoSetItemClientData( int n, void* clientData )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, wxT("invalid choice control") );
|
||||
|
||||
wxNode *node = m_clientList.Item( n );
|
||||
wxList::compatibility_iterator node = m_clientList.Item( n );
|
||||
wxCHECK_RET( node, wxT("invalid index in wxChoice::DoSetItemClientData") );
|
||||
|
||||
node->SetData( (wxObject*) clientData );
|
||||
@@ -166,7 +166,7 @@ void* wxChoice::DoGetItemClientData( int n ) const
|
||||
{
|
||||
wxCHECK_MSG( m_widget != NULL, NULL, wxT("invalid choice control") );
|
||||
|
||||
wxNode *node = m_clientList.Item( n );
|
||||
wxList::compatibility_iterator node = m_clientList.Item( n );
|
||||
wxCHECK_MSG( node, NULL, wxT("invalid index in wxChoice::DoGetItemClientData") );
|
||||
|
||||
return node->GetData();
|
||||
@@ -176,7 +176,7 @@ void wxChoice::DoSetItemClientObject( int n, wxClientData* clientData )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, wxT("invalid choice control") );
|
||||
|
||||
wxNode *node = m_clientList.Item( n );
|
||||
wxList::compatibility_iterator node = m_clientList.Item( n );
|
||||
wxCHECK_RET( node, wxT("invalid index in wxChoice::DoSetItemClientObject") );
|
||||
|
||||
// wxItemContainer already deletes data for us
|
||||
@@ -188,7 +188,7 @@ wxClientData* wxChoice::DoGetItemClientObject( int n ) const
|
||||
{
|
||||
wxCHECK_MSG( m_widget != NULL, (wxClientData*) NULL, wxT("invalid choice control") );
|
||||
|
||||
wxNode *node = m_clientList.Item( n );
|
||||
wxList::compatibility_iterator node = m_clientList.Item( n );
|
||||
wxCHECK_MSG( node, (wxClientData *)NULL,
|
||||
wxT("invalid index in wxChoice::DoGetItemClientObject") );
|
||||
|
||||
@@ -208,7 +208,7 @@ void wxChoice::Clear()
|
||||
// destroy the data (due to Robert's idea of using wxList<wxObject>
|
||||
// and not wxList<wxClientData> we can't just say
|
||||
// m_clientList.DeleteContents(TRUE) - this would crash!
|
||||
wxNode *node = m_clientList.GetFirst();
|
||||
wxList::compatibility_iterator node = m_clientList.GetFirst();
|
||||
while ( node )
|
||||
{
|
||||
delete (wxClientData *)node->GetData();
|
||||
|
@@ -156,12 +156,13 @@ wxColour::wxColour( unsigned char red, unsigned char green, unsigned char blue )
|
||||
M_COLDATA->m_color.pixel = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxColour::InitFromName( const wxString &colourName )
|
||||
{
|
||||
wxNode *node = (wxNode *) NULL;
|
||||
if ( (wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) )
|
||||
wxColour* col = NULL;
|
||||
if ( (wxTheColourDatabase) && (col = wxTheColourDatabase->FindColourNoAdd(colourName)) )
|
||||
{
|
||||
wxColour *col = (wxColour*)node->GetData();
|
||||
UnRef();
|
||||
if (col) Ref( *col );
|
||||
}
|
||||
|
@@ -197,7 +197,7 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
|
||||
|
||||
wxComboBox::~wxComboBox()
|
||||
{
|
||||
wxNode *node = m_clientObjectList.GetFirst();
|
||||
wxList::compatibility_iterator node = m_clientObjectList.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
wxClientData *cd = (wxClientData*)node->GetData();
|
||||
@@ -360,7 +360,7 @@ void wxComboBox::SetClientData( int n, void* clientData )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
|
||||
|
||||
wxNode *node = m_clientDataList.Item( n );
|
||||
wxList::compatibility_iterator node = m_clientDataList.Item( n );
|
||||
if (!node) return;
|
||||
|
||||
node->SetData( (wxObject*) clientData );
|
||||
@@ -370,7 +370,7 @@ void* wxComboBox::GetClientData( int n ) const
|
||||
{
|
||||
wxCHECK_MSG( m_widget != NULL, NULL, wxT("invalid combobox") );
|
||||
|
||||
wxNode *node = m_clientDataList.Item( n );
|
||||
wxList::compatibility_iterator node = m_clientDataList.Item( n );
|
||||
|
||||
return node ? node->GetData() : NULL;
|
||||
}
|
||||
@@ -379,7 +379,7 @@ void wxComboBox::SetClientObject( int n, wxClientData* clientData )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
|
||||
|
||||
wxNode *node = m_clientObjectList.Item( n );
|
||||
wxList::compatibility_iterator node = m_clientObjectList.Item( n );
|
||||
if (!node) return;
|
||||
|
||||
wxClientData *cd = (wxClientData*) node->GetData();
|
||||
@@ -392,7 +392,7 @@ wxClientData* wxComboBox::GetClientObject( int n ) const
|
||||
{
|
||||
wxCHECK_MSG( m_widget != NULL, (wxClientData*)NULL, wxT("invalid combobox") );
|
||||
|
||||
wxNode *node = m_clientObjectList.Item( n );
|
||||
wxList::compatibility_iterator node = m_clientObjectList.Item( n );
|
||||
|
||||
return node ? (wxClientData*) node->GetData() : NULL;
|
||||
}
|
||||
@@ -406,7 +406,7 @@ void wxComboBox::Clear()
|
||||
GtkWidget *list = GTK_COMBO(m_widget)->list;
|
||||
gtk_list_clear_items( GTK_LIST(list), 0, Number() );
|
||||
|
||||
wxNode *node = m_clientObjectList.GetFirst();
|
||||
wxList::compatibility_iterator node = m_clientObjectList.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
wxClientData *cd = (wxClientData*)node->GetData();
|
||||
@@ -440,18 +440,18 @@ void wxComboBox::Delete( int n )
|
||||
gtk_list_remove_items( listbox, list );
|
||||
g_list_free( list );
|
||||
|
||||
wxNode *node = m_clientObjectList.Item( n );
|
||||
wxList::compatibility_iterator node = m_clientObjectList.Item( n );
|
||||
if (node)
|
||||
{
|
||||
wxClientData *cd = (wxClientData*)node->GetData();
|
||||
if (cd) delete cd;
|
||||
m_clientObjectList.DeleteNode( node );
|
||||
m_clientObjectList.Erase( node );
|
||||
}
|
||||
|
||||
node = m_clientDataList.Item( n );
|
||||
if (node)
|
||||
m_clientDataList.DeleteNode( node );
|
||||
|
||||
m_clientDataList.Erase( node );
|
||||
|
||||
EnableEvents();
|
||||
}
|
||||
|
||||
|
@@ -448,7 +448,7 @@ void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
|
||||
if (index != GetCount())
|
||||
{
|
||||
GtkAddItem( items[n], index );
|
||||
wxNode *node = m_clientList.Item( index );
|
||||
wxList::compatibility_iterator node = m_clientList.Item( index );
|
||||
m_clientList.Insert( node, (wxObject*) NULL );
|
||||
}
|
||||
else
|
||||
@@ -471,7 +471,7 @@ void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
|
||||
}
|
||||
else
|
||||
{
|
||||
wxNode *node = m_clientList.Item( pos );
|
||||
wxList::compatibility_iterator node = m_clientList.Item( pos );
|
||||
for ( size_t n = 0; n < nItems; n++ )
|
||||
{
|
||||
GtkAddItem( items[n], pos+n );
|
||||
@@ -497,7 +497,7 @@ int wxListBox::DoAppend( const wxString& item )
|
||||
{
|
||||
GtkAddItem( item, index );
|
||||
|
||||
wxNode *node = m_clientList.Item( index );
|
||||
wxList::compatibility_iterator node = m_clientList.Item( index );
|
||||
m_clientList.Insert( node, (wxObject *)NULL );
|
||||
|
||||
return index;
|
||||
@@ -619,7 +619,7 @@ void wxListBox::Clear()
|
||||
// destroy the data (due to Robert's idea of using wxList<wxObject>
|
||||
// and not wxList<wxClientData> we can't just say
|
||||
// m_clientList.DeleteContents(TRUE) - this would crash!
|
||||
wxNode *node = m_clientList.GetFirst();
|
||||
wxList::compatibility_iterator node = m_clientList.GetFirst();
|
||||
while ( node )
|
||||
{
|
||||
delete (wxClientData *)node->GetData();
|
||||
@@ -644,7 +644,7 @@ void wxListBox::Delete( int n )
|
||||
gtk_list_remove_items( m_list, list );
|
||||
g_list_free( list );
|
||||
|
||||
wxNode *node = m_clientList.Item( n );
|
||||
wxList::compatibility_iterator node = m_clientList.Item( n );
|
||||
if ( node )
|
||||
{
|
||||
if ( m_clientDataItemsType == wxClientData_Object )
|
||||
@@ -653,7 +653,7 @@ void wxListBox::Delete( int n )
|
||||
delete cd;
|
||||
}
|
||||
|
||||
m_clientList.DeleteNode( node );
|
||||
m_clientList.Erase( node );
|
||||
}
|
||||
|
||||
if ( m_strings )
|
||||
@@ -668,7 +668,7 @@ void wxListBox::DoSetItemClientData( int n, void* clientData )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, wxT("invalid listbox control") );
|
||||
|
||||
wxNode *node = m_clientList.Item( n );
|
||||
wxList::compatibility_iterator node = m_clientList.Item( n );
|
||||
wxCHECK_RET( node, wxT("invalid index in wxListBox::DoSetItemClientData") );
|
||||
|
||||
node->SetData( (wxObject*) clientData );
|
||||
@@ -678,7 +678,7 @@ void* wxListBox::DoGetItemClientData( int n ) const
|
||||
{
|
||||
wxCHECK_MSG( m_widget != NULL, NULL, wxT("invalid listbox control") );
|
||||
|
||||
wxNode *node = m_clientList.Item( n );
|
||||
wxList::compatibility_iterator node = m_clientList.Item( n );
|
||||
wxCHECK_MSG( node, NULL, wxT("invalid index in wxListBox::DoGetItemClientData") );
|
||||
|
||||
return node->GetData();
|
||||
@@ -688,7 +688,7 @@ void wxListBox::DoSetItemClientObject( int n, wxClientData* clientData )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, wxT("invalid listbox control") );
|
||||
|
||||
wxNode *node = m_clientList.Item( n );
|
||||
wxList::compatibility_iterator node = m_clientList.Item( n );
|
||||
wxCHECK_RET( node, wxT("invalid index in wxListBox::DoSetItemClientObject") );
|
||||
|
||||
// wxItemContainer already deletes data for us
|
||||
@@ -700,7 +700,7 @@ wxClientData* wxListBox::DoGetItemClientObject( int n ) const
|
||||
{
|
||||
wxCHECK_MSG( m_widget != NULL, (wxClientData*) NULL, wxT("invalid listbox control") );
|
||||
|
||||
wxNode *node = m_clientList.Item( n );
|
||||
wxList::compatibility_iterator node = m_clientList.Item( n );
|
||||
wxCHECK_MSG( node, (wxClientData *)NULL,
|
||||
wxT("invalid index in wxListBox::DoGetItemClientObject") );
|
||||
|
||||
|
@@ -75,7 +75,7 @@ gtk_mdi_page_change_callback( GtkNotebook *WXUNUSED(widget),
|
||||
|
||||
child = (wxMDIChildFrame*) NULL;
|
||||
|
||||
wxWindowList::Node *node = client_window->GetChildren().GetFirst();
|
||||
wxWindowList::compatibility_iterator node = client_window->GetChildren().GetFirst();
|
||||
while (node)
|
||||
{
|
||||
wxMDIChildFrame *child_frame = wxDynamicCast( node->GetData(), wxMDIChildFrame );
|
||||
@@ -170,7 +170,7 @@ void wxMDIParentFrame::OnInternalIdle()
|
||||
wxMDIChildFrame *active_child_frame = GetActiveChild();
|
||||
bool visible_child_menu = false;
|
||||
|
||||
wxWindowList::Node *node = m_clientWindow->GetChildren().GetFirst();
|
||||
wxWindowList::compatibility_iterator node = m_clientWindow->GetChildren().GetFirst();
|
||||
while (node)
|
||||
{
|
||||
wxMDIChildFrame *child_frame = wxDynamicCast( node->GetData(), wxMDIChildFrame );
|
||||
@@ -247,7 +247,7 @@ wxMDIChildFrame *wxMDIParentFrame::GetActiveChild() const
|
||||
GtkNotebookPage* page = (GtkNotebookPage*) (g_list_nth(notebook->children,i)->data);
|
||||
if (!page) return (wxMDIChildFrame*) NULL;
|
||||
|
||||
wxWindowList::Node *node = m_clientWindow->GetChildren().GetFirst();
|
||||
wxWindowList::compatibility_iterator node = m_clientWindow->GetChildren().GetFirst();
|
||||
while (node)
|
||||
{
|
||||
wxMDIChildFrame *child_frame = wxDynamicCast( node->GetData(), wxMDIChildFrame );
|
||||
|
@@ -200,8 +200,6 @@ wxMenuBar::wxMenuBar( long style )
|
||||
return;
|
||||
}
|
||||
|
||||
m_menus.DeleteContents( TRUE );
|
||||
|
||||
/* GTK 1.2.0 doesn't have gtk_item_factory_get_item(), but GTK 1.2.1 has. */
|
||||
#if GTK_CHECK_VERSION(1, 2, 1)
|
||||
m_accel = gtk_accel_group_new();
|
||||
@@ -241,8 +239,6 @@ wxMenuBar::wxMenuBar()
|
||||
return;
|
||||
}
|
||||
|
||||
m_menus.DeleteContents( TRUE );
|
||||
|
||||
/* GTK 1.2.0 doesn't have gtk_item_factory_get_item(), but GTK 1.2.1 has. */
|
||||
#if GTK_CHECK_VERSION(1, 2, 1)
|
||||
m_accel = gtk_accel_group_new();
|
||||
@@ -275,7 +271,7 @@ static void wxMenubarUnsetInvokingWindow( wxMenu *menu, wxWindow *win )
|
||||
/* support for native hot keys */
|
||||
gtk_accel_group_detach( menu->m_accel, ACCEL_OBJ_CAST(top_frame->m_widget) );
|
||||
|
||||
wxMenuItemList::Node *node = menu->GetMenuItems().GetFirst();
|
||||
wxMenuItemList::compatibility_iterator node = menu->GetMenuItems().GetFirst();
|
||||
while (node)
|
||||
{
|
||||
wxMenuItem *menuitem = node->GetData();
|
||||
@@ -300,7 +296,7 @@ static void wxMenubarSetInvokingWindow( wxMenu *menu, wxWindow *win )
|
||||
gtk_accel_group_attach( menu->m_accel, obj );
|
||||
#endif // GTK+ 1.2.1+
|
||||
|
||||
wxMenuItemList::Node *node = menu->GetMenuItems().GetFirst();
|
||||
wxMenuItemList::compatibility_iterator node = menu->GetMenuItems().GetFirst();
|
||||
while (node)
|
||||
{
|
||||
wxMenuItem *menuitem = node->GetData();
|
||||
@@ -324,7 +320,7 @@ void wxMenuBar::SetInvokingWindow( wxWindow *win )
|
||||
gtk_accel_group_attach( m_accel, obj );
|
||||
#endif // GTK+ 1.2.1+
|
||||
|
||||
wxMenuList::Node *node = m_menus.GetFirst();
|
||||
wxMenuList::compatibility_iterator node = m_menus.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
wxMenu *menu = node->GetData();
|
||||
@@ -345,7 +341,7 @@ void wxMenuBar::UnsetInvokingWindow( wxWindow *win )
|
||||
gtk_accel_group_detach( m_accel, ACCEL_OBJ_CAST(top_frame->m_widget) );
|
||||
#endif // GTK+ 1.2.1+
|
||||
|
||||
wxMenuList::Node *node = m_menus.GetFirst();
|
||||
wxMenuList::compatibility_iterator node = m_menus.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
wxMenu *menu = node->GetData();
|
||||
@@ -474,7 +470,7 @@ wxMenu *wxMenuBar::Replace(size_t pos, wxMenu *menu, const wxString& title)
|
||||
static wxMenu *CopyMenu (wxMenu *menu)
|
||||
{
|
||||
wxMenu *menucopy = new wxMenu ();
|
||||
wxMenuItemList::Node *node = menu->GetMenuItems().GetFirst();
|
||||
wxMenuItemList::compatibility_iterator node = menu->GetMenuItems().GetFirst();
|
||||
while (node)
|
||||
{
|
||||
wxMenuItem *item = node->GetData();
|
||||
@@ -552,7 +548,7 @@ static int FindMenuItemRecursive( const wxMenu *menu, const wxString &menuString
|
||||
return res;
|
||||
}
|
||||
|
||||
wxMenuItemList::Node *node = menu->GetMenuItems().GetFirst();
|
||||
wxMenuItemList::compatibility_iterator node = menu->GetMenuItems().GetFirst();
|
||||
while (node)
|
||||
{
|
||||
wxMenuItem *item = node->GetData();
|
||||
@@ -567,7 +563,7 @@ static int FindMenuItemRecursive( const wxMenu *menu, const wxString &menuString
|
||||
|
||||
int wxMenuBar::FindMenuItem( const wxString &menuString, const wxString &itemString ) const
|
||||
{
|
||||
wxMenuList::Node *node = m_menus.GetFirst();
|
||||
wxMenuList::compatibility_iterator node = m_menus.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
wxMenu *menu = node->GetData();
|
||||
@@ -585,7 +581,7 @@ static wxMenuItem* FindMenuItemByIdRecursive(const wxMenu* menu, int id)
|
||||
{
|
||||
wxMenuItem* result = menu->FindChildItem(id);
|
||||
|
||||
wxMenuItemList::Node *node = menu->GetMenuItems().GetFirst();
|
||||
wxMenuItemList::compatibility_iterator node = menu->GetMenuItems().GetFirst();
|
||||
while ( node && result == NULL )
|
||||
{
|
||||
wxMenuItem *item = node->GetData();
|
||||
@@ -602,7 +598,7 @@ static wxMenuItem* FindMenuItemByIdRecursive(const wxMenu* menu, int id)
|
||||
wxMenuItem* wxMenuBar::FindItem( int id, wxMenu **menuForItem ) const
|
||||
{
|
||||
wxMenuItem* result = 0;
|
||||
wxMenuList::Node *node = m_menus.GetFirst();
|
||||
wxMenuList::compatibility_iterator node = m_menus.GetFirst();
|
||||
while (node && result == 0)
|
||||
{
|
||||
wxMenu *menu = node->GetData();
|
||||
@@ -620,7 +616,7 @@ wxMenuItem* wxMenuBar::FindItem( int id, wxMenu **menuForItem ) const
|
||||
|
||||
void wxMenuBar::EnableTop( size_t pos, bool flag )
|
||||
{
|
||||
wxMenuList::Node *node = m_menus.Item( pos );
|
||||
wxMenuList::compatibility_iterator node = m_menus.Item( pos );
|
||||
|
||||
wxCHECK_RET( node, wxT("menu not found") );
|
||||
|
||||
@@ -632,7 +628,7 @@ void wxMenuBar::EnableTop( size_t pos, bool flag )
|
||||
|
||||
wxString wxMenuBar::GetLabelTop( size_t pos ) const
|
||||
{
|
||||
wxMenuList::Node *node = m_menus.Item( pos );
|
||||
wxMenuList::compatibility_iterator node = m_menus.Item( pos );
|
||||
|
||||
wxCHECK_MSG( node, wxT("invalid"), wxT("menu not found") );
|
||||
|
||||
@@ -659,7 +655,7 @@ wxString wxMenuBar::GetLabelTop( size_t pos ) const
|
||||
|
||||
void wxMenuBar::SetLabelTop( size_t pos, const wxString& label )
|
||||
{
|
||||
wxMenuList::Node *node = m_menus.Item( pos );
|
||||
wxMenuList::compatibility_iterator node = m_menus.Item( pos );
|
||||
|
||||
wxCHECK_RET( node, wxT("menu not found") );
|
||||
|
||||
@@ -1122,7 +1118,7 @@ void wxMenu::Init()
|
||||
|
||||
wxMenu::~wxMenu()
|
||||
{
|
||||
m_items.Clear();
|
||||
WX_CLEAR_LIST(wxMenuItemList, m_items);
|
||||
|
||||
if ( GTK_IS_WIDGET( m_menu ))
|
||||
gtk_widget_destroy( m_menu );
|
||||
@@ -1398,7 +1394,7 @@ wxMenuItem *wxMenu::DoRemove(wxMenuItem *item)
|
||||
|
||||
int wxMenu::FindMenuIdByMenuItem( GtkWidget *menuItem ) const
|
||||
{
|
||||
wxMenuItemList::Node *node = m_items.GetFirst();
|
||||
wxMenuItemList::compatibility_iterator node = m_items.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
wxMenuItem *item = node->GetData();
|
||||
|
@@ -240,7 +240,6 @@ void wxNotebook::Init()
|
||||
m_inSwitchPage = FALSE;
|
||||
|
||||
m_imageList = (wxImageList *) NULL;
|
||||
m_pagesData.DeleteContents( TRUE );
|
||||
m_selection = -1;
|
||||
m_themeEnabled = TRUE;
|
||||
}
|
||||
@@ -567,7 +566,9 @@ wxNotebookPage *wxNotebook::DoRemovePage( int page )
|
||||
|
||||
gtk_notebook_remove_page( GTK_NOTEBOOK(m_widget), page );
|
||||
|
||||
m_pagesData.DeleteObject(GetNotebookPage(page));
|
||||
wxGtkNotebookPage* p = GetNotebookPage(page);
|
||||
m_pagesData.DeleteObject(p);
|
||||
delete p;
|
||||
|
||||
return client;
|
||||
}
|
||||
|
@@ -80,7 +80,7 @@ static gint gtk_radiobox_keypress_callback( GtkWidget *widget, GdkEventKey *gdk_
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
wxNode *node = rb->m_boxes.Find( (wxObject*) widget );
|
||||
wxList::compatibility_iterator node = rb->m_boxes.Find( (wxObject*) widget );
|
||||
if (!node)
|
||||
{
|
||||
return FALSE;
|
||||
@@ -260,7 +260,7 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
|
||||
|
||||
wxRadioBox::~wxRadioBox()
|
||||
{
|
||||
wxNode *node = m_boxes.GetFirst();
|
||||
wxList::compatibility_iterator node = m_boxes.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
GtkWidget *button = GTK_WIDGET( node->GetData() );
|
||||
@@ -314,7 +314,7 @@ wxSize wxRadioBox::LayoutItems()
|
||||
y = 15;
|
||||
|
||||
int max_len = 0;
|
||||
wxNode *node = m_boxes.Item( j*num_of_rows );
|
||||
wxList::compatibility_iterator node = m_boxes.Item( j*num_of_rows );
|
||||
for (int i1 = 0; i1< num_of_rows; i1++)
|
||||
{
|
||||
GtkWidget *button = GTK_WIDGET( node->GetData() );
|
||||
@@ -359,7 +359,7 @@ wxSize wxRadioBox::LayoutItems()
|
||||
{
|
||||
int max = 0;
|
||||
|
||||
wxNode *node = m_boxes.GetFirst();
|
||||
wxList::compatibility_iterator node = m_boxes.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
GtkWidget *button = GTK_WIDGET( node->GetData() );
|
||||
@@ -405,7 +405,7 @@ bool wxRadioBox::Show( bool show )
|
||||
if ((m_windowStyle & wxNO_BORDER) != 0)
|
||||
gtk_widget_hide( m_widget );
|
||||
|
||||
wxNode *node = m_boxes.GetFirst();
|
||||
wxList::compatibility_iterator node = m_boxes.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
GtkWidget *button = GTK_WIDGET( node->GetData() );
|
||||
@@ -424,7 +424,7 @@ int wxRadioBox::FindString( const wxString &find ) const
|
||||
|
||||
int count = 0;
|
||||
|
||||
wxNode *node = m_boxes.GetFirst();
|
||||
wxList::compatibility_iterator node = m_boxes.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
GtkLabel *label = GTK_LABEL( BUTTON_CHILD(node->GetData()) );
|
||||
@@ -450,7 +450,7 @@ void wxRadioBox::SetFocus()
|
||||
|
||||
if (m_boxes.GetCount() == 0) return;
|
||||
|
||||
wxNode *node = m_boxes.GetFirst();
|
||||
wxList::compatibility_iterator node = m_boxes.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
GtkToggleButton *button = GTK_TOGGLE_BUTTON( node->GetData() );
|
||||
@@ -467,7 +467,7 @@ void wxRadioBox::SetSelection( int n )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, wxT("invalid radiobox") );
|
||||
|
||||
wxNode *node = m_boxes.Item( n );
|
||||
wxList::compatibility_iterator node = m_boxes.Item( n );
|
||||
|
||||
wxCHECK_RET( node, wxT("radiobox wrong index") );
|
||||
|
||||
@@ -486,7 +486,7 @@ int wxRadioBox::GetSelection(void) const
|
||||
|
||||
int count = 0;
|
||||
|
||||
wxNode *node = m_boxes.GetFirst();
|
||||
wxList::compatibility_iterator node = m_boxes.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
GtkToggleButton *button = GTK_TOGGLE_BUTTON( node->GetData() );
|
||||
@@ -504,7 +504,7 @@ wxString wxRadioBox::GetString( int n ) const
|
||||
{
|
||||
wxCHECK_MSG( m_widget != NULL, wxT(""), wxT("invalid radiobox") );
|
||||
|
||||
wxNode *node = m_boxes.Item( n );
|
||||
wxList::compatibility_iterator node = m_boxes.Item( n );
|
||||
|
||||
wxCHECK_MSG( node, wxT(""), wxT("radiobox wrong index") );
|
||||
|
||||
@@ -532,7 +532,7 @@ void wxRadioBox::SetString( int item, const wxString& label )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, wxT("invalid radiobox") );
|
||||
|
||||
wxNode *node = m_boxes.Item( item );
|
||||
wxList::compatibility_iterator node = m_boxes.Item( item );
|
||||
|
||||
wxCHECK_RET( node, wxT("radiobox wrong index") );
|
||||
|
||||
@@ -546,7 +546,7 @@ bool wxRadioBox::Enable( bool enable )
|
||||
if ( !wxControl::Enable( enable ) )
|
||||
return FALSE;
|
||||
|
||||
wxNode *node = m_boxes.GetFirst();
|
||||
wxList::compatibility_iterator node = m_boxes.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
GtkButton *button = GTK_BUTTON( node->GetData() );
|
||||
@@ -564,7 +564,7 @@ void wxRadioBox::Enable( int item, bool enable )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, wxT("invalid radiobox") );
|
||||
|
||||
wxNode *node = m_boxes.Item( item );
|
||||
wxList::compatibility_iterator node = m_boxes.Item( item );
|
||||
|
||||
wxCHECK_RET( node, wxT("radiobox wrong index") );
|
||||
|
||||
@@ -579,7 +579,7 @@ void wxRadioBox::Show( int item, bool show )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, wxT("invalid radiobox") );
|
||||
|
||||
wxNode *node = m_boxes.Item( item );
|
||||
wxList::compatibility_iterator node = m_boxes.Item( item );
|
||||
|
||||
wxCHECK_RET( node, wxT("radiobox wrong index") );
|
||||
|
||||
@@ -595,7 +595,7 @@ wxString wxRadioBox::GetStringSelection() const
|
||||
{
|
||||
wxCHECK_MSG( m_widget != NULL, wxT(""), wxT("invalid radiobox") );
|
||||
|
||||
wxNode *node = m_boxes.GetFirst();
|
||||
wxList::compatibility_iterator node = m_boxes.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
GtkToggleButton *button = GTK_TOGGLE_BUTTON( node->GetData() );
|
||||
@@ -645,7 +645,7 @@ void wxRadioBox::SetNumberOfRowsOrCols( int WXUNUSED(n) )
|
||||
|
||||
void wxRadioBox::GtkDisableEvents()
|
||||
{
|
||||
wxNode *node = m_boxes.GetFirst();
|
||||
wxList::compatibility_iterator node = m_boxes.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
gtk_signal_disconnect_by_func( GTK_OBJECT(node->GetData()),
|
||||
@@ -657,7 +657,7 @@ void wxRadioBox::GtkDisableEvents()
|
||||
|
||||
void wxRadioBox::GtkEnableEvents()
|
||||
{
|
||||
wxNode *node = m_boxes.GetFirst();
|
||||
wxList::compatibility_iterator node = m_boxes.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
gtk_signal_connect( GTK_OBJECT(node->GetData()), "clicked",
|
||||
@@ -673,7 +673,7 @@ void wxRadioBox::ApplyWidgetStyle()
|
||||
|
||||
gtk_widget_set_style( m_widget, m_widgetStyle );
|
||||
|
||||
wxNode *node = m_boxes.GetFirst();
|
||||
wxList::compatibility_iterator node = m_boxes.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET( node->GetData() );
|
||||
@@ -688,7 +688,7 @@ void wxRadioBox::ApplyWidgetStyle()
|
||||
#if wxUSE_TOOLTIPS
|
||||
void wxRadioBox::ApplyToolTip( GtkTooltips *tips, const wxChar *tip )
|
||||
{
|
||||
wxNode *node = m_boxes.GetFirst();
|
||||
wxList::compatibility_iterator node = m_boxes.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET( node->GetData() );
|
||||
@@ -702,7 +702,7 @@ bool wxRadioBox::IsOwnGtkWindow( GdkWindow *window )
|
||||
{
|
||||
if (window == m_widget->window) return TRUE;
|
||||
|
||||
wxNode *node = m_boxes.GetFirst();
|
||||
wxList::compatibility_iterator node = m_boxes.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
GtkWidget *button = GTK_WIDGET( node->GetData() );
|
||||
|
@@ -94,7 +94,7 @@ bool wxRadioButton::Create( wxWindow *parent,
|
||||
{
|
||||
// search backward for last group start
|
||||
wxRadioButton *chief = (wxRadioButton*) NULL;
|
||||
wxWindowList::Node *node = parent->GetChildren().GetLast();
|
||||
wxWindowList::compatibility_iterator node = parent->GetChildren().GetLast();
|
||||
while (node)
|
||||
{
|
||||
wxWindow *child = node->GetData();
|
||||
|
@@ -433,8 +433,9 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
|
||||
|
||||
if ( tool->IsRadio() )
|
||||
{
|
||||
wxToolBarToolsList::Node *node = pos ? m_tools.Item(pos - 1)
|
||||
: NULL;
|
||||
wxToolBarToolsList::compatibility_iterator node;
|
||||
if ( pos ) node = m_tools.Item(pos - 1);
|
||||
|
||||
while ( node )
|
||||
{
|
||||
wxToolBarTool *tool = (wxToolBarTool *)node->GetData();
|
||||
@@ -660,7 +661,7 @@ void wxToolBar::OnInternalIdle()
|
||||
gdk_window_set_cursor( m_widget->window, cursor.GetCursor() );
|
||||
}
|
||||
|
||||
wxToolBarToolsList::Node *node = m_tools.GetFirst();
|
||||
wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst();
|
||||
while ( node )
|
||||
{
|
||||
wxToolBarTool *tool = (wxToolBarTool *)node->GetData();
|
||||
|
@@ -345,7 +345,7 @@ wxWindow *wxFindFocusedChild(wxWindowGTK *win)
|
||||
if ( winFocus == win )
|
||||
return (wxWindow *)win;
|
||||
|
||||
for ( wxWindowList::Node *node = win->GetChildren().GetFirst();
|
||||
for ( wxWindowList::compatibility_iterator node = win->GetChildren().GetFirst();
|
||||
node;
|
||||
node = node->GetNext() )
|
||||
{
|
||||
@@ -1405,7 +1405,7 @@ wxWindowGTK *FindWindowForMouseEvent(wxWindowGTK *win, wxCoord& x, wxCoord& y)
|
||||
yy += pizza->yoffset;
|
||||
}
|
||||
|
||||
wxWindowList::Node *node = win->GetChildren().GetFirst();
|
||||
wxWindowList::compatibility_iterator node = win->GetChildren().GetFirst();
|
||||
while (node)
|
||||
{
|
||||
wxWindowGTK *child = node->GetData();
|
||||
@@ -3274,7 +3274,7 @@ static void wxWindowNotifyEnable(wxWindowGTK* win, bool enable)
|
||||
// Recurse, so that children have the opportunity to Do The Right Thing
|
||||
// and reset colours that have been messed up by a parent's (really ancestor's)
|
||||
// Enable call
|
||||
for ( wxWindowList::Node *node = win->GetChildren().GetFirst();
|
||||
for ( wxWindowList::compatibility_iterator node = win->GetChildren().GetFirst();
|
||||
node;
|
||||
node = node->GetNext() )
|
||||
{
|
||||
@@ -4141,7 +4141,7 @@ void gtk_pop_hide_callback( GtkWidget *WXUNUSED(widget), bool* is_waiting )
|
||||
static void SetInvokingWindow( wxMenu *menu, wxWindowGTK *win )
|
||||
{
|
||||
menu->SetInvokingWindow( win );
|
||||
wxMenuItemList::Node *node = menu->GetMenuItems().GetFirst();
|
||||
wxMenuItemList::compatibility_iterator node = menu->GetMenuItems().GetFirst();
|
||||
while (node)
|
||||
{
|
||||
wxMenuItem *menuitem = node->GetData();
|
||||
|
Reference in New Issue
Block a user