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
This commit is contained in:
@@ -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;
|
||||
|
@@ -105,7 +105,7 @@ void wxButton::Command (wxCommandEvent & event)
|
||||
ProcessCommand (event);
|
||||
}
|
||||
|
||||
void wxButton::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
|
||||
void wxButton::MacHandleControlClick( WXWidget WXUNUSED(control) , wxInt16 controlpart )
|
||||
{
|
||||
if ( controlpart != kControlNoPart )
|
||||
{
|
||||
|
@@ -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;
|
||||
|
@@ -105,7 +105,7 @@ void wxButton::Command (wxCommandEvent & event)
|
||||
ProcessCommand (event);
|
||||
}
|
||||
|
||||
void wxButton::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
|
||||
void wxButton::MacHandleControlClick( WXWidget WXUNUSED(control) , wxInt16 controlpart )
|
||||
{
|
||||
if ( controlpart != kControlNoPart )
|
||||
{
|
||||
|
@@ -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 )
|
||||
|
@@ -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());
|
||||
|
@@ -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.
|
||||
|
@@ -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 <esc> 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 )
|
||||
{
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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"
|
||||
|
@@ -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"
|
||||
|
@@ -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);
|
||||
|
@@ -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();
|
||||
}
|
||||
|
@@ -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() ) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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)
|
||||
|
@@ -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
|
||||
|
@@ -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 )
|
||||
|
@@ -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());
|
||||
|
@@ -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.
|
||||
|
@@ -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 <esc> 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 )
|
||||
{
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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"
|
||||
|
@@ -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"
|
||||
|
@@ -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);
|
||||
|
@@ -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();
|
||||
}
|
||||
|
@@ -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() ) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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)
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user