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;
|
if (!Ok()) return -1;
|
||||||
|
|
||||||
wxNode *node = M_ACCELDATA->m_accels.First();
|
wxwxAccelListNode *node = M_ACCELDATA->m_accels.GetFirst();
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
wxAcceleratorEntry *entry = (wxAcceleratorEntry*)node->Data();
|
wxAcceleratorEntry *entry = (wxAcceleratorEntry*)node->GetData();
|
||||||
if ((event.m_keyCode == entry->GetKeyCode()) &&
|
if ((event.m_keyCode == entry->GetKeyCode()) &&
|
||||||
(((entry->GetFlags() & wxACCEL_CTRL) == 0) || event.ControlDown()) &&
|
(((entry->GetFlags() & wxACCEL_CTRL) == 0) || event.ControlDown()) &&
|
||||||
(((entry->GetFlags() & wxACCEL_SHIFT) == 0) || event.ShiftDown()) &&
|
(((entry->GetFlags() & wxACCEL_SHIFT) == 0) || event.ShiftDown()) &&
|
||||||
@@ -99,7 +99,7 @@ int wxAcceleratorTable::GetCommand( wxKeyEvent &event )
|
|||||||
{
|
{
|
||||||
return entry->GetCommand();
|
return entry->GetCommand();
|
||||||
}
|
}
|
||||||
node = node->Next();
|
node = node->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
|
@@ -95,23 +95,23 @@ wxSize wxButton::GetDefaultSize()
|
|||||||
|
|
||||||
void wxButton::Command (wxCommandEvent & event)
|
void wxButton::Command (wxCommandEvent & event)
|
||||||
{
|
{
|
||||||
if ( (ControlHandle) m_macControl )
|
if ( (ControlHandle) m_macControl )
|
||||||
{
|
{
|
||||||
HiliteControl( (ControlHandle) m_macControl , kControlButtonPart ) ;
|
HiliteControl( (ControlHandle) m_macControl , kControlButtonPart ) ;
|
||||||
unsigned long finalTicks ;
|
unsigned long finalTicks ;
|
||||||
Delay( 8 , &finalTicks ) ;
|
Delay( 8 , &finalTicks ) ;
|
||||||
HiliteControl( (ControlHandle) m_macControl , 0 ) ;
|
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 )
|
if ( controlpart != kControlNoPart )
|
||||||
{
|
{
|
||||||
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, m_windowId );
|
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, m_windowId );
|
||||||
event.SetEventObject(this);
|
event.SetEventObject(this);
|
||||||
ProcessCommand(event);
|
ProcessCommand(event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -88,10 +88,10 @@ int wxAcceleratorTable::GetCommand( wxKeyEvent &event )
|
|||||||
{
|
{
|
||||||
if (!Ok()) return -1;
|
if (!Ok()) return -1;
|
||||||
|
|
||||||
wxNode *node = M_ACCELDATA->m_accels.First();
|
wxwxAccelListNode *node = M_ACCELDATA->m_accels.GetFirst();
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
wxAcceleratorEntry *entry = (wxAcceleratorEntry*)node->Data();
|
wxAcceleratorEntry *entry = (wxAcceleratorEntry*)node->GetData();
|
||||||
if ((event.m_keyCode == entry->GetKeyCode()) &&
|
if ((event.m_keyCode == entry->GetKeyCode()) &&
|
||||||
(((entry->GetFlags() & wxACCEL_CTRL) == 0) || event.ControlDown()) &&
|
(((entry->GetFlags() & wxACCEL_CTRL) == 0) || event.ControlDown()) &&
|
||||||
(((entry->GetFlags() & wxACCEL_SHIFT) == 0) || event.ShiftDown()) &&
|
(((entry->GetFlags() & wxACCEL_SHIFT) == 0) || event.ShiftDown()) &&
|
||||||
@@ -99,7 +99,7 @@ int wxAcceleratorTable::GetCommand( wxKeyEvent &event )
|
|||||||
{
|
{
|
||||||
return entry->GetCommand();
|
return entry->GetCommand();
|
||||||
}
|
}
|
||||||
node = node->Next();
|
node = node->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
|
@@ -95,23 +95,23 @@ wxSize wxButton::GetDefaultSize()
|
|||||||
|
|
||||||
void wxButton::Command (wxCommandEvent & event)
|
void wxButton::Command (wxCommandEvent & event)
|
||||||
{
|
{
|
||||||
if ( (ControlHandle) m_macControl )
|
if ( (ControlHandle) m_macControl )
|
||||||
{
|
{
|
||||||
HiliteControl( (ControlHandle) m_macControl , kControlButtonPart ) ;
|
HiliteControl( (ControlHandle) m_macControl , kControlButtonPart ) ;
|
||||||
unsigned long finalTicks ;
|
unsigned long finalTicks ;
|
||||||
Delay( 8 , &finalTicks ) ;
|
Delay( 8 , &finalTicks ) ;
|
||||||
HiliteControl( (ControlHandle) m_macControl , 0 ) ;
|
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 )
|
if ( controlpart != kControlNoPart )
|
||||||
{
|
{
|
||||||
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, m_windowId );
|
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, m_windowId );
|
||||||
event.SetEventObject(this);
|
event.SetEventObject(this);
|
||||||
ProcessCommand(event);
|
ProcessCommand(event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -376,7 +376,7 @@ END_EVENT_TABLE()
|
|||||||
|
|
||||||
void wxCheckListBox::OnChar(wxKeyEvent& event)
|
void wxCheckListBox::OnChar(wxKeyEvent& event)
|
||||||
{
|
{
|
||||||
if ( event.KeyCode() == WXK_SPACE )
|
if ( event.GetKeyCode() == WXK_SPACE )
|
||||||
{
|
{
|
||||||
int index = GetSelection() ;
|
int index = GetSelection() ;
|
||||||
if ( index >= 0 )
|
if ( index >= 0 )
|
||||||
|
@@ -60,7 +60,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
void OnChar( wxKeyEvent& event )
|
void OnChar( wxKeyEvent& event )
|
||||||
{
|
{
|
||||||
if ( event.KeyCode() == WXK_RETURN )
|
if ( event.GetKeyCode() == WXK_RETURN )
|
||||||
{
|
{
|
||||||
wxString value = GetValue();
|
wxString value = GetValue();
|
||||||
|
|
||||||
@@ -462,7 +462,7 @@ bool wxComboBox::SetStringSelection(const wxString& sel)
|
|||||||
return FALSE;
|
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 );
|
wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId );
|
||||||
event.SetInt(GetSelection());
|
event.SetInt(GetSelection());
|
||||||
|
@@ -87,7 +87,7 @@ pascal void wxMacLiveScrollbarActionProc( ControlHandle control , ControlPartCod
|
|||||||
ControlColorUPP wxMacSetupControlBackgroundUPP = NULL ;
|
ControlColorUPP wxMacSetupControlBackgroundUPP = NULL ;
|
||||||
ControlDefUPP wxMacControlActionUPP = 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 ) ;
|
||||||
@@ -295,7 +295,7 @@ wxControl *wxFindControlFromMacControl(ControlHandle inControl )
|
|||||||
wxNode *node = wxWinMacControlList->Find((long)inControl);
|
wxNode *node = wxWinMacControlList->Find((long)inControl);
|
||||||
if (!node)
|
if (!node)
|
||||||
return NULL;
|
return NULL;
|
||||||
return (wxControl *)node->Data();
|
return (wxControl *)node->GetData();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxAssociateControlWithMacControl(ControlHandle inControl, wxControl *control)
|
void wxAssociateControlWithMacControl(ControlHandle inControl, wxControl *control)
|
||||||
@@ -398,7 +398,7 @@ void wxControl::MacPostControlCreate()
|
|||||||
}
|
}
|
||||||
if ( wxMacControlActionUPP == NULL )
|
if ( wxMacControlActionUPP == NULL )
|
||||||
{
|
{
|
||||||
wxMacControlActionUPP = NewControlDefUPP( wxMacControlDefintion ) ;
|
wxMacControlActionUPP = NewControlDefUPP( wxMacControlDefinition ) ;
|
||||||
}
|
}
|
||||||
// The following block of code is responsible for crashes when switching
|
// The following block of code is responsible for crashes when switching
|
||||||
// back to windows, which can be seen in the dialogs sample.
|
// back to windows, which can be seen in the dialogs sample.
|
||||||
|
@@ -937,7 +937,7 @@ void wxListBox::MacDoDoubleClick()
|
|||||||
|
|
||||||
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() ;
|
wxWindow* parent = GetParent() ;
|
||||||
while( parent && !parent->IsTopLevel() && parent->GetDefaultItem() == NULL )
|
while( parent && !parent->IsTopLevel() && parent->GetDefaultItem() == NULL )
|
||||||
@@ -958,14 +958,14 @@ void wxListBox::OnChar(wxKeyEvent& event)
|
|||||||
event.Skip() ;
|
event.Skip() ;
|
||||||
}
|
}
|
||||||
/* generate wxID_CANCEL if command-. or <esc> has been pressed (typically in dialogs) */
|
/* 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 ) ;
|
wxWindow* win = GetParent()->FindWindow( wxID_CANCEL ) ;
|
||||||
wxCommandEvent new_event(wxEVT_COMMAND_BUTTON_CLICKED,wxID_CANCEL);
|
wxCommandEvent new_event(wxEVT_COMMAND_BUTTON_CLICKED,wxID_CANCEL);
|
||||||
new_event.SetEventObject( win );
|
new_event.SetEventObject( win );
|
||||||
win->GetEventHandler()->ProcessEvent( new_event );
|
win->GetEventHandler()->ProcessEvent( new_event );
|
||||||
}
|
}
|
||||||
else if ( event.KeyCode() == WXK_TAB )
|
else if ( event.GetKeyCode() == WXK_TAB )
|
||||||
{
|
{
|
||||||
wxNavigationKeyEvent new_event;
|
wxNavigationKeyEvent new_event;
|
||||||
new_event.SetEventObject( this );
|
new_event.SetEventObject( this );
|
||||||
@@ -976,7 +976,7 @@ void wxListBox::OnChar(wxKeyEvent& event)
|
|||||||
if ( !GetEventHandler()->ProcessEvent( new_event ) )
|
if ( !GetEventHandler()->ProcessEvent( new_event ) )
|
||||||
event.Skip() ;
|
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
|
// perform the default key handling first
|
||||||
wxControl::OnKeyDown( event ) ;
|
wxControl::OnKeyDown( event ) ;
|
||||||
@@ -1011,7 +1011,7 @@ void wxListBox::OnChar(wxKeyEvent& event)
|
|||||||
m_typeIn = "" ;
|
m_typeIn = "" ;
|
||||||
}
|
}
|
||||||
m_lastTypeIn = event.GetTimestamp() ;
|
m_lastTypeIn = event.GetTimestamp() ;
|
||||||
m_typeIn += (char) event.KeyCode() ;
|
m_typeIn += (char) event.GetKeyCode() ;
|
||||||
int line = FindString("*"+m_typeIn+"*") ;
|
int line = FindString("*"+m_typeIn+"*") ;
|
||||||
if ( line >= 0 )
|
if ( line >= 0 )
|
||||||
{
|
{
|
||||||
|
@@ -10,6 +10,11 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
#pragma implementation "menu.h"
|
||||||
|
#pragma implementation "menuitem.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// headers & declarations
|
// headers & declarations
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -17,11 +22,6 @@
|
|||||||
// wxWindows headers
|
// wxWindows headers
|
||||||
// -----------------
|
// -----------------
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma implementation "menu.h"
|
|
||||||
#pragma implementation "menuitem.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/menu.h"
|
#include "wx/menu.h"
|
||||||
#include "wx/menuitem.h"
|
#include "wx/menuitem.h"
|
||||||
@@ -560,7 +560,7 @@ void wxMenuBar::MacInstallMenuBar()
|
|||||||
for (size_t i = 0; i < m_menus.GetCount(); i++)
|
for (size_t i = 0; i < m_menus.GetCount(); i++)
|
||||||
{
|
{
|
||||||
Str255 label;
|
Str255 label;
|
||||||
wxNode *node;
|
wxwxMenuItemListNode *node;
|
||||||
wxMenuItem *item;
|
wxMenuItem *item;
|
||||||
int pos ;
|
int pos ;
|
||||||
wxMenu* menu = m_menus[i] , *subMenu = NULL ;
|
wxMenu* menu = m_menus[i] , *subMenu = NULL ;
|
||||||
@@ -578,9 +578,9 @@ void wxMenuBar::MacInstallMenuBar()
|
|||||||
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() ;
|
subMenu = item->GetSubMenu() ;
|
||||||
if (subMenu)
|
if (subMenu)
|
||||||
{
|
{
|
||||||
@@ -629,9 +629,9 @@ void wxMenuBar::MacInstallMenuBar()
|
|||||||
UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , label ) ;
|
UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , label ) ;
|
||||||
wxArrayPtrVoid submenus ;
|
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() ;
|
subMenu = item->GetSubMenu() ;
|
||||||
if (subMenu)
|
if (subMenu)
|
||||||
{
|
{
|
||||||
@@ -642,12 +642,12 @@ void wxMenuBar::MacInstallMenuBar()
|
|||||||
for ( size_t i = 0 ; i < submenus.GetCount() ; ++i )
|
for ( size_t i = 0 ; i < submenus.GetCount() ; ++i )
|
||||||
{
|
{
|
||||||
wxMenu* submenu = (wxMenu*) submenus[i] ;
|
wxMenu* submenu = (wxMenu*) submenus[i] ;
|
||||||
wxNode *subnode;
|
wxwxMenuItemListNode *subnode;
|
||||||
wxMenuItem *subitem;
|
wxMenuItem *subitem;
|
||||||
int subpos ;
|
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() ;
|
wxMenu* itsSubMenu = subitem->GetSubMenu() ;
|
||||||
if (itsSubMenu)
|
if (itsSubMenu)
|
||||||
{
|
{
|
||||||
|
@@ -9,6 +9,10 @@
|
|||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
#pragma implementation "notebook.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// declarations
|
// declarations
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -16,10 +20,6 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// headers
|
// headers
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma implementation "notebook.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/string.h"
|
#include "wx/string.h"
|
||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
|
@@ -9,15 +9,15 @@
|
|||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------
|
|
||||||
// headers
|
|
||||||
//-------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma implementation "radioboxbase.h"
|
#pragma implementation "radioboxbase.h"
|
||||||
#pragma implementation "radiobox.h"
|
#pragma implementation "radiobox.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------------------
|
||||||
|
// headers
|
||||||
|
//-------------------------------------------------------------------------------------
|
||||||
|
|
||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
|
|
||||||
#include "wx/radiobox.h"
|
#include "wx/radiobox.h"
|
||||||
|
@@ -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) ;
|
wxControl::DoMoveWindow(x,y,width,height) ;
|
||||||
}
|
}
|
||||||
|
@@ -71,7 +71,7 @@ void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap)
|
|||||||
Refresh() ;
|
Refresh() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxStaticBitmap::OnPaint( wxPaintEvent &event )
|
void wxStaticBitmap::OnPaint( wxPaintEvent& WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
wxPaintDC dc(this);
|
wxPaintDC dc(this);
|
||||||
PrepareDC(dc);
|
PrepareDC(dc);
|
||||||
|
@@ -1587,27 +1587,27 @@ bool wxTextCtrl::Show(bool show)
|
|||||||
// 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))
|
||||||
{
|
{
|
||||||
Cut();
|
Cut();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTextCtrl::OnCopy(wxCommandEvent& event)
|
void wxTextCtrl::OnCopy(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
Copy();
|
Copy();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTextCtrl::OnPaste(wxCommandEvent& event)
|
void wxTextCtrl::OnPaste(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
Paste();
|
Paste();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTextCtrl::OnUndo(wxCommandEvent& event)
|
void wxTextCtrl::OnUndo(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
Undo();
|
Undo();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTextCtrl::OnRedo(wxCommandEvent& event)
|
void wxTextCtrl::OnRedo(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
Redo();
|
Redo();
|
||||||
}
|
}
|
||||||
|
@@ -172,7 +172,7 @@ wxToolBar::~wxToolBar()
|
|||||||
|
|
||||||
bool wxToolBar::Realize()
|
bool wxToolBar::Realize()
|
||||||
{
|
{
|
||||||
if (m_tools.Number() == 0)
|
if (m_tools.GetCount() == 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
Point localOrigin ;
|
Point localOrigin ;
|
||||||
@@ -195,7 +195,7 @@ bool wxToolBar::Realize()
|
|||||||
controlstyle.flags = kControlUseFontMask ;
|
controlstyle.flags = kControlUseFontMask ;
|
||||||
controlstyle.font = kControlFontSmallSystemFont ;
|
controlstyle.font = kControlFontSmallSystemFont ;
|
||||||
|
|
||||||
wxNode *node = m_tools.First();
|
wxwxToolBarToolsListNode *node = m_tools.GetFirst();
|
||||||
int noButtons = 0;
|
int noButtons = 0;
|
||||||
int x = 0 ;
|
int x = 0 ;
|
||||||
int y = 0 ;
|
int y = 0 ;
|
||||||
@@ -208,7 +208,7 @@ bool wxToolBar::Realize()
|
|||||||
|
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
wxToolBarTool *tool = (wxToolBarTool *)node->Data();
|
wxToolBarTool *tool = (wxToolBarTool *)node->GetData();
|
||||||
|
|
||||||
if( !tool->IsSeparator() )
|
if( !tool->IsSeparator() )
|
||||||
{
|
{
|
||||||
@@ -288,7 +288,7 @@ bool wxToolBar::Realize()
|
|||||||
if (toolbarrect.top + y + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v > maxHeight) {
|
if (toolbarrect.top + y + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v > maxHeight) {
|
||||||
maxHeight = toolbarrect.top + y + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v ;
|
maxHeight = toolbarrect.top + y + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v ;
|
||||||
}
|
}
|
||||||
node = node->Next();
|
node = node->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( GetWindowStyleFlag() & wxTB_HORIZONTAL )
|
if ( GetWindowStyleFlag() & wxTB_HORIZONTAL )
|
||||||
@@ -339,7 +339,7 @@ void wxToolBar::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
|
|||||||
{
|
{
|
||||||
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() )
|
if ( tool->CanBeToggled() )
|
||||||
{
|
{
|
||||||
tool->Toggle( GetControl32BitValue( (ControlHandle) control ) ) ;
|
tool->Toggle( GetControl32BitValue( (ControlHandle) control ) ) ;
|
||||||
@@ -363,7 +363,7 @@ void wxToolBar::SetRows(int nRows)
|
|||||||
|
|
||||||
void wxToolBar::MacSuperChangedPosition()
|
void wxToolBar::MacSuperChangedPosition()
|
||||||
{
|
{
|
||||||
if (m_tools.Number() > 0)
|
if (m_tools.GetCount() > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
Point localOrigin ;
|
Point localOrigin ;
|
||||||
@@ -385,7 +385,7 @@ void wxToolBar::MacSuperChangedPosition()
|
|||||||
controlstyle.flags = kControlUseFontMask ;
|
controlstyle.flags = kControlUseFontMask ;
|
||||||
controlstyle.font = kControlFontSmallSystemFont ;
|
controlstyle.font = kControlFontSmallSystemFont ;
|
||||||
|
|
||||||
wxNode *node = m_tools.First();
|
wxwxToolBarToolsListNode *node = m_tools.GetFirst();
|
||||||
int noButtons = 0;
|
int noButtons = 0;
|
||||||
int x = 0 ;
|
int x = 0 ;
|
||||||
wxSize toolSize = GetToolSize() ;
|
wxSize toolSize = GetToolSize() ;
|
||||||
@@ -399,7 +399,7 @@ void wxToolBar::MacSuperChangedPosition()
|
|||||||
WindowRef rootwindow = (WindowRef) MacGetRootWindow() ;
|
WindowRef rootwindow = (WindowRef) MacGetRootWindow() ;
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
wxToolBarTool *tool = (wxToolBarTool *)node->Data();
|
wxToolBarTool *tool = (wxToolBarTool *)node->GetData();
|
||||||
|
|
||||||
if( !tool->IsSeparator() )
|
if( !tool->IsSeparator() )
|
||||||
{
|
{
|
||||||
@@ -444,7 +444,7 @@ void wxToolBar::MacSuperChangedPosition()
|
|||||||
if (toolbarrect.top + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v > maxHeight)
|
if (toolbarrect.top + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v > maxHeight)
|
||||||
maxHeight = toolbarrect.top + kwxMacToolBarTopMargin + m_yMargin - m_y - localOrigin.v ;
|
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 ) ;
|
GetControlBounds((ControlHandle) m_macToolHandles[index], &bounds ) ;
|
||||||
if ( PtInRect( pt , &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);
|
wxNode *node = wxWinMacWindowList->Find((long)inWindowRef);
|
||||||
if (!node)
|
if (!node)
|
||||||
return NULL;
|
return NULL;
|
||||||
return (wxTopLevelWindowMac *)node->Data();
|
return (wxTopLevelWindowMac *)node->GetData();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxAssociateWinWithMacWindow(WXWindow inWindowRef, wxTopLevelWindowMac *win)
|
void wxAssociateWinWithMacWindow(WXWindow inWindowRef, wxTopLevelWindowMac *win)
|
||||||
|
@@ -786,13 +786,13 @@ bool wxWindowMac::Show(bool show)
|
|||||||
|
|
||||||
void wxWindowMac::MacSuperShown( bool show )
|
void wxWindowMac::MacSuperShown( bool show )
|
||||||
{
|
{
|
||||||
wxNode *node = GetChildren().First();
|
wxWindowListNode *node = GetChildren().GetFirst();
|
||||||
while ( node )
|
while ( node )
|
||||||
{
|
{
|
||||||
wxWindowMac *child = (wxWindowMac *)node->Data();
|
wxWindowMac *child = (wxWindowMac *)node->GetData();
|
||||||
if ( child->m_isShown )
|
if ( child->m_isShown )
|
||||||
child->MacSuperShown( show ) ;
|
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)
|
// because unter MacOSX the frames are drawn with an addXXX mode)
|
||||||
// the borders area
|
// the borders area
|
||||||
}
|
}
|
||||||
wxNode *node = GetChildren().First();
|
wxWindowListNode *node = GetChildren().GetFirst();
|
||||||
while ( node )
|
while ( node )
|
||||||
{
|
{
|
||||||
wxWindowMac *child = (wxWindowMac *)node->Data();
|
wxWindowMac *child = (wxWindowMac *)node->GetData();
|
||||||
if ( child->m_isShown )
|
if ( child->m_isShown )
|
||||||
child->MacSuperEnabled( enabled ) ;
|
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 ) ;
|
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_vScrollBar) continue;
|
||||||
if (child == m_hScrollBar) continue;
|
if (child == m_hScrollBar) continue;
|
||||||
if (child->IsTopLevel()) continue;
|
if (child->IsTopLevel()) continue;
|
||||||
@@ -1313,13 +1313,13 @@ void wxWindowMac::OnCommand(wxWindowMac& win, wxCommandEvent& event)
|
|||||||
wxObject* wxWindowMac::GetChild(int number) const
|
wxObject* wxWindowMac::GetChild(int number) const
|
||||||
{
|
{
|
||||||
// Return a pointer to the Nth object in the Panel
|
// Return a pointer to the Nth object in the Panel
|
||||||
wxNode *node = GetChildren().First();
|
wxNode *node = GetChildren().GetFirst();
|
||||||
int n = number;
|
int n = number;
|
||||||
while (node && n--)
|
while (node && n--)
|
||||||
node = node->Next();
|
node = node->GetNext();
|
||||||
if ( node )
|
if ( node )
|
||||||
{
|
{
|
||||||
wxObject *obj = (wxObject *)node->Data();
|
wxObject *obj = (wxObject *)node->GetData();
|
||||||
return(obj);
|
return(obj);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1435,9 +1435,9 @@ bool wxWindowMac::MacGetWindowFromPointSub( const wxPoint &point , wxWindowMac**
|
|||||||
newPoint.y -= m_y;
|
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
|
// added the m_isShown test --dmazzoni
|
||||||
if ( child->MacGetRootWindow() == window && child->m_isShown )
|
if ( child->MacGetRootWindow() == window && child->m_isShown )
|
||||||
{
|
{
|
||||||
@@ -1540,9 +1540,9 @@ bool wxWindowMac::MacDispatchMouseEvent(wxMouseEvent& event)
|
|||||||
int x = event.m_x ;
|
int x = event.m_x ;
|
||||||
int y = event.m_y ;
|
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->MacGetRootWindow() == window && child->IsShown() && child->IsEnabled() )
|
||||||
{
|
{
|
||||||
if (child->MacDispatchMouseEvent(event))
|
if (child->MacDispatchMouseEvent(event))
|
||||||
@@ -1678,9 +1678,9 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool respectChildrenAndSibling
|
|||||||
{
|
{
|
||||||
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() )
|
||||||
{
|
{
|
||||||
@@ -1701,9 +1701,9 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool respectChildrenAndSibling
|
|||||||
if ( (GetWindowStyle() & wxCLIP_SIBLINGS) && GetParent() )
|
if ( (GetWindowStyle() & wxCLIP_SIBLINGS) && GetParent() )
|
||||||
{
|
{
|
||||||
bool thisWindowThrough = false ;
|
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 )
|
if ( sibling == this )
|
||||||
{
|
{
|
||||||
thisWindowThrough = true ;
|
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
|
// now intersect for each of the children their rect with the updateRgn and call MacRedraw recursively
|
||||||
|
|
||||||
RgnHandle childupdate = NewRgn() ;
|
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
|
// 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
|
// 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 ) ;
|
SetRectRgn( childupdate , child->m_x , child->m_y , child->m_x + child->m_width , child->m_y + child->m_height ) ;
|
||||||
SectRgn( childupdate , updatergn , childupdate ) ;
|
SectRgn( childupdate , updatergn , childupdate ) ;
|
||||||
OffsetRgn( childupdate , -child->m_x , -child->m_y ) ;
|
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
|
// only window-absolute structures have to be moved i.e. controls
|
||||||
|
|
||||||
wxNode *node = GetChildren().First();
|
wxWindowListNode *node = GetChildren().GetFirst();
|
||||||
while ( node )
|
while ( node )
|
||||||
{
|
{
|
||||||
wxWindowMac *child = (wxWindowMac *)node->Data();
|
wxWindowMac *child = (wxWindowMac *)node->GetData();
|
||||||
child->MacSuperChangedPosition() ;
|
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
|
// only screen-absolute structures have to be moved i.e. glcanvas
|
||||||
|
|
||||||
wxNode *node = GetChildren().First();
|
wxWindowListNode *node = GetChildren().GetFirst();
|
||||||
while ( node )
|
while ( node )
|
||||||
{
|
{
|
||||||
wxWindowMac *child = (wxWindowMac *)node->Data();
|
wxWindowMac *child = (wxWindowMac *)node->GetData();
|
||||||
child->MacTopLevelWindowChangedPosition() ;
|
child->MacTopLevelWindowChangedPosition() ;
|
||||||
node = node->Next();
|
node = node->GetNext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
long wxWindowMac::MacGetLeftBorderSize( ) const
|
long wxWindowMac::MacGetLeftBorderSize( ) const
|
||||||
|
@@ -376,7 +376,7 @@ END_EVENT_TABLE()
|
|||||||
|
|
||||||
void wxCheckListBox::OnChar(wxKeyEvent& event)
|
void wxCheckListBox::OnChar(wxKeyEvent& event)
|
||||||
{
|
{
|
||||||
if ( event.KeyCode() == WXK_SPACE )
|
if ( event.GetKeyCode() == WXK_SPACE )
|
||||||
{
|
{
|
||||||
int index = GetSelection() ;
|
int index = GetSelection() ;
|
||||||
if ( index >= 0 )
|
if ( index >= 0 )
|
||||||
|
@@ -60,7 +60,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
void OnChar( wxKeyEvent& event )
|
void OnChar( wxKeyEvent& event )
|
||||||
{
|
{
|
||||||
if ( event.KeyCode() == WXK_RETURN )
|
if ( event.GetKeyCode() == WXK_RETURN )
|
||||||
{
|
{
|
||||||
wxString value = GetValue();
|
wxString value = GetValue();
|
||||||
|
|
||||||
@@ -462,7 +462,7 @@ bool wxComboBox::SetStringSelection(const wxString& sel)
|
|||||||
return FALSE;
|
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 );
|
wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId );
|
||||||
event.SetInt(GetSelection());
|
event.SetInt(GetSelection());
|
||||||
|
@@ -87,7 +87,7 @@ pascal void wxMacLiveScrollbarActionProc( ControlHandle control , ControlPartCod
|
|||||||
ControlColorUPP wxMacSetupControlBackgroundUPP = NULL ;
|
ControlColorUPP wxMacSetupControlBackgroundUPP = NULL ;
|
||||||
ControlDefUPP wxMacControlActionUPP = 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 ) ;
|
||||||
@@ -295,7 +295,7 @@ wxControl *wxFindControlFromMacControl(ControlHandle inControl )
|
|||||||
wxNode *node = wxWinMacControlList->Find((long)inControl);
|
wxNode *node = wxWinMacControlList->Find((long)inControl);
|
||||||
if (!node)
|
if (!node)
|
||||||
return NULL;
|
return NULL;
|
||||||
return (wxControl *)node->Data();
|
return (wxControl *)node->GetData();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxAssociateControlWithMacControl(ControlHandle inControl, wxControl *control)
|
void wxAssociateControlWithMacControl(ControlHandle inControl, wxControl *control)
|
||||||
@@ -398,7 +398,7 @@ void wxControl::MacPostControlCreate()
|
|||||||
}
|
}
|
||||||
if ( wxMacControlActionUPP == NULL )
|
if ( wxMacControlActionUPP == NULL )
|
||||||
{
|
{
|
||||||
wxMacControlActionUPP = NewControlDefUPP( wxMacControlDefintion ) ;
|
wxMacControlActionUPP = NewControlDefUPP( wxMacControlDefinition ) ;
|
||||||
}
|
}
|
||||||
// The following block of code is responsible for crashes when switching
|
// The following block of code is responsible for crashes when switching
|
||||||
// back to windows, which can be seen in the dialogs sample.
|
// back to windows, which can be seen in the dialogs sample.
|
||||||
|
@@ -937,7 +937,7 @@ void wxListBox::MacDoDoubleClick()
|
|||||||
|
|
||||||
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() ;
|
wxWindow* parent = GetParent() ;
|
||||||
while( parent && !parent->IsTopLevel() && parent->GetDefaultItem() == NULL )
|
while( parent && !parent->IsTopLevel() && parent->GetDefaultItem() == NULL )
|
||||||
@@ -958,14 +958,14 @@ void wxListBox::OnChar(wxKeyEvent& event)
|
|||||||
event.Skip() ;
|
event.Skip() ;
|
||||||
}
|
}
|
||||||
/* generate wxID_CANCEL if command-. or <esc> has been pressed (typically in dialogs) */
|
/* 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 ) ;
|
wxWindow* win = GetParent()->FindWindow( wxID_CANCEL ) ;
|
||||||
wxCommandEvent new_event(wxEVT_COMMAND_BUTTON_CLICKED,wxID_CANCEL);
|
wxCommandEvent new_event(wxEVT_COMMAND_BUTTON_CLICKED,wxID_CANCEL);
|
||||||
new_event.SetEventObject( win );
|
new_event.SetEventObject( win );
|
||||||
win->GetEventHandler()->ProcessEvent( new_event );
|
win->GetEventHandler()->ProcessEvent( new_event );
|
||||||
}
|
}
|
||||||
else if ( event.KeyCode() == WXK_TAB )
|
else if ( event.GetKeyCode() == WXK_TAB )
|
||||||
{
|
{
|
||||||
wxNavigationKeyEvent new_event;
|
wxNavigationKeyEvent new_event;
|
||||||
new_event.SetEventObject( this );
|
new_event.SetEventObject( this );
|
||||||
@@ -976,7 +976,7 @@ void wxListBox::OnChar(wxKeyEvent& event)
|
|||||||
if ( !GetEventHandler()->ProcessEvent( new_event ) )
|
if ( !GetEventHandler()->ProcessEvent( new_event ) )
|
||||||
event.Skip() ;
|
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
|
// perform the default key handling first
|
||||||
wxControl::OnKeyDown( event ) ;
|
wxControl::OnKeyDown( event ) ;
|
||||||
@@ -1011,7 +1011,7 @@ void wxListBox::OnChar(wxKeyEvent& event)
|
|||||||
m_typeIn = "" ;
|
m_typeIn = "" ;
|
||||||
}
|
}
|
||||||
m_lastTypeIn = event.GetTimestamp() ;
|
m_lastTypeIn = event.GetTimestamp() ;
|
||||||
m_typeIn += (char) event.KeyCode() ;
|
m_typeIn += (char) event.GetKeyCode() ;
|
||||||
int line = FindString("*"+m_typeIn+"*") ;
|
int line = FindString("*"+m_typeIn+"*") ;
|
||||||
if ( line >= 0 )
|
if ( line >= 0 )
|
||||||
{
|
{
|
||||||
|
@@ -10,6 +10,11 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
#pragma implementation "menu.h"
|
||||||
|
#pragma implementation "menuitem.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// headers & declarations
|
// headers & declarations
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -17,11 +22,6 @@
|
|||||||
// wxWindows headers
|
// wxWindows headers
|
||||||
// -----------------
|
// -----------------
|
||||||
|
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma implementation "menu.h"
|
|
||||||
#pragma implementation "menuitem.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/menu.h"
|
#include "wx/menu.h"
|
||||||
#include "wx/menuitem.h"
|
#include "wx/menuitem.h"
|
||||||
@@ -560,7 +560,7 @@ void wxMenuBar::MacInstallMenuBar()
|
|||||||
for (size_t i = 0; i < m_menus.GetCount(); i++)
|
for (size_t i = 0; i < m_menus.GetCount(); i++)
|
||||||
{
|
{
|
||||||
Str255 label;
|
Str255 label;
|
||||||
wxNode *node;
|
wxwxMenuItemListNode *node;
|
||||||
wxMenuItem *item;
|
wxMenuItem *item;
|
||||||
int pos ;
|
int pos ;
|
||||||
wxMenu* menu = m_menus[i] , *subMenu = NULL ;
|
wxMenu* menu = m_menus[i] , *subMenu = NULL ;
|
||||||
@@ -578,9 +578,9 @@ void wxMenuBar::MacInstallMenuBar()
|
|||||||
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() ;
|
subMenu = item->GetSubMenu() ;
|
||||||
if (subMenu)
|
if (subMenu)
|
||||||
{
|
{
|
||||||
@@ -629,9 +629,9 @@ void wxMenuBar::MacInstallMenuBar()
|
|||||||
UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , label ) ;
|
UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , label ) ;
|
||||||
wxArrayPtrVoid submenus ;
|
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() ;
|
subMenu = item->GetSubMenu() ;
|
||||||
if (subMenu)
|
if (subMenu)
|
||||||
{
|
{
|
||||||
@@ -642,12 +642,12 @@ void wxMenuBar::MacInstallMenuBar()
|
|||||||
for ( size_t i = 0 ; i < submenus.GetCount() ; ++i )
|
for ( size_t i = 0 ; i < submenus.GetCount() ; ++i )
|
||||||
{
|
{
|
||||||
wxMenu* submenu = (wxMenu*) submenus[i] ;
|
wxMenu* submenu = (wxMenu*) submenus[i] ;
|
||||||
wxNode *subnode;
|
wxwxMenuItemListNode *subnode;
|
||||||
wxMenuItem *subitem;
|
wxMenuItem *subitem;
|
||||||
int subpos ;
|
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() ;
|
wxMenu* itsSubMenu = subitem->GetSubMenu() ;
|
||||||
if (itsSubMenu)
|
if (itsSubMenu)
|
||||||
{
|
{
|
||||||
|
@@ -9,6 +9,10 @@
|
|||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
#pragma implementation "notebook.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// declarations
|
// declarations
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -16,10 +20,6 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// headers
|
// headers
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
#ifdef __GNUG__
|
|
||||||
#pragma implementation "notebook.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/string.h"
|
#include "wx/string.h"
|
||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
|
@@ -9,15 +9,15 @@
|
|||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------
|
|
||||||
// headers
|
|
||||||
//-------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma implementation "radioboxbase.h"
|
#pragma implementation "radioboxbase.h"
|
||||||
#pragma implementation "radiobox.h"
|
#pragma implementation "radiobox.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------------------
|
||||||
|
// headers
|
||||||
|
//-------------------------------------------------------------------------------------
|
||||||
|
|
||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
|
|
||||||
#include "wx/radiobox.h"
|
#include "wx/radiobox.h"
|
||||||
|
@@ -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) ;
|
wxControl::DoMoveWindow(x,y,width,height) ;
|
||||||
}
|
}
|
||||||
|
@@ -71,7 +71,7 @@ void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap)
|
|||||||
Refresh() ;
|
Refresh() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxStaticBitmap::OnPaint( wxPaintEvent &event )
|
void wxStaticBitmap::OnPaint( wxPaintEvent& WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
wxPaintDC dc(this);
|
wxPaintDC dc(this);
|
||||||
PrepareDC(dc);
|
PrepareDC(dc);
|
||||||
|
@@ -1587,27 +1587,27 @@ bool wxTextCtrl::Show(bool show)
|
|||||||
// 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))
|
||||||
{
|
{
|
||||||
Cut();
|
Cut();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTextCtrl::OnCopy(wxCommandEvent& event)
|
void wxTextCtrl::OnCopy(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
Copy();
|
Copy();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTextCtrl::OnPaste(wxCommandEvent& event)
|
void wxTextCtrl::OnPaste(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
Paste();
|
Paste();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTextCtrl::OnUndo(wxCommandEvent& event)
|
void wxTextCtrl::OnUndo(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
Undo();
|
Undo();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTextCtrl::OnRedo(wxCommandEvent& event)
|
void wxTextCtrl::OnRedo(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
Redo();
|
Redo();
|
||||||
}
|
}
|
||||||
|
@@ -172,7 +172,7 @@ wxToolBar::~wxToolBar()
|
|||||||
|
|
||||||
bool wxToolBar::Realize()
|
bool wxToolBar::Realize()
|
||||||
{
|
{
|
||||||
if (m_tools.Number() == 0)
|
if (m_tools.GetCount() == 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
Point localOrigin ;
|
Point localOrigin ;
|
||||||
@@ -195,7 +195,7 @@ bool wxToolBar::Realize()
|
|||||||
controlstyle.flags = kControlUseFontMask ;
|
controlstyle.flags = kControlUseFontMask ;
|
||||||
controlstyle.font = kControlFontSmallSystemFont ;
|
controlstyle.font = kControlFontSmallSystemFont ;
|
||||||
|
|
||||||
wxNode *node = m_tools.First();
|
wxwxToolBarToolsListNode *node = m_tools.GetFirst();
|
||||||
int noButtons = 0;
|
int noButtons = 0;
|
||||||
int x = 0 ;
|
int x = 0 ;
|
||||||
int y = 0 ;
|
int y = 0 ;
|
||||||
@@ -208,7 +208,7 @@ bool wxToolBar::Realize()
|
|||||||
|
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
wxToolBarTool *tool = (wxToolBarTool *)node->Data();
|
wxToolBarTool *tool = (wxToolBarTool *)node->GetData();
|
||||||
|
|
||||||
if( !tool->IsSeparator() )
|
if( !tool->IsSeparator() )
|
||||||
{
|
{
|
||||||
@@ -288,7 +288,7 @@ bool wxToolBar::Realize()
|
|||||||
if (toolbarrect.top + y + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v > maxHeight) {
|
if (toolbarrect.top + y + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v > maxHeight) {
|
||||||
maxHeight = toolbarrect.top + y + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v ;
|
maxHeight = toolbarrect.top + y + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v ;
|
||||||
}
|
}
|
||||||
node = node->Next();
|
node = node->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( GetWindowStyleFlag() & wxTB_HORIZONTAL )
|
if ( GetWindowStyleFlag() & wxTB_HORIZONTAL )
|
||||||
@@ -339,7 +339,7 @@ void wxToolBar::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
|
|||||||
{
|
{
|
||||||
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() )
|
if ( tool->CanBeToggled() )
|
||||||
{
|
{
|
||||||
tool->Toggle( GetControl32BitValue( (ControlHandle) control ) ) ;
|
tool->Toggle( GetControl32BitValue( (ControlHandle) control ) ) ;
|
||||||
@@ -363,7 +363,7 @@ void wxToolBar::SetRows(int nRows)
|
|||||||
|
|
||||||
void wxToolBar::MacSuperChangedPosition()
|
void wxToolBar::MacSuperChangedPosition()
|
||||||
{
|
{
|
||||||
if (m_tools.Number() > 0)
|
if (m_tools.GetCount() > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
Point localOrigin ;
|
Point localOrigin ;
|
||||||
@@ -385,7 +385,7 @@ void wxToolBar::MacSuperChangedPosition()
|
|||||||
controlstyle.flags = kControlUseFontMask ;
|
controlstyle.flags = kControlUseFontMask ;
|
||||||
controlstyle.font = kControlFontSmallSystemFont ;
|
controlstyle.font = kControlFontSmallSystemFont ;
|
||||||
|
|
||||||
wxNode *node = m_tools.First();
|
wxwxToolBarToolsListNode *node = m_tools.GetFirst();
|
||||||
int noButtons = 0;
|
int noButtons = 0;
|
||||||
int x = 0 ;
|
int x = 0 ;
|
||||||
wxSize toolSize = GetToolSize() ;
|
wxSize toolSize = GetToolSize() ;
|
||||||
@@ -399,7 +399,7 @@ void wxToolBar::MacSuperChangedPosition()
|
|||||||
WindowRef rootwindow = (WindowRef) MacGetRootWindow() ;
|
WindowRef rootwindow = (WindowRef) MacGetRootWindow() ;
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
wxToolBarTool *tool = (wxToolBarTool *)node->Data();
|
wxToolBarTool *tool = (wxToolBarTool *)node->GetData();
|
||||||
|
|
||||||
if( !tool->IsSeparator() )
|
if( !tool->IsSeparator() )
|
||||||
{
|
{
|
||||||
@@ -444,7 +444,7 @@ void wxToolBar::MacSuperChangedPosition()
|
|||||||
if (toolbarrect.top + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v > maxHeight)
|
if (toolbarrect.top + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v > maxHeight)
|
||||||
maxHeight = toolbarrect.top + kwxMacToolBarTopMargin + m_yMargin - m_y - localOrigin.v ;
|
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 ) ;
|
GetControlBounds((ControlHandle) m_macToolHandles[index], &bounds ) ;
|
||||||
if ( PtInRect( pt , &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);
|
wxNode *node = wxWinMacWindowList->Find((long)inWindowRef);
|
||||||
if (!node)
|
if (!node)
|
||||||
return NULL;
|
return NULL;
|
||||||
return (wxTopLevelWindowMac *)node->Data();
|
return (wxTopLevelWindowMac *)node->GetData();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxAssociateWinWithMacWindow(WXWindow inWindowRef, wxTopLevelWindowMac *win)
|
void wxAssociateWinWithMacWindow(WXWindow inWindowRef, wxTopLevelWindowMac *win)
|
||||||
|
@@ -786,13 +786,13 @@ bool wxWindowMac::Show(bool show)
|
|||||||
|
|
||||||
void wxWindowMac::MacSuperShown( bool show )
|
void wxWindowMac::MacSuperShown( bool show )
|
||||||
{
|
{
|
||||||
wxNode *node = GetChildren().First();
|
wxWindowListNode *node = GetChildren().GetFirst();
|
||||||
while ( node )
|
while ( node )
|
||||||
{
|
{
|
||||||
wxWindowMac *child = (wxWindowMac *)node->Data();
|
wxWindowMac *child = (wxWindowMac *)node->GetData();
|
||||||
if ( child->m_isShown )
|
if ( child->m_isShown )
|
||||||
child->MacSuperShown( show ) ;
|
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)
|
// because unter MacOSX the frames are drawn with an addXXX mode)
|
||||||
// the borders area
|
// the borders area
|
||||||
}
|
}
|
||||||
wxNode *node = GetChildren().First();
|
wxWindowListNode *node = GetChildren().GetFirst();
|
||||||
while ( node )
|
while ( node )
|
||||||
{
|
{
|
||||||
wxWindowMac *child = (wxWindowMac *)node->Data();
|
wxWindowMac *child = (wxWindowMac *)node->GetData();
|
||||||
if ( child->m_isShown )
|
if ( child->m_isShown )
|
||||||
child->MacSuperEnabled( enabled ) ;
|
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 ) ;
|
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_vScrollBar) continue;
|
||||||
if (child == m_hScrollBar) continue;
|
if (child == m_hScrollBar) continue;
|
||||||
if (child->IsTopLevel()) continue;
|
if (child->IsTopLevel()) continue;
|
||||||
@@ -1313,13 +1313,13 @@ void wxWindowMac::OnCommand(wxWindowMac& win, wxCommandEvent& event)
|
|||||||
wxObject* wxWindowMac::GetChild(int number) const
|
wxObject* wxWindowMac::GetChild(int number) const
|
||||||
{
|
{
|
||||||
// Return a pointer to the Nth object in the Panel
|
// Return a pointer to the Nth object in the Panel
|
||||||
wxNode *node = GetChildren().First();
|
wxNode *node = GetChildren().GetFirst();
|
||||||
int n = number;
|
int n = number;
|
||||||
while (node && n--)
|
while (node && n--)
|
||||||
node = node->Next();
|
node = node->GetNext();
|
||||||
if ( node )
|
if ( node )
|
||||||
{
|
{
|
||||||
wxObject *obj = (wxObject *)node->Data();
|
wxObject *obj = (wxObject *)node->GetData();
|
||||||
return(obj);
|
return(obj);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1435,9 +1435,9 @@ bool wxWindowMac::MacGetWindowFromPointSub( const wxPoint &point , wxWindowMac**
|
|||||||
newPoint.y -= m_y;
|
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
|
// added the m_isShown test --dmazzoni
|
||||||
if ( child->MacGetRootWindow() == window && child->m_isShown )
|
if ( child->MacGetRootWindow() == window && child->m_isShown )
|
||||||
{
|
{
|
||||||
@@ -1540,9 +1540,9 @@ bool wxWindowMac::MacDispatchMouseEvent(wxMouseEvent& event)
|
|||||||
int x = event.m_x ;
|
int x = event.m_x ;
|
||||||
int y = event.m_y ;
|
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->MacGetRootWindow() == window && child->IsShown() && child->IsEnabled() )
|
||||||
{
|
{
|
||||||
if (child->MacDispatchMouseEvent(event))
|
if (child->MacDispatchMouseEvent(event))
|
||||||
@@ -1678,9 +1678,9 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool respectChildrenAndSibling
|
|||||||
{
|
{
|
||||||
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() )
|
||||||
{
|
{
|
||||||
@@ -1701,9 +1701,9 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool respectChildrenAndSibling
|
|||||||
if ( (GetWindowStyle() & wxCLIP_SIBLINGS) && GetParent() )
|
if ( (GetWindowStyle() & wxCLIP_SIBLINGS) && GetParent() )
|
||||||
{
|
{
|
||||||
bool thisWindowThrough = false ;
|
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 )
|
if ( sibling == this )
|
||||||
{
|
{
|
||||||
thisWindowThrough = true ;
|
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
|
// now intersect for each of the children their rect with the updateRgn and call MacRedraw recursively
|
||||||
|
|
||||||
RgnHandle childupdate = NewRgn() ;
|
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
|
// 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
|
// 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 ) ;
|
SetRectRgn( childupdate , child->m_x , child->m_y , child->m_x + child->m_width , child->m_y + child->m_height ) ;
|
||||||
SectRgn( childupdate , updatergn , childupdate ) ;
|
SectRgn( childupdate , updatergn , childupdate ) ;
|
||||||
OffsetRgn( childupdate , -child->m_x , -child->m_y ) ;
|
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
|
// only window-absolute structures have to be moved i.e. controls
|
||||||
|
|
||||||
wxNode *node = GetChildren().First();
|
wxWindowListNode *node = GetChildren().GetFirst();
|
||||||
while ( node )
|
while ( node )
|
||||||
{
|
{
|
||||||
wxWindowMac *child = (wxWindowMac *)node->Data();
|
wxWindowMac *child = (wxWindowMac *)node->GetData();
|
||||||
child->MacSuperChangedPosition() ;
|
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
|
// only screen-absolute structures have to be moved i.e. glcanvas
|
||||||
|
|
||||||
wxNode *node = GetChildren().First();
|
wxWindowListNode *node = GetChildren().GetFirst();
|
||||||
while ( node )
|
while ( node )
|
||||||
{
|
{
|
||||||
wxWindowMac *child = (wxWindowMac *)node->Data();
|
wxWindowMac *child = (wxWindowMac *)node->GetData();
|
||||||
child->MacTopLevelWindowChangedPosition() ;
|
child->MacTopLevelWindowChangedPosition() ;
|
||||||
node = node->Next();
|
node = node->GetNext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
long wxWindowMac::MacGetLeftBorderSize( ) const
|
long wxWindowMac::MacGetLeftBorderSize( ) const
|
||||||
|
Reference in New Issue
Block a user