return FALSE;
}
+// Is the frame maximized?
+bool wxFrame::IsMaximized(void) const
+{
+ // TODO
+ return FALSE;
+}
+
void wxFrame::SetTitle(const wxString& title)
{
// TODO
// Set the height according to the font and the border size
wxClientDC dc(statusBar);
- dc.SetFont(* statusBar->GetFont());
+ dc.SetFont(statusBar->GetFont());
long x, y;
dc.GetTextExtent("X", &x, &y);
void wxFrame::Fit()
{
// Work out max. size
- wxNode *node = GetChildren()->First();
+ wxNode *node = GetChildren().First();
int max_width = 0;
int max_height = 0;
while (node)
// do we have _exactly_ one child?
wxWindow *child = NULL;
- for ( wxNode *node = GetChildren()->First(); node; node = node->Next() )
+ for ( wxNode *node = GetChildren().First(); node; node = node->Next() )
{
wxWindow *win = (wxWindow *)node->Data();
if ( !win->IsKindOf(CLASSINFO(wxFrame)) &&
// subwindow found.
void wxFrame::OnActivate(wxActivateEvent& event)
{
- for(wxNode *node = GetChildren()->First(); node; node = node->Next())
+ 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();
}
}
-// The default implementation for the close window event - calls
-// OnClose for backward compatibility.
+// The default implementation for the close window event.
void wxFrame::OnCloseWindow(wxCloseEvent& event)
{
- // Compatibility
- if ( GetEventHandler()->OnClose() || event.GetForce())
- {
- this->Destroy();
- }
-}
-
-bool wxFrame::OnClose()
-{
- return TRUE;
+ this->Destroy();
}
// Destroy the window (delayed, if a managed window)
}
*/
- GetEventHandler()->ProcessEvent(commandEvent);
+ wxEvtHandler* evtHandler = GetEventHandler();
+ evtHandler->ProcessEvent(commandEvent);
}
// Checks if there is a toolbar, and returns the first free client position