X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1bc822dfb5cdc24fd2d98b59ea20c9951301bfb1..16640ba22621cb6d0ec7053c95357e05fd280d4b:/src/motif/palette.cpp?ds=sidebyside diff --git a/src/motif/palette.cpp b/src/motif/palette.cpp index 8db16a4440..2540f1ecdd 100644 --- a/src/motif/palette.cpp +++ b/src/motif/palette.cpp @@ -20,7 +20,7 @@ /* Wolfram Gloger I have implemented basic colormap support for the X11 versions of -wxWindows, notably wxPalette::Create(). The way I did it is to +wxWidgets, notably wxPalette::Create(). The way I did it is to allocate additional read-only color cells in the default colormap. In general you will get arbitrary pixel values assigned to these new cells and therefore I added a method wxColourMap::TransferBitmap() @@ -34,10 +34,13 @@ recommended; only the window manager should do this... Also, it is not the functionality that wxPalette::Create() aims to provide. */ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "palette.h" #endif +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + #include "wx/palette.h" #include "wx/window.h" #include "wx/app.h" @@ -77,7 +80,7 @@ wxPaletteRefData::~wxPaletteRefData() { Display *display = (Display*) NULL; - wxList::Node *node, *next; + wxList::compatibility_iterator node, next; for (node = m_palettes.GetFirst(); node; node = next) { wxXPalette *c = (wxXPalette *)node->GetData(); @@ -104,7 +107,7 @@ wxPaletteRefData::~wxPaletteRefData() XFreeColormap(display, cmap); next = node->GetNext(); - m_palettes.DeleteNode(node); + m_palettes.Erase(node); delete c; } } @@ -192,7 +195,7 @@ WXColormap wxPalette::GetXColormap(WXDisplay* display) const if (!M_PALETTEDATA || (M_PALETTEDATA->m_palettes.GetCount() == 0)) return wxTheApp->GetMainColormap(display); - wxList::Node* node = M_PALETTEDATA->m_palettes.GetFirst(); + wxList::compatibility_iterator node = M_PALETTEDATA->m_palettes.GetFirst(); if (!display && node) { wxXPalette* p = (wxXPalette*) node->GetData(); @@ -320,7 +323,7 @@ unsigned long *wxPalette::GetXPixArray(WXDisplay *display, int *n) { if (!M_PALETTEDATA) return (unsigned long*) 0; - wxList::Node *node; + wxList::compatibility_iterator node; for (node = M_PALETTEDATA->m_palettes.GetFirst(); node; node = node->GetNext())