1. added wxEvtHandler::SafelyProcessEvent() and wxWindow::HandleWindowEvent() to correctly handle exceptions in even handlers in wxGTK
2. use HandleWindowEvent() everywhere as more obvious and convenient shortcut for GetEventHandler()->ProcessEvent(); also for consistency with wxGTK where it's required git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -274,6 +274,30 @@ recursively applied to the parent window's event handler. If this returns true,
|
||||
|
||||
\helpref{wxEvtHandler::SearchEventTable}{wxevthandlersearcheventtable}
|
||||
|
||||
|
||||
\membersection{wxEvtHandler::SafelyProcessEvent}\label{wxevthandlersafelyprocessevent}
|
||||
|
||||
\func{bool}{SafelyProcessEvent}{\param{wxEvent\& }{event}}
|
||||
|
||||
Processes an event by calling \helpref{ProcessEvent}{wxevthandlerprocessevent}
|
||||
and handles any exceptions that occur in the process. If an exception is
|
||||
thrown in event handler, \helpref{wxApp::OnExceptionInMainLoop}{wxapponexceptioninmainloop}
|
||||
is called.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{event}{Event to process.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
\true if the event was processed, \false if no handler was found or an
|
||||
exception was thrown.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxWindow::HandleWindowEvent}{wxwindowhandlewindowevent}
|
||||
|
||||
|
||||
\membersection{wxEvtHandler::SearchEventTable}\label{wxevthandlersearcheventtable}
|
||||
|
||||
\func{virtual bool}{SearchEventTable}{\param{wxEventTable\& }{table}, \param{wxEvent\& }{event}}
|
||||
|
@@ -1539,6 +1539,13 @@ Returns the value previously passed to
|
||||
\helpref{wxWindow::SetWindowVariant}{wxwindowsetwindowvariant}.
|
||||
|
||||
|
||||
\membersection{wxWindow::HandleWindowEvent}\label{wxwindowhandlewindowevent}
|
||||
|
||||
\func{bool}{HandleWindowEvent}{\param{wxEvent\& }{event}}
|
||||
|
||||
Shorthand for \texttt{\helpref{GetEventHandler}{wxwindowgeteventhandler}()->\helpref{SafelyProcessEvent}{wxevthandlersafelyprocessevent}(event)}.
|
||||
|
||||
|
||||
\membersection{wxWindow::HasCapture}\label{wxwindowhascapture}
|
||||
|
||||
\constfunc{virtual bool}{HasCapture}{\void}
|
||||
|
@@ -2363,6 +2363,12 @@ public:
|
||||
// process an event right now
|
||||
virtual bool ProcessEvent(wxEvent& event);
|
||||
|
||||
// Process an event by calling ProcessEvent and handling any exceptions
|
||||
// thrown by event handlers. It's mostly useful when processing wx events
|
||||
// when called from C code (e.g. in GTK+ callback) when the exception
|
||||
// wouldn't correctly propagate to wxEventLoop.
|
||||
bool SafelyProcessEvent(wxEvent& event);
|
||||
|
||||
// add an event to be processed later
|
||||
virtual void AddPendingEvent(const wxEvent& event);
|
||||
|
||||
|
@@ -745,6 +745,13 @@ public:
|
||||
// be there)
|
||||
bool RemoveEventHandler(wxEvtHandler *handler);
|
||||
|
||||
// Process an event by calling GetEventHandler()->ProcessEvent() and
|
||||
// handling any exceptions thrown by event handlers. It's mostly useful
|
||||
// when processing wx events when called from C code (e.g. in GTK+
|
||||
// callback) when the exception wouldn't correctly propagate to
|
||||
// wxEventLoop.
|
||||
bool HandleWindowEvent(wxEvent& event) const;
|
||||
|
||||
// validators
|
||||
// ----------
|
||||
|
||||
|
@@ -122,7 +122,7 @@ void wxChoice::CocoaNotification_menuDidSendAction(WX_NSNotification notificatio
|
||||
event.SetInt(index);
|
||||
event.SetEventObject(this);
|
||||
event.SetString(GetStringSelection());
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
void wxChoice::DoClear()
|
||||
|
@@ -229,14 +229,14 @@ void wxComboBox::doWxEvent(int nEvent)
|
||||
event2.SetInt(GetSelection());
|
||||
event2.SetEventObject(this);
|
||||
event2.SetString(GetStringSelection());
|
||||
GetEventHandler()->ProcessEvent(event2);
|
||||
HandleWindowEvent(event2);
|
||||
|
||||
// For consistency with MSW and GTK, also send a text updated event
|
||||
// After all, the text is updated when a selection is made
|
||||
wxCommandEvent TextEvent( wxEVT_COMMAND_TEXT_UPDATED, GetId() );
|
||||
TextEvent.SetString( GetStringSelection() );
|
||||
TextEvent.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( TextEvent );
|
||||
HandleWindowEvent( TextEvent );
|
||||
}
|
||||
|
||||
|
||||
|
@@ -97,7 +97,7 @@ wxSize wxControl::DoGetBestSize() const
|
||||
|
||||
bool wxControl::ProcessCommand(wxCommandEvent& event)
|
||||
{
|
||||
return GetEventHandler()->ProcessEvent(event);
|
||||
return HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
void wxControl::CocoaSetEnabled(bool enable)
|
||||
|
@@ -325,7 +325,7 @@ bool wxNotebook::CocoaDelegate_tabView_shouldSelectTabViewItem(WX_NSTabViewItem
|
||||
wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, GetId(),
|
||||
[GetNSTabView() indexOfTabViewItem:tabViewItem], GetSelection());
|
||||
event.SetEventObject(this);
|
||||
return !GetEventHandler()->ProcessEvent(event) || event.IsAllowed();
|
||||
return !HandleWindowEvent(event) || event.IsAllowed();
|
||||
}
|
||||
|
||||
#endif // wxUSE_NOTEBOOK
|
||||
|
@@ -176,7 +176,7 @@ void wxScrollBar::Cocoa_wxNSScrollerAction()
|
||||
wxScrollEvent event(command, GetId(), GetThumbPosition(),
|
||||
HasFlag(wxSB_VERTICAL)?wxVERTICAL:wxHORIZONTAL);
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
#endif // wxUSE_SCROLLBAR
|
||||
|
@@ -111,7 +111,7 @@ void wxSlider::ProcessEventType(wxEventType commandType)
|
||||
{
|
||||
wxScrollEvent event(commandType, GetId(), GetValue(), HasFlag(wxSL_VERTICAL)?wxVERTICAL:wxHORIZONTAL);
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
static inline wxEventType wxSliderEventTypeForKeyFromEvent(NSEvent *theEvent)
|
||||
|
@@ -80,7 +80,7 @@ void wxSpinButton::CocoaTarget_action()
|
||||
wxSpinEvent event(wxEVT_SCROLL_THUMBTRACK, GetId());
|
||||
event.SetPosition(GetValue());
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
#endif // wxUSE_SPINBTN
|
||||
|
@@ -102,7 +102,7 @@ void wxTextCtrl::CocoaTarget_action(void)
|
||||
//event.SetString(GetValue());
|
||||
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
void wxTextCtrl::AppendText(wxString const&)
|
||||
|
@@ -222,7 +222,7 @@ void wxTopLevelWindowCocoa::CocoaDelegate_windowDidBecomeKey(void)
|
||||
wxLogTrace(wxTRACE_COCOA,wxT("wxTopLevelWindowCocoa=%p::CocoaDelegate_windowDidBecomeKey"),this);
|
||||
wxActivateEvent event(wxEVT_ACTIVATE, true, GetId());
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
void wxTopLevelWindowCocoa::CocoaDelegate_windowDidResignKey(void)
|
||||
@@ -230,7 +230,7 @@ void wxTopLevelWindowCocoa::CocoaDelegate_windowDidResignKey(void)
|
||||
wxLogTrace(wxTRACE_COCOA,wxT("wxTopLevelWindowCocoa=%p::CocoaDelegate_windowDidResignKey"),this);
|
||||
wxActivateEvent event(wxEVT_ACTIVATE, false, GetId());
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
void wxTopLevelWindowCocoa::CocoaDelegate_windowDidBecomeMain(void)
|
||||
@@ -301,7 +301,7 @@ bool wxTopLevelWindowCocoa::Show(bool show)
|
||||
// is shown. I doubt this will cause any problems though.
|
||||
wxSizeEvent event(GetSize(), GetId());
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
|
||||
[m_cocoaNSWindow makeKeyAndOrderFront:m_cocoaNSWindow];
|
||||
}
|
||||
|
@@ -985,7 +985,7 @@ void wxWindowCocoaScrollView::_wx_doScroller(NSScroller *sender)
|
||||
}
|
||||
wxScrollWinEvent event(commandType, scrollpos, orientation);
|
||||
event.SetEventObject(m_owner);
|
||||
m_owner->GetEventHandler()->ProcessEvent(event);
|
||||
m_owner->HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
void wxWindowCocoaScrollView::UpdateSizes()
|
||||
@@ -1010,7 +1010,7 @@ void wxWindowCocoaScrollView::Cocoa_FrameChanged(void)
|
||||
wxLogTrace(wxTRACE_COCOA,wxT("wxWindowCocoaScrollView=%p::Cocoa_FrameChanged for wxWindow %p"), this, m_owner);
|
||||
wxSizeEvent event(m_owner->GetSize(), m_owner->GetId());
|
||||
event.SetEventObject(m_owner);
|
||||
m_owner->GetEventHandler()->ProcessEvent(event);
|
||||
m_owner->HandleWindowEvent(event);
|
||||
UpdateSizes();
|
||||
}
|
||||
|
||||
@@ -1191,7 +1191,7 @@ bool wxWindowCocoa::Cocoa_drawRect(const NSRect &rect)
|
||||
|
||||
wxPaintEvent event(m_windowId);
|
||||
event.SetEventObject(this);
|
||||
bool ret = GetEventHandler()->ProcessEvent(event);
|
||||
bool ret = HandleWindowEvent(event);
|
||||
m_isInPaint = false;
|
||||
return ret;
|
||||
}
|
||||
@@ -1261,7 +1261,7 @@ bool wxWindowCocoa::Cocoa_mouseMoved(WX_NSEvent theEvent)
|
||||
wxMouseEvent event(wxEVT_MOTION);
|
||||
InitMouseEvent(event,theEvent);
|
||||
wxLogTrace(wxTRACE_COCOA,wxT("wxWindow=%p::Cocoa_mouseMoved @%d,%d"),this,event.m_x,event.m_y);
|
||||
return GetEventHandler()->ProcessEvent(event);
|
||||
return HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
void wxWindowCocoa::Cocoa_synthesizeMouseMoved()
|
||||
@@ -1282,7 +1282,7 @@ void wxWindowCocoa::Cocoa_synthesizeMouseMoved()
|
||||
event.SetId(GetId());
|
||||
|
||||
wxLogTrace(wxTRACE_COCOA,wxT("wxwin=%p Synthesized Mouse Moved @%d,%d"),this,event.m_x,event.m_y);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
bool wxWindowCocoa::Cocoa_mouseEntered(WX_NSEvent theEvent)
|
||||
@@ -1300,7 +1300,7 @@ bool wxWindowCocoa::Cocoa_mouseEntered(WX_NSEvent theEvent)
|
||||
wxMouseEvent event(wxEVT_ENTER_WINDOW);
|
||||
InitMouseEvent(event,theEvent);
|
||||
wxLogTrace(wxTRACE_COCOA_TrackingRect,wxT("wxwin=%p Mouse Entered TR#%d @%d,%d"),this,[theEvent trackingNumber], event.m_x,event.m_y);
|
||||
return GetEventHandler()->ProcessEvent(event);
|
||||
return HandleWindowEvent(event);
|
||||
}
|
||||
else
|
||||
return false;
|
||||
@@ -1315,7 +1315,7 @@ bool wxWindowCocoa::Cocoa_mouseExited(WX_NSEvent theEvent)
|
||||
wxMouseEvent event(wxEVT_LEAVE_WINDOW);
|
||||
InitMouseEvent(event,theEvent);
|
||||
wxLogTrace(wxTRACE_COCOA_TrackingRect,wxT("wxwin=%p Mouse Exited TR#%d @%d,%d"),this,[theEvent trackingNumber],event.m_x,event.m_y);
|
||||
return GetEventHandler()->ProcessEvent(event);
|
||||
return HandleWindowEvent(event);
|
||||
}
|
||||
else
|
||||
return false;
|
||||
@@ -1326,7 +1326,7 @@ bool wxWindowCocoa::Cocoa_mouseDown(WX_NSEvent theEvent)
|
||||
wxMouseEvent event([theEvent clickCount]<2?wxEVT_LEFT_DOWN:wxEVT_LEFT_DCLICK);
|
||||
InitMouseEvent(event,theEvent);
|
||||
wxLogTrace(wxTRACE_COCOA,wxT("Mouse Down @%d,%d num clicks=%d"),event.m_x,event.m_y,[theEvent clickCount]);
|
||||
return GetEventHandler()->ProcessEvent(event);
|
||||
return HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
bool wxWindowCocoa::Cocoa_mouseDragged(WX_NSEvent theEvent)
|
||||
@@ -1335,7 +1335,7 @@ bool wxWindowCocoa::Cocoa_mouseDragged(WX_NSEvent theEvent)
|
||||
InitMouseEvent(event,theEvent);
|
||||
event.m_leftDown = true;
|
||||
wxLogTrace(wxTRACE_COCOA,wxT("Mouse Drag @%d,%d"),event.m_x,event.m_y);
|
||||
return GetEventHandler()->ProcessEvent(event);
|
||||
return HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
bool wxWindowCocoa::Cocoa_mouseUp(WX_NSEvent theEvent)
|
||||
@@ -1343,7 +1343,7 @@ bool wxWindowCocoa::Cocoa_mouseUp(WX_NSEvent theEvent)
|
||||
wxMouseEvent event(wxEVT_LEFT_UP);
|
||||
InitMouseEvent(event,theEvent);
|
||||
wxLogTrace(wxTRACE_COCOA,wxT("Mouse Up @%d,%d"),event.m_x,event.m_y);
|
||||
return GetEventHandler()->ProcessEvent(event);
|
||||
return HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
bool wxWindowCocoa::Cocoa_rightMouseDown(WX_NSEvent theEvent)
|
||||
@@ -1351,7 +1351,7 @@ bool wxWindowCocoa::Cocoa_rightMouseDown(WX_NSEvent theEvent)
|
||||
wxMouseEvent event([theEvent clickCount]<2?wxEVT_RIGHT_DOWN:wxEVT_RIGHT_DCLICK);
|
||||
InitMouseEvent(event,theEvent);
|
||||
wxLogDebug(wxT("Mouse Down @%d,%d num clicks=%d"),event.m_x,event.m_y,[theEvent clickCount]);
|
||||
return GetEventHandler()->ProcessEvent(event);
|
||||
return HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
bool wxWindowCocoa::Cocoa_rightMouseDragged(WX_NSEvent theEvent)
|
||||
@@ -1360,7 +1360,7 @@ bool wxWindowCocoa::Cocoa_rightMouseDragged(WX_NSEvent theEvent)
|
||||
InitMouseEvent(event,theEvent);
|
||||
event.m_rightDown = true;
|
||||
wxLogDebug(wxT("Mouse Drag @%d,%d"),event.m_x,event.m_y);
|
||||
return GetEventHandler()->ProcessEvent(event);
|
||||
return HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
bool wxWindowCocoa::Cocoa_rightMouseUp(WX_NSEvent theEvent)
|
||||
@@ -1368,7 +1368,7 @@ bool wxWindowCocoa::Cocoa_rightMouseUp(WX_NSEvent theEvent)
|
||||
wxMouseEvent event(wxEVT_RIGHT_UP);
|
||||
InitMouseEvent(event,theEvent);
|
||||
wxLogDebug(wxT("Mouse Up @%d,%d"),event.m_x,event.m_y);
|
||||
return GetEventHandler()->ProcessEvent(event);
|
||||
return HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
bool wxWindowCocoa::Cocoa_otherMouseDown(WX_NSEvent theEvent)
|
||||
@@ -1401,7 +1401,7 @@ void wxWindowCocoa::Cocoa_FrameChanged(void)
|
||||
m_visibleTrackingRectManager->RebuildTrackingRect();
|
||||
wxSizeEvent event(GetSize(), m_windowId);
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#endif
|
||||
|
||||
#include "wx/event.h"
|
||||
#include "wx/evtloop.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/list.h"
|
||||
@@ -1314,6 +1315,42 @@ bool wxEvtHandler::ProcessEvent(wxEvent& event)
|
||||
return TryParent(event);
|
||||
}
|
||||
|
||||
bool wxEvtHandler::SafelyProcessEvent(wxEvent& event)
|
||||
{
|
||||
#if wxUSE_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif
|
||||
return ProcessEvent(event);
|
||||
#if wxUSE_EXCEPTIONS
|
||||
}
|
||||
catch ( ... )
|
||||
{
|
||||
wxEventLoopBase *loop = wxEventLoopBase::GetActive();
|
||||
try
|
||||
{
|
||||
if ( !wxTheApp || !wxTheApp->OnExceptionInMainLoop() )
|
||||
{
|
||||
if ( loop )
|
||||
loop->Exit();
|
||||
}
|
||||
//else: continue running current event loop
|
||||
|
||||
return false;
|
||||
}
|
||||
catch ( ... )
|
||||
{
|
||||
// OnExceptionInMainLoop() threw, possibly rethrowing the same
|
||||
// exception again: very good, but we still need Exit() to
|
||||
// be called
|
||||
if ( loop )
|
||||
loop->Exit();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
#endif // wxUSE_EXCEPTIONS
|
||||
}
|
||||
|
||||
|
||||
bool wxEvtHandler::SearchEventTable(wxEventTable& table, wxEvent& event)
|
||||
{
|
||||
|
@@ -1051,6 +1051,11 @@ bool wxWindowBase::RemoveEventHandler(wxEvtHandler *handler)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxWindowBase::HandleWindowEvent(wxEvent& event) const
|
||||
{
|
||||
return GetEventHandler()->SafelyProcessEvent(event);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// colours, fonts &c
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -228,7 +228,7 @@ bool wxNonOwnedWindow::Show(bool show)
|
||||
m_sizeSet = true;
|
||||
wxSizeEvent event(GetSize(), GetId());
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
// make sure the window is fully painted, with all pending updates, before
|
||||
|
@@ -185,7 +185,7 @@ void wxTopLevelWindowDFB::HandleFocusEvent(const wxDFBWindowEvent& event_)
|
||||
|
||||
wxActivateEvent event(wxEVT_ACTIVATE, activate, GetId());
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
|
||||
// if a frame that doesn't have wx focus inside it just got focus, we
|
||||
// need to set focus to it (or its child):
|
||||
|
@@ -206,12 +206,12 @@ void wxWindowDFB::SetFocus()
|
||||
// notify the parent keeping track of focus for the kbd navigation
|
||||
// purposes that we got it
|
||||
wxChildFocusEvent eventFocus((wxWindow*)this);
|
||||
GetEventHandler()->ProcessEvent(eventFocus);
|
||||
HandleWindowEvent(eventFocus);
|
||||
|
||||
wxFocusEvent event(wxEVT_SET_FOCUS, GetId());
|
||||
event.SetEventObject(this);
|
||||
event.SetWindow((wxWindow*)oldFocusedWindow);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
|
||||
#if wxUSE_CARET
|
||||
// caret needs to be informed about focus change
|
||||
@@ -241,7 +241,7 @@ void wxWindowDFB::DFBKillFocus()
|
||||
wxFocusEvent event(wxEVT_KILL_FOCUS, GetId());
|
||||
event.SetEventObject(this);
|
||||
event.SetWindow(gs_toBeFocusedWindow);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -526,7 +526,7 @@ void wxWindowDFB::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
||||
wxSize newSize(width, height);
|
||||
wxSizeEvent event(newSize, GetId());
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -674,7 +674,7 @@ void wxWindowDFB::PaintWindow(const wxRect& rect)
|
||||
wxWindowDC dc((wxWindow*)this);
|
||||
wxEraseEvent eventEr(m_windowId, &dc);
|
||||
eventEr.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(eventEr);
|
||||
HandleWindowEvent(eventEr);
|
||||
|
||||
wxRect clientRect(GetClientRect());
|
||||
|
||||
@@ -683,7 +683,7 @@ void wxWindowDFB::PaintWindow(const wxRect& rect)
|
||||
{
|
||||
wxNcPaintEvent eventNc(GetId());
|
||||
eventNc.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(eventNc);
|
||||
HandleWindowEvent(eventNc);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -696,7 +696,7 @@ void wxWindowDFB::PaintWindow(const wxRect& rect)
|
||||
{
|
||||
wxPaintEvent eventPt(GetId());
|
||||
eventPt.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(eventPt);
|
||||
HandleWindowEvent(eventPt);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1026,7 +1026,7 @@ void wxWindowDFB::HandleKeyEvent(const wxDFBWindowEvent& event_)
|
||||
if ( e.type == DWET_KEYUP )
|
||||
{
|
||||
event.SetEventType(wxEVT_KEY_UP);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1034,7 +1034,7 @@ void wxWindowDFB::HandleKeyEvent(const wxDFBWindowEvent& event_)
|
||||
|
||||
event.SetEventType(wxEVT_KEY_DOWN);
|
||||
|
||||
if ( GetEventHandler()->ProcessEvent(event) )
|
||||
if ( HandleWindowEvent(event) )
|
||||
return;
|
||||
|
||||
// only send wxEVT_CHAR event if not processed yet:
|
||||
@@ -1042,7 +1042,7 @@ void wxWindowDFB::HandleKeyEvent(const wxDFBWindowEvent& event_)
|
||||
if ( event.m_keyCode != 0 )
|
||||
{
|
||||
event.SetEventType(wxEVT_CHAR);
|
||||
if ( GetEventHandler()->ProcessEvent(event) )
|
||||
if ( HandleWindowEvent(event) )
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1057,7 +1057,7 @@ void wxWindowDFB::HandleKeyEvent(const wxDFBWindowEvent& event_)
|
||||
// Ctrl-TAB changes the (parent) window, i.e. switch notebook page:
|
||||
navEvent.SetWindowChange(event.m_controlDown);
|
||||
navEvent.SetCurrentFocus(wxStaticCast(this, wxWindow));
|
||||
GetParent()->GetEventHandler()->ProcessEvent(navEvent);
|
||||
GetParent()->HandleWindowEvent(navEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ static void gtk_bmpbutton_clicked_callback( GtkWidget *WXUNUSED(widget), wxBitma
|
||||
|
||||
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId());
|
||||
event.SetEventObject(button);
|
||||
button->GetEventHandler()->ProcessEvent(event);
|
||||
button->HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -44,7 +44,7 @@ static void gtk_button_clicked_callback( GtkWidget *WXUNUSED(widget), wxButton *
|
||||
|
||||
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId());
|
||||
event.SetEventObject(button);
|
||||
button->GetEventHandler()->ProcessEvent(event);
|
||||
button->HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -84,7 +84,7 @@ static void gtk_checkbox_toggled_callback(GtkWidget *widget, wxCheckBox *cb)
|
||||
wxCommandEvent event(wxEVT_COMMAND_CHECKBOX_CLICKED, cb->GetId());
|
||||
event.SetInt(cb->Get3StateValue());
|
||||
event.SetEventObject(cb);
|
||||
cb->GetEventHandler()->ProcessEvent(event);
|
||||
cb->HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -37,7 +37,7 @@ static void gtk_checklist_toggled(GtkCellRendererToggle * WXUNUSED(renderer),
|
||||
new_event.SetInt( gtk_tree_path_get_indices(path)[0] );
|
||||
gtk_tree_path_free(path);
|
||||
listbox->Check( new_event.GetInt(), !listbox->IsChecked(new_event.GetInt()));
|
||||
listbox->GetEventHandler()->ProcessEvent( new_event );
|
||||
listbox->HandleWindowEvent( new_event );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -62,7 +62,7 @@ static void gtk_choice_clicked_callback( GtkWidget *WXUNUSED(widget), wxChoice *
|
||||
else if ( choice->HasClientUntypedData() )
|
||||
event.SetClientData( choice->GetClientData(n) );
|
||||
|
||||
choice->GetEventHandler()->ProcessEvent(event);
|
||||
choice->HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -43,7 +43,7 @@ static void gtk_clrbutton_setcolor_callback(GtkColorButton *widget,
|
||||
|
||||
// fire the colour-changed event
|
||||
wxColourPickerEvent event(p, p->GetId(), p->GetColour());
|
||||
p->GetEventHandler()->ProcessEvent(event);
|
||||
p->HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -102,7 +102,7 @@ gtk_collapsiblepane_expanded_callback(GObject * WXUNUSED(object),
|
||||
{
|
||||
// fire an event
|
||||
wxCollapsiblePaneEvent ev(p, p->GetId(), p->IsCollapsed());
|
||||
p->GetEventHandler()->ProcessEvent(ev);
|
||||
p->HandleWindowEvent(ev);
|
||||
|
||||
// the user asked to explicitely handle the resizing itself...
|
||||
return;
|
||||
@@ -143,7 +143,7 @@ gtk_collapsiblepane_expanded_callback(GObject * WXUNUSED(object),
|
||||
|
||||
// fire an event
|
||||
wxCollapsiblePaneEvent ev(p, p->GetId(), p->IsCollapsed());
|
||||
p->GetEventHandler()->ProcessEvent(ev);
|
||||
p->HandleWindowEvent(ev);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -36,7 +36,7 @@ gtkcombobox_text_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *comb
|
||||
wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, combo->GetId() );
|
||||
event.SetString( combo->GetValue() );
|
||||
event.SetEventObject( combo );
|
||||
combo->GetEventHandler()->ProcessEvent( event );
|
||||
combo->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -51,7 +51,7 @@ gtkcombobox_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo )
|
||||
event.SetInt( combo->GetSelection() );
|
||||
event.SetString( combo->GetStringSelection() );
|
||||
event.SetEventObject( combo );
|
||||
combo->GetEventHandler()->ProcessEvent( event );
|
||||
combo->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -386,7 +386,7 @@ void wxComboBox::OnChar( wxKeyEvent &event )
|
||||
eventEnter.SetInt( GetSelection() );
|
||||
eventEnter.SetEventObject( this );
|
||||
|
||||
if ( GetEventHandler()->ProcessEvent(eventEnter) )
|
||||
if ( HandleWindowEvent(eventEnter) )
|
||||
{
|
||||
// Catch GTK event so that GTK doesn't open the drop
|
||||
// down list upon RETURN.
|
||||
|
@@ -642,7 +642,7 @@ void wxgtk_tree_model_set_sort_column_id (GtkTreeSortable *sortable,
|
||||
wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED, dv->GetId() );
|
||||
event.SetDataViewColumn( gs_lastLeftClickHeader );
|
||||
event.SetModel( dv->GetModel() );
|
||||
dv->GetEventHandler()->ProcessEvent( event );
|
||||
dv->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
gs_lastLeftClickHeader = NULL;
|
||||
@@ -1212,7 +1212,7 @@ wxgtk_cell_editable_editing_done( GtkCellEditable *editable,
|
||||
event.SetModel( dv->GetModel() );
|
||||
wxDataViewItem item( s_user_data );
|
||||
event.SetItem( item );
|
||||
dv->GetEventHandler()->ProcessEvent( event );
|
||||
dv->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1230,7 +1230,7 @@ wxgtk_renderer_editing_started( GtkCellRenderer *cell, GtkCellEditable *editable
|
||||
gtk_tree_path_free( tree_path );
|
||||
wxDataViewItem item( iter.user_data );
|
||||
event.SetItem( item );
|
||||
dv->GetEventHandler()->ProcessEvent( event );
|
||||
dv->HandleWindowEvent( event );
|
||||
|
||||
if (GTK_IS_CELL_EDITABLE(editable))
|
||||
{
|
||||
@@ -2068,7 +2068,7 @@ gtk_dataview_header_button_press_callback( GtkWidget *widget,
|
||||
wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK, dv->GetId() );
|
||||
event.SetDataViewColumn( column );
|
||||
event.SetModel( dv->GetModel() );
|
||||
if (dv->GetEventHandler()->ProcessEvent( event ))
|
||||
if (dv->HandleWindowEvent( event ))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2078,7 +2078,7 @@ gtk_dataview_header_button_press_callback( GtkWidget *widget,
|
||||
wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, dv->GetId() );
|
||||
event.SetDataViewColumn( column );
|
||||
event.SetModel( dv->GetModel() );
|
||||
if (dv->GetEventHandler()->ProcessEvent( event ))
|
||||
if (dv->HandleWindowEvent( event ))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2654,7 +2654,7 @@ bool wxDataViewCtrlInternal::ItemChanged( const wxDataViewItem &item )
|
||||
event.SetEventObject( m_owner );
|
||||
event.SetModel( m_owner->GetModel() );
|
||||
event.SetItem( item );
|
||||
m_owner->GetEventHandler()->ProcessEvent( event );
|
||||
m_owner->HandleWindowEvent( event );
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -2667,7 +2667,7 @@ bool wxDataViewCtrlInternal::ValueChanged( const wxDataViewItem &item, unsigned
|
||||
event.SetColumn( col );
|
||||
event.SetDataViewColumn( GetOwner()->GetColumn(col) );
|
||||
event.SetItem( item );
|
||||
m_owner->GetEventHandler()->ProcessEvent( event );
|
||||
m_owner->HandleWindowEvent( event );
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -3120,7 +3120,7 @@ wxdataview_selection_changed_callback( GtkTreeSelection* selection, wxDataViewCt
|
||||
wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, dv->GetId() );
|
||||
event.SetItem( dv->GetSelection() );
|
||||
event.SetModel( dv->GetModel() );
|
||||
dv->GetEventHandler()->ProcessEvent( event );
|
||||
dv->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -3134,7 +3134,7 @@ wxdataview_row_activated_callback( GtkTreeView* treeview, GtkTreePath *path,
|
||||
wxDataViewItem item( (void*) iter.user_data );;
|
||||
event.SetItem( item );
|
||||
event.SetModel( dv->GetModel() );
|
||||
dv->GetEventHandler()->ProcessEvent( event );
|
||||
dv->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -3146,7 +3146,7 @@ wxdataview_test_expand_row_callback( GtkTreeView* treeview, GtkTreeIter* iter,
|
||||
wxDataViewItem item( (void*) iter->user_data );;
|
||||
event.SetItem( item );
|
||||
event.SetModel( dv->GetModel() );
|
||||
dv->GetEventHandler()->ProcessEvent( event );
|
||||
dv->HandleWindowEvent( event );
|
||||
|
||||
return !event.IsAllowed();
|
||||
}
|
||||
@@ -3160,7 +3160,7 @@ wxdataview_row_expanded_callback( GtkTreeView* treeview, GtkTreeIter* iter,
|
||||
wxDataViewItem item( (void*) iter->user_data );;
|
||||
event.SetItem( item );
|
||||
event.SetModel( dv->GetModel() );
|
||||
dv->GetEventHandler()->ProcessEvent( event );
|
||||
dv->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -3172,7 +3172,7 @@ wxdataview_test_collapse_row_callback( GtkTreeView* treeview, GtkTreeIter* iter,
|
||||
wxDataViewItem item( (void*) iter->user_data );;
|
||||
event.SetItem( item );
|
||||
event.SetModel( dv->GetModel() );
|
||||
dv->GetEventHandler()->ProcessEvent( event );
|
||||
dv->HandleWindowEvent( event );
|
||||
|
||||
return !event.IsAllowed();
|
||||
}
|
||||
@@ -3186,7 +3186,7 @@ wxdataview_row_collapsed_callback( GtkTreeView* treeview, GtkTreeIter* iter,
|
||||
wxDataViewItem item( (void*) iter->user_data );;
|
||||
event.SetItem( item );
|
||||
event.SetModel( dv->GetModel() );
|
||||
dv->GetEventHandler()->ProcessEvent( event );
|
||||
dv->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@@ -49,7 +49,7 @@ static void gtk_dirdialog_ok_callback(GtkWidget *widget, wxDirDialog *dialog)
|
||||
|
||||
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK);
|
||||
event.SetEventObject(dialog);
|
||||
dialog->GetEventHandler()->ProcessEvent(event);
|
||||
dialog->HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ static void gtk_dirdialog_cancel_callback(GtkWidget *WXUNUSED(w),
|
||||
{
|
||||
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
|
||||
event.SetEventObject(dialog);
|
||||
dialog->GetEventHandler()->ProcessEvent(event);
|
||||
dialog->HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -80,7 +80,7 @@ static void gtk_filedialog_ok_callback(GtkWidget *widget, wxFileDialog *dialog)
|
||||
|
||||
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK);
|
||||
event.SetEventObject(dialog);
|
||||
dialog->GetEventHandler()->ProcessEvent(event);
|
||||
dialog->HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ gtk_filedialog_cancel_callback(GtkWidget * WXUNUSED(w), wxFileDialog *dialog)
|
||||
{
|
||||
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
|
||||
event.SetEventObject(dialog);
|
||||
dialog->GetEventHandler()->ProcessEvent(event);
|
||||
dialog->HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
static void gtk_filedialog_response_callback(GtkWidget *w,
|
||||
|
@@ -120,7 +120,7 @@ void wxFileButton::OnDialogOK(wxCommandEvent& ev)
|
||||
|
||||
// ...and fire an event
|
||||
wxFileDirPickerEvent event(wxEVT_COMMAND_FILEPICKER_CHANGED, this, GetId(), m_path);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ static void gtk_dirbutton_currentfolderchanged_callback(GtkFileChooserButton *wi
|
||||
|
||||
// ...and fire an event
|
||||
wxFileDirPickerEvent event(wxEVT_COMMAND_DIRPICKER_CHANGED, p, p->GetId(), p->GetPath());
|
||||
p->GetEventHandler()->ProcessEvent(event);
|
||||
p->HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -60,7 +60,7 @@ void gtk_fontdialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFontDialog *dial
|
||||
|
||||
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK);
|
||||
event.SetEventObject( dialog );
|
||||
dialog->GetEventHandler()->ProcessEvent( event );
|
||||
dialog->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ void gtk_fontdialog_cancel_callback( GtkWidget *WXUNUSED(w), wxFontDialog *dialo
|
||||
{
|
||||
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
|
||||
event.SetEventObject( dialog );
|
||||
dialog->GetEventHandler()->ProcessEvent( event );
|
||||
dialog->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -42,7 +42,7 @@ static void gtk_fontbutton_setfont_callback(GtkFontButton *widget,
|
||||
|
||||
// fire the colour-changed event
|
||||
wxFontPickerEvent event(p, p->GetId(), p->GetSelectedFont());
|
||||
p->GetEventHandler()->ProcessEvent(event);
|
||||
p->HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -54,7 +54,7 @@ gtk_glwindow_map_callback( GtkWidget * WXUNUSED(widget), wxGLCanvas *win )
|
||||
{
|
||||
wxPaintEvent event( win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
|
||||
win->m_exposed = false;
|
||||
win->GetUpdateRegion().Clear();
|
||||
@@ -96,7 +96,7 @@ gtk_glcanvas_size_callback(GtkWidget *WXUNUSED(widget),
|
||||
|
||||
wxSizeEvent event( wxSize(win->m_width,win->m_height), win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ void wxGLCanvas::OnInternalIdle()
|
||||
{
|
||||
wxPaintEvent event( GetId() );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
HandleWindowEvent( event );
|
||||
|
||||
m_exposed = false;
|
||||
GetUpdateRegion().Clear();
|
||||
|
@@ -104,7 +104,7 @@ gtk_listbox_row_activated_callback(GtkTreeView * WXUNUSED(treeview),
|
||||
event.SetInt(-1);
|
||||
}
|
||||
|
||||
listbox->GetEventHandler()->ProcessEvent( event );
|
||||
listbox->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ gtk_listitem_changed_callback(GtkTreeSelection * WXUNUSED(selection),
|
||||
event.SetExtraLong( 0 );
|
||||
event.SetInt( -1 );
|
||||
|
||||
listbox->GetEventHandler()->ProcessEvent( event );
|
||||
listbox->HandleWindowEvent( event );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -145,7 +145,7 @@ gtk_listitem_changed_callback(GtkTreeSelection * WXUNUSED(selection),
|
||||
event.SetExtraLong( 1 );
|
||||
event.SetInt( selections[0] );
|
||||
|
||||
listbox->GetEventHandler()->ProcessEvent( event );
|
||||
listbox->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -157,7 +157,7 @@ gtk_listitem_changed_callback(GtkTreeSelection * WXUNUSED(selection),
|
||||
event.SetExtraLong( 0 );
|
||||
event.SetInt( -1 );
|
||||
|
||||
listbox->GetEventHandler()->ProcessEvent( event );
|
||||
listbox->HandleWindowEvent( event );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -178,7 +178,7 @@ gtk_listitem_changed_callback(GtkTreeSelection * WXUNUSED(selection),
|
||||
else if ( listbox->HasClientUntypedData() )
|
||||
event.SetClientData( gtk_tree_entry_get_userdata(entry) );
|
||||
|
||||
listbox->GetEventHandler()->ProcessEvent( event );
|
||||
listbox->HandleWindowEvent( event );
|
||||
|
||||
g_object_unref (entry);
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ gtk_mdi_page_change_callback( GtkNotebook *WXUNUSED(widget),
|
||||
{
|
||||
wxActivateEvent event1( wxEVT_ACTIVATE, false, child->GetId() );
|
||||
event1.SetEventObject( child);
|
||||
child->GetEventHandler()->ProcessEvent( event1 );
|
||||
child->HandleWindowEvent( event1 );
|
||||
}
|
||||
|
||||
// send activate event to new child
|
||||
@@ -71,7 +71,7 @@ gtk_mdi_page_change_callback( GtkNotebook *WXUNUSED(widget),
|
||||
|
||||
wxActivateEvent event2( wxEVT_ACTIVATE, true, child->GetId() );
|
||||
event2.SetEventObject( child);
|
||||
child->GetEventHandler()->ProcessEvent( event2 );
|
||||
child->HandleWindowEvent( event2 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -60,12 +60,12 @@ static void DoCommonMenuCallbackCode(wxMenu *menu, wxMenuEvent& event)
|
||||
event.SetEventObject( menu );
|
||||
|
||||
wxEvtHandler* handler = menu->GetEventHandler();
|
||||
if (handler && handler->ProcessEvent(event))
|
||||
if (handler && handler->SafelyProcessEvent(event))
|
||||
return;
|
||||
|
||||
wxWindow *win = menu->GetInvokingWindow();
|
||||
if (win)
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
@@ -573,7 +573,7 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu )
|
||||
if (item->IsCheckable())
|
||||
commandEvent.SetInt(item->IsChecked());
|
||||
|
||||
frame->GetEventHandler()->ProcessEvent(commandEvent);
|
||||
frame->HandleWindowEvent(commandEvent);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -601,11 +601,11 @@ static void gtk_menu_hilight_callback( GtkWidget *widget, wxMenu *menu )
|
||||
event.SetEventObject( menu );
|
||||
|
||||
wxEvtHandler* handler = menu->GetEventHandler();
|
||||
if (handler && handler->ProcessEvent(event))
|
||||
if (handler && handler->SafelyProcessEvent(event))
|
||||
return;
|
||||
|
||||
wxWindow *win = menu->GetInvokingWindow();
|
||||
if (win) win->GetEventHandler()->ProcessEvent( event );
|
||||
if (win) win->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -627,12 +627,12 @@ static void gtk_menu_nolight_callback( GtkWidget *widget, wxMenu *menu )
|
||||
event.SetEventObject( menu );
|
||||
|
||||
wxEvtHandler* handler = menu->GetEventHandler();
|
||||
if (handler && handler->ProcessEvent(event))
|
||||
if (handler && handler->SafelyProcessEvent(event))
|
||||
return;
|
||||
|
||||
wxWindow *win = menu->GetInvokingWindow();
|
||||
if (win)
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -53,7 +53,7 @@ static gint gtk_popup_button_press (GtkWidget *widget, GdkEvent *gdk_event, wxPo
|
||||
wxFocusEvent event( wxEVT_KILL_FOCUS, win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
|
||||
(void)win->GetEventHandler()->ProcessEvent( event );
|
||||
(void)win->HandleWindowEvent( event );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -227,7 +227,7 @@ void wxPopupWindow::DoSetSize( int x, int y, int width, int height, int sizeFlag
|
||||
gtk_widget_set_size_request( m_widget, m_width, m_height );
|
||||
wxSizeEvent event(GetSize(), GetId());
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ bool wxPopupWindow::Show( bool show )
|
||||
{
|
||||
wxSizeEvent event(GetSize(), GetId());
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
bool ret = wxWindow::Show( show );
|
||||
|
@@ -67,7 +67,7 @@ static void gtk_radiobutton_clicked_callback( GtkToggleButton *button, wxRadioBo
|
||||
event.SetInt( rb->GetSelection() );
|
||||
event.SetString( rb->GetStringSelection() );
|
||||
event.SetEventObject( rb );
|
||||
rb->GetEventHandler()->ProcessEvent(event);
|
||||
rb->HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ static gint gtk_radiobox_keypress_callback( GtkWidget *widget, GdkEventKey *gdk_
|
||||
// CTRL-TAB changes the (parent) window, i.e. switch notebook page
|
||||
new_event.SetWindowChange( (gdk_event->state & GDK_CONTROL_MASK) );
|
||||
new_event.SetCurrentFocus( rb );
|
||||
return rb->GetParent()->GetEventHandler()->ProcessEvent( new_event );
|
||||
return rb->GetParent()->HandleWindowEvent(new_event);
|
||||
}
|
||||
|
||||
if ((gdk_event->keyval != GDK_Up) &&
|
||||
@@ -156,7 +156,7 @@ static gint gtk_radiobutton_focus_in( GtkWidget * WXUNUSED(widget),
|
||||
|
||||
// never stop the signal emission, it seems to break the kbd handling
|
||||
// inside the radiobox
|
||||
(void)win->GetEventHandler()->ProcessEvent( event );
|
||||
(void)win->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@@ -658,7 +658,7 @@ void wxRadioBox::OnInternalIdle()
|
||||
wxFocusEvent event( wxEVT_KILL_FOCUS, GetId() );
|
||||
event.SetEventObject( this );
|
||||
|
||||
(void)GetEventHandler()->ProcessEvent( event );
|
||||
(void)HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -41,7 +41,7 @@ void gtk_radiobutton_clicked_callback( GtkToggleButton *button, wxRadioButton *r
|
||||
wxCommandEvent event( wxEVT_COMMAND_RADIOBUTTON_SELECTED, rb->GetId());
|
||||
event.SetInt( rb->GetValue() );
|
||||
event.SetEventObject( rb );
|
||||
rb->GetEventHandler()->ProcessEvent( event );
|
||||
rb->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -38,14 +38,14 @@ gtk_value_changed(GtkRange* range, wxScrollBar* win)
|
||||
// first send the specific event for the user action
|
||||
wxScrollEvent evtSpec(eventType, id, value, orient);
|
||||
evtSpec.SetEventObject(win);
|
||||
win->GetEventHandler()->ProcessEvent(evtSpec);
|
||||
win->HandleWindowEvent(evtSpec);
|
||||
|
||||
if (!win->m_isScrolling)
|
||||
{
|
||||
// and if it's over also send a general "changed" event
|
||||
wxScrollEvent evtChanged(wxEVT_SCROLL_CHANGED, id, value, orient);
|
||||
evtChanged.SetEventObject(win);
|
||||
win->GetEventHandler()->ProcessEvent(evtChanged);
|
||||
win->HandleWindowEvent(evtChanged);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -82,11 +82,11 @@ gtk_event_after(GtkRange* range, GdkEvent* event, wxScrollBar* win)
|
||||
|
||||
wxScrollEvent evtRel(wxEVT_SCROLL_THUMBRELEASE, id, value, orient);
|
||||
evtRel.SetEventObject(win);
|
||||
win->GetEventHandler()->ProcessEvent(evtRel);
|
||||
win->HandleWindowEvent(evtRel);
|
||||
|
||||
wxScrollEvent evtChanged(wxEVT_SCROLL_CHANGED, id, value, orient);
|
||||
evtChanged.SetEventObject(win);
|
||||
win->GetEventHandler()->ProcessEvent(evtChanged);
|
||||
win->HandleWindowEvent(evtChanged);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -46,7 +46,7 @@ ProcessScrollEvent(wxSlider *win, wxEventType evtType)
|
||||
{
|
||||
wxScrollEvent event( evtType, win->GetId(), value, orient );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
// but, in any case, except if we're dragging the slider (and so the change
|
||||
@@ -55,14 +55,14 @@ ProcessScrollEvent(wxSlider *win, wxEventType evtType)
|
||||
{
|
||||
wxScrollEvent event(wxEVT_SCROLL_CHANGED, win->GetId(), value, orient);
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
// and also generate a command event for compatibility
|
||||
wxCommandEvent event( wxEVT_COMMAND_SLIDER_UPDATED, win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
event.SetInt( value );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
static inline wxEventType GtkScrollTypeToWx(int scrollType)
|
||||
|
@@ -48,7 +48,7 @@ gtk_value_changed(GtkSpinButton* spinbutton, wxSpinButton* win)
|
||||
event.SetPosition(pos);
|
||||
event.SetEventObject(win);
|
||||
|
||||
if ((win->GetEventHandler()->ProcessEvent( event )) &&
|
||||
if ((win->HandleWindowEvent( event )) &&
|
||||
!event.IsAllowed() )
|
||||
{
|
||||
/* program has vetoed */
|
||||
@@ -64,7 +64,7 @@ gtk_value_changed(GtkSpinButton* spinbutton, wxSpinButton* win)
|
||||
wxSpinEvent event2(wxEVT_SCROLL_THUMBTRACK, win->GetId());
|
||||
event2.SetPosition(pos);
|
||||
event2.SetEventObject(win);
|
||||
win->GetEventHandler()->ProcessEvent(event2);
|
||||
win->HandleWindowEvent(event2);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -51,7 +51,7 @@ gtk_value_changed(GtkSpinButton* spinbutton, wxSpinCtrl* win)
|
||||
// values in range 5..50 is then, ummm, quite challenging (hint: you can't
|
||||
// enter 1!) (VZ)
|
||||
event.SetInt(win->m_pos);
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ gtk_changed(GtkSpinButton* spinbutton, wxSpinCtrl* win)
|
||||
|
||||
// see above
|
||||
event.SetInt(win->m_pos);
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event )
|
||||
GtkSpinButton *gsb = GTK_SPIN_BUTTON(m_widget);
|
||||
wxString val = wxGTK_CONV_BACK( gtk_entry_get_text( &gsb->entry ) );
|
||||
evt.SetString( val );
|
||||
if (GetEventHandler()->ProcessEvent(evt)) return;
|
||||
if (HandleWindowEvent(evt)) return;
|
||||
}
|
||||
|
||||
event.Skip();
|
||||
|
@@ -278,7 +278,7 @@ static gboolean gtk_toolbar_dropdown_lclick_callback(GtkWidget *widget,
|
||||
if (!tool->IsEnabled()) return FALSE;
|
||||
|
||||
wxCommandEvent evt(wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED, tool->GetId() );
|
||||
if ( tbar->GetEventHandler()->ProcessEvent(evt) )
|
||||
if ( tbar->HandleWindowEvent(evt) )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
@@ -526,7 +526,7 @@ handle_text_clipboard_callback( GtkWidget *widget, wxTextCtrl *win,
|
||||
{
|
||||
wxClipboardTextEvent event( eventType, win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
if ( win->GetEventHandler()->ProcessEvent( event ) )
|
||||
if ( win->HandleWindowEvent( event ) )
|
||||
{
|
||||
// don't let the default processing to take place if we did something
|
||||
// ourselves in the event handler
|
||||
@@ -1527,7 +1527,7 @@ void wxTextCtrl::OnChar( wxKeyEvent &key_event )
|
||||
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
|
||||
event.SetEventObject(this);
|
||||
event.SetString(GetValue());
|
||||
if ( GetEventHandler()->ProcessEvent(event) )
|
||||
if ( HandleWindowEvent(event) )
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1823,8 +1823,8 @@ void wxTextCtrl::OnUrlMouseEvent(wxMouseEvent& event)
|
||||
|
||||
InitCommandEvent(url_event);
|
||||
// Is that a good idea? Seems not (pleasure with gtk_text_view_start_selection_drag)
|
||||
//event.Skip(!GetEventHandler()->ProcessEvent(url_event));
|
||||
GetEventHandler()->ProcessEvent(url_event);
|
||||
//event.Skip(!HandleWindowEvent(url_event));
|
||||
HandleWindowEvent(url_event);
|
||||
}
|
||||
|
||||
bool wxTextCtrl::GTKProcessEvent(wxEvent& event) const
|
||||
|
@@ -313,7 +313,7 @@ void wxTextEntry::SendMaxLenEvent()
|
||||
wxCommandEvent event(wxEVT_COMMAND_TEXT_MAXLEN, win->GetId());
|
||||
event.SetEventObject(win);
|
||||
event.SetString(GetValue());
|
||||
win->GetEventHandler()->ProcessEvent(event);
|
||||
win->HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
#endif // wxUSE_TEXTCTRL || wxUSE_COMBOBOX
|
||||
|
@@ -37,7 +37,7 @@ static void gtk_togglebutton_clicked_callback(GtkWidget *WXUNUSED(widget), wxTog
|
||||
wxCommandEvent event(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, cb->GetId());
|
||||
event.SetInt(cb->GetValue());
|
||||
event.SetEventObject(cb);
|
||||
cb->GetEventHandler()->ProcessEvent(event);
|
||||
cb->HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -163,7 +163,7 @@ static gboolean gtk_frame_focus_in_callback( GtkWidget *widget,
|
||||
wxLogTrace(wxT("activate"), wxT("Activating frame %p (from focus_in)"), g_activeFrame);
|
||||
wxActivateEvent event(wxEVT_ACTIVATE, true, g_activeFrame->GetId());
|
||||
event.SetEventObject(g_activeFrame);
|
||||
g_activeFrame->GetEventHandler()->ProcessEvent(event);
|
||||
g_activeFrame->HandleWindowEvent(event);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -193,7 +193,7 @@ gboolean gtk_frame_focus_out_callback(GtkWidget * WXUNUSED(widget),
|
||||
wxLogTrace(wxT("activate"), wxT("Activating frame %p (from focus_in)"), g_activeFrame);
|
||||
wxActivateEvent event(wxEVT_ACTIVATE, false, g_activeFrame->GetId());
|
||||
event.SetEventObject(g_activeFrame);
|
||||
g_activeFrame->GetEventHandler()->ProcessEvent(event);
|
||||
g_activeFrame->HandleWindowEvent(event);
|
||||
|
||||
g_activeFrame = NULL;
|
||||
}
|
||||
@@ -246,7 +246,7 @@ size_allocate(GtkWidget*, GtkAllocation* alloc, wxTopLevelWindowGTK* win)
|
||||
{
|
||||
wxSizeEvent event(size, win->GetId());
|
||||
event.SetEventObject(win);
|
||||
win->GetEventHandler()->ProcessEvent(event);
|
||||
win->HandleWindowEvent(event);
|
||||
}
|
||||
// else the window is currently unmapped, don't generate size events
|
||||
}
|
||||
@@ -309,7 +309,7 @@ gtk_frame_configure_callback( GtkWidget* widget,
|
||||
win->m_y = point.y;
|
||||
wxMoveEvent mevent(point, win->GetId());
|
||||
mevent.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( mevent );
|
||||
win->HandleWindowEvent( mevent );
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -823,7 +823,7 @@ bool wxTopLevelWindowGTK::Show( bool show )
|
||||
// top down), before the initial size_allocate signals occur.
|
||||
wxSizeEvent event(GetSize(), GetId());
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
bool change = wxTopLevelWindowBase::Show(show);
|
||||
@@ -908,7 +908,7 @@ void wxTopLevelWindowGTK::DoSetSize( int x, int y, int width, int height, int si
|
||||
GetClientSize(&m_oldClientWidth, &m_oldClientHeight);
|
||||
wxSizeEvent event(GetSize(), GetId());
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -914,7 +914,7 @@ gtk_window_key_press_callback( GtkWidget *widget,
|
||||
if( wxTranslateGTKKeyEventToWx(event, win, gdk_event) )
|
||||
{
|
||||
// Emit KEY_DOWN event
|
||||
ret = win->GetEventHandler()->ProcessEvent( event );
|
||||
ret = win->HandleWindowEvent( event );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -950,7 +950,7 @@ gtk_window_key_press_callback( GtkWidget *widget,
|
||||
if (command != -1)
|
||||
{
|
||||
wxCommandEvent command_event( wxEVT_COMMAND_MENU_SELECTED, command );
|
||||
ret = ancestor->GetEventHandler()->ProcessEvent( command_event );
|
||||
ret = ancestor->HandleWindowEvent( command_event );
|
||||
break;
|
||||
}
|
||||
if (ancestor->IsTopLevel())
|
||||
@@ -1009,13 +1009,13 @@ gtk_window_key_press_callback( GtkWidget *widget,
|
||||
if (parent)
|
||||
{
|
||||
event.SetEventType( wxEVT_CHAR_HOOK );
|
||||
ret = parent->GetEventHandler()->ProcessEvent( event );
|
||||
ret = parent->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
if (!ret)
|
||||
{
|
||||
event.SetEventType(wxEVT_CHAR);
|
||||
ret = win->GetEventHandler()->ProcessEvent( event );
|
||||
ret = win->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1085,13 +1085,13 @@ gtk_wxwindow_commit_cb (GtkIMContext * WXUNUSED(context),
|
||||
if (parent)
|
||||
{
|
||||
event.SetEventType( wxEVT_CHAR_HOOK );
|
||||
ret = parent->GetEventHandler()->ProcessEvent( event );
|
||||
ret = parent->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
if (!ret)
|
||||
{
|
||||
event.SetEventType(wxEVT_CHAR);
|
||||
ret = window->GetEventHandler()->ProcessEvent( event );
|
||||
ret = window->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1272,7 +1272,7 @@ wxWindowGTK *FindWindowForMouseEvent(wxWindowGTK *win, wxCoord& x, wxCoord& y)
|
||||
bool wxWindowGTK::GTKProcessEvent(wxEvent& event) const
|
||||
{
|
||||
// nothing special at this level
|
||||
return GetEventHandler()->ProcessEvent(event);
|
||||
return HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
int wxWindowGTK::GTKCallbackCommonPrologue(GdkEventAny *event) const
|
||||
@@ -1319,12 +1319,12 @@ static bool DoSendFocusEvents(wxWindow *win)
|
||||
// Notify the parent keeping track of focus for the kbd navigation
|
||||
// purposes that we got it.
|
||||
wxChildFocusEvent eventChildFocus(win);
|
||||
(void)win->GetEventHandler()->ProcessEvent(eventChildFocus);
|
||||
(void)win->HandleWindowEvent(eventChildFocus);
|
||||
|
||||
wxFocusEvent eventFocus(wxEVT_SET_FOCUS, win->GetId());
|
||||
eventFocus.SetEventObject(win);
|
||||
|
||||
return win->GetEventHandler()->ProcessEvent(eventFocus);
|
||||
return win->HandleWindowEvent(eventFocus);
|
||||
}
|
||||
|
||||
// all event handlers must have C linkage as they're called from GTK+ C code
|
||||
@@ -2019,7 +2019,7 @@ gtk_window_grab_broken( GtkWidget*,
|
||||
{
|
||||
wxMouseCaptureLostEvent evt( win->GetId() );
|
||||
evt.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( evt );
|
||||
win->HandleWindowEvent( evt );
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -2660,7 +2660,7 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags
|
||||
{
|
||||
wxSizeEvent event( wxSize(m_width,m_height), GetId() );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2678,7 +2678,7 @@ bool wxWindowGTK::GtkShowFromOnIdle()
|
||||
gtk_widget_show( m_widget );
|
||||
wxShowEvent eventShow(GetId(), true);
|
||||
eventShow.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(eventShow);
|
||||
HandleWindowEvent(eventShow);
|
||||
m_showOnIdle = false;
|
||||
return true;
|
||||
}
|
||||
@@ -2918,7 +2918,7 @@ bool wxWindowGTK::Show( bool show )
|
||||
gtk_widget_show( m_widget );
|
||||
wxShowEvent eventShow(GetId(), show);
|
||||
eventShow.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(eventShow);
|
||||
HandleWindowEvent(eventShow);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -2926,7 +2926,7 @@ bool wxWindowGTK::Show( bool show )
|
||||
gtk_widget_hide( m_widget );
|
||||
wxShowEvent eventShow(GetId(), show);
|
||||
eventShow.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(eventShow);
|
||||
HandleWindowEvent(eventShow);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -3669,16 +3669,16 @@ void wxWindowGTK::GtkSendPaintEvents()
|
||||
wxEraseEvent erase_event( GetId(), &dc );
|
||||
erase_event.SetEventObject( this );
|
||||
|
||||
GetEventHandler()->ProcessEvent(erase_event);
|
||||
HandleWindowEvent(erase_event);
|
||||
}
|
||||
|
||||
wxNcPaintEvent nc_paint_event( GetId() );
|
||||
nc_paint_event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( nc_paint_event );
|
||||
HandleWindowEvent( nc_paint_event );
|
||||
|
||||
wxPaintEvent paint_event( GetId() );
|
||||
paint_event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( paint_event );
|
||||
HandleWindowEvent( paint_event );
|
||||
|
||||
m_clipPaintRegion = false;
|
||||
|
||||
@@ -4012,7 +4012,7 @@ void wxWindowGTK::GTKReleaseMouseAndNotify()
|
||||
DoReleaseMouse();
|
||||
wxMouseCaptureLostEvent evt(GetId());
|
||||
evt.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( evt );
|
||||
HandleWindowEvent( evt );
|
||||
}
|
||||
|
||||
/* static */
|
||||
|
@@ -50,7 +50,7 @@ static void gtk_bmpbutton_clicked_callback( GtkWidget *WXUNUSED(widget), wxBitma
|
||||
|
||||
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId());
|
||||
event.SetEventObject(button);
|
||||
button->GetEventHandler()->ProcessEvent(event);
|
||||
button->HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -55,7 +55,7 @@ static void gtk_button_clicked_callback( GtkWidget *WXUNUSED(widget), wxButton *
|
||||
|
||||
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId());
|
||||
event.SetEventObject(button);
|
||||
button->GetEventHandler()->ProcessEvent(event);
|
||||
button->HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -50,7 +50,7 @@ static void gtk_checkbox_toggled_callback(GtkWidget *WXUNUSED(widget),
|
||||
wxCommandEvent event(wxEVT_COMMAND_CHECKBOX_CLICKED, cb->GetId());
|
||||
event.SetInt(cb->GetValue());
|
||||
event.SetEventObject(cb);
|
||||
cb->GetEventHandler()->ProcessEvent(event);
|
||||
cb->HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -78,7 +78,7 @@ static void gtk_choice_clicked_callback( GtkWidget *WXUNUSED(widget), wxChoice *
|
||||
else if ( choice->HasClientUntypedData() )
|
||||
event.SetClientData( choice->GetClientData(n) );
|
||||
|
||||
choice->GetEventHandler()->ProcessEvent(event);
|
||||
choice->HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -59,7 +59,7 @@ gtk_text_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo )
|
||||
wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, combo->GetId() );
|
||||
event.SetString( combo->GetValue() );
|
||||
event.SetEventObject( combo );
|
||||
combo->GetEventHandler()->ProcessEvent( event );
|
||||
combo->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,13 +91,13 @@ gtk_popup_hide_callback(GtkCombo *WXUNUSED(gtk_combo), wxComboBox *combo)
|
||||
event.SetInt( curSelection );
|
||||
event.SetString( combo->GetStringSelection() );
|
||||
event.SetEventObject( combo );
|
||||
combo->GetEventHandler()->ProcessEvent( event );
|
||||
combo->HandleWindowEvent( event );
|
||||
|
||||
// for consistency with the other ports, send TEXT event
|
||||
wxCommandEvent event2( wxEVT_COMMAND_TEXT_UPDATED, combo->GetId() );
|
||||
event2.SetString( combo->GetStringSelection() );
|
||||
event2.SetEventObject( combo );
|
||||
combo->GetEventHandler()->ProcessEvent( event2 );
|
||||
combo->HandleWindowEvent( event2 );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -154,14 +154,14 @@ gtk_combo_select_child_callback( GtkList *WXUNUSED(list), GtkWidget *WXUNUSED(wi
|
||||
event.SetInt( curSelection );
|
||||
event.SetString( combo->GetStringSelection() );
|
||||
event.SetEventObject( combo );
|
||||
combo->GetEventHandler()->ProcessEvent( event );
|
||||
combo->HandleWindowEvent( event );
|
||||
|
||||
// for consistency with the other ports, don't generate text update
|
||||
// events while the user is browsing the combobox neither
|
||||
wxCommandEvent event2( wxEVT_COMMAND_TEXT_UPDATED, combo->GetId() );
|
||||
event2.SetString( combo->GetValue() );
|
||||
event2.SetEventObject( combo );
|
||||
combo->GetEventHandler()->ProcessEvent( event2 );
|
||||
combo->HandleWindowEvent( event2 );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -789,7 +789,7 @@ void wxComboBox::OnChar( wxKeyEvent &event )
|
||||
eventEnter.SetInt( GetSelection() );
|
||||
eventEnter.SetEventObject( this );
|
||||
|
||||
if (!GetEventHandler()->ProcessEvent( eventEnter ))
|
||||
if (!HandleWindowEvent( eventEnter ))
|
||||
{
|
||||
// This will invoke the dialog default action, such
|
||||
// as the clicking the default button.
|
||||
|
@@ -141,7 +141,7 @@ void wxDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
|
||||
|
||||
wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
|
||||
cancelEvent.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent(cancelEvent);
|
||||
HandleWindowEvent(cancelEvent);
|
||||
s_closing.DeleteObject(this);
|
||||
}
|
||||
|
||||
|
@@ -84,7 +84,7 @@ void gtk_fontdialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFontDialog *dial
|
||||
|
||||
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK);
|
||||
event.SetEventObject( dialog );
|
||||
dialog->GetEventHandler()->ProcessEvent( event );
|
||||
dialog->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ void gtk_fontdialog_cancel_callback( GtkWidget *WXUNUSED(w), wxFontDialog *dialo
|
||||
|
||||
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
|
||||
event.SetEventObject( dialog );
|
||||
dialog->GetEventHandler()->ProcessEvent( event );
|
||||
dialog->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -495,7 +495,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
|
||||
// send size event to frame
|
||||
wxSizeEvent event( wxSize(m_width,m_height), GetId() );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
HandleWindowEvent( event );
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
// send size event to status bar
|
||||
@@ -503,7 +503,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
|
||||
{
|
||||
wxSizeEvent event2( wxSize(m_frameStatusBar->m_width,m_frameStatusBar->m_height), m_frameStatusBar->GetId() );
|
||||
event2.SetEventObject( m_frameStatusBar );
|
||||
m_frameStatusBar->GetEventHandler()->ProcessEvent( event2 );
|
||||
m_frameStatusBar->HandleWindowEvent( event2 );
|
||||
}
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
|
@@ -68,7 +68,7 @@ gtk_glwindow_map_callback( GtkWidget * WXUNUSED(widget), wxGLCanvas *win )
|
||||
{
|
||||
wxPaintEvent event( win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
|
||||
win->GetUpdateRegion().Clear();
|
||||
|
||||
@@ -126,7 +126,7 @@ gtk_glcanvas_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, w
|
||||
|
||||
wxSizeEvent event( wxSize(win->m_width,win->m_height), win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ void wxGLCanvas::OnInternalIdle()
|
||||
{
|
||||
wxPaintEvent event( GetId() );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
HandleWindowEvent( event );
|
||||
|
||||
GetUpdateRegion().Clear();
|
||||
}
|
||||
|
@@ -110,12 +110,12 @@ static gint gtk_listitem_focus_in_callback( GtkWidget *WXUNUSED(widget),
|
||||
win->m_hasFocus = true;
|
||||
|
||||
wxChildFocusEvent eventChildFocus(win);
|
||||
(void)win->GetEventHandler()->ProcessEvent(eventChildFocus);
|
||||
(void)win->HandleWindowEvent(eventChildFocus);
|
||||
|
||||
wxFocusEvent eventFocus(wxEVT_SET_FOCUS, win->GetId());
|
||||
eventFocus.SetEventObject(win);
|
||||
|
||||
(void)win->GetEventHandler()->ProcessEvent(eventFocus);
|
||||
(void)win->HandleWindowEvent(eventFocus);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@@ -149,7 +149,7 @@ static gint gtk_listitem_focus_out_callback( GtkWidget *WXUNUSED(widget),
|
||||
// process it too as otherwise bad things happen, especially in GTK2
|
||||
// where the text control simply aborts the program if it doesn't get
|
||||
// the matching focus out event
|
||||
(void)win->GetEventHandler()->ProcessEvent( event );
|
||||
(void)win->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@@ -202,7 +202,7 @@ gtk_listbox_button_release_callback( GtkWidget * WXUNUSED(widget),
|
||||
|
||||
event.SetInt(n);
|
||||
|
||||
listbox->GetEventHandler()->ProcessEvent( event );
|
||||
listbox->HandleWindowEvent( event );
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -237,7 +237,7 @@ gtk_listbox_button_press_callback( GtkWidget *widget,
|
||||
wxCommandEvent event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, listbox->GetId() );
|
||||
event.SetEventObject( listbox );
|
||||
event.SetInt( sel );
|
||||
listbox->GetEventHandler()->ProcessEvent( event );
|
||||
listbox->HandleWindowEvent( event );
|
||||
}
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
|
||||
@@ -288,7 +288,7 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis
|
||||
/* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
|
||||
new_event.SetWindowChange( (gdk_event->state & GDK_CONTROL_MASK) );
|
||||
new_event.SetCurrentFocus( listbox );
|
||||
ret = listbox->GetEventHandler()->ProcessEvent( new_event );
|
||||
ret = listbox->HandleWindowEvent( new_event );
|
||||
}
|
||||
|
||||
if ((gdk_event->keyval == GDK_Return) && (!ret))
|
||||
@@ -309,7 +309,7 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis
|
||||
wxCommandEvent new_event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, listbox->GetId() );
|
||||
new_event.SetEventObject( listbox );
|
||||
new_event.SetInt( sel );
|
||||
ret = listbox->GetEventHandler()->ProcessEvent( new_event );
|
||||
ret = listbox->HandleWindowEvent( new_event );
|
||||
}
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
|
||||
@@ -347,7 +347,7 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis
|
||||
n = -1;
|
||||
}
|
||||
new_event.SetInt(n);
|
||||
listbox->GetEventHandler()->ProcessEvent( new_event );
|
||||
listbox->HandleWindowEvent( new_event );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -412,7 +412,7 @@ static void gtk_listitem_select_cb( GtkWidget *widget,
|
||||
|
||||
// No longer required with new code in wxLB_SINGLE
|
||||
// listbox->GetEventHandler()->AddPendingEvent( event );
|
||||
listbox->GetEventHandler()->ProcessEvent( event );
|
||||
listbox->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
|
@@ -66,7 +66,7 @@ gtk_mdi_page_change_callback( GtkNotebook *WXUNUSED(widget),
|
||||
{
|
||||
wxActivateEvent event1( wxEVT_ACTIVATE, false, child->GetId() );
|
||||
event1.SetEventObject( child);
|
||||
child->GetEventHandler()->ProcessEvent( event1 );
|
||||
child->HandleWindowEvent( event1 );
|
||||
}
|
||||
|
||||
// send activate event to new child
|
||||
@@ -100,7 +100,7 @@ gtk_mdi_page_change_callback( GtkNotebook *WXUNUSED(widget),
|
||||
|
||||
wxActivateEvent event2( wxEVT_ACTIVATE, true, child->GetId() );
|
||||
event2.SetEventObject( child);
|
||||
child->GetEventHandler()->ProcessEvent( event2 );
|
||||
child->HandleWindowEvent( event2 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -143,7 +143,7 @@ static void DoCommonMenuCallbackCode(wxMenu *menu, wxMenuEvent& event)
|
||||
|
||||
wxWindow *win = menu->GetInvokingWindow();
|
||||
if (win)
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
@@ -632,7 +632,7 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu )
|
||||
commandEvent.SetInt(item->IsChecked());
|
||||
commandEvent.SetEventObject(menu);
|
||||
|
||||
frame->GetEventHandler()->ProcessEvent(commandEvent);
|
||||
frame->HandleWindowEvent(commandEvent);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -666,7 +666,7 @@ static void gtk_menu_hilight_callback( GtkWidget *widget, wxMenu *menu )
|
||||
return;
|
||||
|
||||
wxWindow *win = menu->GetInvokingWindow();
|
||||
if (win) win->GetEventHandler()->ProcessEvent( event );
|
||||
if (win) win->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -695,7 +695,7 @@ static void gtk_menu_nolight_callback( GtkWidget *widget, wxMenu *menu )
|
||||
|
||||
wxWindow *win = menu->GetInvokingWindow();
|
||||
if (win)
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -249,7 +249,7 @@ static gint gtk_notebook_key_press_callback( GtkWidget *widget, GdkEventKey *gdk
|
||||
event.SetCurrentFocus( notebook );
|
||||
|
||||
wxNotebookPage *client = notebook->GetPage(sel);
|
||||
if ( !client->GetEventHandler()->ProcessEvent( event ) )
|
||||
if ( !client->HandleWindowEvent( event ) )
|
||||
{
|
||||
client->SetFocus();
|
||||
}
|
||||
|
@@ -62,7 +62,7 @@ static gint gtk_popup_button_press (GtkWidget *widget, GdkEvent *gdk_event, wxPo
|
||||
wxFocusEvent event( wxEVT_KILL_FOCUS, win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
|
||||
(void)win->GetEventHandler()->ProcessEvent( event );
|
||||
(void)win->HandleWindowEvent( event );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -337,7 +337,7 @@ void wxPopupWindow::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int
|
||||
|
||||
wxSizeEvent event( wxSize(m_width,m_height), GetId() );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
void wxPopupWindow::OnInternalIdle()
|
||||
|
@@ -57,7 +57,7 @@ static void gtk_radiobutton_clicked_callback( GtkToggleButton *button, wxRadioBo
|
||||
event.SetInt( rb->GetSelection() );
|
||||
event.SetString( rb->GetStringSelection() );
|
||||
event.SetEventObject( rb );
|
||||
rb->GetEventHandler()->ProcessEvent(event);
|
||||
rb->HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ static gint gtk_radiobutton_focus_in( GtkWidget *WXUNUSED(widget),
|
||||
|
||||
// never stop the signal emission, it seems to break the kbd handling
|
||||
// inside the radiobox
|
||||
(void)win->GetEventHandler()->ProcessEvent( event );
|
||||
(void)win->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@@ -586,7 +586,7 @@ void wxRadioBox::OnInternalIdle()
|
||||
wxFocusEvent event( wxEVT_KILL_FOCUS, GetId() );
|
||||
event.SetEventObject( this );
|
||||
|
||||
(void)GetEventHandler()->ProcessEvent( event );
|
||||
(void)HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
if (g_delayedFocus == this)
|
||||
|
@@ -52,7 +52,7 @@ void gtk_radiobutton_clicked_callback( GtkToggleButton *button, wxRadioButton *r
|
||||
wxCommandEvent event( wxEVT_COMMAND_RADIOBUTTON_SELECTED, rb->GetId());
|
||||
event.SetInt( rb->GetValue() );
|
||||
event.SetEventObject( rb );
|
||||
rb->GetEventHandler()->ProcessEvent( event );
|
||||
rb->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -70,13 +70,13 @@ static void gtk_scrollbar_callback( GtkAdjustment *adjust,
|
||||
{
|
||||
wxScrollEvent event( g_currentUpDownEvent, win->GetId(), value, orient );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
// throw other event (wxEVT_SCROLL_THUMBTRACK)
|
||||
wxScrollEvent event( command, win->GetId(), value, orient );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
|
||||
/*
|
||||
wxCommandEvent cevent( wxEVT_COMMAND_SCROLLBAR_UPDATED, win->GetId() );
|
||||
@@ -149,7 +149,7 @@ gtk_scrollbar_button_release_callback( GtkRange *WXUNUSED(widget),
|
||||
|
||||
wxScrollEvent event( command, win->GetId(), value, orient );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
win->m_isScrolling = false;
|
||||
|
@@ -54,19 +54,19 @@ ProcessScrollEvent(wxSlider *win, wxEventType evtType, double dvalue)
|
||||
int value = (int)(dvalue < 0 ? dvalue - 0.5 : dvalue + 0.5);
|
||||
wxScrollEvent event( evtType, win->GetId(), value, orient );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
|
||||
if ( evtType != wxEVT_SCROLL_THUMBTRACK )
|
||||
{
|
||||
wxScrollEvent event2(wxEVT_SCROLL_CHANGED, win->GetId(), value, orient);
|
||||
event2.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event2 );
|
||||
win->HandleWindowEvent( event2 );
|
||||
}
|
||||
|
||||
wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, win->GetId() );
|
||||
cevent.SetEventObject( win );
|
||||
cevent.SetInt( value );
|
||||
win->GetEventHandler()->ProcessEvent( cevent );
|
||||
win->HandleWindowEvent( cevent );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@@ -66,7 +66,7 @@ static void gtk_spinbutt_callback( GtkWidget *WXUNUSED(widget), wxSpinButton *wi
|
||||
event.SetPosition( value );
|
||||
event.SetEventObject( win );
|
||||
|
||||
if ((win->GetEventHandler()->ProcessEvent( event )) &&
|
||||
if ((win->HandleWindowEvent( event )) &&
|
||||
!event.IsAllowed() )
|
||||
{
|
||||
/* program has vetoed */
|
||||
@@ -94,7 +94,7 @@ static void gtk_spinbutt_callback( GtkWidget *WXUNUSED(widget), wxSpinButton *wi
|
||||
wxSpinEvent event2( command, win->GetId());
|
||||
event2.SetPosition( value );
|
||||
event2.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event2 );
|
||||
win->HandleWindowEvent( event2 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -60,7 +60,7 @@ static void gtk_spinctrl_callback( GtkWidget *WXUNUSED(widget), wxSpinCtrl *win
|
||||
// values in range 5..50 is then, ummm, quite challenging (hint: you can't
|
||||
// enter 1!) (VZ)
|
||||
event.SetInt( (int)ceil(win->m_adjust->value) );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ gtk_spinctrl_text_changed_callback( GtkWidget *WXUNUSED(widget), wxSpinCtrl *win
|
||||
|
||||
// see above
|
||||
event.SetInt( (int)ceil(win->m_adjust->value) );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event )
|
||||
GtkSpinButton *gsb = GTK_SPIN_BUTTON(m_widget);
|
||||
wxString val = wxGTK_CONV_BACK( gtk_entry_get_text( &gsb->entry ) );
|
||||
evt.SetString( val );
|
||||
if (GetEventHandler()->ProcessEvent(evt)) return;
|
||||
if (HandleWindowEvent(evt)) return;
|
||||
}
|
||||
|
||||
event.Skip();
|
||||
|
@@ -119,7 +119,7 @@ gtk_insert_text_callback(GtkEditable *editable,
|
||||
wxCommandEvent event(wxEVT_COMMAND_TEXT_MAXLEN, win->GetId());
|
||||
event.SetEventObject(win);
|
||||
event.SetString(win->GetValue());
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -145,7 +145,7 @@ gtk_text_changed_callback( GtkWidget *WXUNUSED(widget), wxTextCtrl *win )
|
||||
|
||||
wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -999,7 +999,7 @@ void wxTextCtrl::OnChar( wxKeyEvent &key_event )
|
||||
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
|
||||
event.SetEventObject(this);
|
||||
event.SetString(GetValue());
|
||||
if (GetEventHandler()->ProcessEvent(event)) return;
|
||||
if (HandleWindowEvent(event)) return;
|
||||
}
|
||||
|
||||
if ((key_event.GetKeyCode() == WXK_RETURN) && !(m_windowStyle & wxTE_MULTILINE))
|
||||
|
@@ -43,7 +43,7 @@ static void gtk_togglebutton_clicked_callback(GtkWidget *WXUNUSED(widget), wxTog
|
||||
wxCommandEvent event(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, cb->GetId());
|
||||
event.SetInt(cb->GetValue());
|
||||
event.SetEventObject(cb);
|
||||
cb->GetEventHandler()->ProcessEvent(event);
|
||||
cb->HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -159,7 +159,7 @@ static gint gtk_frame_focus_in_callback( GtkWidget *widget,
|
||||
wxLogTrace(wxT("activate"), wxT("Activating frame %p (from focus_in)"), g_activeFrame);
|
||||
wxActivateEvent event(wxEVT_ACTIVATE, true, g_activeFrame->GetId());
|
||||
event.SetEventObject(g_activeFrame);
|
||||
g_activeFrame->GetEventHandler()->ProcessEvent(event);
|
||||
g_activeFrame->HandleWindowEvent(event);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -191,7 +191,7 @@ static gint gtk_frame_focus_out_callback( GtkWidget *WXUNUSED(widget),
|
||||
wxLogTrace(wxT("activate"), wxT("Activating frame %p (from focus_in)"), g_activeFrame);
|
||||
wxActivateEvent event(wxEVT_ACTIVATE, false, g_activeFrame->GetId());
|
||||
event.SetEventObject(g_activeFrame);
|
||||
g_activeFrame->GetEventHandler()->ProcessEvent(event);
|
||||
g_activeFrame->HandleWindowEvent(event);
|
||||
|
||||
g_activeFrame = NULL;
|
||||
}
|
||||
@@ -291,7 +291,7 @@ gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *WX
|
||||
|
||||
wxMoveEvent mevent( wxPoint(win->m_x,win->m_y), win->GetId() );
|
||||
mevent.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( mevent );
|
||||
win->HandleWindowEvent( mevent );
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1020,7 +1020,7 @@ void wxTopLevelWindowGTK::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
|
||||
// send size event to frame
|
||||
wxSizeEvent event( wxSize(m_width,m_height), GetId() );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
HandleWindowEvent( event );
|
||||
|
||||
m_resizing = false;
|
||||
}
|
||||
|
@@ -1066,7 +1066,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
|
||||
if ( wxTranslateGTKKeyEventToWx(event, win, gdk_event) )
|
||||
{
|
||||
// Emit KEY_DOWN event
|
||||
ret = win->GetEventHandler()->ProcessEvent( event );
|
||||
ret = win->HandleWindowEvent( event );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1122,12 +1122,12 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
|
||||
if (parent)
|
||||
{
|
||||
event.SetEventType( wxEVT_CHAR_HOOK );
|
||||
ret = parent->GetEventHandler()->ProcessEvent( event );
|
||||
ret = parent->HandleWindowEvent( event );
|
||||
}
|
||||
if (!ret)
|
||||
{
|
||||
event.SetEventType(wxEVT_CHAR);
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -1146,7 +1146,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
|
||||
if (command != -1)
|
||||
{
|
||||
wxCommandEvent command_event( wxEVT_COMMAND_MENU_SELECTED, command );
|
||||
ret = ancestor->GetEventHandler()->ProcessEvent( command_event );
|
||||
ret = ancestor->HandleWindowEvent( command_event );
|
||||
break;
|
||||
}
|
||||
if (ancestor->IsTopLevel())
|
||||
@@ -1191,13 +1191,13 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
|
||||
if (parent)
|
||||
{
|
||||
event.SetEventType( wxEVT_CHAR_HOOK );
|
||||
ret = parent->GetEventHandler()->ProcessEvent( event );
|
||||
ret = parent->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
if (!ret)
|
||||
{
|
||||
event.SetEventType(wxEVT_CHAR);
|
||||
ret = win->GetEventHandler()->ProcessEvent( event );
|
||||
ret = win->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1227,7 +1227,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
|
||||
// CTRL-TAB changes the (parent) window, i.e. switch notebook page
|
||||
new_event.SetWindowChange( (gdk_event->state & GDK_CONTROL_MASK) );
|
||||
new_event.SetCurrentFocus( win );
|
||||
ret = win->GetParent()->GetEventHandler()->ProcessEvent( new_event );
|
||||
ret = win->GetParent()->HandleWindowEvent( new_event );
|
||||
}
|
||||
|
||||
// generate wxID_CANCEL if <esc> has been pressed (typically in dialogs)
|
||||
@@ -1263,7 +1263,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
|
||||
{
|
||||
wxCommandEvent eventClick(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
|
||||
eventClick.SetEventObject(btnCancel);
|
||||
ret = btnCancel->GetEventHandler()->ProcessEvent(eventClick);
|
||||
ret = btnCancel->HandleWindowEvent(eventClick);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1304,7 +1304,7 @@ static gint gtk_window_key_release_callback( GtkWidget *widget,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ( !win->GetEventHandler()->ProcessEvent( event ) )
|
||||
if ( !win->HandleWindowEvent( event ) )
|
||||
return FALSE;
|
||||
|
||||
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "key_release_event" );
|
||||
@@ -1616,7 +1616,7 @@ static gint gtk_window_button_press_callback( GtkWidget *widget,
|
||||
}
|
||||
}
|
||||
|
||||
if (win->GetEventHandler()->ProcessEvent( event ))
|
||||
if (win->HandleWindowEvent( event ))
|
||||
{
|
||||
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "button_press_event" );
|
||||
g_lastMouseEvent = NULL;
|
||||
@@ -1638,7 +1638,7 @@ static gint gtk_window_button_press_callback( GtkWidget *widget,
|
||||
win->GetId(),
|
||||
win->ClientToScreen(event.GetPosition()));
|
||||
evtCtx.SetEventObject(win);
|
||||
return win->GetEventHandler()->ProcessEvent(evtCtx);
|
||||
return win->HandleWindowEvent(evtCtx);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@@ -1701,7 +1701,7 @@ static gint gtk_window_button_release_callback( GtkWidget *widget,
|
||||
if ( !g_captureWindow )
|
||||
win = FindWindowForMouseEvent(win, event.m_x, event.m_y);
|
||||
|
||||
if (win->GetEventHandler()->ProcessEvent( event ))
|
||||
if (win->HandleWindowEvent( event ))
|
||||
{
|
||||
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "button_release_event" );
|
||||
return TRUE;
|
||||
@@ -1771,7 +1771,7 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget,
|
||||
: wxEVT_LEAVE_WINDOW);
|
||||
InitMouseEvent(win, eventM, gdk_event);
|
||||
eventM.SetEventObject(win);
|
||||
win->GetEventHandler()->ProcessEvent(eventM);
|
||||
win->HandleWindowEvent(eventM);
|
||||
}
|
||||
}
|
||||
else // no capture
|
||||
@@ -1779,7 +1779,7 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget,
|
||||
win = FindWindowForMouseEvent(win, event.m_x, event.m_y);
|
||||
}
|
||||
|
||||
bool ret = win->GetEventHandler()->ProcessEvent( event );
|
||||
bool ret = win->HandleWindowEvent( event );
|
||||
g_lastMouseEvent = NULL;
|
||||
|
||||
if ( ret )
|
||||
@@ -1802,12 +1802,12 @@ static bool DoSendFocusEvents(wxWindow *win)
|
||||
// Notify the parent keeping track of focus for the kbd navigation
|
||||
// purposes that we got it.
|
||||
wxChildFocusEvent eventChildFocus(win);
|
||||
(void)win->GetEventHandler()->ProcessEvent(eventChildFocus);
|
||||
(void)win->HandleWindowEvent(eventChildFocus);
|
||||
|
||||
wxFocusEvent eventFocus(wxEVT_SET_FOCUS, win->GetId());
|
||||
eventFocus.SetEventObject(win);
|
||||
|
||||
return win->GetEventHandler()->ProcessEvent(eventFocus);
|
||||
return win->HandleWindowEvent(eventFocus);
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
@@ -1908,7 +1908,7 @@ static gint gtk_window_focus_out_callback( GtkWidget *WXUNUSED(widget),
|
||||
// process it too as otherwise bad things happen, especially in GTK2
|
||||
// where the text control simply aborts the program if it doesn't get
|
||||
// the matching focus out event
|
||||
(void)win->GetEventHandler()->ProcessEvent( event );
|
||||
(void)win->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@@ -1950,7 +1950,7 @@ gint gtk_window_enter_callback( GtkWidget *widget,
|
||||
event.m_x = x + pt.x;
|
||||
event.m_y = y + pt.y;
|
||||
|
||||
if (win->GetEventHandler()->ProcessEvent( event ))
|
||||
if (win->HandleWindowEvent( event ))
|
||||
{
|
||||
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "enter_notify_event" );
|
||||
return TRUE;
|
||||
@@ -2002,7 +2002,7 @@ static gint gtk_window_leave_callback( GtkWidget *widget, GdkEventCrossing *gdk_
|
||||
event.m_x = x + pt.x;
|
||||
event.m_y = y + pt.y;
|
||||
|
||||
if (win->GetEventHandler()->ProcessEvent( event ))
|
||||
if (win->HandleWindowEvent( event ))
|
||||
{
|
||||
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "leave_notify_event" );
|
||||
return TRUE;
|
||||
@@ -2042,7 +2042,7 @@ static void gtk_window_vscroll_callback( GtkAdjustment *adjust,
|
||||
|
||||
wxScrollWinEvent event( command, value, wxVERTICAL );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2075,7 +2075,7 @@ static void gtk_window_hscroll_callback( GtkAdjustment *adjust,
|
||||
|
||||
wxScrollWinEvent event( command, value, wxHORIZONTAL );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2141,7 +2141,7 @@ static gint gtk_scrollbar_button_release_callback( GtkRange *widget,
|
||||
|
||||
wxScrollWinEvent event( command, value, dir );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
win->m_isScrolling = false;
|
||||
@@ -2179,7 +2179,7 @@ gtk_window_realized_callback( GtkWidget *WXUNUSED(widget), wxWindow *win )
|
||||
|
||||
wxWindowCreateEvent event( win );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -2213,7 +2213,7 @@ void gtk_window_size_callback( GtkWidget *WXUNUSED(widget),
|
||||
{
|
||||
wxSizeEvent event( win->GetSize(), win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
win->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2917,7 +2917,7 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags
|
||||
{
|
||||
wxSizeEvent event( wxSize(m_width,m_height), GetId() );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
m_resizing = false;
|
||||
@@ -3208,7 +3208,7 @@ bool wxWindowGTK::Show( bool show )
|
||||
wxShowEvent eventShow(GetId(), show);
|
||||
eventShow.SetEventObject(this);
|
||||
|
||||
GetEventHandler()->ProcessEvent(eventShow);
|
||||
HandleWindowEvent(eventShow);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -3596,7 +3596,7 @@ void wxWindowGTK::GtkSendPaintEvents()
|
||||
wxEraseEvent erase_event( GetId(), &dc );
|
||||
erase_event.SetEventObject( this );
|
||||
|
||||
if (!GetEventHandler()->ProcessEvent(erase_event) && GetBackgroundStyle() != wxBG_STYLE_CUSTOM)
|
||||
if (!HandleWindowEvent(erase_event) && GetBackgroundStyle() != wxBG_STYLE_CUSTOM)
|
||||
{
|
||||
if (!g_eraseGC)
|
||||
{
|
||||
@@ -3618,11 +3618,11 @@ void wxWindowGTK::GtkSendPaintEvents()
|
||||
|
||||
wxNcPaintEvent nc_paint_event( GetId() );
|
||||
nc_paint_event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( nc_paint_event );
|
||||
HandleWindowEvent( nc_paint_event );
|
||||
|
||||
wxPaintEvent paint_event( GetId() );
|
||||
paint_event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( paint_event );
|
||||
HandleWindowEvent( paint_event );
|
||||
|
||||
m_clipPaintRegion = false;
|
||||
|
||||
|
@@ -586,7 +586,7 @@ wxMacAppMenuEventHandler( EventHandlerCallRef WXUNUSED(handler),
|
||||
{
|
||||
wxWindow *win = menu->GetInvokingWindow();
|
||||
if (win)
|
||||
win->GetEventHandler()->ProcessEvent(wxevent);
|
||||
win->HandleWindowEvent(wxevent);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1408,7 +1408,7 @@ bool wxApp::MacSendKeyDownEvent( wxWindow* focus , long keymessage , long modifi
|
||||
wxKeyEvent event(wxEVT_KEY_DOWN) ;
|
||||
MacCreateKeyEvent( event, focus , keymessage , modifiers , when , wherex , wherey , uniChar ) ;
|
||||
|
||||
handled = focus->GetEventHandler()->ProcessEvent( event ) ;
|
||||
handled = focus->HandleWindowEvent( event ) ;
|
||||
if ( handled && event.GetSkipped() )
|
||||
handled = false ;
|
||||
|
||||
@@ -1455,7 +1455,7 @@ bool wxApp::MacSendKeyUpEvent( wxWindow* focus , long keymessage , long modifier
|
||||
bool handled;
|
||||
wxKeyEvent event( wxEVT_KEY_UP ) ;
|
||||
MacCreateKeyEvent( event, focus , keymessage , modifiers , when , wherex , wherey , uniChar ) ;
|
||||
handled = focus->GetEventHandler()->ProcessEvent( event ) ;
|
||||
handled = focus->HandleWindowEvent( event ) ;
|
||||
|
||||
return handled ;
|
||||
}
|
||||
@@ -1476,7 +1476,7 @@ bool wxApp::MacSendCharEvent( wxWindow* focus , long keymessage , long modifiers
|
||||
if (tlw)
|
||||
{
|
||||
event.SetEventType( wxEVT_CHAR_HOOK );
|
||||
handled = tlw->GetEventHandler()->ProcessEvent( event );
|
||||
handled = tlw->HandleWindowEvent( event );
|
||||
if ( handled && event.GetSkipped() )
|
||||
handled = false ;
|
||||
}
|
||||
@@ -1485,7 +1485,7 @@ bool wxApp::MacSendCharEvent( wxWindow* focus , long keymessage , long modifiers
|
||||
{
|
||||
event.SetEventType( wxEVT_CHAR );
|
||||
event.Skip( false ) ;
|
||||
handled = focus->GetEventHandler()->ProcessEvent( event ) ;
|
||||
handled = focus->HandleWindowEvent( event ) ;
|
||||
}
|
||||
|
||||
if ( !handled && (keyval == WXK_TAB) )
|
||||
@@ -1501,7 +1501,7 @@ bool wxApp::MacSendCharEvent( wxWindow* focus , long keymessage , long modifiers
|
||||
/* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
|
||||
new_event.SetWindowChange( event.ControlDown() );
|
||||
new_event.SetCurrentFocus( focus );
|
||||
handled = focus->GetParent()->GetEventHandler()->ProcessEvent( new_event );
|
||||
handled = focus->GetParent()->HandleWindowEvent( new_event );
|
||||
if ( handled && new_event.GetSkipped() )
|
||||
handled = false ;
|
||||
}
|
||||
@@ -1540,7 +1540,7 @@ bool wxApp::MacSendCharEvent( wxWindow* focus , long keymessage , long modifiers
|
||||
// generate wxID_CANCEL if command-. or <esc> has been pressed (typically in dialogs)
|
||||
wxCommandEvent new_event(wxEVT_COMMAND_BUTTON_CLICKED,wxID_CANCEL);
|
||||
new_event.SetEventObject( focus );
|
||||
handled = focus->GetEventHandler()->ProcessEvent( new_event );
|
||||
handled = focus->HandleWindowEvent( new_event );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@@ -222,7 +222,7 @@ public :
|
||||
wxCommandEvent event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, checklist->GetId() );
|
||||
event.SetInt( owner->GetLineFromItem( this ) );
|
||||
event.SetEventObject( checklist );
|
||||
checklist->GetEventHandler()->ProcessEvent( event );
|
||||
checklist->HandleWindowEvent( event );
|
||||
}
|
||||
break;
|
||||
|
||||
|
@@ -83,14 +83,14 @@ protected:
|
||||
NavEvent.SetWindowChange(false);
|
||||
|
||||
// Get the parent of the combo and have it process the navigation?
|
||||
if (m_cb->GetParent()->GetEventHandler()->ProcessEvent(NavEvent))
|
||||
if (m_cb->GetParent()->HandleWindowEvent(NavEvent))
|
||||
return;
|
||||
}
|
||||
|
||||
// send the event to the combobox class in case the user has bound EVT_CHAR
|
||||
wxKeyEvent kevt(event);
|
||||
kevt.SetEventObject(m_cb);
|
||||
if (m_cb->GetEventHandler()->ProcessEvent(kevt))
|
||||
if (m_cb->HandleWindowEvent(kevt))
|
||||
// If the event was handled and not skipped then we're done
|
||||
return;
|
||||
|
||||
@@ -103,7 +103,7 @@ protected:
|
||||
|
||||
// This will invoke the dialog default action,
|
||||
// such as the clicking the default button.
|
||||
if (!m_cb->GetEventHandler()->ProcessEvent( event ))
|
||||
if (!m_cb->HandleWindowEvent( event ))
|
||||
{
|
||||
wxTopLevelWindow *tlw = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow);
|
||||
if ( tlw && tlw->GetDefaultItem() )
|
||||
@@ -128,7 +128,7 @@ protected:
|
||||
{
|
||||
event.SetEventObject(m_cb);
|
||||
event.SetId(m_cb->GetId());
|
||||
if (! m_cb->GetEventHandler()->ProcessEvent(event))
|
||||
if (! m_cb->HandleWindowEvent(event))
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ protected:
|
||||
{
|
||||
event.SetEventObject(m_cb);
|
||||
event.SetId(m_cb->GetId());
|
||||
if (! m_cb->GetEventHandler()->ProcessEvent(event))
|
||||
if (! m_cb->HandleWindowEvent(event))
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ protected:
|
||||
{
|
||||
event.SetEventObject(m_cb);
|
||||
event.SetId(m_cb->GetId());
|
||||
if (! m_cb->GetEventHandler()->ProcessEvent(event))
|
||||
if (! m_cb->HandleWindowEvent(event))
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
@@ -65,7 +65,7 @@ static pascal OSStatus wxMacComboBoxEventHandler( EventHandlerCallRef handler ,
|
||||
event.SetInt( cb->GetSelection() );
|
||||
event.SetString( cb->GetStringSelection() );
|
||||
event.SetEventObject( cb );
|
||||
cb->GetEventHandler()->ProcessEvent( event );
|
||||
cb->HandleWindowEvent( event );
|
||||
}
|
||||
break;
|
||||
default :
|
||||
@@ -126,7 +126,7 @@ protected:
|
||||
event.SetInt( 0 );
|
||||
event.SetString( value );
|
||||
event.SetEventObject( m_cb );
|
||||
m_cb->GetEventHandler()->ProcessEvent( event );
|
||||
m_cb->HandleWindowEvent( event );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -141,7 +141,7 @@ protected:
|
||||
event.SetInt( m_cb->GetCount() - 1 );
|
||||
event.SetString( value );
|
||||
event.SetEventObject( m_cb );
|
||||
m_cb->GetEventHandler()->ProcessEvent( event );
|
||||
m_cb->HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
// This will invoke the dialog default action, such
|
||||
|
@@ -78,7 +78,7 @@ bool wxControl::ProcessCommand( wxCommandEvent &event )
|
||||
// Tries:
|
||||
// 1) OnCommand, starting at this window and working up parent hierarchy
|
||||
// 2) OnCommand then calls ProcessEvent to search the event tables.
|
||||
return GetEventHandler()->ProcessEvent( event );
|
||||
return HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
void wxControl::OnKeyDown( wxKeyEvent &WXUNUSED(event) )
|
||||
|
@@ -738,7 +738,7 @@ OSStatus wxMacDataViewDataBrowserListViewControl::DataBrowserGetSetItemDataProc(
|
||||
dataViewEvent.SetEventObject(dataViewCtrlPtr);
|
||||
dataViewEvent.SetItem(wxDataViewItem(reinterpret_cast<void*>(itemID)));
|
||||
// finally send the equivalent wxWidget event:
|
||||
dataViewCtrlPtr->GetEventHandler()->ProcessEvent(dataViewEvent);
|
||||
dataViewCtrlPtr->HandleWindowEvent(dataViewEvent);
|
||||
// opening the container is allowed if not vetoed:
|
||||
return ::SetDataBrowserItemDataBooleanValue(itemData,dataViewEvent.IsAllowed());
|
||||
} /* block */
|
||||
@@ -754,7 +754,7 @@ OSStatus wxMacDataViewDataBrowserListViewControl::DataBrowserGetSetItemDataProc(
|
||||
dataViewEvent.SetEventObject(dataViewCtrlPtr);
|
||||
dataViewEvent.SetItem(wxDataViewItem(reinterpret_cast<void*>(itemID)));
|
||||
// finally send the equivalent wxWidget event:
|
||||
dataViewCtrlPtr->GetEventHandler()->ProcessEvent(dataViewEvent);
|
||||
dataViewCtrlPtr->HandleWindowEvent(dataViewEvent);
|
||||
// opening the container is allowed if not vetoed:
|
||||
return ::SetDataBrowserItemDataBooleanValue(itemData,dataViewEvent.IsAllowed());
|
||||
} /* block */
|
||||
@@ -792,7 +792,7 @@ void wxMacDataViewDataBrowserListViewControl::DataBrowserItemNotificationProc(Da
|
||||
dataViewEvent.SetEventObject(dataViewCtrlPtr);
|
||||
dataViewEvent.SetItem(wxDataViewItem(reinterpret_cast<void*>(itemID)));
|
||||
// finally send the equivalent wxWidget event:
|
||||
dataViewCtrlPtr->GetEventHandler()->ProcessEvent(dataViewEvent);
|
||||
dataViewCtrlPtr->HandleWindowEvent(dataViewEvent);
|
||||
} /* block */
|
||||
break;
|
||||
case kDataBrowserContainerOpened:
|
||||
@@ -803,7 +803,7 @@ void wxMacDataViewDataBrowserListViewControl::DataBrowserItemNotificationProc(Da
|
||||
dataViewEvent.SetEventObject(dataViewCtrlPtr);
|
||||
dataViewEvent.SetItem(wxDataViewItem(reinterpret_cast<void*>(itemID)));
|
||||
// finally send the equivalent wxWidget event:
|
||||
dataViewCtrlPtr->GetEventHandler()->ProcessEvent(dataViewEvent);
|
||||
dataViewCtrlPtr->HandleWindowEvent(dataViewEvent);
|
||||
// add children to the expanded container:
|
||||
dataViewCtrlPtr->AddChildrenLevel(wxDataViewItem(reinterpret_cast<void*>(itemID)));
|
||||
} /* block */
|
||||
@@ -826,7 +826,7 @@ void wxMacDataViewDataBrowserListViewControl::DataBrowserItemNotificationProc(Da
|
||||
dataViewEvent.SetDataViewColumn(dataViewCtrlPtr->GetColumnPtr(propertyID));
|
||||
} /* if */
|
||||
// finally send the equivalent wxWidget event:
|
||||
dataViewCtrlPtr->GetEventHandler()->ProcessEvent(dataViewEvent);
|
||||
dataViewCtrlPtr->HandleWindowEvent(dataViewEvent);
|
||||
} /* block */
|
||||
break;
|
||||
case kDataBrowserEditStopped:
|
||||
@@ -847,7 +847,7 @@ void wxMacDataViewDataBrowserListViewControl::DataBrowserItemNotificationProc(Da
|
||||
dataViewEvent.SetDataViewColumn(dataViewCtrlPtr->GetColumnPtr(propertyID));
|
||||
} /* if */
|
||||
// finally send the equivalent wxWidget event:
|
||||
dataViewCtrlPtr->GetEventHandler()->ProcessEvent(dataViewEvent);
|
||||
dataViewCtrlPtr->HandleWindowEvent(dataViewEvent);
|
||||
} /* block */
|
||||
break;
|
||||
case kDataBrowserItemAdded:
|
||||
@@ -862,7 +862,7 @@ void wxMacDataViewDataBrowserListViewControl::DataBrowserItemNotificationProc(Da
|
||||
dataViewEvent.SetEventObject(dataViewCtrlPtr);
|
||||
dataViewEvent.SetItem(wxDataViewItem(reinterpret_cast<void*>(itemID)));
|
||||
// finally send the equivalent wxWidget event:
|
||||
dataViewCtrlPtr->GetEventHandler()->ProcessEvent(dataViewEvent);
|
||||
dataViewCtrlPtr->HandleWindowEvent(dataViewEvent);
|
||||
} /* block */
|
||||
break;
|
||||
case kDataBrowserItemRemoved:
|
||||
@@ -877,7 +877,7 @@ void wxMacDataViewDataBrowserListViewControl::DataBrowserItemNotificationProc(Da
|
||||
dataViewEvent.SetEventObject(dataViewCtrlPtr);
|
||||
dataViewEvent.SetModel (dataViewCtrlPtr->GetModel());
|
||||
// finally send the equivalent wxWidget event:
|
||||
dataViewCtrlPtr->GetEventHandler()->ProcessEvent(dataViewEvent);
|
||||
dataViewCtrlPtr->HandleWindowEvent(dataViewEvent);
|
||||
} /* block */
|
||||
break;
|
||||
case kDataBrowserUserStateChanged:
|
||||
@@ -918,7 +918,7 @@ void wxMacDataViewDataBrowserListViewControl::DataBrowserItemNotificationProc(Da
|
||||
dataViewEvent.SetColumn(columnIndex);
|
||||
dataViewEvent.SetDataViewColumn(columnPtr);
|
||||
// finally send the equivalent wxWidget event:
|
||||
dataViewCtrlPtr->GetEventHandler()->ProcessEvent(dataViewEvent);
|
||||
dataViewCtrlPtr->HandleWindowEvent(dataViewEvent);
|
||||
} /* if */
|
||||
} /* if */
|
||||
} /* if */
|
||||
|
@@ -84,7 +84,7 @@ static pascal OSStatus wxMacDataViewCtrlEventHandler(EventHandlerCallRef handler
|
||||
DataViewEvent.SetColumn(columnIndex);
|
||||
DataViewEvent.SetDataViewColumn(DataViewCtrlPtr->GetColumn(columnIndex));
|
||||
// finally sent the equivalent wxWidget event:
|
||||
DataViewCtrlPtr->GetEventHandler()->ProcessEvent(DataViewEvent);
|
||||
DataViewCtrlPtr->HandleWindowEvent(DataViewEvent);
|
||||
return ::CallNextEventHandler(handler,EventReference);
|
||||
} /* if */
|
||||
else
|
||||
@@ -238,7 +238,7 @@ public:
|
||||
dataViewEvent.SetEventObject(dataViewCtrlPtr);
|
||||
dataViewEvent.SetItem(item);
|
||||
// sent the equivalent wxWidget event:
|
||||
dataViewCtrlPtr->GetEventHandler()->ProcessEvent(dataViewEvent);
|
||||
dataViewCtrlPtr->HandleWindowEvent(dataViewEvent);
|
||||
// done
|
||||
return true;
|
||||
} /* if */
|
||||
@@ -270,7 +270,7 @@ public:
|
||||
for (size_t i=0; i<noOfEntries; ++i)
|
||||
{
|
||||
dataViewEvent.SetItem(reinterpret_cast<void*>(itemIDs[i]));
|
||||
dataViewCtrlPtr->GetEventHandler()->ProcessEvent(dataViewEvent);
|
||||
dataViewCtrlPtr->HandleWindowEvent(dataViewEvent);
|
||||
} /* for */
|
||||
} /* if */
|
||||
// release allocated array space:
|
||||
@@ -357,7 +357,7 @@ public:
|
||||
dataViewEvent.SetColumn(col);
|
||||
dataViewEvent.SetItem(item);
|
||||
// send the equivalent wxWidget event:
|
||||
dataViewCtrlPtr->GetEventHandler()->ProcessEvent(dataViewEvent);
|
||||
dataViewCtrlPtr->HandleWindowEvent(dataViewEvent);
|
||||
// done
|
||||
return true;
|
||||
} /* if */
|
||||
|
@@ -357,7 +357,7 @@ void wxFontColourSwatchCtrl::OnMouseEvent(wxMouseEvent& event)
|
||||
Refresh();
|
||||
|
||||
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, GetId());
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -447,7 +447,7 @@ void wxMacListBoxItem::Notification(wxMacDataItemBrowserControl *owner ,
|
||||
|
||||
// direct notification is not always having the listbox GetSelection()
|
||||
// having in synch with event, so use wxPostEvent instead
|
||||
// list->GetEventHandler()->ProcessEvent(event);
|
||||
// list->HandleWindowEvent(event);
|
||||
|
||||
wxPostEvent( list->GetEventHandler(), event );
|
||||
}
|
||||
|
@@ -152,7 +152,7 @@ static pascal OSStatus wxMacListCtrlEventHandler( EventHandlerCallRef handler ,
|
||||
// FIXME: we can't use the sort property for virtual listctrls
|
||||
// so we need to find a better way to determine which column was clicked...
|
||||
if (!window->IsVirtual())
|
||||
window->GetEventHandler()->ProcessEvent( le );
|
||||
window->HandleWindowEvent( le );
|
||||
}
|
||||
result = CallNextEventHandler(handler, event);
|
||||
break;
|
||||
@@ -305,7 +305,7 @@ bool wxMacListCtrlEventDelegate::ProcessEvent( wxEvent& event )
|
||||
|
||||
if ( !event.IsKindOf( CLASSINFO( wxCommandEvent ) ) )
|
||||
{
|
||||
if (m_list->GetEventHandler()->ProcessEvent( event ))
|
||||
if (m_list->HandleWindowEvent( event ))
|
||||
return true;
|
||||
}
|
||||
return wxEvtHandler::ProcessEvent(event);
|
||||
@@ -648,7 +648,7 @@ void wxListCtrl::FireMouseEvent(wxEventType eventType, wxPoint position)
|
||||
le.m_itemIndex = item;
|
||||
le.m_item.m_itemId = item;
|
||||
GetItem(le.m_item);
|
||||
GetEventHandler()->ProcessEvent(le);
|
||||
HandleWindowEvent(le);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -697,7 +697,7 @@ void wxListCtrl::OnChar(wxKeyEvent& event)
|
||||
le.m_itemIndex = m_current;
|
||||
le.m_item.m_itemId = m_current;
|
||||
GetItem(le.m_item);
|
||||
GetEventHandler()->ProcessEvent(le);
|
||||
HandleWindowEvent(le);
|
||||
}
|
||||
}
|
||||
event.Skip();
|
||||
@@ -1743,7 +1743,7 @@ bool wxListCtrl::DeleteItem(long item)
|
||||
wxListEvent event( wxEVT_COMMAND_LIST_DELETE_ITEM, GetId() );
|
||||
event.SetEventObject( this );
|
||||
event.m_itemIndex = item;
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
HandleWindowEvent( event );
|
||||
|
||||
}
|
||||
return true;
|
||||
@@ -1760,7 +1760,7 @@ bool wxListCtrl::DeleteAllItems()
|
||||
m_dbImpl->MacClear();
|
||||
wxListEvent event( wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, GetId() );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
HandleWindowEvent( event );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -1834,7 +1834,7 @@ wxTextCtrl* wxListCtrl::EditLabel(long item, wxClassInfo* textControlClass)
|
||||
le.m_col = 0;
|
||||
GetItem( le.m_item );
|
||||
|
||||
if ( GetParent()->GetEventHandler()->ProcessEvent( le ) && !le.IsAllowed() )
|
||||
if ( GetParent()->HandleWindowEvent( le ) && !le.IsAllowed() )
|
||||
{
|
||||
// vetoed by user code
|
||||
return NULL;
|
||||
@@ -2033,7 +2033,7 @@ long wxListCtrl::InsertItem(wxListItem& info)
|
||||
wxListEvent event( wxEVT_COMMAND_LIST_INSERT_ITEM, GetId() );
|
||||
event.SetEventObject( this );
|
||||
event.m_itemIndex = info.m_itemId;
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
HandleWindowEvent( event );
|
||||
return info.m_itemId;
|
||||
}
|
||||
return -1;
|
||||
@@ -2200,7 +2200,7 @@ bool wxListCtrl::OnRenameAccept(long itemEdit, const wxString& value)
|
||||
|
||||
GetItem( le.m_item );
|
||||
le.m_item.m_text = value;
|
||||
return !GetEventHandler()->ProcessEvent( le ) ||
|
||||
return !HandleWindowEvent( le ) ||
|
||||
le.IsAllowed();
|
||||
}
|
||||
|
||||
@@ -2215,7 +2215,7 @@ void wxListCtrl::OnRenameCancelled(long itemEdit)
|
||||
le.m_itemIndex = itemEdit;
|
||||
|
||||
GetItem( le.m_item );
|
||||
GetEventHandler()->ProcessEvent( le );
|
||||
HandleWindowEvent( le );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -374,13 +374,13 @@ bool wxMenu::ProcessCommand(wxCommandEvent & event)
|
||||
|
||||
// Try the menu's event handler
|
||||
if ( /* !processed && */ GetEventHandler())
|
||||
processed = GetEventHandler()->ProcessEvent(event);
|
||||
processed = HandleWindowEvent(event);
|
||||
|
||||
// Try the window the menu was popped up from
|
||||
// (and up through the hierarchy)
|
||||
wxWindow *win = GetInvokingWindow();
|
||||
if ( !processed && win )
|
||||
processed = win->GetEventHandler()->ProcessEvent(event);
|
||||
processed = win->HandleWindowEvent(event);
|
||||
|
||||
return processed;
|
||||
}
|
||||
@@ -567,7 +567,7 @@ wxInt32 wxMenu::MacHandleCommandProcess( wxMenuItem* item, int id, wxWindow* tar
|
||||
event.SetEventObject(targetWindow);
|
||||
event.SetInt(item->IsCheckable() ? item->IsChecked() : -1);
|
||||
|
||||
if ( targetWindow->GetEventHandler()->ProcessEvent(event) )
|
||||
if ( targetWindow->HandleWindowEvent(event) )
|
||||
result = noErr ;
|
||||
}
|
||||
}
|
||||
@@ -601,7 +601,7 @@ wxInt32 wxMenu::MacHandleCommandUpdateStatus(wxMenuItem* WXUNUSED(item),
|
||||
wxWindow *win = menu->GetInvokingWindow();
|
||||
if ( win )
|
||||
{
|
||||
processed = win->GetEventHandler()->ProcessEvent(event);
|
||||
processed = win->HandleWindowEvent(event);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -611,7 +611,7 @@ wxInt32 wxMenu::MacHandleCommandUpdateStatus(wxMenuItem* WXUNUSED(item),
|
||||
|
||||
if ( !processed && targetWindow != NULL)
|
||||
{
|
||||
processed = targetWindow->GetEventHandler()->ProcessEvent(event);
|
||||
processed = targetWindow->HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
if ( processed )
|
||||
|
@@ -509,7 +509,7 @@ void wxNotebook::OnNavigationKey(wxNavigationKeyEvent& event)
|
||||
event.SetEventObject( this );
|
||||
|
||||
wxWindow *page = m_pages[m_nSelection];
|
||||
if ( !page->GetEventHandler()->ProcessEvent( event ) )
|
||||
if ( !page->HandleWindowEvent( event ) )
|
||||
{
|
||||
page->SetFocus();
|
||||
}
|
||||
@@ -527,7 +527,7 @@ void wxNotebook::OnNavigationKey(wxNavigationKeyEvent& event)
|
||||
if ( parent )
|
||||
{
|
||||
event.SetCurrentFocus( this );
|
||||
parent->GetEventHandler()->ProcessEvent( event );
|
||||
parent->HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -594,7 +594,7 @@ wxInt32 wxNotebook::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTR
|
||||
wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, m_windowId,
|
||||
newSel , m_nSelection );
|
||||
changing.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( changing );
|
||||
HandleWindowEvent( changing );
|
||||
|
||||
if ( changing.IsAllowed() )
|
||||
{
|
||||
@@ -602,7 +602,7 @@ wxInt32 wxNotebook::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTR
|
||||
wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, m_windowId,
|
||||
newSel, m_nSelection );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
HandleWindowEvent( event );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -153,7 +153,7 @@ bool wxPopupWindow::Show(bool show)
|
||||
// because apps expect a size event to occur at this moment
|
||||
wxSizeEvent event(GetSize() , m_windowId);
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -165,7 +165,7 @@ void wxScrollBar::MacHandleControlClick( WXWidget WXUNUSED(control), wxInt16 con
|
||||
// this is hardcoded
|
||||
window->MacOnScroll( event );
|
||||
else
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
HandleWindowEvent( event );
|
||||
}
|
||||
|
||||
wxInt32 wxScrollBar::MacControlHit( WXEVENTHANDLERREF WXUNUSED(handler), WXEVENTREF mevent )
|
||||
@@ -221,7 +221,7 @@ wxInt32 wxScrollBar::MacControlHit( WXEVENTHANDLERREF WXUNUSED(handler), WXEVENT
|
||||
// this is hardcoded
|
||||
window->MacOnScroll( event );
|
||||
else
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
HandleWindowEvent( event );
|
||||
|
||||
return noErr;
|
||||
}
|
||||
|
@@ -307,12 +307,12 @@ void wxSlider::MacHandleControlClick(WXWidget WXUNUSED(control),
|
||||
wxScrollEvent event( wxEVT_SCROLL_THUMBTRACK, m_windowId );
|
||||
event.SetPosition( value );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
HandleWindowEvent( event );
|
||||
|
||||
wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, m_windowId );
|
||||
cevent.SetInt( value );
|
||||
cevent.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( cevent );
|
||||
HandleWindowEvent( cevent );
|
||||
}
|
||||
|
||||
wxInt32 wxSlider::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler),
|
||||
@@ -327,13 +327,13 @@ wxInt32 wxSlider::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler),
|
||||
wxScrollEvent event( wxEVT_SCROLL_THUMBRELEASE, m_windowId );
|
||||
event.SetPosition( value );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
HandleWindowEvent( event );
|
||||
|
||||
wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, m_windowId );
|
||||
cevent.SetInt( value );
|
||||
cevent.SetEventObject( this );
|
||||
|
||||
GetEventHandler()->ProcessEvent( cevent );
|
||||
HandleWindowEvent( cevent );
|
||||
|
||||
return noErr;
|
||||
}
|
||||
|
@@ -133,7 +133,7 @@ void wxSpinButton::MacHandleValueChanged( int inc )
|
||||
|
||||
event.SetPosition( m_value );
|
||||
event.SetEventObject( this );
|
||||
if ((GetEventHandler()->ProcessEvent( event )) && !event.IsAllowed())
|
||||
if ((HandleWindowEvent( event )) && !event.IsAllowed())
|
||||
m_value = oldValue;
|
||||
|
||||
m_peer->SetValue( m_value );
|
||||
@@ -145,7 +145,7 @@ void wxSpinButton::MacHandleValueChanged( int inc )
|
||||
wxSpinEvent event2( scrollEvent, GetId() );
|
||||
event2.SetPosition( m_value );
|
||||
event2.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event2 );
|
||||
HandleWindowEvent( event2 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -88,7 +88,7 @@ protected:
|
||||
wxCommandEvent event(wxEVT_COMMAND_SPINCTRL_UPDATED, m_spin->GetId());
|
||||
event.SetEventObject(m_spin);
|
||||
event.SetInt(l);
|
||||
m_spin->GetEventHandler()->ProcessEvent(event);
|
||||
m_spin->HandleWindowEvent(event);
|
||||
|
||||
m_spin->m_oldValue = l;
|
||||
}
|
||||
@@ -116,7 +116,7 @@ protected:
|
||||
event.SetString(m_spin->GetText()->GetValue());
|
||||
event.SetInt(val);
|
||||
|
||||
m_spin->GetEventHandler()->ProcessEvent(event);
|
||||
m_spin->HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
event.Skip();
|
||||
@@ -166,7 +166,7 @@ protected:
|
||||
event.SetEventObject(m_spin);
|
||||
event.SetInt(pos);
|
||||
|
||||
m_spin->GetEventHandler()->ProcessEvent(event);
|
||||
m_spin->HandleWindowEvent(event);
|
||||
|
||||
m_spin->m_oldValue = pos;
|
||||
}
|
||||
|
@@ -518,7 +518,7 @@ void wxTextCtrl::Cut()
|
||||
|
||||
wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, m_windowId );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -532,7 +532,7 @@ void wxTextCtrl::Paste()
|
||||
|
||||
wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, m_windowId );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
HandleWindowEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -847,7 +847,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
|
||||
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
|
||||
event.SetEventObject( this );
|
||||
event.SetString( GetValue() );
|
||||
if ( GetEventHandler()->ProcessEvent(event) )
|
||||
if ( HandleWindowEvent(event) )
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -211,25 +211,25 @@ static pascal OSStatus KeyboardEventHandler( EventHandlerCallRef handler , Event
|
||||
{
|
||||
event.m_keyCode = WXK_CONTROL ;
|
||||
event.SetEventType( ( modifiers & controlKey ) ? wxEVT_KEY_DOWN : wxEVT_KEY_UP ) ;
|
||||
focus->GetEventHandler()->ProcessEvent( event ) ;
|
||||
focus->HandleWindowEvent( event ) ;
|
||||
}
|
||||
if ( /* focus && */ (modifiers ^ wxApp::s_lastModifiers ) & shiftKey )
|
||||
{
|
||||
event.m_keyCode = WXK_SHIFT ;
|
||||
event.SetEventType( ( modifiers & shiftKey ) ? wxEVT_KEY_DOWN : wxEVT_KEY_UP ) ;
|
||||
focus->GetEventHandler()->ProcessEvent( event ) ;
|
||||
focus->HandleWindowEvent( event ) ;
|
||||
}
|
||||
if ( /* focus && */ (modifiers ^ wxApp::s_lastModifiers ) & optionKey )
|
||||
{
|
||||
event.m_keyCode = WXK_ALT ;
|
||||
event.SetEventType( ( modifiers & optionKey ) ? wxEVT_KEY_DOWN : wxEVT_KEY_UP ) ;
|
||||
focus->GetEventHandler()->ProcessEvent( event ) ;
|
||||
focus->HandleWindowEvent( event ) ;
|
||||
}
|
||||
if ( /* focus && */ (modifiers ^ wxApp::s_lastModifiers ) & cmdKey )
|
||||
{
|
||||
event.m_keyCode = WXK_COMMAND ;
|
||||
event.SetEventType( ( modifiers & cmdKey ) ? wxEVT_KEY_DOWN : wxEVT_KEY_UP ) ;
|
||||
focus->GetEventHandler()->ProcessEvent( event ) ;
|
||||
focus->HandleWindowEvent( event ) ;
|
||||
}
|
||||
|
||||
wxApp::s_lastModifiers = modifiers ;
|
||||
@@ -485,7 +485,7 @@ wxMacTopLevelMouseEventHandler(EventHandlerCallRef WXUNUSED(handler),
|
||||
wxToolTip::RelayEvent( g_MacLastWindow , eventleave);
|
||||
#endif
|
||||
|
||||
g_MacLastWindow->GetEventHandler()->ProcessEvent(eventleave);
|
||||
g_MacLastWindow->HandleWindowEvent(eventleave);
|
||||
}
|
||||
|
||||
if ( currentMouseWindow )
|
||||
@@ -500,7 +500,7 @@ wxMacTopLevelMouseEventHandler(EventHandlerCallRef WXUNUSED(handler),
|
||||
wxToolTip::RelayEvent( currentMouseWindow , evententer );
|
||||
#endif
|
||||
|
||||
currentMouseWindow->GetEventHandler()->ProcessEvent(evententer);
|
||||
currentMouseWindow->HandleWindowEvent(evententer);
|
||||
}
|
||||
|
||||
g_MacLastWindow = currentMouseWindow ;
|
||||
@@ -532,7 +532,7 @@ wxMacTopLevelMouseEventHandler(EventHandlerCallRef WXUNUSED(handler),
|
||||
wxToolTip::RelayEvent( currentMouseWindow , wxevent );
|
||||
#endif
|
||||
|
||||
if ( currentMouseWindow->GetEventHandler()->ProcessEvent(wxevent) )
|
||||
if ( currentMouseWindow->HandleWindowEvent(wxevent) )
|
||||
{
|
||||
if ((currentMouseWindowParent != NULL) &&
|
||||
(currentMouseWindowParent->GetChildren().Find(currentMouseWindow) == NULL))
|
||||
@@ -616,7 +616,7 @@ wxMacTopLevelWindowEventHandler(EventHandlerCallRef WXUNUSED(handler),
|
||||
wxActivateEvent wxevent(wxEVT_ACTIVATE, true , toplevelWindow->GetId());
|
||||
wxevent.SetTimestamp( cEvent.GetTicks() ) ;
|
||||
wxevent.SetEventObject(toplevelWindow);
|
||||
toplevelWindow->GetEventHandler()->ProcessEvent(wxevent);
|
||||
toplevelWindow->HandleWindowEvent(wxevent);
|
||||
// we still sending an eventNotHandledErr in order to allow for default processing
|
||||
}
|
||||
break ;
|
||||
@@ -627,7 +627,7 @@ wxMacTopLevelWindowEventHandler(EventHandlerCallRef WXUNUSED(handler),
|
||||
wxActivateEvent wxevent(wxEVT_ACTIVATE, false , toplevelWindow->GetId());
|
||||
wxevent.SetTimestamp( cEvent.GetTicks() ) ;
|
||||
wxevent.SetEventObject(toplevelWindow);
|
||||
toplevelWindow->GetEventHandler()->ProcessEvent(wxevent);
|
||||
toplevelWindow->HandleWindowEvent(wxevent);
|
||||
// we still sending an eventNotHandledErr in order to allow for default processing
|
||||
}
|
||||
break ;
|
||||
@@ -661,7 +661,7 @@ wxMacTopLevelWindowEventHandler(EventHandlerCallRef WXUNUSED(handler),
|
||||
wxSizeEvent event( r.GetSize() , toplevelWindow->GetId() ) ;
|
||||
event.SetEventObject( toplevelWindow ) ;
|
||||
|
||||
toplevelWindow->GetEventHandler()->ProcessEvent(event) ;
|
||||
toplevelWindow->HandleWindowEvent(event) ;
|
||||
toplevelWindow->wxWindowMac::MacSuperChangedPosition() ; // like this only children will be notified
|
||||
}
|
||||
|
||||
@@ -669,7 +669,7 @@ wxMacTopLevelWindowEventHandler(EventHandlerCallRef WXUNUSED(handler),
|
||||
{
|
||||
wxMoveEvent event( r.GetLeftTop() , toplevelWindow->GetId() ) ;
|
||||
event.SetEventObject( toplevelWindow ) ;
|
||||
toplevelWindow->GetEventHandler()->ProcessEvent(event) ;
|
||||
toplevelWindow->HandleWindowEvent(event) ;
|
||||
}
|
||||
|
||||
result = noErr ;
|
||||
@@ -697,7 +697,7 @@ wxMacTopLevelWindowEventHandler(EventHandlerCallRef WXUNUSED(handler),
|
||||
wxSizeEvent wxevent( r , toplevelWindow->GetId() ) ;
|
||||
wxevent.SetEventObject( toplevelWindow ) ;
|
||||
wxRect adjustR = r ;
|
||||
if ( toplevelWindow->GetEventHandler()->ProcessEvent(wxevent) )
|
||||
if ( toplevelWindow->HandleWindowEvent(wxevent) )
|
||||
adjustR = wxevent.GetRect() ;
|
||||
|
||||
if ( toplevelWindow->GetMaxWidth() != -1 && adjustR.GetWidth() > toplevelWindow->GetMaxWidth() )
|
||||
@@ -1256,7 +1256,7 @@ void wxTopLevelWindowMac::DoMacCreateRealWindow(
|
||||
}
|
||||
|
||||
wxWindowCreateEvent event(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
void wxTopLevelWindowMac::ClearBackground()
|
||||
@@ -1333,7 +1333,7 @@ bool wxTopLevelWindowMac::Show(bool show)
|
||||
// because apps expect a size event to occur at this moment
|
||||
wxSizeEvent event(GetSize() , m_windowId);
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1416,7 +1416,7 @@ bool wxTopLevelWindowMac::ShowWithEffect(wxShowEffect effect,
|
||||
// because apps expect a size event to occur at this moment
|
||||
wxSizeEvent event(GetSize() , m_windowId);
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@@ -308,13 +308,13 @@ bool wxTreeCtrl::ExpandItem(long item, int action)
|
||||
bIsExpanded
|
||||
? wxEVT_COMMAND_TREE_ITEM_EXPANDING
|
||||
: wxEVT_COMMAND_TREE_ITEM_COLLAPSING);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
|
||||
event.SetEventType(
|
||||
bIsExpanded
|
||||
? wxEVT_COMMAND_TREE_ITEM_EXPANDED
|
||||
: wxEVT_COMMAND_TREE_ITEM_COLLAPSED);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
return bOk;
|
||||
|
@@ -334,7 +334,7 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
|
||||
inKillFocusEvent = true ;
|
||||
wxFocusEvent event( wxEVT_KILL_FOCUS, thisWindow->GetId());
|
||||
event.SetEventObject(thisWindow);
|
||||
thisWindow->GetEventHandler()->ProcessEvent(event) ;
|
||||
thisWindow->HandleWindowEvent(event) ;
|
||||
inKillFocusEvent = false ;
|
||||
}
|
||||
}
|
||||
@@ -344,7 +344,7 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
|
||||
// panel wants to track the window which was the last to have focus in it
|
||||
wxLogTrace(_T("Focus"), _T("focus set(%p)"), wx_static_cast(void*, thisWindow));
|
||||
wxChildFocusEvent eventFocus((wxWindow*)thisWindow);
|
||||
thisWindow->GetEventHandler()->ProcessEvent(eventFocus);
|
||||
thisWindow->HandleWindowEvent(eventFocus);
|
||||
|
||||
#if wxUSE_CARET
|
||||
if ( thisWindow->GetCaret() )
|
||||
@@ -353,7 +353,7 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
|
||||
|
||||
wxFocusEvent event(wxEVT_SET_FOCUS, thisWindow->GetId());
|
||||
event.SetEventObject(thisWindow);
|
||||
thisWindow->GetEventHandler()->ProcessEvent(event) ;
|
||||
thisWindow->HandleWindowEvent(event) ;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -423,7 +423,7 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
|
||||
inKillFocusEvent = true ;
|
||||
wxFocusEvent event( wxEVT_KILL_FOCUS, thisWindow->GetId());
|
||||
event.SetEventObject(thisWindow);
|
||||
thisWindow->GetEventHandler()->ProcessEvent(event) ;
|
||||
thisWindow->HandleWindowEvent(event) ;
|
||||
inKillFocusEvent = false ;
|
||||
}
|
||||
}
|
||||
@@ -432,7 +432,7 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
|
||||
// panel wants to track the window which was the last to have focus in it
|
||||
wxLogTrace(_T("Focus"), _T("focus set(%p)"), wx_static_cast(void*, thisWindow));
|
||||
wxChildFocusEvent eventFocus((wxWindow*)thisWindow);
|
||||
thisWindow->GetEventHandler()->ProcessEvent(eventFocus);
|
||||
thisWindow->HandleWindowEvent(eventFocus);
|
||||
|
||||
#if wxUSE_CARET
|
||||
if ( thisWindow->GetCaret() )
|
||||
@@ -441,7 +441,7 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
|
||||
|
||||
wxFocusEvent event(wxEVT_SET_FOCUS, thisWindow->GetId());
|
||||
event.SetEventObject(thisWindow);
|
||||
thisWindow->GetEventHandler()->ProcessEvent(event) ;
|
||||
thisWindow->HandleWindowEvent(event) ;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -1775,7 +1775,7 @@ void wxWindowMac::DoMoveWindow(int x, int y, int width, int height)
|
||||
wxPoint point(actualX, actualY);
|
||||
wxMoveEvent event(point, m_windowId);
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event) ;
|
||||
HandleWindowEvent(event) ;
|
||||
}
|
||||
|
||||
if ( doResize )
|
||||
@@ -1784,7 +1784,7 @@ void wxWindowMac::DoMoveWindow(int x, int y, int width, int height)
|
||||
wxSize size(actualWidth, actualHeight);
|
||||
wxSizeEvent event(size, m_windowId);
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2388,7 +2388,7 @@ void wxWindowMac::DoUpdateScrollbarVisibility()
|
||||
{
|
||||
wxSizeEvent event(GetSize(), m_windowId);
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2500,7 +2500,7 @@ void wxWindowMac::MacOnScroll( wxScrollEvent &event )
|
||||
else if (event.GetEventType() == wxEVT_SCROLL_THUMBRELEASE)
|
||||
wevent.SetEventType( wxEVT_SCROLLWIN_THUMBRELEASE );
|
||||
|
||||
GetEventHandler()->ProcessEvent(wevent);
|
||||
HandleWindowEvent(wevent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2545,7 +2545,7 @@ bool wxWindowMac::MacSetupCursor( const wxPoint& pt )
|
||||
{
|
||||
wxSetCursorEvent event( pt.x , pt.y );
|
||||
|
||||
bool processedEvtSetCursor = GetEventHandler()->ProcessEvent(event);
|
||||
bool processedEvtSetCursor = HandleWindowEvent(event);
|
||||
if ( processedEvtSetCursor && event.HasCursor() )
|
||||
{
|
||||
cursor = event.GetCursor() ;
|
||||
@@ -2763,7 +2763,7 @@ bool wxWindowMac::MacDoRedraw( void* updatergnr , long time )
|
||||
|
||||
wxEraseEvent eevent( GetId(), dc );
|
||||
eevent.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( eevent );
|
||||
HandleWindowEvent( eevent );
|
||||
delete dc ;
|
||||
}
|
||||
|
||||
@@ -2781,7 +2781,7 @@ bool wxWindowMac::MacDoRedraw( void* updatergnr , long time )
|
||||
wxPaintEvent event;
|
||||
event.SetTimestamp(time);
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
handled = true ;
|
||||
}
|
||||
|
||||
@@ -2820,7 +2820,7 @@ bool wxWindowMac::MacDoRedraw( void* updatergnr , long time )
|
||||
// paint custom borders
|
||||
wxNcPaintEvent eventNc( child->GetId() );
|
||||
eventNc.SetEventObject( child );
|
||||
if ( !child->GetEventHandler()->ProcessEvent( eventNc ) )
|
||||
if ( !child->HandleWindowEvent( eventNc ) )
|
||||
{
|
||||
child->MacPaintBorders(0, 0) ;
|
||||
}
|
||||
@@ -3155,7 +3155,7 @@ void wxWindowMac::OnMouseEvent( wxMouseEvent &event )
|
||||
wxContextMenuEvent evtCtx(wxEVT_CONTEXT_MENU,
|
||||
this->GetId(),
|
||||
this->ClientToScreen(event.GetPosition()));
|
||||
if ( ! GetEventHandler()->ProcessEvent(evtCtx) )
|
||||
if ( ! HandleWindowEvent(evtCtx) )
|
||||
event.Skip() ;
|
||||
}
|
||||
else
|
||||
|
@@ -152,7 +152,7 @@ bool wxTopLevelWindowMGL::Show(bool show)
|
||||
m_sizeSet = true;
|
||||
wxSizeEvent event(GetSize(), GetId());
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
if ( ret && show && CanAcceptFocus() )
|
||||
|
@@ -235,12 +235,12 @@ static ibool MGLAPI wxWindowMouseHandler(window_t *wnd, event_t *e)
|
||||
|
||||
event2.SetEventObject(gs_windowUnderMouse);
|
||||
event2.SetEventType(wxEVT_LEAVE_WINDOW);
|
||||
gs_windowUnderMouse->GetEventHandler()->ProcessEvent(event2);
|
||||
gs_windowUnderMouse->HandleWindowEvent(event2);
|
||||
}
|
||||
|
||||
wxMouseEvent event3(event);
|
||||
event3.SetEventType(wxEVT_ENTER_WINDOW);
|
||||
win->GetEventHandler()->ProcessEvent(event3);
|
||||
win->HandleWindowEvent(event3);
|
||||
|
||||
gs_windowUnderMouse = win;
|
||||
}
|
||||
@@ -257,7 +257,7 @@ static ibool MGLAPI wxWindowMouseHandler(window_t *wnd, event_t *e)
|
||||
wxMouseEvent evt(inside ?
|
||||
wxEVT_ENTER_WINDOW : wxEVT_LEAVE_WINDOW);
|
||||
evt.SetEventObject(win);
|
||||
win->GetEventHandler()->ProcessEvent(evt);
|
||||
win->HandleWindowEvent(evt);
|
||||
gs_windowUnderMouse = inside ? win : NULL;
|
||||
}
|
||||
}
|
||||
@@ -276,7 +276,7 @@ static ibool MGLAPI wxWindowMouseHandler(window_t *wnd, event_t *e)
|
||||
else
|
||||
{
|
||||
event.SetEventType(type);
|
||||
return win->GetEventHandler()->ProcessEvent(event);
|
||||
return win->HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -471,7 +471,7 @@ static ibool MGLAPI wxWindowKeybHandler(window_t *wnd, event_t *e)
|
||||
if ( e->what == EVT_KEYUP )
|
||||
{
|
||||
event.SetEventType(wxEVT_KEY_UP);
|
||||
return win->GetEventHandler()->ProcessEvent(event);
|
||||
return win->HandleWindowEvent(event);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -481,7 +481,7 @@ static ibool MGLAPI wxWindowKeybHandler(window_t *wnd, event_t *e)
|
||||
event.SetEventType(wxEVT_KEY_DOWN);
|
||||
event2 = event;
|
||||
|
||||
ret = win->GetEventHandler()->ProcessEvent(event);
|
||||
ret = win->HandleWindowEvent(event);
|
||||
|
||||
// wxMSW doesn't send char events with Alt pressed
|
||||
// Only send wxEVT_CHAR event if not processed yet. Thus, ALT-x
|
||||
@@ -490,7 +490,7 @@ static ibool MGLAPI wxWindowKeybHandler(window_t *wnd, event_t *e)
|
||||
if ( !ret && event2.m_keyCode != 0 )
|
||||
{
|
||||
event2.SetEventType(wxEVT_CHAR);
|
||||
ret = win->GetEventHandler()->ProcessEvent(event2);
|
||||
ret = win->HandleWindowEvent(event2);
|
||||
}
|
||||
|
||||
// Synthetize navigation key event, but do it only if the TAB key
|
||||
@@ -505,7 +505,7 @@ static ibool MGLAPI wxWindowKeybHandler(window_t *wnd, event_t *e)
|
||||
// Ctrl-TAB changes the (parent) window, i.e. switch notebook page:
|
||||
navEvent.SetWindowChange(event.m_controlDown);
|
||||
navEvent.SetCurrentFocus(wxStaticCast(win, wxWindow));
|
||||
ret = win->GetParent()->GetEventHandler()->ProcessEvent(navEvent);
|
||||
ret = win->HandleWindowEvent(navEvent);
|
||||
}
|
||||
|
||||
// Finally, process special meaning keys that are usually
|
||||
@@ -695,24 +695,24 @@ void wxWindowMGL::SetFocus()
|
||||
{
|
||||
wxActivateEvent event(wxEVT_ACTIVATE, false, gs_activeFrame->GetId());
|
||||
event.SetEventObject(gs_activeFrame);
|
||||
gs_activeFrame->GetEventHandler()->ProcessEvent(event);
|
||||
gs_activeFrame->HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
gs_activeFrame = active;
|
||||
wxActivateEvent event(wxEVT_ACTIVATE, true, gs_activeFrame->GetId());
|
||||
event.SetEventObject(gs_activeFrame);
|
||||
gs_activeFrame->GetEventHandler()->ProcessEvent(event);
|
||||
gs_activeFrame->HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
// notify the parent keeping track of focus for the kbd navigation
|
||||
// purposes that we got it
|
||||
wxChildFocusEvent eventFocus((wxWindow*)this);
|
||||
GetEventHandler()->ProcessEvent(eventFocus);
|
||||
HandleWindowEvent(eventFocus);
|
||||
|
||||
wxFocusEvent event(wxEVT_SET_FOCUS, GetId());
|
||||
event.SetEventObject(this);
|
||||
event.SetWindow((wxWindow*)oldFocusedWindow);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
|
||||
#if wxUSE_CARET
|
||||
// caret needs to be informed about focus change
|
||||
@@ -741,7 +741,7 @@ void wxWindowMGL::KillFocus()
|
||||
wxFocusEvent event(wxEVT_KILL_FOCUS, GetId());
|
||||
event.SetEventObject(this);
|
||||
event.SetWindow(gs_toBeFocusedWindow);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -1056,7 +1056,7 @@ void wxWindowMGL::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
||||
wxSize newSize(width, height);
|
||||
wxSizeEvent event(newSize, GetId());
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1175,17 +1175,17 @@ void wxWindowMGL::HandlePaint(MGLDevCtx *dc)
|
||||
wxWindowDC dc((wxWindow*)this);
|
||||
wxEraseEvent eventEr(m_windowId, &dc);
|
||||
eventEr.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(eventEr);
|
||||
HandleWindowEvent(eventEr);
|
||||
}
|
||||
m_eraseBackground = -1;
|
||||
|
||||
wxNcPaintEvent eventNc(GetId());
|
||||
eventNc.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(eventNc);
|
||||
HandleWindowEvent(eventNc);
|
||||
|
||||
wxPaintEvent eventPt(GetId());
|
||||
eventPt.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(eventPt);
|
||||
HandleWindowEvent(eventPt);
|
||||
|
||||
#if wxUSE_CARET
|
||||
if ( caret )
|
||||
|
@@ -141,7 +141,7 @@ void wxCheckListBox::DoToggleItem( int n, int x )
|
||||
event.SetEventObject(this);
|
||||
event.SetString(GetString(n));
|
||||
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
HandleWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -306,7 +306,7 @@ void wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData,
|
||||
event.SetClientData( item->GetClientData(idx) );
|
||||
event.SetExtraLong(true);
|
||||
event.SetEventObject(item);
|
||||
item->GetEventHandler()->ProcessEvent(event);
|
||||
item->HandleWindowEvent(event);
|
||||
break;
|
||||
}
|
||||
case XmCR_VALUE_CHANGED:
|
||||
@@ -316,7 +316,7 @@ void wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData,
|
||||
event.SetString( item->GetValue() );
|
||||
event.SetExtraLong(true);
|
||||
event.SetEventObject(item);
|
||||
item->GetEventHandler()->ProcessEvent(event);
|
||||
item->HandleWindowEvent(event);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
@@ -102,7 +102,7 @@ wxString wxControl::GetLabel() const
|
||||
|
||||
bool wxControl::ProcessCommand(wxCommandEvent & event)
|
||||
{
|
||||
return GetEventHandler()->ProcessEvent(event);
|
||||
return HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
wxSize wxControl::DoGetBestSize() const
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user