ReactOS  0.4.15-dev-3712-gf1ad684
palettemodel.h
Go to the documentation of this file.
1 /*
2  * PROJECT: PAINT for ReactOS
3  * LICENSE: LGPL
4  * FILE: base/applications/mspaint/palettemodel.h
5  * PURPOSE: Keep track of palette data, notify listeners
6  * PROGRAMMERS: Benedikt Freisen
7  */
8 
9 #pragma once
10 
11 #define NUM_COLORS 28
12 
14 {
17 };
18 
19 /* CLASSES **********************************************************/
20 
22 {
23 private:
28 
29  void NotifyColorChanged();
30  void NotifyPaletteChanged();
31 
32 public:
33  PaletteModel();
35  void SelectPalette(PAL_TYPE nPalette);
36  COLORREF GetColor(UINT nIndex) const;
37  void SetColor(UINT nIndex, COLORREF newColor);
38  COLORREF GetFgColor() const;
39  void SetFgColor(COLORREF newColor);
40  COLORREF GetBgColor() const;
41  void SetBgColor(COLORREF newColor);
42 };
PAL_TYPE m_nSelectedPalette
Definition: palettemodel.h:25
void SelectPalette(PAL_TYPE nPalette)
void SetFgColor(COLORREF newColor)
void NotifyPaletteChanged()
COLORREF m_bgColor
Definition: palettemodel.h:27
COLORREF m_fgColor
Definition: palettemodel.h:26
#define NUM_COLORS
Definition: palettemodel.h:11
COLORREF m_colors[NUM_COLORS]
Definition: palettemodel.h:24
COLORREF GetBgColor() const
COLORREF GetFgColor() const
void SetBgColor(COLORREF newColor)
void SetColor(UINT nIndex, COLORREF newColor)
COLORREF GetColor(UINT nIndex) const
void NotifyColorChanged()
DWORD COLORREF
Definition: windef.h:300
PAL_TYPE
Definition: palettemodel.h:13
unsigned int UINT
Definition: ndis.h:50
PAL_TYPE SelectedPalette()