From f8e3449ceb699ff2f2ecc7670e8d68d42acff77a Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 1 Oct 2001 22:11:56 +0000 Subject: [PATCH] added wxSystemSettings::HasFrameDecorations (anybody knows a better name?) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11773 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gtk/settings.h | 3 +++ include/wx/gtk1/settings.h | 3 +++ include/wx/mac/settings.h | 3 +++ include/wx/motif/settings.h | 3 +++ include/wx/msw/settings.h | 3 +++ include/wx/os2/settings.h | 1 + src/univ/topluniv.cpp | 12 ++++++++---- 7 files changed, 24 insertions(+), 4 deletions(-) diff --git a/include/wx/gtk/settings.h b/include/wx/gtk/settings.h index 9e7db68bcd..901678da41 100644 --- a/include/wx/gtk/settings.h +++ b/include/wx/gtk/settings.h @@ -35,6 +35,9 @@ public: // Get a system metric, e.g. scrollbar size static int GetSystemMetric(int index); + + // Return true if the port can draw frame titlebar (i.e. doesn't need wxUniv for it) + static bool HasFrameDecorations() { return TRUE; } }; #endif diff --git a/include/wx/gtk1/settings.h b/include/wx/gtk1/settings.h index 9e7db68bcd..901678da41 100644 --- a/include/wx/gtk1/settings.h +++ b/include/wx/gtk1/settings.h @@ -35,6 +35,9 @@ public: // Get a system metric, e.g. scrollbar size static int GetSystemMetric(int index); + + // Return true if the port can draw frame titlebar (i.e. doesn't need wxUniv for it) + static bool HasFrameDecorations() { return TRUE; } }; #endif diff --git a/include/wx/mac/settings.h b/include/wx/mac/settings.h index 8ed994f1ba..d274901abb 100644 --- a/include/wx/mac/settings.h +++ b/include/wx/mac/settings.h @@ -127,6 +127,9 @@ public: // Get a system metric, e.g. scrollbar size static int GetSystemMetric(int index); + + // Return true if the port can draw frame titlebar (i.e. doesn't need wxUniv for it) + static bool HasFrameDecorations() { return TRUE; } }; #endif diff --git a/include/wx/motif/settings.h b/include/wx/motif/settings.h index 92a61461af..2dd0d45953 100644 --- a/include/wx/motif/settings.h +++ b/include/wx/motif/settings.h @@ -36,6 +36,9 @@ public: // Get a system metric, e.g. scrollbar size static int GetSystemMetric(int index); + + // Return true if the port can draw frame titlebar (i.e. doesn't need wxUniv for it) + static bool HasFrameDecorations() { return TRUE; } }; #endif diff --git a/include/wx/msw/settings.h b/include/wx/msw/settings.h index 6402bc29e5..4c7c1c3561 100644 --- a/include/wx/msw/settings.h +++ b/include/wx/msw/settings.h @@ -33,6 +33,9 @@ public: // Get a system metric, e.g. scrollbar size static int GetSystemMetric(int index); + // Return true if the port can draw frame titlebar (i.e. doesn't need wxUniv for it) + static bool HasFrameDecorations() { return TRUE; } + }; #endif diff --git a/include/wx/os2/settings.h b/include/wx/os2/settings.h index 03b343faad..d3f75e0404 100644 --- a/include/wx/os2/settings.h +++ b/include/wx/os2/settings.h @@ -24,6 +24,7 @@ public: static wxColour GetSystemColour(int index); static wxFont GetSystemFont(int index); static int GetSystemMetric(int index); + static bool HasFrameDecorations() { return TRUE; } }; // end of CLASS wxSystemSettings #endif diff --git a/src/univ/topluniv.cpp b/src/univ/topluniv.cpp index 959e5f278a..aa67c1fafe 100644 --- a/src/univ/topluniv.cpp +++ b/src/univ/topluniv.cpp @@ -26,9 +26,14 @@ #endif #include "wx/defs.h" + +#ifndef WX_PRECOMP + #include "wx/dcclient.h" + #include "wx/settings.h" +#endif + #include "wx/toplevel.h" #include "wx/univ/renderer.h" -#include "wx/dcclient.h" #include "wx/bitmap.h" #include "wx/image.h" #include "wx/cshelp.h" @@ -71,9 +76,8 @@ bool wxTopLevelWindow::Create(wxWindow *parent, exstyleOrig = 0; if ( ms_drawDecorations == -1 ) - ms_drawDecorations = TRUE; - // FIXME_MGL -- this is temporary; we assume for now that native TLW - // can't do decorations, which is not true + ms_drawDecorations = !wxSystemSettings::HasFrameDecorations(); + // FIXME -- wxUniv should provide a way to force non-native decorations! if ( ms_drawDecorations ) { -- 2.45.2