2015-07-07 11:15:24 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: PAINT for ReactOS
|
|
|
|
* LICENSE: LGPL
|
2015-09-09 13:13:35 +00:00
|
|
|
* FILE: base/applications/mspaint/palettemodel.h
|
2015-07-07 11:15:24 +00:00
|
|
|
* PURPOSE: Keep track of palette data, notify listeners
|
|
|
|
* PROGRAMMERS: Benedikt Freisen
|
|
|
|
*/
|
|
|
|
|
2017-12-09 12:36:45 +00:00
|
|
|
#pragma once
|
|
|
|
|
2015-07-07 11:15:24 +00:00
|
|
|
/* CLASSES **********************************************************/
|
|
|
|
|
|
|
|
class PaletteModel
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
int m_colors[28];
|
|
|
|
int m_nSelectedPalette;
|
|
|
|
int m_fgColor;
|
|
|
|
int m_bgColor;
|
2015-07-07 11:44:50 +00:00
|
|
|
|
|
|
|
void NotifyColorChanged();
|
|
|
|
void NotifyPaletteChanged();
|
|
|
|
|
2015-07-07 11:15:24 +00:00
|
|
|
public:
|
|
|
|
PaletteModel();
|
|
|
|
int SelectedPalette();
|
|
|
|
void SelectPalette(int nPalette);
|
|
|
|
int GetColor(int nIndex);
|
|
|
|
void SetColor(int nIndex, int newColor);
|
|
|
|
int GetFgColor();
|
|
|
|
void SetFgColor(int newColor);
|
|
|
|
int GetBgColor();
|
|
|
|
void SetBgColor(int newColor);
|
|
|
|
};
|