summaryrefslogtreecommitdiff
path: root/include/svx/PaletteManager.hxx
diff options
context:
space:
mode:
authorKrisztian Pinter <pin.terminator@gmail.com>2014-08-11 17:35:50 +0200
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2014-09-17 10:19:55 +0200
commit93c4e3c9349a1ea07b822a2824559ad28f4a9a5e (patch)
treeb92faf4285f5bb1677fe1f89d19f691889d56cfd /include/svx/PaletteManager.hxx
parent43b896d20abf500a882fc67f16cd0902918e5794 (diff)
Add recent colors
Change-Id: Id6b2239149bf7d0b3c9242efb7a72091e32c3384
Diffstat (limited to 'include/svx/PaletteManager.hxx')
-rw-r--r--include/svx/PaletteManager.hxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/include/svx/PaletteManager.hxx b/include/svx/PaletteManager.hxx
index e4144f96ca9c..cb70d2c4917d 100644
--- a/include/svx/PaletteManager.hxx
+++ b/include/svx/PaletteManager.hxx
@@ -23,6 +23,7 @@
#include <svx/Palette.hxx>
#include <rtl/ustring.hxx>
#include <svx/tbxcolorupdate.hxx>
+#include <deque>
#include <tools/urlobj.hxx>
#include <comphelper/processfactory.hxx>
@@ -36,27 +37,35 @@
class PaletteManager
{
- sal_uInt16 mnNumOfPalettes;
- sal_uInt16 mnCurrentPalette;
+ const sal_uInt16 mnMaxRecentColors;
- long mnColorCount;
+ sal_uInt16 mnNumOfPalettes;
+ sal_uInt16 mnCurrentPalette;
+
+ long mnColorCount;
svx::ToolboxButtonColorUpdater* mpBtnUpdater;
- Color mLastColor;
+ Color mLastColor;
+ std::deque<Color> maRecentColors;
boost::ptr_vector<Palette> maPalettes;
public:
PaletteManager();
~PaletteManager();
void LoadPalettes();
void ReloadColorSet(SvxColorValueSet& rColorSet);
+ void ReloadRecentColorSet(SvxColorValueSet& rColorSet);
std::vector<OUString> GetPaletteList();
void SetPalette( sal_Int32 nPos );
sal_Int32 GetPalette();
long GetColorCount();
+ long GetRecentColorCount();
OUString GetPaletteName();
+
const Color& GetLastColor();
void SetLastColor(const Color& rLastColor);
+ void AddRecentColor(const Color& rRecentColor);
+
void SetBtnUpdater(svx::ToolboxButtonColorUpdater* pBtnUpdater);
void PopupColorPicker(const OUString aCommand);
static void DispatchColorCommand(const OUString aCommand, const Color aColor);