]> git.saurik.com Git - wxWidgets.git/blobdiff - src/palmos/settings.cpp
Merge in from trunk r64802 - r68625
[wxWidgets.git] / src / palmos / settings.cpp
index f4be898d01804499d07822911888ceb084d355d3..ecb01c9bd5a3cbf8895275ec3a9d8c8e9656faa5 100644 (file)
@@ -1,11 +1,11 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        palmos/settings.cpp
+// Name:        src/palmos/settings.cpp
 // Purpose:     wxSystemSettingsNative implementation for Palm OS
-// Author:      William Osborne
-// Modified by:
+// Author:      William Osborne - minimal working wxPalmOS port
+// Modified by: Wlodzimierz ABX Skiba - native implementation
 // Created:     10/13/04
-// RCS-ID:      $Id:
-// Copyright:   (c) William Osborne
+// RCS-ID:      $Id$
+// Copyright:   (c) William Osborne, Wlodzimierz Skiba
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
     #pragma hdrstop
 #endif
 
+#include "wx/settings.h"
+
 #ifndef WX_PRECOMP
     #include "wx/utils.h"
     #include "wx/gdicmn.h"
+    #include "wx/module.h"
 #endif
 
-#include "wx/settings.h"
-#include "wx/module.h"
 #include "wx/fontutil.h"
 
+#include <UIColor.h>
+
 // ============================================================================
 // implementation
 // ============================================================================
@@ -73,6 +76,7 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
         case wxSYS_COLOUR_INACTIVEBORDER:
         case wxSYS_COLOUR_APPWORKSPACE:
         case wxSYS_COLOUR_HIGHLIGHT:
+        case wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT:
         case wxSYS_COLOUR_HIGHLIGHTTEXT:
         case wxSYS_COLOUR_BTNFACE:
         case wxSYS_COLOUR_BTNSHADOW:
@@ -123,9 +127,25 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
 // ----------------------------------------------------------------------------
 
 // Get a system metric, e.g. scrollbar size
-int wxSystemSettingsNative::GetMetric(wxSystemMetric index)
+int wxSystemSettingsNative::GetMetric(wxSystemMetric index, wxWindow* WXUNUSED(win))
 {
-    return -1;
+    int metric = -1;
+    uint32_t attrP;
+
+    switch( index )
+    {
+        case wxSYS_SCREEN_X:
+            WinScreenGetAttribute(winScreenWidth, &attrP);
+            metric = attrP;
+            break;
+
+        case wxSYS_SCREEN_Y:
+            WinScreenGetAttribute(winScreenHeight, &attrP);
+            metric = attrP;
+            break;
+    }
+
+    return metric;
 }
 
 bool wxSystemSettingsNative::HasFeature(wxSystemFeature index)