1 /////////////////////////////////////////////////////////////////////////////// 2 // Name: Palettes3D.h 3 // Purpose: The class to create and store palette with 3 colours per entry 4 // Author: Alex Thuering 5 // Created: 05.11.2006 6 // RCS-ID: $Id: Palette3D.h,v 1.3 2011/07/16 18:56:33 ntalex Exp $ 7 // Copyright: (c) Alex Thuering 8 // Licence: GPL 9 /////////////////////////////////////////////////////////////////////////////// 10 11 #ifndef PALETTE_3D_H 12 #define PALETTE_3D_H 13 14 #include "MenuObject.h" 15 #include <wx/dynarray.h> 16 #include <wx/colour.h> 17 18 class Palette3D { 19 private: 20 wxArrayInt m_colours1; // normal colour 21 wxArrayInt m_colours2; // highlighted colour 22 wxArrayInt m_colours3; // selected colour 23 24 public: Palette3D()25 Palette3D() {} ~Palette3D()26 virtual ~Palette3D() {} 27 28 void Add(const wxColour& colour1, const wxColour& colour2, const wxColour& colour3); 29 30 /** 31 * Searches for matched colours in palette and replace given with them. 32 * Returns true if colour was changed. 33 **/ 34 bool Apply(MenuObjectParam* param, bool drawButtonsOnBackground); 35 36 /** Reduces the number of colours in palette to given value. */ 37 void ReduceColours(int maxColours); 38 39 /** Returns the number of colours in palette */ GetColoursCount()40 inline int GetColoursCount() { return m_colours1.GetCount(); } 41 }; 42 43 #endif // PALETTE_3D_H 44