]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/topluniv.cpp
update copyright year to 2009 (closes #10319)
[wxWidgets.git] / src / univ / topluniv.cpp
index fa5ecced1126bc772c32d3a6946dbb0ab28816e1..a93554e73d963905e3795cada4eda7f101fffd93 100644 (file)
@@ -155,7 +155,8 @@ bool wxTopLevelWindow::ShowFullScreen(bool show, long style)
     return wxTopLevelWindowNative::ShowFullScreen(show, style);
 }
 
     return wxTopLevelWindowNative::ShowFullScreen(show, style);
 }
 
-/* static */ wxTopLevelWindow::UseNativeDecorationsByDefault(bool native)
+/* static */
+void wxTopLevelWindow::UseNativeDecorationsByDefault(bool native)
 {
     ms_drawDecorations = !native;
 }
 {
     ms_drawDecorations = !native;
 }
@@ -183,7 +184,9 @@ long wxTopLevelWindow::GetDecorationsStyle() const
             ms_canIconize = wxSystemSettings::HasFeature(wxSYS_CAN_ICONIZE_FRAME);
         }
 
             ms_canIconize = wxSystemSettings::HasFeature(wxSYS_CAN_ICONIZE_FRAME);
         }
 
-        style |= wxTOPLEVEL_TITLEBAR | wxTOPLEVEL_BUTTON_CLOSE;
+        style |= wxTOPLEVEL_TITLEBAR;
+        if ( m_windowStyle & wxCLOSE_BOX )
+            style |= wxTOPLEVEL_BUTTON_CLOSE;
         if ( (m_windowStyle & wxMINIMIZE_BOX) && ms_canIconize )
             style |= wxTOPLEVEL_BUTTON_ICONIZE;
         if ( m_windowStyle & wxMAXIMIZE_BOX )
         if ( (m_windowStyle & wxMINIMIZE_BOX) && ms_canIconize )
             style |= wxTOPLEVEL_BUTTON_ICONIZE;
         if ( m_windowStyle & wxMAXIMIZE_BOX )
@@ -302,26 +305,15 @@ long wxTopLevelWindow::HitTest(const wxPoint& pt) const
     return m_renderer->HitTestFrame(rect, pt+GetClientAreaOrigin(), GetDecorationsStyle());
 }
 
     return m_renderer->HitTestFrame(rect, pt+GetClientAreaOrigin(), GetDecorationsStyle());
 }
 
-int wxTopLevelWindow::GetMinWidth() const
+wxSize wxTopLevelWindow::GetMinSize() const
 {
 {
+    wxSize size = wxTopLevelWindowNative::GetMinSize();
     if ( !m_usingNativeDecorations )
     {
     if ( !m_usingNativeDecorations )
     {
-        return wxMax(wxTopLevelWindowNative::GetMinWidth(),
-                     m_renderer->GetFrameMinSize(GetDecorationsStyle()).x);
+        size.IncTo(m_renderer->GetFrameMinSize(GetDecorationsStyle()));
     }
     }
-    else
-        return wxTopLevelWindowNative::GetMinWidth();
-}
 
 
-int wxTopLevelWindow::GetMinHeight() const
-{
-    if ( !m_usingNativeDecorations )
-    {
-        return wxMax(wxTopLevelWindowNative::GetMinHeight(),
-                     m_renderer->GetFrameMinSize(GetDecorationsStyle()).y);
-    }
-    else
-        return wxTopLevelWindowNative::GetMinHeight();
+    return size;
 }
 
 // ----------------------------------------------------------------------------
 }
 
 // ----------------------------------------------------------------------------