git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18720
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
30 files changed:
- wxNode *node = M_ACCELDATA->m_accels.First();
+ wxwxAccelListNode *node = M_ACCELDATA->m_accels.GetFirst();
- 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()) &&
if ((event.m_keyCode == entry->GetKeyCode()) &&
(((entry->GetFlags() & wxACCEL_CTRL) == 0) || event.ControlDown()) &&
(((entry->GetFlags() & wxACCEL_SHIFT) == 0) || event.ShiftDown()) &&
{
return entry->GetCommand();
}
{
return entry->GetCommand();
}
+ node = node->GetNext();
void wxButton::Command (wxCommandEvent & event)
{
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);
}
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);
+ }
- wxNode *node = M_ACCELDATA->m_accels.First();
+ wxwxAccelListNode *node = M_ACCELDATA->m_accels.GetFirst();
- 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()) &&
if ((event.m_keyCode == entry->GetKeyCode()) &&
(((entry->GetFlags() & wxACCEL_CTRL) == 0) || event.ControlDown()) &&
(((entry->GetFlags() & wxACCEL_SHIFT) == 0) || event.ShiftDown()) &&
{
return entry->GetCommand();
}
{
return entry->GetCommand();
}
+ node = node->GetNext();
void wxButton::Command (wxCommandEvent & event)
{
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);
}
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);
+ }
void wxCheckListBox::OnChar(wxKeyEvent& event)
{
void wxCheckListBox::OnChar(wxKeyEvent& event)
{
- if ( event.KeyCode() == WXK_SPACE )
+ if ( event.GetKeyCode() == WXK_SPACE )
{
int index = GetSelection() ;
if ( index >= 0 )
{
int index = GetSelection() ;
if ( index >= 0 )
protected:
void OnChar( wxKeyEvent& event )
{
protected:
void OnChar( wxKeyEvent& event )
{
- if ( event.KeyCode() == WXK_RETURN )
+ if ( event.GetKeyCode() == WXK_RETURN )
{
wxString value = GetValue();
{
wxString value = GetValue();
-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());
{
wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId );
event.SetInt(GetSelection());
ControlColorUPP wxMacSetupControlBackgroundUPP = NULL ;
ControlDefUPP wxMacControlActionUPP = NULL ;
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 ) ;
{
wxControl* wx = (wxControl*) wxFindControlFromMacControl( theControl ) ;
wxNode *node = wxWinMacControlList->Find((long)inControl);
if (!node)
return NULL;
wxNode *node = wxWinMacControlList->Find((long)inControl);
if (!node)
return NULL;
- return (wxControl *)node->Data();
+ return (wxControl *)node->GetData();
}
void wxAssociateControlWithMacControl(ControlHandle inControl, wxControl *control)
}
void wxAssociateControlWithMacControl(ControlHandle inControl, wxControl *control)
}
if ( wxMacControlActionUPP == NULL )
{
}
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.
}
// The following block of code is responsible for crashes when switching
// back to windows, which can be seen in the dialogs sample.
void wxListBox::OnChar(wxKeyEvent& event)
{
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 )
{
wxWindow* parent = GetParent() ;
while( parent && !parent->IsTopLevel() && parent->GetDefaultItem() == NULL )
event.Skip() ;
}
/* generate wxID_CANCEL if command-. or <esc> has been pressed (typically in dialogs) */
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 );
}
{
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 );
{
wxNavigationKeyEvent new_event;
new_event.SetEventObject( this );
if ( !GetEventHandler()->ProcessEvent( new_event ) )
event.Skip() ;
}
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 ) ;
{
// perform the default key handling first
wxControl::OnKeyDown( event ) ;
m_typeIn = "" ;
}
m_lastTypeIn = event.GetTimestamp() ;
m_typeIn = "" ;
}
m_lastTypeIn = event.GetTimestamp() ;
- m_typeIn += (char) event.KeyCode() ;
+ m_typeIn += (char) event.GetKeyCode() ;
int line = FindString("*"+m_typeIn+"*") ;
if ( line >= 0 )
{
int line = FindString("*"+m_typeIn+"*") ;
if ( line >= 0 )
{
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
+#ifdef __GNUG__
+#pragma implementation "menu.h"
+#pragma implementation "menuitem.h"
+#endif
+
// ============================================================================
// headers & declarations
// ============================================================================
// ============================================================================
// headers & declarations
// ============================================================================
// wxWindows headers
// -----------------
// 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"
#include "wx/app.h"
#include "wx/menu.h"
#include "wx/menuitem.h"
for (size_t i = 0; i < m_menus.GetCount(); i++)
{
Str255 label;
for (size_t i = 0; i < m_menus.GetCount(); i++)
{
Str255 label;
+ wxwxMenuItemListNode *node;
wxMenuItem *item;
int pos ;
wxMenu* menu = m_menus[i] , *subMenu = NULL ;
wxMenuItem *item;
int pos ;
wxMenu* menu = m_menus[i] , *subMenu = NULL ;
DeleteMenuItem( mh , i ) ;
}
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)
{
subMenu = item->GetSubMenu() ;
if (subMenu)
{
UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , label ) ;
wxArrayPtrVoid submenus ;
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)
{
subMenu = item->GetSubMenu() ;
if (subMenu)
{
for ( size_t i = 0 ; i < submenus.GetCount() ; ++i )
{
wxMenu* submenu = (wxMenu*) submenus[i] ;
for ( size_t i = 0 ; i < submenus.GetCount() ; ++i )
{
wxMenu* submenu = (wxMenu*) submenus[i] ;
+ wxwxMenuItemListNode *subnode;
wxMenuItem *subitem;
int subpos ;
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)
{
wxMenu* itsSubMenu = subitem->GetSubMenu() ;
if (itsSubMenu)
{
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
+#ifdef __GNUG__
+ #pragma implementation "notebook.h"
+#endif
+
// ============================================================================
// declarations
// ============================================================================
// ============================================================================
// declarations
// ============================================================================
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
-#ifdef __GNUG__
- #pragma implementation "notebook.h"
-#endif
-
#include "wx/app.h"
#include "wx/string.h"
#include "wx/log.h"
#include "wx/app.h"
#include "wx/string.h"
#include "wx/log.h"
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-//-------------------------------------------------------------------------------------
-// headers
-//-------------------------------------------------------------------------------------
-
#ifdef __GNUG__
#pragma implementation "radioboxbase.h"
#pragma implementation "radiobox.h"
#endif
#ifdef __GNUG__
#pragma implementation "radioboxbase.h"
#pragma implementation "radiobox.h"
#endif
+//-------------------------------------------------------------------------------------
+// headers
+//-------------------------------------------------------------------------------------
+
#include "wx/defs.h"
#include "wx/radiobox.h"
#include "wx/defs.h"
#include "wx/radiobox.h"
- 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) ;
wxControl::DoMoveWindow(x,y,width,height) ;
-}
\ No newline at end of file
-void wxStaticBitmap::OnPaint( wxPaintEvent &event )
+void wxStaticBitmap::OnPaint( wxPaintEvent& WXUNUSED(event) )
{
wxPaintDC dc(this);
PrepareDC(dc);
{
wxPaintDC dc(this);
PrepareDC(dc);
// standard handlers for standard edit menu events
// ----------------------------------------------------------------------------
// standard handlers for standard edit menu events
// ----------------------------------------------------------------------------
-void wxTextCtrl::OnCut(wxCommandEvent& event)
+void wxTextCtrl::OnCut(wxCommandEvent& WXUNUSED(event))
-void wxTextCtrl::OnCopy(wxCommandEvent& event)
+void wxTextCtrl::OnCopy(wxCommandEvent& WXUNUSED(event))
-void wxTextCtrl::OnPaste(wxCommandEvent& event)
+void wxTextCtrl::OnPaste(wxCommandEvent& WXUNUSED(event))
-void wxTextCtrl::OnUndo(wxCommandEvent& event)
+void wxTextCtrl::OnUndo(wxCommandEvent& WXUNUSED(event))
-void wxTextCtrl::OnRedo(wxCommandEvent& event)
+void wxTextCtrl::OnRedo(wxCommandEvent& WXUNUSED(event))
bool wxToolBar::Realize()
{
bool wxToolBar::Realize()
{
- if (m_tools.Number() == 0)
+ if (m_tools.GetCount() == 0)
return FALSE;
Point localOrigin ;
return FALSE;
Point localOrigin ;
controlstyle.flags = kControlUseFontMask ;
controlstyle.font = kControlFontSmallSystemFont ;
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 ;
int noButtons = 0;
int x = 0 ;
int y = 0 ;
- wxToolBarTool *tool = (wxToolBarTool *)node->Data();
+ wxToolBarTool *tool = (wxToolBarTool *)node->GetData();
if( !tool->IsSeparator() )
{
if( !tool->IsSeparator() )
{
if (toolbarrect.top + y + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v > maxHeight) {
maxHeight = toolbarrect.top + y + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v ;
}
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->GetNext();
}
if ( GetWindowStyleFlag() & wxTB_HORIZONTAL )
}
if ( GetWindowStyleFlag() & wxTB_HORIZONTAL )
{
if ( m_macToolHandles[index] == (void*) control )
{
{
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 ) ) ;
if ( tool->CanBeToggled() )
{
tool->Toggle( GetControl32BitValue( (ControlHandle) control ) ) ;
void wxToolBar::MacSuperChangedPosition()
{
void wxToolBar::MacSuperChangedPosition()
{
- if (m_tools.Number() > 0)
+ if (m_tools.GetCount() > 0)
controlstyle.flags = kControlUseFontMask ;
controlstyle.font = kControlFontSmallSystemFont ;
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() ;
int noButtons = 0;
int x = 0 ;
wxSize toolSize = GetToolSize() ;
WindowRef rootwindow = (WindowRef) MacGetRootWindow() ;
while (node)
{
WindowRef rootwindow = (WindowRef) MacGetRootWindow() ;
while (node)
{
- wxToolBarTool *tool = (wxToolBarTool *)node->Data();
+ wxToolBarTool *tool = (wxToolBarTool *)node->GetData();
if( !tool->IsSeparator() )
{
if( !tool->IsSeparator() )
{
if (toolbarrect.top + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v > maxHeight)
maxHeight = toolbarrect.top + kwxMacToolBarTopMargin + m_yMargin - m_y - localOrigin.v ;
if (toolbarrect.top + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v > maxHeight)
maxHeight = toolbarrect.top + kwxMacToolBarTopMargin + m_yMargin - m_y - localOrigin.v ;
+ node = node->GetNext();
GetControlBounds((ControlHandle) m_macToolHandles[index], &bounds ) ;
if ( PtInRect( pt , &bounds ) )
{
GetControlBounds((ControlHandle) m_macToolHandles[index], &bounds ) ;
if ( PtInRect( pt , &bounds ) )
{
- return (wxToolBarTool*) (m_tools.Nth( index )->Data() ) ;
+ return (wxToolBarTool*) (m_tools.Item( index )->GetData() ) ;
wxNode *node = wxWinMacWindowList->Find((long)inWindowRef);
if (!node)
return NULL;
wxNode *node = wxWinMacWindowList->Find((long)inWindowRef);
if (!node)
return NULL;
- return (wxTopLevelWindowMac *)node->Data();
+ return (wxTopLevelWindowMac *)node->GetData();
}
void wxAssociateWinWithMacWindow(WXWindow inWindowRef, wxTopLevelWindowMac *win)
}
void wxAssociateWinWithMacWindow(WXWindow inWindowRef, wxTopLevelWindowMac *win)
void wxWindowMac::MacSuperShown( bool show )
{
void wxWindowMac::MacSuperShown( bool show )
{
- wxNode *node = GetChildren().First();
+ wxWindowListNode *node = GetChildren().GetFirst();
- wxWindowMac *child = (wxWindowMac *)node->Data();
+ wxWindowMac *child = (wxWindowMac *)node->GetData();
if ( child->m_isShown )
child->MacSuperShown( show ) ;
if ( child->m_isShown )
child->MacSuperShown( show ) ;
+ node = node->GetNext();
// because unter MacOSX the frames are drawn with an addXXX mode)
// the borders area
}
// because unter MacOSX the frames are drawn with an addXXX mode)
// the borders area
}
- wxNode *node = GetChildren().First();
+ wxWindowListNode *node = GetChildren().GetFirst();
- wxWindowMac *child = (wxWindowMac *)node->Data();
+ wxWindowMac *child = (wxWindowMac *)node->GetData();
if ( child->m_isShown )
child->MacSuperEnabled( enabled ) ;
if ( child->m_isShown )
child->MacSuperEnabled( enabled ) ;
+ node = node->GetNext();
DisposeRgn( updateRgn ) ;
}
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;
if (child == m_vScrollBar) continue;
if (child == m_hScrollBar) continue;
if (child->IsTopLevel()) continue;
wxObject* wxWindowMac::GetChild(int number) const
{
// Return a pointer to the Nth object in the Panel
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--)
int n = number;
while (node && n--)
+ node = node->GetNext();
- wxObject *obj = (wxObject *)node->Data();
+ wxObject *obj = (wxObject *)node->GetData();
- 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 )
{
// added the m_isShown test --dmazzoni
if ( child->MacGetRootWindow() == window && child->m_isShown )
{
int x = event.m_x ;
int y = event.m_y ;
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))
if ( child->MacGetRootWindow() == window && child->IsShown() && child->IsEnabled() )
{
if (child->MacDispatchMouseEvent(event))
{
if ( GetWindowStyle() & wxCLIP_CHILDREN )
{
{
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() )
{
if ( !child->IsTopLevel() && child->IsShown() )
{
if ( (GetWindowStyle() & wxCLIP_SIBLINGS) && GetParent() )
{
bool thisWindowThrough = false ;
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 ;
if ( sibling == this )
{
thisWindowThrough = true ;
// now intersect for each of the children their rect with the updateRgn and call MacRedraw recursively
RgnHandle childupdate = NewRgn() ;
// 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
{
// 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 ) ;
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 ) ;
{
// only window-absolute structures have to be moved i.e. controls
{
// only window-absolute structures have to be moved i.e. controls
- wxNode *node = GetChildren().First();
+ wxWindowListNode *node = GetChildren().GetFirst();
- wxWindowMac *child = (wxWindowMac *)node->Data();
+ wxWindowMac *child = (wxWindowMac *)node->GetData();
child->MacSuperChangedPosition() ;
child->MacSuperChangedPosition() ;
+ node = node->GetNext();
{
// only screen-absolute structures have to be moved i.e. glcanvas
{
// only screen-absolute structures have to be moved i.e. glcanvas
- wxNode *node = GetChildren().First();
+ wxWindowListNode *node = GetChildren().GetFirst();
- wxWindowMac *child = (wxWindowMac *)node->Data();
+ wxWindowMac *child = (wxWindowMac *)node->GetData();
child->MacTopLevelWindowChangedPosition() ;
child->MacTopLevelWindowChangedPosition() ;
+ node = node->GetNext();
}
}
long wxWindowMac::MacGetLeftBorderSize( ) const
}
}
long wxWindowMac::MacGetLeftBorderSize( ) const
void wxCheckListBox::OnChar(wxKeyEvent& event)
{
void wxCheckListBox::OnChar(wxKeyEvent& event)
{
- if ( event.KeyCode() == WXK_SPACE )
+ if ( event.GetKeyCode() == WXK_SPACE )
{
int index = GetSelection() ;
if ( index >= 0 )
{
int index = GetSelection() ;
if ( index >= 0 )
protected:
void OnChar( wxKeyEvent& event )
{
protected:
void OnChar( wxKeyEvent& event )
{
- if ( event.KeyCode() == WXK_RETURN )
+ if ( event.GetKeyCode() == WXK_RETURN )
{
wxString value = GetValue();
{
wxString value = GetValue();
-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());
{
wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId );
event.SetInt(GetSelection());
ControlColorUPP wxMacSetupControlBackgroundUPP = NULL ;
ControlDefUPP wxMacControlActionUPP = NULL ;
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 ) ;
{
wxControl* wx = (wxControl*) wxFindControlFromMacControl( theControl ) ;
wxNode *node = wxWinMacControlList->Find((long)inControl);
if (!node)
return NULL;
wxNode *node = wxWinMacControlList->Find((long)inControl);
if (!node)
return NULL;
- return (wxControl *)node->Data();
+ return (wxControl *)node->GetData();
}
void wxAssociateControlWithMacControl(ControlHandle inControl, wxControl *control)
}
void wxAssociateControlWithMacControl(ControlHandle inControl, wxControl *control)
}
if ( wxMacControlActionUPP == NULL )
{
}
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.
}
// The following block of code is responsible for crashes when switching
// back to windows, which can be seen in the dialogs sample.
void wxListBox::OnChar(wxKeyEvent& event)
{
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 )
{
wxWindow* parent = GetParent() ;
while( parent && !parent->IsTopLevel() && parent->GetDefaultItem() == NULL )
event.Skip() ;
}
/* generate wxID_CANCEL if command-. or <esc> has been pressed (typically in dialogs) */
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 );
}
{
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 );
{
wxNavigationKeyEvent new_event;
new_event.SetEventObject( this );
if ( !GetEventHandler()->ProcessEvent( new_event ) )
event.Skip() ;
}
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 ) ;
{
// perform the default key handling first
wxControl::OnKeyDown( event ) ;
m_typeIn = "" ;
}
m_lastTypeIn = event.GetTimestamp() ;
m_typeIn = "" ;
}
m_lastTypeIn = event.GetTimestamp() ;
- m_typeIn += (char) event.KeyCode() ;
+ m_typeIn += (char) event.GetKeyCode() ;
int line = FindString("*"+m_typeIn+"*") ;
if ( line >= 0 )
{
int line = FindString("*"+m_typeIn+"*") ;
if ( line >= 0 )
{
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
+#ifdef __GNUG__
+#pragma implementation "menu.h"
+#pragma implementation "menuitem.h"
+#endif
+
// ============================================================================
// headers & declarations
// ============================================================================
// ============================================================================
// headers & declarations
// ============================================================================
// wxWindows headers
// -----------------
// 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"
#include "wx/app.h"
#include "wx/menu.h"
#include "wx/menuitem.h"
for (size_t i = 0; i < m_menus.GetCount(); i++)
{
Str255 label;
for (size_t i = 0; i < m_menus.GetCount(); i++)
{
Str255 label;
+ wxwxMenuItemListNode *node;
wxMenuItem *item;
int pos ;
wxMenu* menu = m_menus[i] , *subMenu = NULL ;
wxMenuItem *item;
int pos ;
wxMenu* menu = m_menus[i] , *subMenu = NULL ;
DeleteMenuItem( mh , i ) ;
}
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)
{
subMenu = item->GetSubMenu() ;
if (subMenu)
{
UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , label ) ;
wxArrayPtrVoid submenus ;
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)
{
subMenu = item->GetSubMenu() ;
if (subMenu)
{
for ( size_t i = 0 ; i < submenus.GetCount() ; ++i )
{
wxMenu* submenu = (wxMenu*) submenus[i] ;
for ( size_t i = 0 ; i < submenus.GetCount() ; ++i )
{
wxMenu* submenu = (wxMenu*) submenus[i] ;
+ wxwxMenuItemListNode *subnode;
wxMenuItem *subitem;
int subpos ;
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)
{
wxMenu* itsSubMenu = subitem->GetSubMenu() ;
if (itsSubMenu)
{
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
+#ifdef __GNUG__
+ #pragma implementation "notebook.h"
+#endif
+
// ============================================================================
// declarations
// ============================================================================
// ============================================================================
// declarations
// ============================================================================
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
-#ifdef __GNUG__
- #pragma implementation "notebook.h"
-#endif
-
#include "wx/app.h"
#include "wx/string.h"
#include "wx/log.h"
#include "wx/app.h"
#include "wx/string.h"
#include "wx/log.h"
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-//-------------------------------------------------------------------------------------
-// headers
-//-------------------------------------------------------------------------------------
-
#ifdef __GNUG__
#pragma implementation "radioboxbase.h"
#pragma implementation "radiobox.h"
#endif
#ifdef __GNUG__
#pragma implementation "radioboxbase.h"
#pragma implementation "radiobox.h"
#endif
+//-------------------------------------------------------------------------------------
+// headers
+//-------------------------------------------------------------------------------------
+
#include "wx/defs.h"
#include "wx/radiobox.h"
#include "wx/defs.h"
#include "wx/radiobox.h"
- 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) ;
wxControl::DoMoveWindow(x,y,width,height) ;
-}
\ No newline at end of file
-void wxStaticBitmap::OnPaint( wxPaintEvent &event )
+void wxStaticBitmap::OnPaint( wxPaintEvent& WXUNUSED(event) )
{
wxPaintDC dc(this);
PrepareDC(dc);
{
wxPaintDC dc(this);
PrepareDC(dc);
// standard handlers for standard edit menu events
// ----------------------------------------------------------------------------
// standard handlers for standard edit menu events
// ----------------------------------------------------------------------------
-void wxTextCtrl::OnCut(wxCommandEvent& event)
+void wxTextCtrl::OnCut(wxCommandEvent& WXUNUSED(event))
-void wxTextCtrl::OnCopy(wxCommandEvent& event)
+void wxTextCtrl::OnCopy(wxCommandEvent& WXUNUSED(event))
-void wxTextCtrl::OnPaste(wxCommandEvent& event)
+void wxTextCtrl::OnPaste(wxCommandEvent& WXUNUSED(event))
-void wxTextCtrl::OnUndo(wxCommandEvent& event)
+void wxTextCtrl::OnUndo(wxCommandEvent& WXUNUSED(event))
-void wxTextCtrl::OnRedo(wxCommandEvent& event)
+void wxTextCtrl::OnRedo(wxCommandEvent& WXUNUSED(event))
bool wxToolBar::Realize()
{
bool wxToolBar::Realize()
{
- if (m_tools.Number() == 0)
+ if (m_tools.GetCount() == 0)
return FALSE;
Point localOrigin ;
return FALSE;
Point localOrigin ;
controlstyle.flags = kControlUseFontMask ;
controlstyle.font = kControlFontSmallSystemFont ;
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 ;
int noButtons = 0;
int x = 0 ;
int y = 0 ;
- wxToolBarTool *tool = (wxToolBarTool *)node->Data();
+ wxToolBarTool *tool = (wxToolBarTool *)node->GetData();
if( !tool->IsSeparator() )
{
if( !tool->IsSeparator() )
{
if (toolbarrect.top + y + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v > maxHeight) {
maxHeight = toolbarrect.top + y + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v ;
}
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->GetNext();
}
if ( GetWindowStyleFlag() & wxTB_HORIZONTAL )
}
if ( GetWindowStyleFlag() & wxTB_HORIZONTAL )
{
if ( m_macToolHandles[index] == (void*) control )
{
{
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 ) ) ;
if ( tool->CanBeToggled() )
{
tool->Toggle( GetControl32BitValue( (ControlHandle) control ) ) ;
void wxToolBar::MacSuperChangedPosition()
{
void wxToolBar::MacSuperChangedPosition()
{
- if (m_tools.Number() > 0)
+ if (m_tools.GetCount() > 0)
controlstyle.flags = kControlUseFontMask ;
controlstyle.font = kControlFontSmallSystemFont ;
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() ;
int noButtons = 0;
int x = 0 ;
wxSize toolSize = GetToolSize() ;
WindowRef rootwindow = (WindowRef) MacGetRootWindow() ;
while (node)
{
WindowRef rootwindow = (WindowRef) MacGetRootWindow() ;
while (node)
{
- wxToolBarTool *tool = (wxToolBarTool *)node->Data();
+ wxToolBarTool *tool = (wxToolBarTool *)node->GetData();
if( !tool->IsSeparator() )
{
if( !tool->IsSeparator() )
{
if (toolbarrect.top + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v > maxHeight)
maxHeight = toolbarrect.top + kwxMacToolBarTopMargin + m_yMargin - m_y - localOrigin.v ;
if (toolbarrect.top + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v > maxHeight)
maxHeight = toolbarrect.top + kwxMacToolBarTopMargin + m_yMargin - m_y - localOrigin.v ;
+ node = node->GetNext();
GetControlBounds((ControlHandle) m_macToolHandles[index], &bounds ) ;
if ( PtInRect( pt , &bounds ) )
{
GetControlBounds((ControlHandle) m_macToolHandles[index], &bounds ) ;
if ( PtInRect( pt , &bounds ) )
{
- return (wxToolBarTool*) (m_tools.Nth( index )->Data() ) ;
+ return (wxToolBarTool*) (m_tools.Item( index )->GetData() ) ;
wxNode *node = wxWinMacWindowList->Find((long)inWindowRef);
if (!node)
return NULL;
wxNode *node = wxWinMacWindowList->Find((long)inWindowRef);
if (!node)
return NULL;
- return (wxTopLevelWindowMac *)node->Data();
+ return (wxTopLevelWindowMac *)node->GetData();
}
void wxAssociateWinWithMacWindow(WXWindow inWindowRef, wxTopLevelWindowMac *win)
}
void wxAssociateWinWithMacWindow(WXWindow inWindowRef, wxTopLevelWindowMac *win)
void wxWindowMac::MacSuperShown( bool show )
{
void wxWindowMac::MacSuperShown( bool show )
{
- wxNode *node = GetChildren().First();
+ wxWindowListNode *node = GetChildren().GetFirst();
- wxWindowMac *child = (wxWindowMac *)node->Data();
+ wxWindowMac *child = (wxWindowMac *)node->GetData();
if ( child->m_isShown )
child->MacSuperShown( show ) ;
if ( child->m_isShown )
child->MacSuperShown( show ) ;
+ node = node->GetNext();
// because unter MacOSX the frames are drawn with an addXXX mode)
// the borders area
}
// because unter MacOSX the frames are drawn with an addXXX mode)
// the borders area
}
- wxNode *node = GetChildren().First();
+ wxWindowListNode *node = GetChildren().GetFirst();
- wxWindowMac *child = (wxWindowMac *)node->Data();
+ wxWindowMac *child = (wxWindowMac *)node->GetData();
if ( child->m_isShown )
child->MacSuperEnabled( enabled ) ;
if ( child->m_isShown )
child->MacSuperEnabled( enabled ) ;
+ node = node->GetNext();
DisposeRgn( updateRgn ) ;
}
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;
if (child == m_vScrollBar) continue;
if (child == m_hScrollBar) continue;
if (child->IsTopLevel()) continue;
wxObject* wxWindowMac::GetChild(int number) const
{
// Return a pointer to the Nth object in the Panel
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--)
int n = number;
while (node && n--)
+ node = node->GetNext();
- wxObject *obj = (wxObject *)node->Data();
+ wxObject *obj = (wxObject *)node->GetData();
- 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 )
{
// added the m_isShown test --dmazzoni
if ( child->MacGetRootWindow() == window && child->m_isShown )
{
int x = event.m_x ;
int y = event.m_y ;
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))
if ( child->MacGetRootWindow() == window && child->IsShown() && child->IsEnabled() )
{
if (child->MacDispatchMouseEvent(event))
{
if ( GetWindowStyle() & wxCLIP_CHILDREN )
{
{
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() )
{
if ( !child->IsTopLevel() && child->IsShown() )
{
if ( (GetWindowStyle() & wxCLIP_SIBLINGS) && GetParent() )
{
bool thisWindowThrough = false ;
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 ;
if ( sibling == this )
{
thisWindowThrough = true ;
// now intersect for each of the children their rect with the updateRgn and call MacRedraw recursively
RgnHandle childupdate = NewRgn() ;
// 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
{
// 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 ) ;
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 ) ;
{
// only window-absolute structures have to be moved i.e. controls
{
// only window-absolute structures have to be moved i.e. controls
- wxNode *node = GetChildren().First();
+ wxWindowListNode *node = GetChildren().GetFirst();
- wxWindowMac *child = (wxWindowMac *)node->Data();
+ wxWindowMac *child = (wxWindowMac *)node->GetData();
child->MacSuperChangedPosition() ;
child->MacSuperChangedPosition() ;
+ node = node->GetNext();
{
// only screen-absolute structures have to be moved i.e. glcanvas
{
// only screen-absolute structures have to be moved i.e. glcanvas
- wxNode *node = GetChildren().First();
+ wxWindowListNode *node = GetChildren().GetFirst();
- wxWindowMac *child = (wxWindowMac *)node->Data();
+ wxWindowMac *child = (wxWindowMac *)node->GetData();
child->MacTopLevelWindowChangedPosition() ;
child->MacTopLevelWindowChangedPosition() ;
+ node = node->GetNext();
}
}
long wxWindowMac::MacGetLeftBorderSize( ) const
}
}
long wxWindowMac::MacGetLeftBorderSize( ) const