wxFrame::wxFrame()
{
+#if wxUSE_TOOLBAR
m_frameToolBar = NULL ;
+#endif // wxUSE_TOOLBAR
+
m_frameMenuBar = NULL;
m_frameStatusBar = NULL;
m_windowStyle = style;
m_frameMenuBar = NULL;
+#if wxUSE_TOOLBAR
m_frameToolBar = NULL ;
+#endif // wxUSE_TOOLBAR
m_frameStatusBar = NULL;
//// Motif-specific
m_frameStatusBar->GetSize(& sbw, & sbh);
yy -= sbh;
}
+#if wxUSE_TOOLBAR
if (m_frameToolBar)
{
int tbw, tbh;
else
yy -= tbh;
}
+#endif // wxUSE_TOOLBAR
/*
if (GetMenuBar() != (wxMenuBar*) NULL)
{
m_frameStatusBar->GetSize(& sbw, & sbh);
height += sbh;
}
+#if wxUSE_TOOLBAR
if (m_frameToolBar)
{
int tbw, tbh;
else
height += tbh;
}
+#endif // wxUSE_TOOLBAR
XtVaSetValues((Widget) m_workArea, XmNheight, height, NULL);
}
wxWindow *win = (wxWindow *)node->Data();
if ( !win->IsKindOf(CLASSINFO(wxFrame)) &&
!win->IsKindOf(CLASSINFO(wxDialog)) &&
- (win != GetStatusBar()) &&
- (win != GetToolBar()) )
+ (win != GetStatusBar())
+#if wxUSE_TOOLBAR
+ && (win != GetToolBar())
+#endif // wxUSE_TOOLBAR
+ )
{
if ( child )
return; // it's our second subwindow - nothing to do
wxPoint wxFrame::GetClientAreaOrigin() const
{
wxPoint pt(0, 0);
+#if wxUSE_TOOLBAR
if (GetToolBar())
{
int w, h;
pt.y += h;
}
}
+#endif // wxUSE_TOOLBAR
+
return pt;
}
wxWindow::ClientToScreen(x, y);
}
+#if wxUSE_TOOLBAR
wxToolBar* wxFrame::CreateToolBar(long style, wxWindowID id, const wxString& name)
{
wxCHECK_MSG( m_frameToolBar == NULL, FALSE,
return new wxToolBar(this, id, wxPoint(0, 0), wxSize(100, 24), style, name);
}
+void wxFrame::SetToolBar(wxToolBar *toolbar)
+{
+ m_frameToolBar = toolbar;
+}
+
+wxToolBar *wxFrame::GetToolBar() const
+{
+ return m_frameToolBar;
+}
+
void wxFrame::PositionToolBar()
{
int cw, ch;
}
}
}
+#endif // wxUSE_TOOLBAR
void wxFrame::CaptureMouse()
{
XLowerWindow(XtDisplay((Widget) m_frameShell), parent_window);
}
-void wxFrame::SetToolBar(wxToolBar *toolbar)
-{ m_frameToolBar = toolbar; }
-
-wxToolBar *wxFrame::GetToolBar() const
-{ return m_frameToolBar; }
-
void wxFrameFocusProc(Widget workArea, XtPointer clientData,
XmAnyCallbackStruct *cbs)
{
//// Motif-specific
bool wxFrame::PreResize()
{
+#if wxUSE_TOOLBAR
PositionToolBar();
+#endif // wxUSE_TOOLBAR
PositionStatusBar();
return TRUE;
}