]> git.saurik.com Git - wxWidgets.git/commitdiff
A few OS/2 additions to enable the colour database to work with PM.
authorDavid Webster <Dave.Webster@bhmi.com>
Mon, 27 Nov 2000 04:18:36 +0000 (04:18 +0000)
committerDavid Webster <Dave.Webster@bhmi.com>
Mon, 27 Nov 2000 04:18:36 +0000 (04:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gdicmn.h
src/common/gdicmn.cpp

index 06332853389bf06ca7e58826bd979e234b9604e3..7518f8aaf0610548ed6e362407634a43336c41c1 100644 (file)
@@ -383,6 +383,11 @@ public:
     wxColour *FindColour(const wxString& colour) ;
     wxString FindName(const wxColour& colour) const;
     void Initialize();
+#ifdef __WXPM__
+    // PM keeps its own type of colour table
+    long*                           m_palTable;
+    size_t                          m_nSize;
+#endif
 };
 
 class WXDLLEXPORT wxBitmapList : public wxList
index 10efa8c456cc0be38a4d93f0acbda6d0ca25baf4..6e48b25fd3f6c93049d1c0afc6ddfc104e0d6137 100644 (file)
@@ -136,6 +136,9 @@ wxColourDatabase::~wxColourDatabase ()
       delete col;
       node = next;
     }
+#ifdef __WXPM__
+    delete [] m_palTable;
+#endif
 }
 
 // Colour database stuff
@@ -230,6 +233,15 @@ void wxColourDatabase::Initialize ()
         const wxColourDesc& cc = wxColourTable[n];
         Append(cc.name, new wxColour(cc.r,cc.g,cc.b));
     }
+#ifdef __WXPM__
+    m_palTable = new long[n];
+    for ( n = 0; n < WXSIZEOF(wxColourTable); n++ )
+    {
+        const wxColourDesc& cc = wxColourTable[n];
+        m_palTable[n] = OS2RGB(cc.r,cc.g,cc.b);
+    }
+    m_nSize = n;
+#endif
 }
 
 /*