From eb22f2a6dc1d8cafc91482b6ba45df86fc54f626 Mon Sep 17 00:00:00 2001 From: Gilles Depeyrot Date: Tue, 14 Jan 2003 07:01:22 +0000 Subject: [PATCH] updated source to not use deprecated wxList methods git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/accel.cpp | 6 ++--- src/mac/button.cpp | 28 +++++++++---------- src/mac/carbon/accel.cpp | 6 ++--- src/mac/carbon/button.cpp | 28 +++++++++---------- src/mac/carbon/checklst.cpp | 2 +- src/mac/carbon/combobox.cpp | 4 +-- src/mac/carbon/control.cpp | 6 ++--- src/mac/carbon/listbox.cpp | 10 +++---- src/mac/carbon/menu.cpp | 26 +++++++++--------- src/mac/carbon/notebmac.cpp | 8 +++--- src/mac/carbon/radiobox.cpp | 8 +++--- src/mac/carbon/slider.cpp | 6 ++--- src/mac/carbon/statbmp.cpp | 2 +- src/mac/carbon/textctrl.cpp | 10 +++---- src/mac/carbon/toolbar.cpp | 20 +++++++------- src/mac/carbon/toplevel.cpp | 2 +- src/mac/carbon/window.cpp | 54 ++++++++++++++++++------------------- src/mac/checklst.cpp | 2 +- src/mac/combobox.cpp | 4 +-- src/mac/control.cpp | 6 ++--- src/mac/listbox.cpp | 10 +++---- src/mac/menu.cpp | 26 +++++++++--------- src/mac/notebmac.cpp | 8 +++--- src/mac/radiobox.cpp | 8 +++--- src/mac/slider.cpp | 6 ++--- src/mac/statbmp.cpp | 2 +- src/mac/textctrl.cpp | 10 +++---- src/mac/toolbar.cpp | 20 +++++++------- src/mac/toplevel.cpp | 2 +- src/mac/window.cpp | 54 ++++++++++++++++++------------------- 30 files changed, 192 insertions(+), 192 deletions(-) diff --git a/src/mac/accel.cpp b/src/mac/accel.cpp index ca83c8db9a..ebd4580eb1 100644 --- a/src/mac/accel.cpp +++ b/src/mac/accel.cpp @@ -88,10 +88,10 @@ int wxAcceleratorTable::GetCommand( wxKeyEvent &event ) { if (!Ok()) return -1; - wxNode *node = M_ACCELDATA->m_accels.First(); + wxwxAccelListNode *node = M_ACCELDATA->m_accels.GetFirst(); while (node) { - wxAcceleratorEntry *entry = (wxAcceleratorEntry*)node->Data(); + wxAcceleratorEntry *entry = (wxAcceleratorEntry*)node->GetData(); if ((event.m_keyCode == entry->GetKeyCode()) && (((entry->GetFlags() & wxACCEL_CTRL) == 0) || event.ControlDown()) && (((entry->GetFlags() & wxACCEL_SHIFT) == 0) || event.ShiftDown()) && @@ -99,7 +99,7 @@ int wxAcceleratorTable::GetCommand( wxKeyEvent &event ) { return entry->GetCommand(); } - node = node->Next(); + node = node->GetNext(); } return -1; diff --git a/src/mac/button.cpp b/src/mac/button.cpp index cbc1d846d9..b036d87636 100644 --- a/src/mac/button.cpp +++ b/src/mac/button.cpp @@ -95,23 +95,23 @@ wxSize wxButton::GetDefaultSize() void wxButton::Command (wxCommandEvent & event) { - if ( (ControlHandle) m_macControl ) - { - HiliteControl( (ControlHandle) m_macControl , kControlButtonPart ) ; - unsigned long finalTicks ; - Delay( 8 , &finalTicks ) ; - HiliteControl( (ControlHandle) m_macControl , 0 ) ; - } + if ( (ControlHandle) m_macControl ) + { + HiliteControl( (ControlHandle) m_macControl , kControlButtonPart ) ; + unsigned long finalTicks ; + Delay( 8 , &finalTicks ) ; + HiliteControl( (ControlHandle) m_macControl , 0 ) ; + } ProcessCommand (event); } -void wxButton::MacHandleControlClick( WXWidget control , wxInt16 controlpart ) +void wxButton::MacHandleControlClick( WXWidget WXUNUSED(control) , wxInt16 controlpart ) { - if ( controlpart != kControlNoPart ) - { - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, m_windowId ); - event.SetEventObject(this); - ProcessCommand(event); - } + if ( controlpart != kControlNoPart ) + { + wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, m_windowId ); + event.SetEventObject(this); + ProcessCommand(event); + } } diff --git a/src/mac/carbon/accel.cpp b/src/mac/carbon/accel.cpp index ca83c8db9a..ebd4580eb1 100644 --- a/src/mac/carbon/accel.cpp +++ b/src/mac/carbon/accel.cpp @@ -88,10 +88,10 @@ int wxAcceleratorTable::GetCommand( wxKeyEvent &event ) { if (!Ok()) return -1; - wxNode *node = M_ACCELDATA->m_accels.First(); + wxwxAccelListNode *node = M_ACCELDATA->m_accels.GetFirst(); while (node) { - wxAcceleratorEntry *entry = (wxAcceleratorEntry*)node->Data(); + wxAcceleratorEntry *entry = (wxAcceleratorEntry*)node->GetData(); if ((event.m_keyCode == entry->GetKeyCode()) && (((entry->GetFlags() & wxACCEL_CTRL) == 0) || event.ControlDown()) && (((entry->GetFlags() & wxACCEL_SHIFT) == 0) || event.ShiftDown()) && @@ -99,7 +99,7 @@ int wxAcceleratorTable::GetCommand( wxKeyEvent &event ) { return entry->GetCommand(); } - node = node->Next(); + node = node->GetNext(); } return -1; diff --git a/src/mac/carbon/button.cpp b/src/mac/carbon/button.cpp index cbc1d846d9..b036d87636 100644 --- a/src/mac/carbon/button.cpp +++ b/src/mac/carbon/button.cpp @@ -95,23 +95,23 @@ wxSize wxButton::GetDefaultSize() void wxButton::Command (wxCommandEvent & event) { - if ( (ControlHandle) m_macControl ) - { - HiliteControl( (ControlHandle) m_macControl , kControlButtonPart ) ; - unsigned long finalTicks ; - Delay( 8 , &finalTicks ) ; - HiliteControl( (ControlHandle) m_macControl , 0 ) ; - } + if ( (ControlHandle) m_macControl ) + { + HiliteControl( (ControlHandle) m_macControl , kControlButtonPart ) ; + unsigned long finalTicks ; + Delay( 8 , &finalTicks ) ; + HiliteControl( (ControlHandle) m_macControl , 0 ) ; + } ProcessCommand (event); } -void wxButton::MacHandleControlClick( WXWidget control , wxInt16 controlpart ) +void wxButton::MacHandleControlClick( WXWidget WXUNUSED(control) , wxInt16 controlpart ) { - if ( controlpart != kControlNoPart ) - { - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, m_windowId ); - event.SetEventObject(this); - ProcessCommand(event); - } + if ( controlpart != kControlNoPart ) + { + wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, m_windowId ); + event.SetEventObject(this); + ProcessCommand(event); + } } diff --git a/src/mac/carbon/checklst.cpp b/src/mac/carbon/checklst.cpp index 3bb48dec08..89123057f0 100644 --- a/src/mac/carbon/checklst.cpp +++ b/src/mac/carbon/checklst.cpp @@ -376,7 +376,7 @@ END_EVENT_TABLE() void wxCheckListBox::OnChar(wxKeyEvent& event) { - if ( event.KeyCode() == WXK_SPACE ) + if ( event.GetKeyCode() == WXK_SPACE ) { int index = GetSelection() ; if ( index >= 0 ) diff --git a/src/mac/carbon/combobox.cpp b/src/mac/carbon/combobox.cpp index 22924613ea..664d142f40 100644 --- a/src/mac/carbon/combobox.cpp +++ b/src/mac/carbon/combobox.cpp @@ -60,7 +60,7 @@ public: protected: void OnChar( wxKeyEvent& event ) { - if ( event.KeyCode() == WXK_RETURN ) + if ( event.GetKeyCode() == WXK_RETURN ) { wxString value = GetValue(); @@ -462,7 +462,7 @@ bool wxComboBox::SetStringSelection(const wxString& sel) return FALSE; } -void wxComboBox::MacHandleControlClick( WXWidget control , wxInt16 controlpart ) +void wxComboBox::MacHandleControlClick( WXWidget WXUNUSED(control) , wxInt16 WXUNUSED(controlpart) ) { wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId ); event.SetInt(GetSelection()); diff --git a/src/mac/carbon/control.cpp b/src/mac/carbon/control.cpp index 92e8cd3cc8..05db0f2166 100644 --- a/src/mac/carbon/control.cpp +++ b/src/mac/carbon/control.cpp @@ -87,7 +87,7 @@ pascal void wxMacLiveScrollbarActionProc( ControlHandle control , ControlPartCod ControlColorUPP wxMacSetupControlBackgroundUPP = NULL ; ControlDefUPP wxMacControlActionUPP = NULL ; -pascal SInt32 wxMacControlDefintion(SInt16 varCode, ControlRef theControl, ControlDefProcMessage message, SInt32 param) +pascal SInt32 wxMacControlDefinition(SInt16 varCode, ControlRef theControl, ControlDefProcMessage message, SInt32 param) { wxControl* wx = (wxControl*) wxFindControlFromMacControl( theControl ) ; @@ -295,7 +295,7 @@ wxControl *wxFindControlFromMacControl(ControlHandle inControl ) wxNode *node = wxWinMacControlList->Find((long)inControl); if (!node) return NULL; - return (wxControl *)node->Data(); + return (wxControl *)node->GetData(); } void wxAssociateControlWithMacControl(ControlHandle inControl, wxControl *control) @@ -398,7 +398,7 @@ void wxControl::MacPostControlCreate() } if ( wxMacControlActionUPP == NULL ) { - wxMacControlActionUPP = NewControlDefUPP( wxMacControlDefintion ) ; + wxMacControlActionUPP = NewControlDefUPP( wxMacControlDefinition ) ; } // The following block of code is responsible for crashes when switching // back to windows, which can be seen in the dialogs sample. diff --git a/src/mac/carbon/listbox.cpp b/src/mac/carbon/listbox.cpp index 5c3dc855d0..e62b5ac644 100644 --- a/src/mac/carbon/listbox.cpp +++ b/src/mac/carbon/listbox.cpp @@ -937,7 +937,7 @@ void wxListBox::MacDoDoubleClick() void wxListBox::OnChar(wxKeyEvent& event) { - if ( event.KeyCode() == WXK_RETURN || event.KeyCode() == WXK_NUMPAD_ENTER) + if ( event.GetKeyCode() == WXK_RETURN || event.GetKeyCode() == WXK_NUMPAD_ENTER) { wxWindow* parent = GetParent() ; while( parent && !parent->IsTopLevel() && parent->GetDefaultItem() == NULL ) @@ -958,14 +958,14 @@ void wxListBox::OnChar(wxKeyEvent& event) event.Skip() ; } /* generate wxID_CANCEL if command-. or has been pressed (typically in dialogs) */ - else if (event.KeyCode() == WXK_ESCAPE || (event.KeyCode() == '.' && event.MetaDown() ) ) + else if (event.GetKeyCode() == WXK_ESCAPE || (event.GetKeyCode() == '.' && event.MetaDown() ) ) { wxWindow* win = GetParent()->FindWindow( wxID_CANCEL ) ; wxCommandEvent new_event(wxEVT_COMMAND_BUTTON_CLICKED,wxID_CANCEL); new_event.SetEventObject( win ); win->GetEventHandler()->ProcessEvent( new_event ); } - else if ( event.KeyCode() == WXK_TAB ) + else if ( event.GetKeyCode() == WXK_TAB ) { wxNavigationKeyEvent new_event; new_event.SetEventObject( this ); @@ -976,7 +976,7 @@ void wxListBox::OnChar(wxKeyEvent& event) if ( !GetEventHandler()->ProcessEvent( new_event ) ) event.Skip() ; } - else if ( event.KeyCode() == WXK_DOWN || event.KeyCode() == WXK_UP ) + else if ( event.GetKeyCode() == WXK_DOWN || event.GetKeyCode() == WXK_UP ) { // perform the default key handling first wxControl::OnKeyDown( event ) ; @@ -1011,7 +1011,7 @@ void wxListBox::OnChar(wxKeyEvent& event) m_typeIn = "" ; } m_lastTypeIn = event.GetTimestamp() ; - m_typeIn += (char) event.KeyCode() ; + m_typeIn += (char) event.GetKeyCode() ; int line = FindString("*"+m_typeIn+"*") ; if ( line >= 0 ) { diff --git a/src/mac/carbon/menu.cpp b/src/mac/carbon/menu.cpp index e81e6de61a..7064cf06a3 100644 --- a/src/mac/carbon/menu.cpp +++ b/src/mac/carbon/menu.cpp @@ -10,6 +10,11 @@ ///////////////////////////////////////////////////////////////////////////// +#ifdef __GNUG__ +#pragma implementation "menu.h" +#pragma implementation "menuitem.h" +#endif + // ============================================================================ // headers & declarations // ============================================================================ @@ -17,11 +22,6 @@ // wxWindows headers // ----------------- -#ifdef __GNUG__ -#pragma implementation "menu.h" -#pragma implementation "menuitem.h" -#endif - #include "wx/app.h" #include "wx/menu.h" #include "wx/menuitem.h" @@ -560,7 +560,7 @@ void wxMenuBar::MacInstallMenuBar() for (size_t i = 0; i < m_menus.GetCount(); i++) { Str255 label; - wxNode *node; + wxwxMenuItemListNode *node; wxMenuItem *item; int pos ; wxMenu* menu = m_menus[i] , *subMenu = NULL ; @@ -578,9 +578,9 @@ void wxMenuBar::MacInstallMenuBar() DeleteMenuItem( mh , i ) ; } - for (pos = 0 , node = menu->GetMenuItems().First(); node; node = node->Next(), pos++) + for (pos = 0 , node = menu->GetMenuItems().GetFirst(); node; node = node->GetNext(), pos++) { - item = (wxMenuItem *)node->Data(); + item = (wxMenuItem *)node->GetData(); subMenu = item->GetSubMenu() ; if (subMenu) { @@ -629,9 +629,9 @@ void wxMenuBar::MacInstallMenuBar() UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , label ) ; wxArrayPtrVoid submenus ; - for (pos = 0, node = menu->GetMenuItems().First(); node; node = node->Next(), pos++) + for (pos = 0, node = menu->GetMenuItems().GetFirst(); node; node = node->GetNext(), pos++) { - item = (wxMenuItem *)node->Data(); + item = (wxMenuItem *)node->GetData(); subMenu = item->GetSubMenu() ; if (subMenu) { @@ -642,12 +642,12 @@ void wxMenuBar::MacInstallMenuBar() for ( size_t i = 0 ; i < submenus.GetCount() ; ++i ) { wxMenu* submenu = (wxMenu*) submenus[i] ; - wxNode *subnode; + wxwxMenuItemListNode *subnode; wxMenuItem *subitem; int subpos ; - for ( subpos = 0 , subnode = submenu->GetMenuItems().First(); subnode; subnode = subnode->Next(), subpos++) + for ( subpos = 0 , subnode = submenu->GetMenuItems().GetFirst(); subnode; subnode = subnode->GetNext(), subpos++) { - subitem = (wxMenuItem *)subnode->Data(); + subitem = (wxMenuItem *)subnode->GetData(); wxMenu* itsSubMenu = subitem->GetSubMenu() ; if (itsSubMenu) { diff --git a/src/mac/carbon/notebmac.cpp b/src/mac/carbon/notebmac.cpp index 908cef7b5f..aae205f86b 100644 --- a/src/mac/carbon/notebmac.cpp +++ b/src/mac/carbon/notebmac.cpp @@ -9,6 +9,10 @@ // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// +#ifdef __GNUG__ + #pragma implementation "notebook.h" +#endif + // ============================================================================ // declarations // ============================================================================ @@ -16,10 +20,6 @@ // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ - #pragma implementation "notebook.h" -#endif - #include "wx/app.h" #include "wx/string.h" #include "wx/log.h" diff --git a/src/mac/carbon/radiobox.cpp b/src/mac/carbon/radiobox.cpp index 6c9ba1abb2..5c1938736c 100644 --- a/src/mac/carbon/radiobox.cpp +++ b/src/mac/carbon/radiobox.cpp @@ -9,15 +9,15 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -//------------------------------------------------------------------------------------- -// headers -//------------------------------------------------------------------------------------- - #ifdef __GNUG__ #pragma implementation "radioboxbase.h" #pragma implementation "radiobox.h" #endif +//------------------------------------------------------------------------------------- +// headers +//------------------------------------------------------------------------------------- + #include "wx/defs.h" #include "wx/radiobox.h" diff --git a/src/mac/carbon/slider.cpp b/src/mac/carbon/slider.cpp index aa4e68609a..c60b1a5d81 100644 --- a/src/mac/carbon/slider.cpp +++ b/src/mac/carbon/slider.cpp @@ -418,7 +418,7 @@ void wxSlider::MacHandleControlClick( WXWidget control , wxInt16 controlpart ) } } - void wxSlider::DoMoveWindow(int x, int y, int width, int height) - { +void wxSlider::DoMoveWindow(int x, int y, int width, int height) +{ wxControl::DoMoveWindow(x,y,width,height) ; -} \ No newline at end of file +} diff --git a/src/mac/carbon/statbmp.cpp b/src/mac/carbon/statbmp.cpp index d04e549b0e..522d2ed230 100644 --- a/src/mac/carbon/statbmp.cpp +++ b/src/mac/carbon/statbmp.cpp @@ -71,7 +71,7 @@ void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap) Refresh() ; } -void wxStaticBitmap::OnPaint( wxPaintEvent &event ) +void wxStaticBitmap::OnPaint( wxPaintEvent& WXUNUSED(event) ) { wxPaintDC dc(this); PrepareDC(dc); diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index 05da8899ac..c678b88edc 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -1587,27 +1587,27 @@ bool wxTextCtrl::Show(bool show) // standard handlers for standard edit menu events // ---------------------------------------------------------------------------- -void wxTextCtrl::OnCut(wxCommandEvent& event) +void wxTextCtrl::OnCut(wxCommandEvent& WXUNUSED(event)) { Cut(); } -void wxTextCtrl::OnCopy(wxCommandEvent& event) +void wxTextCtrl::OnCopy(wxCommandEvent& WXUNUSED(event)) { Copy(); } -void wxTextCtrl::OnPaste(wxCommandEvent& event) +void wxTextCtrl::OnPaste(wxCommandEvent& WXUNUSED(event)) { Paste(); } -void wxTextCtrl::OnUndo(wxCommandEvent& event) +void wxTextCtrl::OnUndo(wxCommandEvent& WXUNUSED(event)) { Undo(); } -void wxTextCtrl::OnRedo(wxCommandEvent& event) +void wxTextCtrl::OnRedo(wxCommandEvent& WXUNUSED(event)) { Redo(); } diff --git a/src/mac/carbon/toolbar.cpp b/src/mac/carbon/toolbar.cpp index c1d36f4122..3f85d6b4f0 100644 --- a/src/mac/carbon/toolbar.cpp +++ b/src/mac/carbon/toolbar.cpp @@ -172,7 +172,7 @@ wxToolBar::~wxToolBar() bool wxToolBar::Realize() { - if (m_tools.Number() == 0) + if (m_tools.GetCount() == 0) return FALSE; Point localOrigin ; @@ -195,7 +195,7 @@ bool wxToolBar::Realize() controlstyle.flags = kControlUseFontMask ; controlstyle.font = kControlFontSmallSystemFont ; - wxNode *node = m_tools.First(); + wxwxToolBarToolsListNode *node = m_tools.GetFirst(); int noButtons = 0; int x = 0 ; int y = 0 ; @@ -208,7 +208,7 @@ bool wxToolBar::Realize() while (node) { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); + wxToolBarTool *tool = (wxToolBarTool *)node->GetData(); if( !tool->IsSeparator() ) { @@ -288,7 +288,7 @@ bool wxToolBar::Realize() if (toolbarrect.top + y + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v > maxHeight) { maxHeight = toolbarrect.top + y + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v ; } - node = node->Next(); + node = node->GetNext(); } if ( GetWindowStyleFlag() & wxTB_HORIZONTAL ) @@ -339,7 +339,7 @@ void wxToolBar::MacHandleControlClick( WXWidget control , wxInt16 controlpart ) { if ( m_macToolHandles[index] == (void*) control ) { - wxToolBarTool *tool = (wxToolBarTool *)m_tools.Nth( index )->Data(); + wxToolBarTool *tool = (wxToolBarTool *)m_tools.Item( index )->GetData(); if ( tool->CanBeToggled() ) { tool->Toggle( GetControl32BitValue( (ControlHandle) control ) ) ; @@ -363,7 +363,7 @@ void wxToolBar::SetRows(int nRows) void wxToolBar::MacSuperChangedPosition() { - if (m_tools.Number() > 0) + if (m_tools.GetCount() > 0) { Point localOrigin ; @@ -385,7 +385,7 @@ void wxToolBar::MacSuperChangedPosition() controlstyle.flags = kControlUseFontMask ; controlstyle.font = kControlFontSmallSystemFont ; - wxNode *node = m_tools.First(); + wxwxToolBarToolsListNode *node = m_tools.GetFirst(); int noButtons = 0; int x = 0 ; wxSize toolSize = GetToolSize() ; @@ -399,7 +399,7 @@ void wxToolBar::MacSuperChangedPosition() WindowRef rootwindow = (WindowRef) MacGetRootWindow() ; while (node) { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); + wxToolBarTool *tool = (wxToolBarTool *)node->GetData(); if( !tool->IsSeparator() ) { @@ -444,7 +444,7 @@ void wxToolBar::MacSuperChangedPosition() if (toolbarrect.top + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v > maxHeight) maxHeight = toolbarrect.top + kwxMacToolBarTopMargin + m_yMargin - m_y - localOrigin.v ; - node = node->Next(); + node = node->GetNext(); } } @@ -493,7 +493,7 @@ wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord x, wxCoord y) const GetControlBounds((ControlHandle) m_macToolHandles[index], &bounds ) ; if ( PtInRect( pt , &bounds ) ) { - return (wxToolBarTool*) (m_tools.Nth( index )->Data() ) ; + return (wxToolBarTool*) (m_tools.Item( index )->GetData() ) ; } } } diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index 66aadb5830..4db55381ad 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -75,7 +75,7 @@ wxTopLevelWindowMac *wxFindWinFromMacWindow(WXWindow inWindowRef) wxNode *node = wxWinMacWindowList->Find((long)inWindowRef); if (!node) return NULL; - return (wxTopLevelWindowMac *)node->Data(); + return (wxTopLevelWindowMac *)node->GetData(); } void wxAssociateWinWithMacWindow(WXWindow inWindowRef, wxTopLevelWindowMac *win) diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 61a23f38cb..2515e88ca5 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -786,13 +786,13 @@ bool wxWindowMac::Show(bool show) void wxWindowMac::MacSuperShown( bool show ) { - wxNode *node = GetChildren().First(); + wxWindowListNode *node = GetChildren().GetFirst(); while ( node ) { - wxWindowMac *child = (wxWindowMac *)node->Data(); + wxWindowMac *child = (wxWindowMac *)node->GetData(); if ( child->m_isShown ) child->MacSuperShown( show ) ; - node = node->Next(); + node = node->GetNext(); } } @@ -804,13 +804,13 @@ void wxWindowMac::MacSuperEnabled( bool enabled ) // because unter MacOSX the frames are drawn with an addXXX mode) // the borders area } - wxNode *node = GetChildren().First(); + wxWindowListNode *node = GetChildren().GetFirst(); while ( node ) { - wxWindowMac *child = (wxWindowMac *)node->Data(); + wxWindowMac *child = (wxWindowMac *)node->GetData(); if ( child->m_isShown ) child->MacSuperEnabled( enabled ) ; - node = node->Next(); + node = node->GetNext(); } } @@ -1239,9 +1239,9 @@ void wxWindowMac::ScrollWindow(int dx, int dy, const wxRect *rect) DisposeRgn( updateRgn ) ; } - for (wxNode *node = GetChildren().First(); node; node = node->Next()) + for (wxWindowListNode *node = GetChildren().GetFirst(); node; node = node->GetNext()) { - wxWindowMac *child = (wxWindowMac*)node->Data(); + wxWindowMac *child = (wxWindowMac*)node->GetData(); if (child == m_vScrollBar) continue; if (child == m_hScrollBar) continue; if (child->IsTopLevel()) continue; @@ -1313,13 +1313,13 @@ void wxWindowMac::OnCommand(wxWindowMac& win, wxCommandEvent& event) wxObject* wxWindowMac::GetChild(int number) const { // Return a pointer to the Nth object in the Panel - wxNode *node = GetChildren().First(); + wxNode *node = GetChildren().GetFirst(); int n = number; while (node && n--) - node = node->Next(); + node = node->GetNext(); if ( node ) { - wxObject *obj = (wxObject *)node->Data(); + wxObject *obj = (wxObject *)node->GetData(); return(obj); } else @@ -1435,9 +1435,9 @@ bool wxWindowMac::MacGetWindowFromPointSub( const wxPoint &point , wxWindowMac** newPoint.y -= m_y; } - for (wxNode *node = GetChildren().First(); node; node = node->Next()) + for (wxWindowListNode *node = GetChildren().GetFirst(); node; node = node->GetNext()) { - wxWindowMac *child = (wxWindowMac*)node->Data(); + wxWindowMac *child = (wxWindowMac*)node->GetData(); // added the m_isShown test --dmazzoni if ( child->MacGetRootWindow() == window && child->m_isShown ) { @@ -1540,9 +1540,9 @@ bool wxWindowMac::MacDispatchMouseEvent(wxMouseEvent& event) int x = event.m_x ; int y = event.m_y ; - for (wxNode *node = GetChildren().First(); node; node = node->Next()) + for (wxWindowListNode *node = GetChildren().GetFirst(); node; node = node->GetNext()) { - wxWindowMac *child = (wxWindowMac*)node->Data(); + wxWindowMac *child = (wxWindowMac*)node->GetData(); if ( child->MacGetRootWindow() == window && child->IsShown() && child->IsEnabled() ) { if (child->MacDispatchMouseEvent(event)) @@ -1678,9 +1678,9 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool respectChildrenAndSibling { if ( GetWindowStyle() & wxCLIP_CHILDREN ) { - for (wxNode *node = GetChildren().First(); node; node = node->Next()) + for (wxWindowListNode *node = GetChildren().GetFirst(); node; node = node->GetNext()) { - wxWindowMac *child = (wxWindowMac*)node->Data(); + wxWindowMac *child = (wxWindowMac*)node->GetData(); if ( !child->IsTopLevel() && child->IsShown() ) { @@ -1701,9 +1701,9 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool respectChildrenAndSibling if ( (GetWindowStyle() & wxCLIP_SIBLINGS) && GetParent() ) { bool thisWindowThrough = false ; - for (wxNode *node = GetParent()->GetChildren().First(); node; node = node->Next()) + for (wxWindowListNode *node = GetParent()->GetChildren().GetFirst(); node; node = node->GetNext()) { - wxWindowMac *sibling = (wxWindowMac*)node->Data(); + wxWindowMac *sibling = (wxWindowMac*)node->GetData(); if ( sibling == this ) { thisWindowThrough = true ; @@ -1787,11 +1787,11 @@ void wxWindowMac::MacRedraw( WXHRGN updatergnr , long time, bool erase) // now intersect for each of the children their rect with the updateRgn and call MacRedraw recursively RgnHandle childupdate = NewRgn() ; - for (wxNode *node = GetChildren().First(); node; node = node->Next()) + for (wxWindowListNode *node = GetChildren().GetFirst(); node; node = node->GetNext()) { // calculate the update region for the child windows by intersecting the window rectangle with our own // passed in update region and then offset it to be client-wise window coordinates again - wxWindowMac *child = (wxWindowMac*)node->Data(); + wxWindowMac *child = (wxWindowMac*)node->GetData(); SetRectRgn( childupdate , child->m_x , child->m_y , child->m_x + child->m_width , child->m_y + child->m_height ) ; SectRgn( childupdate , updatergn , childupdate ) ; OffsetRgn( childupdate , -child->m_x , -child->m_y ) ; @@ -1948,12 +1948,12 @@ void wxWindowMac::MacSuperChangedPosition() { // only window-absolute structures have to be moved i.e. controls - wxNode *node = GetChildren().First(); + wxWindowListNode *node = GetChildren().GetFirst(); while ( node ) { - wxWindowMac *child = (wxWindowMac *)node->Data(); + wxWindowMac *child = (wxWindowMac *)node->GetData(); child->MacSuperChangedPosition() ; - node = node->Next(); + node = node->GetNext(); } } @@ -1961,12 +1961,12 @@ void wxWindowMac::MacTopLevelWindowChangedPosition() { // only screen-absolute structures have to be moved i.e. glcanvas - wxNode *node = GetChildren().First(); + wxWindowListNode *node = GetChildren().GetFirst(); while ( node ) { - wxWindowMac *child = (wxWindowMac *)node->Data(); + wxWindowMac *child = (wxWindowMac *)node->GetData(); child->MacTopLevelWindowChangedPosition() ; - node = node->Next(); + node = node->GetNext(); } } long wxWindowMac::MacGetLeftBorderSize( ) const diff --git a/src/mac/checklst.cpp b/src/mac/checklst.cpp index 3bb48dec08..89123057f0 100644 --- a/src/mac/checklst.cpp +++ b/src/mac/checklst.cpp @@ -376,7 +376,7 @@ END_EVENT_TABLE() void wxCheckListBox::OnChar(wxKeyEvent& event) { - if ( event.KeyCode() == WXK_SPACE ) + if ( event.GetKeyCode() == WXK_SPACE ) { int index = GetSelection() ; if ( index >= 0 ) diff --git a/src/mac/combobox.cpp b/src/mac/combobox.cpp index 22924613ea..664d142f40 100644 --- a/src/mac/combobox.cpp +++ b/src/mac/combobox.cpp @@ -60,7 +60,7 @@ public: protected: void OnChar( wxKeyEvent& event ) { - if ( event.KeyCode() == WXK_RETURN ) + if ( event.GetKeyCode() == WXK_RETURN ) { wxString value = GetValue(); @@ -462,7 +462,7 @@ bool wxComboBox::SetStringSelection(const wxString& sel) return FALSE; } -void wxComboBox::MacHandleControlClick( WXWidget control , wxInt16 controlpart ) +void wxComboBox::MacHandleControlClick( WXWidget WXUNUSED(control) , wxInt16 WXUNUSED(controlpart) ) { wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId ); event.SetInt(GetSelection()); diff --git a/src/mac/control.cpp b/src/mac/control.cpp index 92e8cd3cc8..05db0f2166 100644 --- a/src/mac/control.cpp +++ b/src/mac/control.cpp @@ -87,7 +87,7 @@ pascal void wxMacLiveScrollbarActionProc( ControlHandle control , ControlPartCod ControlColorUPP wxMacSetupControlBackgroundUPP = NULL ; ControlDefUPP wxMacControlActionUPP = NULL ; -pascal SInt32 wxMacControlDefintion(SInt16 varCode, ControlRef theControl, ControlDefProcMessage message, SInt32 param) +pascal SInt32 wxMacControlDefinition(SInt16 varCode, ControlRef theControl, ControlDefProcMessage message, SInt32 param) { wxControl* wx = (wxControl*) wxFindControlFromMacControl( theControl ) ; @@ -295,7 +295,7 @@ wxControl *wxFindControlFromMacControl(ControlHandle inControl ) wxNode *node = wxWinMacControlList->Find((long)inControl); if (!node) return NULL; - return (wxControl *)node->Data(); + return (wxControl *)node->GetData(); } void wxAssociateControlWithMacControl(ControlHandle inControl, wxControl *control) @@ -398,7 +398,7 @@ void wxControl::MacPostControlCreate() } if ( wxMacControlActionUPP == NULL ) { - wxMacControlActionUPP = NewControlDefUPP( wxMacControlDefintion ) ; + wxMacControlActionUPP = NewControlDefUPP( wxMacControlDefinition ) ; } // The following block of code is responsible for crashes when switching // back to windows, which can be seen in the dialogs sample. diff --git a/src/mac/listbox.cpp b/src/mac/listbox.cpp index 5c3dc855d0..e62b5ac644 100644 --- a/src/mac/listbox.cpp +++ b/src/mac/listbox.cpp @@ -937,7 +937,7 @@ void wxListBox::MacDoDoubleClick() void wxListBox::OnChar(wxKeyEvent& event) { - if ( event.KeyCode() == WXK_RETURN || event.KeyCode() == WXK_NUMPAD_ENTER) + if ( event.GetKeyCode() == WXK_RETURN || event.GetKeyCode() == WXK_NUMPAD_ENTER) { wxWindow* parent = GetParent() ; while( parent && !parent->IsTopLevel() && parent->GetDefaultItem() == NULL ) @@ -958,14 +958,14 @@ void wxListBox::OnChar(wxKeyEvent& event) event.Skip() ; } /* generate wxID_CANCEL if command-. or has been pressed (typically in dialogs) */ - else if (event.KeyCode() == WXK_ESCAPE || (event.KeyCode() == '.' && event.MetaDown() ) ) + else if (event.GetKeyCode() == WXK_ESCAPE || (event.GetKeyCode() == '.' && event.MetaDown() ) ) { wxWindow* win = GetParent()->FindWindow( wxID_CANCEL ) ; wxCommandEvent new_event(wxEVT_COMMAND_BUTTON_CLICKED,wxID_CANCEL); new_event.SetEventObject( win ); win->GetEventHandler()->ProcessEvent( new_event ); } - else if ( event.KeyCode() == WXK_TAB ) + else if ( event.GetKeyCode() == WXK_TAB ) { wxNavigationKeyEvent new_event; new_event.SetEventObject( this ); @@ -976,7 +976,7 @@ void wxListBox::OnChar(wxKeyEvent& event) if ( !GetEventHandler()->ProcessEvent( new_event ) ) event.Skip() ; } - else if ( event.KeyCode() == WXK_DOWN || event.KeyCode() == WXK_UP ) + else if ( event.GetKeyCode() == WXK_DOWN || event.GetKeyCode() == WXK_UP ) { // perform the default key handling first wxControl::OnKeyDown( event ) ; @@ -1011,7 +1011,7 @@ void wxListBox::OnChar(wxKeyEvent& event) m_typeIn = "" ; } m_lastTypeIn = event.GetTimestamp() ; - m_typeIn += (char) event.KeyCode() ; + m_typeIn += (char) event.GetKeyCode() ; int line = FindString("*"+m_typeIn+"*") ; if ( line >= 0 ) { diff --git a/src/mac/menu.cpp b/src/mac/menu.cpp index e81e6de61a..7064cf06a3 100644 --- a/src/mac/menu.cpp +++ b/src/mac/menu.cpp @@ -10,6 +10,11 @@ ///////////////////////////////////////////////////////////////////////////// +#ifdef __GNUG__ +#pragma implementation "menu.h" +#pragma implementation "menuitem.h" +#endif + // ============================================================================ // headers & declarations // ============================================================================ @@ -17,11 +22,6 @@ // wxWindows headers // ----------------- -#ifdef __GNUG__ -#pragma implementation "menu.h" -#pragma implementation "menuitem.h" -#endif - #include "wx/app.h" #include "wx/menu.h" #include "wx/menuitem.h" @@ -560,7 +560,7 @@ void wxMenuBar::MacInstallMenuBar() for (size_t i = 0; i < m_menus.GetCount(); i++) { Str255 label; - wxNode *node; + wxwxMenuItemListNode *node; wxMenuItem *item; int pos ; wxMenu* menu = m_menus[i] , *subMenu = NULL ; @@ -578,9 +578,9 @@ void wxMenuBar::MacInstallMenuBar() DeleteMenuItem( mh , i ) ; } - for (pos = 0 , node = menu->GetMenuItems().First(); node; node = node->Next(), pos++) + for (pos = 0 , node = menu->GetMenuItems().GetFirst(); node; node = node->GetNext(), pos++) { - item = (wxMenuItem *)node->Data(); + item = (wxMenuItem *)node->GetData(); subMenu = item->GetSubMenu() ; if (subMenu) { @@ -629,9 +629,9 @@ void wxMenuBar::MacInstallMenuBar() UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , label ) ; wxArrayPtrVoid submenus ; - for (pos = 0, node = menu->GetMenuItems().First(); node; node = node->Next(), pos++) + for (pos = 0, node = menu->GetMenuItems().GetFirst(); node; node = node->GetNext(), pos++) { - item = (wxMenuItem *)node->Data(); + item = (wxMenuItem *)node->GetData(); subMenu = item->GetSubMenu() ; if (subMenu) { @@ -642,12 +642,12 @@ void wxMenuBar::MacInstallMenuBar() for ( size_t i = 0 ; i < submenus.GetCount() ; ++i ) { wxMenu* submenu = (wxMenu*) submenus[i] ; - wxNode *subnode; + wxwxMenuItemListNode *subnode; wxMenuItem *subitem; int subpos ; - for ( subpos = 0 , subnode = submenu->GetMenuItems().First(); subnode; subnode = subnode->Next(), subpos++) + for ( subpos = 0 , subnode = submenu->GetMenuItems().GetFirst(); subnode; subnode = subnode->GetNext(), subpos++) { - subitem = (wxMenuItem *)subnode->Data(); + subitem = (wxMenuItem *)subnode->GetData(); wxMenu* itsSubMenu = subitem->GetSubMenu() ; if (itsSubMenu) { diff --git a/src/mac/notebmac.cpp b/src/mac/notebmac.cpp index 908cef7b5f..aae205f86b 100644 --- a/src/mac/notebmac.cpp +++ b/src/mac/notebmac.cpp @@ -9,6 +9,10 @@ // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// +#ifdef __GNUG__ + #pragma implementation "notebook.h" +#endif + // ============================================================================ // declarations // ============================================================================ @@ -16,10 +20,6 @@ // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ - #pragma implementation "notebook.h" -#endif - #include "wx/app.h" #include "wx/string.h" #include "wx/log.h" diff --git a/src/mac/radiobox.cpp b/src/mac/radiobox.cpp index 6c9ba1abb2..5c1938736c 100644 --- a/src/mac/radiobox.cpp +++ b/src/mac/radiobox.cpp @@ -9,15 +9,15 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -//------------------------------------------------------------------------------------- -// headers -//------------------------------------------------------------------------------------- - #ifdef __GNUG__ #pragma implementation "radioboxbase.h" #pragma implementation "radiobox.h" #endif +//------------------------------------------------------------------------------------- +// headers +//------------------------------------------------------------------------------------- + #include "wx/defs.h" #include "wx/radiobox.h" diff --git a/src/mac/slider.cpp b/src/mac/slider.cpp index aa4e68609a..c60b1a5d81 100644 --- a/src/mac/slider.cpp +++ b/src/mac/slider.cpp @@ -418,7 +418,7 @@ void wxSlider::MacHandleControlClick( WXWidget control , wxInt16 controlpart ) } } - void wxSlider::DoMoveWindow(int x, int y, int width, int height) - { +void wxSlider::DoMoveWindow(int x, int y, int width, int height) +{ wxControl::DoMoveWindow(x,y,width,height) ; -} \ No newline at end of file +} diff --git a/src/mac/statbmp.cpp b/src/mac/statbmp.cpp index d04e549b0e..522d2ed230 100644 --- a/src/mac/statbmp.cpp +++ b/src/mac/statbmp.cpp @@ -71,7 +71,7 @@ void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap) Refresh() ; } -void wxStaticBitmap::OnPaint( wxPaintEvent &event ) +void wxStaticBitmap::OnPaint( wxPaintEvent& WXUNUSED(event) ) { wxPaintDC dc(this); PrepareDC(dc); diff --git a/src/mac/textctrl.cpp b/src/mac/textctrl.cpp index 05da8899ac..c678b88edc 100644 --- a/src/mac/textctrl.cpp +++ b/src/mac/textctrl.cpp @@ -1587,27 +1587,27 @@ bool wxTextCtrl::Show(bool show) // standard handlers for standard edit menu events // ---------------------------------------------------------------------------- -void wxTextCtrl::OnCut(wxCommandEvent& event) +void wxTextCtrl::OnCut(wxCommandEvent& WXUNUSED(event)) { Cut(); } -void wxTextCtrl::OnCopy(wxCommandEvent& event) +void wxTextCtrl::OnCopy(wxCommandEvent& WXUNUSED(event)) { Copy(); } -void wxTextCtrl::OnPaste(wxCommandEvent& event) +void wxTextCtrl::OnPaste(wxCommandEvent& WXUNUSED(event)) { Paste(); } -void wxTextCtrl::OnUndo(wxCommandEvent& event) +void wxTextCtrl::OnUndo(wxCommandEvent& WXUNUSED(event)) { Undo(); } -void wxTextCtrl::OnRedo(wxCommandEvent& event) +void wxTextCtrl::OnRedo(wxCommandEvent& WXUNUSED(event)) { Redo(); } diff --git a/src/mac/toolbar.cpp b/src/mac/toolbar.cpp index c1d36f4122..3f85d6b4f0 100644 --- a/src/mac/toolbar.cpp +++ b/src/mac/toolbar.cpp @@ -172,7 +172,7 @@ wxToolBar::~wxToolBar() bool wxToolBar::Realize() { - if (m_tools.Number() == 0) + if (m_tools.GetCount() == 0) return FALSE; Point localOrigin ; @@ -195,7 +195,7 @@ bool wxToolBar::Realize() controlstyle.flags = kControlUseFontMask ; controlstyle.font = kControlFontSmallSystemFont ; - wxNode *node = m_tools.First(); + wxwxToolBarToolsListNode *node = m_tools.GetFirst(); int noButtons = 0; int x = 0 ; int y = 0 ; @@ -208,7 +208,7 @@ bool wxToolBar::Realize() while (node) { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); + wxToolBarTool *tool = (wxToolBarTool *)node->GetData(); if( !tool->IsSeparator() ) { @@ -288,7 +288,7 @@ bool wxToolBar::Realize() if (toolbarrect.top + y + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v > maxHeight) { maxHeight = toolbarrect.top + y + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v ; } - node = node->Next(); + node = node->GetNext(); } if ( GetWindowStyleFlag() & wxTB_HORIZONTAL ) @@ -339,7 +339,7 @@ void wxToolBar::MacHandleControlClick( WXWidget control , wxInt16 controlpart ) { if ( m_macToolHandles[index] == (void*) control ) { - wxToolBarTool *tool = (wxToolBarTool *)m_tools.Nth( index )->Data(); + wxToolBarTool *tool = (wxToolBarTool *)m_tools.Item( index )->GetData(); if ( tool->CanBeToggled() ) { tool->Toggle( GetControl32BitValue( (ControlHandle) control ) ) ; @@ -363,7 +363,7 @@ void wxToolBar::SetRows(int nRows) void wxToolBar::MacSuperChangedPosition() { - if (m_tools.Number() > 0) + if (m_tools.GetCount() > 0) { Point localOrigin ; @@ -385,7 +385,7 @@ void wxToolBar::MacSuperChangedPosition() controlstyle.flags = kControlUseFontMask ; controlstyle.font = kControlFontSmallSystemFont ; - wxNode *node = m_tools.First(); + wxwxToolBarToolsListNode *node = m_tools.GetFirst(); int noButtons = 0; int x = 0 ; wxSize toolSize = GetToolSize() ; @@ -399,7 +399,7 @@ void wxToolBar::MacSuperChangedPosition() WindowRef rootwindow = (WindowRef) MacGetRootWindow() ; while (node) { - wxToolBarTool *tool = (wxToolBarTool *)node->Data(); + wxToolBarTool *tool = (wxToolBarTool *)node->GetData(); if( !tool->IsSeparator() ) { @@ -444,7 +444,7 @@ void wxToolBar::MacSuperChangedPosition() if (toolbarrect.top + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v > maxHeight) maxHeight = toolbarrect.top + kwxMacToolBarTopMargin + m_yMargin - m_y - localOrigin.v ; - node = node->Next(); + node = node->GetNext(); } } @@ -493,7 +493,7 @@ wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord x, wxCoord y) const GetControlBounds((ControlHandle) m_macToolHandles[index], &bounds ) ; if ( PtInRect( pt , &bounds ) ) { - return (wxToolBarTool*) (m_tools.Nth( index )->Data() ) ; + return (wxToolBarTool*) (m_tools.Item( index )->GetData() ) ; } } } diff --git a/src/mac/toplevel.cpp b/src/mac/toplevel.cpp index 66aadb5830..4db55381ad 100644 --- a/src/mac/toplevel.cpp +++ b/src/mac/toplevel.cpp @@ -75,7 +75,7 @@ wxTopLevelWindowMac *wxFindWinFromMacWindow(WXWindow inWindowRef) wxNode *node = wxWinMacWindowList->Find((long)inWindowRef); if (!node) return NULL; - return (wxTopLevelWindowMac *)node->Data(); + return (wxTopLevelWindowMac *)node->GetData(); } void wxAssociateWinWithMacWindow(WXWindow inWindowRef, wxTopLevelWindowMac *win) diff --git a/src/mac/window.cpp b/src/mac/window.cpp index 61a23f38cb..2515e88ca5 100644 --- a/src/mac/window.cpp +++ b/src/mac/window.cpp @@ -786,13 +786,13 @@ bool wxWindowMac::Show(bool show) void wxWindowMac::MacSuperShown( bool show ) { - wxNode *node = GetChildren().First(); + wxWindowListNode *node = GetChildren().GetFirst(); while ( node ) { - wxWindowMac *child = (wxWindowMac *)node->Data(); + wxWindowMac *child = (wxWindowMac *)node->GetData(); if ( child->m_isShown ) child->MacSuperShown( show ) ; - node = node->Next(); + node = node->GetNext(); } } @@ -804,13 +804,13 @@ void wxWindowMac::MacSuperEnabled( bool enabled ) // because unter MacOSX the frames are drawn with an addXXX mode) // the borders area } - wxNode *node = GetChildren().First(); + wxWindowListNode *node = GetChildren().GetFirst(); while ( node ) { - wxWindowMac *child = (wxWindowMac *)node->Data(); + wxWindowMac *child = (wxWindowMac *)node->GetData(); if ( child->m_isShown ) child->MacSuperEnabled( enabled ) ; - node = node->Next(); + node = node->GetNext(); } } @@ -1239,9 +1239,9 @@ void wxWindowMac::ScrollWindow(int dx, int dy, const wxRect *rect) DisposeRgn( updateRgn ) ; } - for (wxNode *node = GetChildren().First(); node; node = node->Next()) + for (wxWindowListNode *node = GetChildren().GetFirst(); node; node = node->GetNext()) { - wxWindowMac *child = (wxWindowMac*)node->Data(); + wxWindowMac *child = (wxWindowMac*)node->GetData(); if (child == m_vScrollBar) continue; if (child == m_hScrollBar) continue; if (child->IsTopLevel()) continue; @@ -1313,13 +1313,13 @@ void wxWindowMac::OnCommand(wxWindowMac& win, wxCommandEvent& event) wxObject* wxWindowMac::GetChild(int number) const { // Return a pointer to the Nth object in the Panel - wxNode *node = GetChildren().First(); + wxNode *node = GetChildren().GetFirst(); int n = number; while (node && n--) - node = node->Next(); + node = node->GetNext(); if ( node ) { - wxObject *obj = (wxObject *)node->Data(); + wxObject *obj = (wxObject *)node->GetData(); return(obj); } else @@ -1435,9 +1435,9 @@ bool wxWindowMac::MacGetWindowFromPointSub( const wxPoint &point , wxWindowMac** newPoint.y -= m_y; } - for (wxNode *node = GetChildren().First(); node; node = node->Next()) + for (wxWindowListNode *node = GetChildren().GetFirst(); node; node = node->GetNext()) { - wxWindowMac *child = (wxWindowMac*)node->Data(); + wxWindowMac *child = (wxWindowMac*)node->GetData(); // added the m_isShown test --dmazzoni if ( child->MacGetRootWindow() == window && child->m_isShown ) { @@ -1540,9 +1540,9 @@ bool wxWindowMac::MacDispatchMouseEvent(wxMouseEvent& event) int x = event.m_x ; int y = event.m_y ; - for (wxNode *node = GetChildren().First(); node; node = node->Next()) + for (wxWindowListNode *node = GetChildren().GetFirst(); node; node = node->GetNext()) { - wxWindowMac *child = (wxWindowMac*)node->Data(); + wxWindowMac *child = (wxWindowMac*)node->GetData(); if ( child->MacGetRootWindow() == window && child->IsShown() && child->IsEnabled() ) { if (child->MacDispatchMouseEvent(event)) @@ -1678,9 +1678,9 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool respectChildrenAndSibling { if ( GetWindowStyle() & wxCLIP_CHILDREN ) { - for (wxNode *node = GetChildren().First(); node; node = node->Next()) + for (wxWindowListNode *node = GetChildren().GetFirst(); node; node = node->GetNext()) { - wxWindowMac *child = (wxWindowMac*)node->Data(); + wxWindowMac *child = (wxWindowMac*)node->GetData(); if ( !child->IsTopLevel() && child->IsShown() ) { @@ -1701,9 +1701,9 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool respectChildrenAndSibling if ( (GetWindowStyle() & wxCLIP_SIBLINGS) && GetParent() ) { bool thisWindowThrough = false ; - for (wxNode *node = GetParent()->GetChildren().First(); node; node = node->Next()) + for (wxWindowListNode *node = GetParent()->GetChildren().GetFirst(); node; node = node->GetNext()) { - wxWindowMac *sibling = (wxWindowMac*)node->Data(); + wxWindowMac *sibling = (wxWindowMac*)node->GetData(); if ( sibling == this ) { thisWindowThrough = true ; @@ -1787,11 +1787,11 @@ void wxWindowMac::MacRedraw( WXHRGN updatergnr , long time, bool erase) // now intersect for each of the children their rect with the updateRgn and call MacRedraw recursively RgnHandle childupdate = NewRgn() ; - for (wxNode *node = GetChildren().First(); node; node = node->Next()) + for (wxWindowListNode *node = GetChildren().GetFirst(); node; node = node->GetNext()) { // calculate the update region for the child windows by intersecting the window rectangle with our own // passed in update region and then offset it to be client-wise window coordinates again - wxWindowMac *child = (wxWindowMac*)node->Data(); + wxWindowMac *child = (wxWindowMac*)node->GetData(); SetRectRgn( childupdate , child->m_x , child->m_y , child->m_x + child->m_width , child->m_y + child->m_height ) ; SectRgn( childupdate , updatergn , childupdate ) ; OffsetRgn( childupdate , -child->m_x , -child->m_y ) ; @@ -1948,12 +1948,12 @@ void wxWindowMac::MacSuperChangedPosition() { // only window-absolute structures have to be moved i.e. controls - wxNode *node = GetChildren().First(); + wxWindowListNode *node = GetChildren().GetFirst(); while ( node ) { - wxWindowMac *child = (wxWindowMac *)node->Data(); + wxWindowMac *child = (wxWindowMac *)node->GetData(); child->MacSuperChangedPosition() ; - node = node->Next(); + node = node->GetNext(); } } @@ -1961,12 +1961,12 @@ void wxWindowMac::MacTopLevelWindowChangedPosition() { // only screen-absolute structures have to be moved i.e. glcanvas - wxNode *node = GetChildren().First(); + wxWindowListNode *node = GetChildren().GetFirst(); while ( node ) { - wxWindowMac *child = (wxWindowMac *)node->Data(); + wxWindowMac *child = (wxWindowMac *)node->GetData(); child->MacTopLevelWindowChangedPosition() ; - node = node->Next(); + node = node->GetNext(); } } long wxWindowMac::MacGetLeftBorderSize( ) const -- 2.45.2