// we're officially created now, send the event
wxWindowCreateEvent event((wxWindow *)this);
- (void)GetEventHandler()->ProcessEvent(event);
+ (void)HandleWindowEvent(event);
}
void wxWindowMSW::UnsubclassWin()
// map Enter presses into button presses on PDAs
wxJoystickEvent event(wxEVT_JOY_BUTTON_DOWN);
event.SetEventObject(this);
- if ( GetEventHandler()->ProcessEvent(event) )
+ if ( HandleWindowEvent(event) )
return true;
#endif // __WXWINCE__
}
event.SetFromTab(bFromTab);
event.SetEventObject(this);
- if ( GetEventHandler()->ProcessEvent(event) )
+ if ( HandleWindowEvent(event) )
{
// as we don't call IsDialogMessage(), which would take of
// this by default, we need to manually send this message
wxContextMenuEvent evtCtx(wxEVT_CONTEXT_MENU, GetId(), pt);
evtCtx.SetEventObject(this);
- if (GetEventHandler()->ProcessEvent(evtCtx))
+ if (HandleWindowEvent(evtCtx))
{
processed = true;
return true;
);
helpEvent.SetEventObject(this);
- GetEventHandler()->ProcessEvent(helpEvent);
+ HandleWindowEvent(helpEvent);
#ifndef __WXWINCE__
}
else if ( info->iContextType == HELPINFO_MENUITEM )
{
wxHelpEvent helpEvent(wxEVT_HELP, info->iCtrlId);
helpEvent.SetEventObject(this);
- GetEventHandler()->ProcessEvent(helpEvent);
+ HandleWindowEvent(helpEvent);
}
else // unknown help event?
win = this;
evtCtx.SetEventObject(win);
- processed = win->GetEventHandler()->ProcessEvent(evtCtx);
+ processed = win->HandleWindowEvent(evtCtx);
}
break;
#endif
m_windowId);
event.SetEventObject(this);
- return GetEventHandler()->ProcessEvent(event);
+ return HandleWindowEvent(event);
}
bool wxWindowMSW::HandleSetFocus(WXHWND hwnd)
// notify the parent keeping track of focus for the kbd navigation
// purposes that we got it
wxChildFocusEvent eventFocus((wxWindow *)this);
- (void)GetEventHandler()->ProcessEvent(eventFocus);
+ (void)HandleWindowEvent(eventFocus);
#if wxUSE_CARET
// Deal with caret
// wxFindWinFromHandle() may return NULL, it is ok
event.SetWindow(wxFindWinFromHandle(hwnd));
- return GetEventHandler()->ProcessEvent(event);
+ return HandleWindowEvent(event);
}
bool wxWindowMSW::HandleKillFocus(WXHWND hwnd)
// wxFindWinFromHandle() may return NULL, it is ok
event.SetWindow(wxFindWinFromHandle(hwnd));
- return GetEventHandler()->ProcessEvent(event);
+ return HandleWindowEvent(event);
}
// ---------------------------------------------------------------------------
wxShowEvent event(GetId(), show);
event.SetEventObject(this);
- return GetEventHandler()->ProcessEvent(event);
+ return HandleWindowEvent(event);
}
bool wxWindowMSW::HandleInitDialog(WXHWND WXUNUSED(hWndFocus))
wxInitDialogEvent event(GetId());
event.SetEventObject(this);
- return GetEventHandler()->ProcessEvent(event);
+ return HandleWindowEvent(event);
}
bool wxWindowMSW::HandleDropFiles(WXWPARAM wParam)
event.m_pos.x = dropPoint.x;
event.m_pos.y = dropPoint.y;
- return GetEventHandler()->ProcessEvent(event);
+ return HandleWindowEvent(event);
#endif
}
ScreenToClient(&x, &y);
wxSetCursorEvent event(x, y);
- bool processedEvtSetCursor = GetEventHandler()->ProcessEvent(event);
+ bool processedEvtSetCursor = HandleWindowEvent(event);
if ( processedEvtSetCursor && event.HasCursor() )
{
hcursor = GetHcursorOf(event.GetCursor());
// TODO: notify about PBTF_APMRESUMEFROMFAILURE in case of resume events?
wxPowerEvent event(evtType);
- if ( !GetEventHandler()->ProcessEvent(event) )
+ if ( !HandleWindowEvent(event) )
return false;
*vetoed = event.IsVetoed();
wxSysColourChangedEvent event;
event.SetEventObject(this);
- (void)GetEventHandler()->ProcessEvent(event);
+ (void)HandleWindowEvent(event);
// always let the system carry on the default processing to allow the
// native controls to react to the colours update
wxDisplayChangedEvent event;
event.SetEventObject(this);
- return GetEventHandler()->ProcessEvent(event);
+ return HandleWindowEvent(event);
}
#ifndef __WXMICROWIN__
event.SetEventObject(this);
event.SetChangedWindow(wxFindWinFromHandle(hWndPalChange));
- return GetEventHandler()->ProcessEvent(event);
+ return HandleWindowEvent(event);
}
bool wxWindowMSW::HandleCaptureChanged(WXHWND hWndGainedCapture)
wxWindow *win = wxFindWinFromHandle(hWndGainedCapture);
wxMouseCaptureChangedEvent event(GetId(), win);
event.SetEventObject(this);
- return GetEventHandler()->ProcessEvent(event);
+ return HandleWindowEvent(event);
}
bool wxWindowMSW::HandleSettingChange(WXWPARAM wParam, WXLPARAM lParam)
wxQueryNewPaletteEvent event(GetId());
event.SetEventObject(this);
- return GetEventHandler()->ProcessEvent(event) && event.GetPaletteRealized();
+ return HandleWindowEvent(event) && event.GetPaletteRealized();
}
// Responds to colour changes: passes event on to children.
wxPaintEvent event(m_windowId);
event.SetEventObject(this);
- bool processed = GetEventHandler()->ProcessEvent(event);
+ bool processed = HandleWindowEvent(event);
// note that we must generate NC event after the normal one as otherwise
// BeginPaint() will happily overwrite our decorations with the background
// colour
wxNcPaintEvent eventNc(m_windowId);
eventNc.SetEventObject(this);
- GetEventHandler()->ProcessEvent(eventNc);
+ HandleWindowEvent(eventNc);
// don't keep an HRGN we don't need any longer (GetUpdateRegion() can only
// be called from inside the event handlers called above)
wxEraseEvent event(m_windowId, &dc);
event.SetEventObject(this);
- bool rc = GetEventHandler()->ProcessEvent(event);
+ bool rc = HandleWindowEvent(event);
// must be called manually as ~wxDC doesn't do anything for wxDCTemp
dc.SelectOldObjects(hdc);
wxIconizeEvent event(m_windowId);
event.SetEventObject(this);
- return GetEventHandler()->ProcessEvent(event);
+ return HandleWindowEvent(event);
}
bool wxWindowMSW::HandleMaximize()
wxMaximizeEvent event(m_windowId);
event.SetEventObject(this);
- return GetEventHandler()->ProcessEvent(event);
+ return HandleWindowEvent(event);
}
bool wxWindowMSW::HandleMove(int x, int y)
wxMoveEvent event(point, m_windowId);
event.SetEventObject(this);
- return GetEventHandler()->ProcessEvent(event);
+ return HandleWindowEvent(event);
}
bool wxWindowMSW::HandleMoving(wxRect& rect)
wxMoveEvent event(rect, m_windowId);
event.SetEventObject(this);
- bool rc = GetEventHandler()->ProcessEvent(event);
+ bool rc = HandleWindowEvent(event);
if (rc)
rect = event.GetRect();
return rc;
event.SetEventType(wxEVT_MOVE_START);
event.SetEventObject(this);
- return GetEventHandler()->ProcessEvent(event);
+ return HandleWindowEvent(event);
}
bool wxWindowMSW::HandleExitSizeMove()
event.SetEventType(wxEVT_MOVE_END);
event.SetEventObject(this);
- return GetEventHandler()->ProcessEvent(event);
+ return HandleWindowEvent(event);
}
bool wxWindowMSW::HandleSize(int WXUNUSED(w), int WXUNUSED(h), WXUINT wParam)
wxSizeEvent event(GetSize(), m_windowId);
event.SetEventObject(this);
- processed = GetEventHandler()->ProcessEvent(event);
+ processed = HandleWindowEvent(event);
}
#if USE_DEFERRED_SIZING
wxSizeEvent event(rect, m_windowId);
event.SetEventObject(this);
- bool rc = GetEventHandler()->ProcessEvent(event);
+ bool rc = HandleWindowEvent(event);
if (rc)
rect = event.GetRect();
return rc;
event.SetId(id);
event.SetInt(id);
- return GetEventHandler()->ProcessEvent(event);
+ return HandleWindowEvent(event);
}
else
{
wxMouseEvent event(eventsMouse[msg - WM_MOUSEMOVE]);
InitMouseEvent(event, x, y, flags);
- return GetEventHandler()->ProcessEvent(event);
+ return HandleWindowEvent(event);
}
bool wxWindowMSW::HandleMouseMove(int x, int y, WXUINT flags)
wxMouseEvent event(wxEVT_ENTER_WINDOW);
InitMouseEvent(event, x, y, flags);
- (void)GetEventHandler()->ProcessEvent(event);
+ (void)HandleWindowEvent(event);
}
}
#ifdef HAVE_TRACKMOUSEEVENT
}
event.m_linesPerAction = s_linesPerRotation;
- return GetEventHandler()->ProcessEvent(event);
+ return HandleWindowEvent(event);
#else // !wxUSE_MOUSEWHEEL
wxUnusedVar(wParam);
wxMouseEvent event(wxEVT_LEAVE_WINDOW);
InitMouseEvent(event, pt.x, pt.y, state);
- (void)GetEventHandler()->ProcessEvent(event);
+ (void)HandleWindowEvent(event);
}
// ---------------------------------------------------------------------------
event.m_altDown = false;
}
- return GetEventHandler()->ProcessEvent(event);
+ return HandleWindowEvent(event);
}
bool wxWindowMSW::HandleKeyDown(WXWPARAM wParam, WXLPARAM lParam)
}
wxKeyEvent event(CreateKeyEvent(wxEVT_KEY_DOWN, id, lParam, wParam));
- return GetEventHandler()->ProcessEvent(event);
+ return HandleWindowEvent(event);
}
bool wxWindowMSW::HandleKeyUp(WXWPARAM wParam, WXLPARAM lParam)
}
wxKeyEvent event(CreateKeyEvent(wxEVT_KEY_UP, id, lParam, wParam));
- return GetEventHandler()->ProcessEvent(event);
+ return HandleWindowEvent(event);
}
#if wxUSE_MENUS
evt.SetEventObject(this);
- return GetEventHandler()->ProcessEvent(evt);
+ return HandleWindowEvent(evt);
}
#endif // wxUSE_MENUS
event.SetPosition(wxPoint(x, y));
event.SetEventObject(this);
- return GetEventHandler()->ProcessEvent(event);
+ return HandleWindowEvent(event);
#else
wxUnusedVar(msg);
wxUnusedVar(x);
return false;
}
- return GetEventHandler()->ProcessEvent(event);
+ return HandleWindowEvent(event);
}
// ----------------------------------------------------------------------------
event.m_altDown = (win_modifiers & MOD_ALT) != 0;
event.m_metaDown = (win_modifiers & MOD_WIN) != 0;
- return GetEventHandler()->ProcessEvent(event);
+ return HandleWindowEvent(event);
}
#endif // wxUSE_ACCEL