]>
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 #if defined(__WXMSW__)
45 IMPLEMENT_DYNAMIC_CLASS(wxFrame
, wxFrameMSW
)
46 #elif defined(__WXGTK__)
47 IMPLEMENT_DYNAMIC_CLASS(wxFrame
, wxFrameGTK
)
50 // ----------------------------------------------------------------------------
52 // ----------------------------------------------------------------------------
58 wxFrame::wxFrame(wxWindow
*parent
,
60 const wxString
& title
,
65 : wxFrameNative(parent
, id
, title
, pos
, size
, style
, name
)
70 // ----------------------------------------------------------------------------
72 // ----------------------------------------------------------------------------
74 void wxFrame::OnSize(wxSizeEvent
& event
)
85 void wxFrame::PositionMenuBar()
89 // the menubar is positioned above the client size, hence the negative
91 m_frameMenuBar
->SetSize(0, -m_frameMenuBar
->GetSize().y
,
92 GetClientSize().x
, -1);
97 wxPoint
wxFrame::GetClientAreaOrigin() const
99 wxPoint pt
= wxFrameNative::GetClientAreaOrigin();
102 if ( m_frameMenuBar
)
104 pt
.y
+= m_frameMenuBar
->GetSize().y
;
106 #endif // wxUSE_MENUS
111 bool wxFrame::Enable( bool enable
)
113 if (!wxFrameNative::Enable(enable
))
115 #ifdef __WXMICROWIN__
117 m_frameMenuBar
->Enable(enable
);