]> git.saurik.com Git - wxWidgets.git/commitdiff
Initial wxSystemSettings::GetColour() for PalmOS.
authorWłodzimierz Skiba <abx@abx.art.pl>
Tue, 4 Jan 2005 19:19:39 +0000 (19:19 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Tue, 4 Jan 2005 19:19:39 +0000 (19:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31233 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
src/palmos/settings.cpp

index c3548b2c4bc78019803793b629e026b2a3a935f5..6e7c4d329283d04774606ba06a5cc7ae3084b4bc 100644 (file)
@@ -20,7 +20,7 @@ All:
 - added versions of MB2WC and WC2MB for wxMBConv that for embedded null chars
 - Unicode support in wxODBC is now fully implemented
 - A new data type specific to wxWidgets called SQL_C_WXCHAR has been introduced.
-  SQL_C_WXCHAR should be used rather than SQL_C_CHAR to ensure transparent 
+  SQL_C_WXCHAR should be used rather than SQL_C_CHAR to ensure transparent
   behavior between Unicode and non-unicode builds
 - BLOB example added to samples/db (thanks to Casey ODonnell)
 - use wxStream::GetLength() instead of deprecated GetSize()
@@ -102,6 +102,7 @@ wxPalmOS:
 - enumeration of available volumes
 - native wxPrefConfig around Preferences database
 - native wxProgressDialog implementation
+- native wxSystemSettings colours
 
 
 2.5.3
@@ -167,16 +168,16 @@ Unix:
 wxCocoa:
 
 - added Unicode compatibility layer for OSX 10.2
-- fixed so that wxCocoa runs in OSX 10.2 
+- fixed so that wxCocoa runs in OSX 10.2
 - Tooltips now supported
 - wxSound now supported
-- wxDisplay now supported 
-- Some stock cursors now supported 
+- wxDisplay now supported
+- Some stock cursors now supported
 
 wxMac:
 
-- fixed MLTE text control GetLineText and GetLineLength on OSX 
-- added OSX wxTaskBarIcon implementation for the OSX Dock 
+- fixed MLTE text control GetLineText and GetLineLength on OSX
+- added OSX wxTaskBarIcon implementation for the OSX Dock
 - added Unicode compatibility layer for OSX 10.2
 - wxGetKeyState now works with nearly all wx key codes
 
index 67270661ec40fbf0e9e983932f29cabde47b6b15..f4be898d01804499d07822911888ceb084d355d3 100644 (file)
 #endif
 
 #include "wx/settings.h"
-
-#ifndef SPI_GETFLATMENU
-#define SPI_GETFLATMENU                     0x1022
-#endif
-
 #include "wx/module.h"
 #include "wx/fontutil.h"
 
-// ----------------------------------------------------------------------------
-// private classes
-// ----------------------------------------------------------------------------
-
-// ----------------------------------------------------------------------------
-// global data
-// ----------------------------------------------------------------------------
-
-// the font returned by GetFont(wxSYS_DEFAULT_GUI_FONT): it is created when
-// GetFont() is called for the first time and deleted by wxSystemSettingsModule
-static wxFont *gs_fontDefault = NULL;
-
 // ============================================================================
 // implementation
 // ============================================================================
@@ -64,7 +47,59 @@ static wxFont *gs_fontDefault = NULL;
 
 wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
 {
-    return wxNullColour;
+    // point to unused entry to mark lack of assignment
+    UIColorTableEntries which = UILastColorTableEntry;
+
+    switch( index )
+    {
+        case wxSYS_COLOUR_BACKGROUND:
+        case wxSYS_COLOUR_WINDOW:
+            which = UIFormFill;
+            break;
+        case wxSYS_COLOUR_WINDOWFRAME:
+        case wxSYS_COLOUR_ACTIVECAPTION:
+            which = UIFormFrame;
+            break;
+        case wxSYS_COLOUR_SCROLLBAR:
+            which = UIObjectFill;
+            break;
+/*
+        case wxSYS_COLOUR_INACTIVECAPTION:
+        case wxSYS_COLOUR_MENU:
+        case wxSYS_COLOUR_MENUTEXT:
+        case wxSYS_COLOUR_WINDOWTEXT:
+        case wxSYS_COLOUR_CAPTIONTEXT:
+        case wxSYS_COLOUR_ACTIVEBORDER:
+        case wxSYS_COLOUR_INACTIVEBORDER:
+        case wxSYS_COLOUR_APPWORKSPACE:
+        case wxSYS_COLOUR_HIGHLIGHT:
+        case wxSYS_COLOUR_HIGHLIGHTTEXT:
+        case wxSYS_COLOUR_BTNFACE:
+        case wxSYS_COLOUR_BTNSHADOW:
+        case wxSYS_COLOUR_GRAYTEXT:
+        case wxSYS_COLOUR_BTNTEXT:
+        case wxSYS_COLOUR_INACTIVECAPTIONTEXT:
+        case wxSYS_COLOUR_BTNHIGHLIGHT:
+        case wxSYS_COLOUR_3DDKSHADOW:
+        case wxSYS_COLOUR_3DLIGHT:
+        case wxSYS_COLOUR_INFOTEXT:
+        case wxSYS_COLOUR_INFOBK:
+        case wxSYS_COLOUR_LISTBOX:
+        case wxSYS_COLOUR_HOTLIGHT:
+        case wxSYS_COLOUR_GRADIENTACTIVECAPTION:
+        case wxSYS_COLOUR_GRADIENTINACTIVECAPTION:
+        case wxSYS_COLOUR_MENUHILIGHT:
+        case wxSYS_COLOUR_MENUBAR:
+*/
+    }
+    if ( which == UILastColorTableEntry )
+        return wxNullColour;
+
+    RGBColorType rgbP;
+
+    UIColorGetTableEntryRGB (which,&rgbP);
+
+    return wxColour(rgbP.r,rgbP.g,rgbP.b);
 }
 
 // ----------------------------------------------------------------------------
@@ -90,24 +125,10 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
 // Get a system metric, e.g. scrollbar size
 int wxSystemSettingsNative::GetMetric(wxSystemMetric index)
 {
-    return 0;
+    return -1;
 }
 
 bool wxSystemSettingsNative::HasFeature(wxSystemFeature index)
 {
     return false;
 }
-
-// ----------------------------------------------------------------------------
-// function from wx/msw/wrapcctl.h: there is really no other place for it...
-// ----------------------------------------------------------------------------
-
-#if wxUSE_LISTCTRL || wxUSE_TREECTRL
-
-extern wxFont wxGetCCDefaultFont()
-{
-    wxFont font;
-    return font;
-}
-
-#endif // wxUSE_LISTCTRL || wxUSE_TREECTRL