Various bug fixes, cosmetic changes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-07-07 14:57:42 +00:00
parent 876419ce60
commit bb6290e351
19 changed files with 132 additions and 426 deletions

View File

@@ -852,113 +852,6 @@ void wxFrame::OnMenuHighlight(wxMenuEvent& event)
}
}
#if 0
#if WXWIN_COMPATIBILITY
void wxFrame::OldOnSize(int x, int y)
{
#if WXWIN_COMPATIBILITY == 1
wxSizeEvent event(wxSize(x, y), m_windowId);
event.SetEventObject( this );
if (GetEventHandler()->ProcessEvent(event))
return;
#endif
// Search for a child which is a subwindow, not another frame.
wxWindow *child = NULL;
// Count the number of _subwindow_ children
int noChildren = 0;
for(wxNode *node = GetChildren()->First(); node; node = node->Next())
{
wxWindow *win = (wxWindow *)node->Data();
if (!win->IsKindOf(CLASSINFO(wxFrame)) && !win->IsKindOf(CLASSINFO(wxDialog)) && (win != GetStatusBar()))
{
child = win;
noChildren ++;
}
}
// If not one child, call the Layout function if compiled in
if (!child || (noChildren > 1)
#if USE_CONSTRAINTS
|| GetAutoLayout()
#endif
)
{
#if USE_CONSTRAINTS
if (GetAutoLayout())
Layout();
#endif
return;
}
if (child)
{
int client_x, client_y;
#if DEBUG > 1
wxDebugMsg("wxFrame::OnSize: about to set the child's size.\n");
#endif
GetClientSize(&client_x, &client_y);
child->SetSize(0, 0, client_x, client_y);
}
}
// Default activation behaviour - set the focus for the first child
// subwindow found.
void wxFrame::OldOnActivate(bool flag)
{
#if WXWIN_COMPATIBILITY == 1
wxActivateEvent event(wxEVT_ACTIVATE, flag, m_windowId);
event.SetEventObject( this );
if (GetEventHandler()->ProcessEvent(event))
return;
#endif
for(wxNode *node = GetChildren()->First(); node; node = node->Next())
{
// Find a child that's a subwindow, but not a dialog box.
wxWindow *child = (wxWindow *)node->Data();
if (!child->IsKindOf(CLASSINFO(wxFrame)) &&
!child->IsKindOf(CLASSINFO(wxDialog)))
{
#if DEBUG > 1
wxDebugMsg("wxFrame::OnActivate: about to set the child's focus.\n");
#endif
child->SetFocus();
return;
}
}
}
// Default menu selection behaviour - display a help string
void wxFrame::OldOnMenuSelect(int id)
{
#if WXWIN_COMPATIBILITY == 1
wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, id);
event.SetEventObject( this );
if (GetEventHandler()->ProcessEvent(event))
return;
#endif
if (GetStatusBar())
{
if (id == -1)
SetStatusText("");
else
{
wxMenuBar *menuBar = GetMenuBar();
if (menuBar)
{
wxString helpString(menuBar->GetHelpString(id));
if (helpString != "")
SetStatusText(helpString);
}
}
}
}
#endif
#endif
// 0
wxMenuBar *wxFrame::GetMenuBar(void) const
{
return m_frameMenuBar;