git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2070
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
wxMenuBar* bar = GetMenuBar();
{
wxMenuBar* bar = GetMenuBar();
- // Process events starting with the window with the focus, if any.
- wxWindow* focusWin = wxFindFocusDescendant(this);
-
if ( bar != NULL ) {
int nCount = bar->GetMenuCount();
for (int n = 0; n < nCount; n++)
if ( bar != NULL ) {
int nCount = bar->GetMenuCount();
for (int n = 0; n < nCount; n++)
- DoMenuUpdates(bar->GetMenu(n), focusWin);
+ DoMenuUpdates(bar->GetMenu(n), (wxWindow*) NULL);
}
}
// update a menu and all submenus recursively
}
}
// update a menu and all submenus recursively
-void wxFrame::DoMenuUpdates(wxMenu* menu, wxWindow* focusWin)
+void wxFrame::DoMenuUpdates(wxMenu* menu, wxWindow* WXUNUSED(focusWin))
- wxEvtHandler* evtHandler = focusWin ? focusWin->GetEventHandler() : GetEventHandler();
+ wxEvtHandler* evtHandler = GetEventHandler();
wxNode* node = menu->GetItems().First();
while (node)
{
wxNode* node = menu->GetItems().First();
while (node)
{
}
if (item->GetSubMenu())
}
if (item->GetSubMenu())
- DoMenuUpdates(item->GetSubMenu(), focusWin);
+ DoMenuUpdates(item->GetSubMenu(), (wxWindow*) NULL);
event.SetEventObject(this);
event.SetExtraLong((long) toggleDown);
event.SetEventObject(this);
event.SetExtraLong((long) toggleDown);
- // First try sending the command to a window that has the focus, within a frame that
- // also contains this toolbar.
- wxFrame* frame = (wxFrame*) NULL;
- wxWindow* win = this;
- wxWindow* focusWin = (wxWindow*) NULL;
-
- while (win)
- {
- if (win->IsKindOf(CLASSINFO(wxFrame)))
- {
- frame = (wxFrame*) win;
- break;
- }
- else
- win = win->GetParent();
- }
- if (frame)
- focusWin = wxFindFocusDescendant(frame);
-
- if (focusWin && focusWin->GetEventHandler()->ProcessEvent(event))
- return TRUE;
-
// Send events to this toolbar instead (and thence up the window hierarchy)
GetEventHandler()->ProcessEvent(event);
// Send events to this toolbar instead (and thence up the window hierarchy)
GetEventHandler()->ProcessEvent(event);
// Do the toolbar button updates (check for EVT_UPDATE_UI handlers)
void wxToolBarBase::DoToolbarUpdates()
{
// Do the toolbar button updates (check for EVT_UPDATE_UI handlers)
void wxToolBarBase::DoToolbarUpdates()
{
- // First try sending the command to a window that has the focus, within a frame that
- // also contains this toolbar.
- wxFrame* frame = (wxFrame*) NULL;
- wxWindow* win = this;
- wxWindow* focusWin = (wxWindow*) NULL;
-
- while (win)
- {
- if (win->IsKindOf(CLASSINFO(wxFrame)))
- {
- frame = (wxFrame*) win;
- break;
- }
- else
- win = win->GetParent();
- }
- if (frame)
- focusWin = wxFindFocusDescendant(frame);
-
-
- wxEvtHandler* evtHandler = focusWin ? focusWin->GetEventHandler() : GetEventHandler() ;
+ wxEvtHandler* evtHandler = GetEventHandler() ;
wxNode* node = GetTools().First();
while (node)
wxNode* node = GetTools().First();
while (node)
bar->Check(id,!bar->Checked(id)) ;
}
bar->Check(id,!bar->Checked(id)) ;
}
- // Process events starting with the window with the focus, if any.
- wxWindow* focusWin = wxFindFocusDescendant(this);
-
- wxEvtHandler* evtHandler = focusWin ? focusWin->GetEventHandler() : GetEventHandler();
+ wxEvtHandler* evtHandler = GetEventHandler();
evtHandler->ProcessEvent(commandEvent);
}
evtHandler->ProcessEvent(commandEvent);
}
event.SetInt( toolIndex );
event.SetExtraLong((long) toggleDown);
event.SetInt( toolIndex );
event.SetExtraLong((long) toggleDown);
- // First try sending the command to a window that has the focus, within a frame that
- // also contains this toolbar.
- wxFrame* frame = (wxFrame*) NULL;
- wxWindow* win = this;
- wxWindow* focusWin = (wxWindow*) NULL;
-
- while (win)
- {
- if (win->IsKindOf(CLASSINFO(wxFrame)))
- {
- frame = (wxFrame*) win;
- break;
- }
- else
- win = win->GetParent();
- }
- if (frame)
- focusWin = wxFindFocusDescendant(frame);
-
- if (focusWin && focusWin->GetEventHandler()->ProcessEvent(event))
- return TRUE;
-
GetEventHandler()->ProcessEvent(event);
return TRUE;
GetEventHandler()->ProcessEvent(event);
return TRUE;
bar->Check(id,!bar->Checked(id)) ;
}
bar->Check(id,!bar->Checked(id)) ;
}
- // Process events starting with the window with the focus, if any.
- wxWindow* focusWin = wxFindFocusDescendant(this);
-
- wxEvtHandler* evtHandler = focusWin ? focusWin->GetEventHandler() : GetEventHandler();
+ wxEvtHandler* evtHandler = GetEventHandler();
evtHandler->ProcessEvent(commandEvent);
}
evtHandler->ProcessEvent(commandEvent);
}
event.SetInt( toolIndex );
event.SetExtraLong((long) toggleDown);
event.SetInt( toolIndex );
event.SetExtraLong((long) toggleDown);
- // First try sending the command to a window that has the focus, within a frame that
- // also contains this toolbar.
- wxFrame* frame = (wxFrame*) NULL;
- wxWindow* win = this;
- wxWindow* focusWin = (wxWindow*) NULL;
-
- while (win)
- {
- if (win->IsKindOf(CLASSINFO(wxFrame)))
- {
- frame = (wxFrame*) win;
- break;
- }
- else
- win = win->GetParent();
- }
- if (frame)
- focusWin = wxFindFocusDescendant(frame);
-
- if (focusWin && focusWin->GetEventHandler()->ProcessEvent(event))
- return TRUE;
-
GetEventHandler()->ProcessEvent(event);
return TRUE;
GetEventHandler()->ProcessEvent(event);
return TRUE;
- // Process events starting with the window with the focus, if any.
- wxWindow* focusWin = wxFindFocusDescendant(this);
-
- wxEvtHandler* evtHandler = focusWin ? focusWin->GetEventHandler() : GetEventHandler();
+ wxEvtHandler* evtHandler = GetEventHandler();
evtHandler->ProcessEvent(commandEvent);
}
evtHandler->ProcessEvent(commandEvent);
}
bar->Check(id,!bar->Checked(id)) ;
}
bar->Check(id,!bar->Checked(id)) ;
}
// Process events starting with the window with the focus, if any.
wxWindow* focusWin = wxFindFocusDescendant(this);
wxEvtHandler* evtHandler = focusWin ? focusWin->GetEventHandler() : GetEventHandler();
// Process events starting with the window with the focus, if any.
wxWindow* focusWin = wxFindFocusDescendant(this);
wxEvtHandler* evtHandler = focusWin ? focusWin->GetEventHandler() : GetEventHandler();
+*/
+
+ wxEvtHandler* evtHandler = GetEventHandler();
evtHandler->ProcessEvent(commandEvent);
}
evtHandler->ProcessEvent(commandEvent);
}
..\msw\$D\dib.obj \
..\msw\$D\dibutils.obj \
..\msw\$D\dirdlg.obj \
..\msw\$D\dib.obj \
..\msw\$D\dibutils.obj \
..\msw\$D\dirdlg.obj \
+ ..\msw\$D\dragimag.obj \
..\msw\$D\filedlg.obj \
..\msw\$D\font.obj \
..\msw\$D\fontdlg.obj \
..\msw\$D\filedlg.obj \
..\msw\$D\font.obj \
..\msw\$D\fontdlg.obj \
- // Process events starting with the window with the focus, if any.
- wxWindow* focusWin = wxFindFocusDescendant(this);
-
- wxEvtHandler* evtHandler = focusWin ? focusWin->GetEventHandler() : GetEventHandler();
-
+ wxEvtHandler* evtHandler = GetEventHandler();
evtHandler->ProcessEvent(commandEvent);
}
evtHandler->ProcessEvent(commandEvent);
}