A few OS/2 additions to enable the colour database to work with PM.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster 2000-11-27 04:18:36 +00:00
parent 26ac77dbe2
commit 19bf0c6900
2 changed files with 17 additions and 0 deletions

View File

@ -383,6 +383,11 @@ public:
wxColour *FindColour(const wxString& colour) ; wxColour *FindColour(const wxString& colour) ;
wxString FindName(const wxColour& colour) const; wxString FindName(const wxColour& colour) const;
void Initialize(); 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 class WXDLLEXPORT wxBitmapList : public wxList

View File

@ -136,6 +136,9 @@ wxColourDatabase::~wxColourDatabase ()
delete col; delete col;
node = next; node = next;
} }
#ifdef __WXPM__
delete [] m_palTable;
#endif
} }
// Colour database stuff // Colour database stuff
@ -230,6 +233,15 @@ void wxColourDatabase::Initialize ()
const wxColourDesc& cc = wxColourTable[n]; const wxColourDesc& cc = wxColourTable[n];
Append(cc.name, new wxColour(cc.r,cc.g,cc.b)); 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
} }
/* /*