]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/framuniv.cpp
fixed windows.h check and added checks for MS HTML Help
[wxWidgets.git] / src / univ / framuniv.cpp
index b55c96ae4970de15af3a892e20355e7e150adba9..951ab8630a62ca1594a385c9836481b3d81426b6 100644 (file)
@@ -5,7 +5,7 @@
 // Modified by:
 // Created:     19.05.01
 // RCS-ID:      $Id$
-// Copyright:   (c) 2001 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
+// Copyright:   (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
@@ -41,11 +41,7 @@ BEGIN_EVENT_TABLE(wxFrame, wxFrameNative)
     EVT_SIZE(wxFrame::OnSize)
 END_EVENT_TABLE()
 
-#if defined(__WXMSW__)
-    IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxFrameMSW)
-#elif defined(__WXGTK__)
-    IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxFrameGTK)
-#endif
+IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow)
 
 // ----------------------------------------------------------------------------
 // ctors
@@ -68,19 +64,22 @@ wxFrame::wxFrame(wxWindow *parent,
 }
 
 // ----------------------------------------------------------------------------
-// geometry
+// menu support
 // ----------------------------------------------------------------------------
 
 void wxFrame::OnSize(wxSizeEvent& event)
 {
+#if wxUSE_MENUS
     PositionMenuBar();
+#endif // wxUSE_MENUS
 
     event.Skip();
 }
 
+#if wxUSE_MENUS
+
 void wxFrame::PositionMenuBar()
 {
-#if wxUSE_MENUS
     if ( m_frameMenuBar )
     {
         // the menubar is positioned above the client size, hence the negative
@@ -88,8 +87,8 @@ void wxFrame::PositionMenuBar()
         m_frameMenuBar->SetSize(0, -m_frameMenuBar->GetSize().y,
                                 GetClientSize().x, -1);
     }
-#endif // wxUSE_MENUS
 }
+#endif // wxUSE_MENUS
 
 wxPoint wxFrame::GetClientAreaOrigin() const
 {
@@ -105,3 +104,13 @@ wxPoint wxFrame::GetClientAreaOrigin() const
     return pt;
 }
 
+bool wxFrame::Enable( bool enable )
+{
+    if (!wxFrameNative::Enable(enable))
+       return FALSE;
+#ifdef __WXMICROWIN__
+    if (m_frameMenuBar)
+        m_frameMenuBar->Enable(enable);
+#endif
+    return TRUE;
+}