mirror of
https://github.com/reactos/reactos.git
synced 2024-11-29 06:23:41 +08:00
35 lines
769 B
C++
35 lines
769 B
C++
/*
|
|
* PROJECT: PAINT for ReactOS
|
|
* LICENSE: LGPL
|
|
* FILE: base/applications/mspaint/palettemodel.h
|
|
* PURPOSE: Keep track of palette data, notify listeners
|
|
* PROGRAMMERS: Benedikt Freisen
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
/* CLASSES **********************************************************/
|
|
|
|
class PaletteModel
|
|
{
|
|
private:
|
|
int m_colors[28];
|
|
int m_nSelectedPalette;
|
|
int m_fgColor;
|
|
int m_bgColor;
|
|
|
|
void NotifyColorChanged();
|
|
void NotifyPaletteChanged();
|
|
|
|
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);
|
|
};
|