wxWindowMac* parent = GetParent() ;
while( parent )
{
- if ( parent->MacGetRootWindow() != window )
+ if ( parent->MacGetRootWindow() != (WXWindow) window )
{
// we are in a different window on the mac system
parent = NULL ;
void wxWindowMac::MacOnScroll(wxScrollEvent &event )
{
- if ( event.m_eventObject == m_vScrollBar || event.m_eventObject == m_hScrollBar )
+ if ( event.GetEventObject() == m_vScrollBar || event.GetEventObject() == m_hScrollBar )
{
wxScrollWinEvent wevent;
wevent.SetPosition(event.GetPosition());
wevent.SetOrientation(event.GetOrientation());
- wevent.m_eventObject = this;
-
- if (event.m_eventType == wxEVT_SCROLL_TOP)
- wevent.m_eventType = wxEVT_SCROLLWIN_TOP;
- else if (event.m_eventType == wxEVT_SCROLL_BOTTOM)
- wevent.m_eventType = wxEVT_SCROLLWIN_BOTTOM;
- else if (event.m_eventType == wxEVT_SCROLL_LINEUP)
- wevent.m_eventType = wxEVT_SCROLLWIN_LINEUP;
- else if (event.m_eventType == wxEVT_SCROLL_LINEDOWN)
- wevent.m_eventType = wxEVT_SCROLLWIN_LINEDOWN;
- else if (event.m_eventType == wxEVT_SCROLL_PAGEUP)
- wevent.m_eventType = wxEVT_SCROLLWIN_PAGEUP;
- else if (event.m_eventType == wxEVT_SCROLL_PAGEDOWN)
- wevent.m_eventType = wxEVT_SCROLLWIN_PAGEDOWN;
- else if (event.m_eventType == wxEVT_SCROLL_THUMBTRACK)
- wevent.m_eventType = wxEVT_SCROLLWIN_THUMBTRACK;
- else if (event.m_eventType == wxEVT_SCROLL_THUMBRELEASE)
- wevent.m_eventType = wxEVT_SCROLLWIN_THUMBRELEASE;
+ wevent.SetEventObject(this);
+
+ if (event.GetEventType() == wxEVT_SCROLL_TOP)
+ wevent.SetEventType( wxEVT_SCROLLWIN_TOP );
+ else if (event.GetEventType() == wxEVT_SCROLL_BOTTOM)
+ wevent.SetEventType( wxEVT_SCROLLWIN_BOTTOM );
+ else if (event.GetEventType() == wxEVT_SCROLL_LINEUP)
+ wevent.SetEventType( wxEVT_SCROLLWIN_LINEUP );
+ else if (event.GetEventType() == wxEVT_SCROLL_LINEDOWN)
+ wevent.SetEventType( wxEVT_SCROLLWIN_LINEDOWN );
+ else if (event.GetEventType() == wxEVT_SCROLL_PAGEUP)
+ wevent.SetEventType( wxEVT_SCROLLWIN_PAGEUP );
+ else if (event.GetEventType() == wxEVT_SCROLL_PAGEDOWN)
+ wevent.SetEventType( wxEVT_SCROLLWIN_PAGEDOWN );
+ else if (event.GetEventType() == wxEVT_SCROLL_THUMBTRACK)
+ wevent.SetEventType( wxEVT_SCROLLWIN_THUMBTRACK );
+ else if (event.GetEventType() == wxEVT_SCROLL_THUMBRELEASE)
+ wevent.SetEventType( wxEVT_SCROLLWIN_THUMBRELEASE );
GetEventHandler()->ProcessEvent(wevent);
}
}
// Get the window with the focus
-wxWindowMac *wxWindowBase::FindFocus()
+wxWindowMac *wxWindowBase::DoFindFocus()
{
return gFocusWindow ;
}
{
wxWindowMac *child = node->GetData();
// added the m_isShown test --dmazzoni
- if ( child->MacGetRootWindow() == window && child->m_isShown )
+ if ( child->MacGetRootWindow() == (WXWindow) window && child->m_isShown )
{
if (child->MacGetWindowFromPointSub(newPoint , outWin ))
return TRUE;
if ( ::FindWindow( pt , &window ) == 3 )
{
- wxWindowMac* win = wxFindWinFromMacWindow( window ) ;
+ wxWindowMac* win = wxFindWinFromMacWindow( (WXWindow) window ) ;
if ( win )
{
// No, this yields the CLIENT are, we need the whole frame. RR.
for (wxWindowListNode *node = GetChildren().GetFirst(); node; node = node->GetNext())
{
wxWindowMac *child = node->GetData();
- if ( child->MacGetRootWindow() == window && child->IsShown() && child->IsEnabled() )
+ if ( child->MacGetRootWindow() == (WXWindow) window && child->IsShown() && child->IsEnabled() )
{
if (child->MacDispatchMouseEvent(event))
return TRUE;
WindowRef window = (WindowRef) MacGetRootWindow() ;
if ( window )
{
- win = wxFindWinFromMacWindow( window ) ;
+ win = wxFindWinFromMacWindow( (WXWindow) window ) ;
}
return win ;
}
{
wxControl *child = wxDynamicCast( ( wxWindow*)node->GetData() , wxControl ) ;
- if ( child && child->MacGetRootWindow() == window && child->IsShown() && child->GetMacControl() )
+ if ( child && child->MacGetRootWindow() == (WXWindow) window && child->IsShown() && child->GetMacControl() )
{
SetControlVisibility( (ControlHandle) child->GetMacControl() , false , false ) ;
hiddenWindows.Append( child ) ;
}
wxPaintEvent event;
- event.m_timeStamp = time ;
+ event.SetTimestamp(time);
event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event);
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 ) ;
- if ( child->MacGetRootWindow() == window && child->IsShown() && !EmptyRgn( childupdate ) )
+ if ( child->MacGetRootWindow() == (WXWindow) window && child->IsShown() && !EmptyRgn( childupdate ) )
{
// because dialogs may also be children
child->MacRedraw( childupdate , time , erase ) ;
}
-WXHWND wxWindowMac::MacGetRootWindow() const
+WXWindow wxWindowMac::MacGetRootWindow() const
{
wxWindowMac *iter = (wxWindowMac*)this ;