]>
git.saurik.com Git - wxWidgets.git/blob - src/univ/framuniv.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: univ/frame.cpp
3 // Purpose: wxFrame class for wxUniversal
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 // ===========================================================================
14 // ===========================================================================
16 // ---------------------------------------------------------------------------
18 // ---------------------------------------------------------------------------
21 #pragma implementation "univframe.h"
24 // For compilers that support precompilation, includes "wx.h".
25 #include "wx/wxprec.h"
36 // ============================================================================
38 // ============================================================================
40 BEGIN_EVENT_TABLE(wxFrame
, wxFrameNative
)
41 EVT_SIZE(wxFrame::OnSize
)
44 IMPLEMENT_DYNAMIC_CLASS(wxFrame
, wxWindow
)
46 // ----------------------------------------------------------------------------
48 // ----------------------------------------------------------------------------
54 wxFrame::wxFrame(wxWindow
*parent
,
56 const wxString
& title
,
61 : wxFrameNative(parent
, id
, title
, pos
, size
, style
, name
)
66 // ----------------------------------------------------------------------------
68 // ----------------------------------------------------------------------------
70 void wxFrame::OnSize(wxSizeEvent
& event
)
81 void wxFrame::PositionMenuBar()
85 // the menubar is positioned above the client size, hence the negative
87 wxCoord heightMbar
= m_frameMenuBar
->GetSize().y
;
88 m_frameMenuBar
->SetSize(0,
90 // FIXME: why doesn't this work as expected in wxGTK??
96 GetClientSize().x
, heightMbar
);
100 #endif // wxUSE_MENUS
102 wxPoint
wxFrame::GetClientAreaOrigin() const
104 wxPoint pt
= wxFrameNative::GetClientAreaOrigin();
107 if ( m_frameMenuBar
)
109 pt
.y
+= m_frameMenuBar
->GetSize().y
;
111 #endif // wxUSE_MENUS
116 bool wxFrame::Enable( bool enable
)
118 if (!wxFrameNative::Enable(enable
))
120 #ifdef __WXMICROWIN__
122 m_frameMenuBar
->Enable(enable
);