- void SetPalette(wxPalette &pal) {
- m_custompalette=true;
- m_palette=pal;
- wxWindowDC d((wxWindow *) this);
- d.SetPalette(pal);
- }
- bool HasCustomPalette() { return m_custompalette; }
+ void SetPalette(const wxPalette& pal);
+
+ // return true if we have a specific palette
+ bool HasCustomPalette() const { return m_hasCustomPalette; }
+
+ // return the first parent window with a custom palette or NULL
+ wxWindow *GetAncestorWithCustomPalette() const;