GetEventHandler()->ProcessEvent(commandEvent);
}
-void wxFrame::OnIdle(wxIdleEvent& event)
-{
- DoMenuUpdates();
-}
-
-// Query app for menu item updates (called from OnIdle)
-void wxFrame::DoMenuUpdates(void)
-{
- wxMenuBar* bar = GetMenuBar();
- if (!bar)
- return;
-
- int i;
- for (i = 0; i < bar->m_menuCount; i++)
- {
- wxMenu* menu = bar->m_menus[i];
-
- DoMenuUpdates(menu);
- }
-}
-
-void wxFrame::DoMenuUpdates(wxMenu* menu)
-{
- wxNode* node = menu->m_menuItems.First();
- while (node)
- {
- wxMenuItem* item = (wxMenuItem*) node->Data();
- if ( !item->IsSeparator() )
- {
- wxWindowID id = item->GetId();
- wxUpdateUIEvent event(id);
- event.SetEventObject( this );
-
- if (GetEventHandler()->ProcessEvent(event))
- {
- if (event.GetSetText())
- menu->SetLabel(id, event.GetText());
- if (event.GetSetChecked())
- menu->Check(id, event.GetChecked());
- if (event.GetSetEnabled())
- menu->Enable(id, event.GetEnabled());
- }
-
- if (item->GetSubMenu())
- DoMenuUpdates(item->GetSubMenu());
- }
- node = node->Next();
- }
-}
$(MSWDIR)\file.obj \
$(MSWDIR)\fileconf.obj \
$(MSWDIR)\filefn.obj \
+ $(MSWDIR)\framecmn.obj \
$(MSWDIR)\gdicmn.obj \
$(MSWDIR)\helpbase.obj \
$(MSWDIR)\intl.obj \
$(MSWDIR)\mstream.obj \
$(MSWDIR)\zstream.obj \
$(MSWDIR)\datstrm.obj \
- $(MSWDIR)\extended.obj
+ $(MSWDIR)\extended.obj \
+ $(MSWDIR)\wincmn.obj
# $(MSWDIR)\matrix.obj \
$(MSWDIR)\filefn.obj: $(COMMDIR)\filefn.$(SRCSUFF)
+$(MSWDIR)\framecmn.obj: $(COMMDIR)\framecmn.$(SRCSUFF)
+
$(MSWDIR)\gdicmn.obj: $(COMMDIR)\gdicmn.$(SRCSUFF)
$(MSWDIR)\intl.obj: $(COMMDIR)\intl.$(SRCSUFF)
$(MSWDIR)\stream.obj: $(COMMDIR)\stream.$(SRCSUFF)
+$(MSWDIR)\wincmn.obj: $(COMMDIR)\wincmn.$(SRCSUFF)
+
$(MSWDIR)\extended.obj: $(COMMDIR)\extended.c
########################################################
$(COMMDIR)\event.obj \
$(COMMDIR)\file.obj \
$(COMMDIR)\filefn.obj \
+ $(COMMDIR)\fileconf.obj \
+ $(COMMDIR)\framecmn.obj \
$(COMMDIR)\gdicmn.obj \
$(COMMDIR)\intl.obj \
$(COMMDIR)\helpbase.obj \
$(COMMDIR)\mstream.obj \
$(COMMDIR)\zstream.obj \
$(COMMDIR)\datstrm.obj \
- $(COMMDIR)\extended.obj
-
-# Nested classes: won't comple
-# $(COMMDIR)\fileconf.obj \
+ $(COMMDIR)\extended.obj \
+ $(COMMDIR)\wincmn.obj
MSWOBJS = \
$(MSWDIR)\app.obj \
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<<
+$(COMMDIR)/framecmn.obj: $*.$(SRCSUFF)
+ cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+<<
+
$(COMMDIR)/gdicmn.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
$(CPPFLAGS2) /Fo$@ /c /Tp $*.c
<<
+$(COMMDIR)/wincmn.obj: $*.$(SRCSUFF)
+ cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+<<
+
$(COMMDIR)/y_tab.obj: $*.c $(COMMDIR)/lex_yy.c
cl @<<
$(CPPFLAGS2) -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@ /I ..\common /c $*.c
$(COMMDIR)/file.$(OBJSUFF) \
$(COMMDIR)/fileconf.$(OBJSUFF) \
$(COMMDIR)/filefn.$(OBJSUFF) \
+ $(COMMDIR)/framecmn.$(OBJSUFF) \
$(COMMDIR)/gdicmn.$(OBJSUFF) \
$(COMMDIR)/helpbase.$(OBJSUFF) \
$(COMMDIR)/intl.$(OBJSUFF) \
$(COMMDIR)/mstream.$(OBJSUFF) \
$(COMMDIR)/zstream.$(OBJSUFF) \
$(COMMDIR)/datstrm.$(OBJSUFF) \
- $(COMMDIR)/extended.$(OBJSUFF)
+ $(COMMDIR)/extended.$(OBJSUFF) \
+ $(COMMDIR)/wincmn.$(OBJSUFF)
MSWOBJS = \
app.$(OBJSUFF) \
$(GENDIR)\tabg.obj \
$(GENDIR)\textdlgg.obj
-# $(COMMDIR)\fileconf.obj \
-
COMMONOBJS = \
$(COMMDIR)\cmndata.obj \
$(COMMDIR)\config.obj \
$(COMMDIR)\event.obj \
$(COMMDIR)\file.obj \
$(COMMDIR)\filefn.obj \
+ $(COMMDIR)\fileconf.obj \
+ $(COMMDIR)\framecmn.obj \
$(COMMDIR)\gdicmn.obj \
$(COMMDIR)\intl.obj \
$(COMMDIR)\ipcbase.obj \
$(COMMDIR)\mstream.obj \
$(COMMDIR)\zstream.obj \
$(COMMDIR)\stream.obj \
- $(COMMDIR)\datstrm.obj
+ $(COMMDIR)\wincmn.obj
+
+# $(COMMDIR)\datstrm.obj
MSWOBJS = \
$(MSWDIR)\app.obj \
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
<<
+$(COMMDIR)/framecmn.obj: $*.$(SRCSUFF)
+ cl @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
+<<
+
$(COMMDIR)/gdicmn.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF) /Fo$@
<<
+$(COMMDIR)/wincmn.obj: $*.$(SRCSUFF)
+ cl @<<
+$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF) /Fo$@
+<<
+
$(COMMDIR)/y_tab.obj: $*.c $(COMMDIR)/lex_yy.c
cl @<<
$(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@
SetBackgroundColour(GetParent()->GetBackgroundColour());
}
-// Do Update UI processing for child controls
-
-// TODO: should this be implemented for the child window rather
-// than the parent? Then you can override it e.g. for wxCheckBox
-// to do the Right Thing rather than having to assume a fixed number
-// of control classes.
-
-void wxWindow::UpdateWindowUI(void)
-{
- wxWindowID id = GetId();
- if (id > 0)
- {
- wxUpdateUIEvent event(id);
- event.m_eventObject = this;
-
- if (this->GetEventHandler()->ProcessEvent(event))
- {
- if (event.GetSetEnabled())
- this->Enable(event.GetEnabled());
-
- if (event.GetSetText() && this->IsKindOf(CLASSINFO(wxControl)))
- ((wxControl*)this)->SetLabel(event.GetText());
-
- if (this->IsKindOf(CLASSINFO(wxCheckBox)))
- {
- if (event.GetSetChecked())
- ((wxCheckBox *) this)->SetValue(event.GetChecked());
- }
- else if (this->IsKindOf(CLASSINFO(wxRadioButton)))
- {
- if (event.GetSetChecked())
- ((wxRadioButton *) this)->SetValue(event.GetChecked());
- }
- }
- }
-
-}
-
void wxWindow::OnIdle(wxIdleEvent& event)
{
// Check if we need to send a LEAVE event