]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/colschem.cpp
bring the parent of a wxFRAME_FLOAT_ON_PARENT frame to the top when deleting it as...
[wxWidgets.git] / src / univ / colschem.cpp
index 7fadd934c93a60508a31fa392b1e2fb588fd51e2..3339b53c2114aa98a7898e5d0d6677a0865b3925 100644 (file)
@@ -5,7 +5,7 @@
 // Modified by:
 // Created:     20.08.00
 // RCS-ID:      $Id$
-// Copyright:   (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
+// Copyright:   (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
 // Licence:     wxWindows license
 ///////////////////////////////////////////////////////////////////////////////
 
 #ifndef WX_PRECOMP
 #endif // WX_PRECOMP
 
+#include "wx/settings.h"
+
 #include "wx/univ/colschem.h"
+#include "wx/univ/theme.h"
 
 // ============================================================================
 // implementation
 // ============================================================================
 
+// ----------------------------------------------------------------------------
+// wxColourScheme
+// ----------------------------------------------------------------------------
+
 wxColourScheme::~wxColourScheme()
 {
 }
+
+// ----------------------------------------------------------------------------
+// wxSystemSettings
+// ----------------------------------------------------------------------------
+
+wxColour wxSystemSettings::GetColour(wxSystemColour index)
+{
+    // the elements of this enum must be kept in sync with wxSystemColour
+    static const wxColourScheme::StdColour s_mapSysToThemeCol[] =
+    {
+        wxColourScheme::SCROLLBAR /* wxSYS_COLOUR_SCROLLBAR */,
+        wxColourScheme::WINDOW /* wxSYS_COLOUR_BACKGROUND */,
+        wxColourScheme::TITLEBAR_ACTIVE_TEXT /* wxSYS_COLOUR_ACTIVECAPTION */,
+        wxColourScheme::TITLEBAR_TEXT /* wxSYS_COLOUR_INACTIVECAPTION */,
+        wxColourScheme::MAX /* wxSYS_COLOUR_MENU */,
+        wxColourScheme::MAX /* wxSYS_COLOUR_WINDOW */,
+        wxColourScheme::MAX /* wxSYS_COLOUR_WINDOWFRAME */,
+        wxColourScheme::CONTROL_TEXT /* wxSYS_COLOUR_MENUTEXT */,
+        wxColourScheme::CONTROL_TEXT /* wxSYS_COLOUR_WINDOWTEXT */,
+        wxColourScheme::CONTROL_TEXT /* wxSYS_COLOUR_CAPTIONTEXT */,
+        wxColourScheme::MAX /* wxSYS_COLOUR_ACTIVEBORDER */,
+        wxColourScheme::MAX /* wxSYS_COLOUR_INACTIVEBORDER */,
+        wxColourScheme::MAX /* wxSYS_COLOUR_APPWORKSPACE */,
+        wxColourScheme::HIGHLIGHT /* wxSYS_COLOUR_HIGHLIGHT */,
+        wxColourScheme::HIGHLIGHT_TEXT /* wxSYS_COLOUR_HIGHLIGHTTEXT */,
+        wxColourScheme::CONTROL /* wxSYS_COLOUR_BTNFACE */,
+        wxColourScheme::SHADOW_DARK /* wxSYS_COLOUR_BTNSHADOW */,
+        wxColourScheme::CONTROL_TEXT_DISABLED /* wxSYS_COLOUR_GRAYTEXT */,
+        wxColourScheme::CONTROL_TEXT /* wxSYS_COLOUR_BTNTEXT */,
+        wxColourScheme::MAX /* wxSYS_COLOUR_INACTIVECAPTIONTEXT */,
+        wxColourScheme::SHADOW_HIGHLIGHT /* wxSYS_COLOUR_BTNHIGHLIGHT */,
+        wxColourScheme::SHADOW_DARK /* wxSYS_COLOUR_3DDKSHADOW */,
+        wxColourScheme::SHADOW_OUT /* wxSYS_COLOUR_3DLIGHT */,
+        wxColourScheme::MAX /* wxSYS_COLOUR_INFOTEXT */,
+        wxColourScheme::MAX /* wxSYS_COLOUR_INFOBK */,
+        wxColourScheme::WINDOW /* wxSYS_COLOUR_LISTBOX */,
+    };
+
+    wxCHECK_MSG( index < (int)WXSIZEOF(s_mapSysToThemeCol), wxNullColour,
+                 _T("invalid wxSystemColour") );
+
+    wxColourScheme::StdColour col = s_mapSysToThemeCol[index];
+    if ( col == wxColourScheme::MAX )
+    {
+        // we don't have theme-equivalent for this colour
+        return wxSystemSettingsNative::GetColour(index);
+    }
+
+    return wxTheme::Get()->GetColourScheme()->Get(col);
+}
+