ReactOS 0.4.17-dev-243-g1369312
palettemodel.h
Go to the documentation of this file.
1/*
2 * PROJECT: PAINT for ReactOS
3 * LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later)
4 * PURPOSE: Keep track of palette data, notify listeners
5 * COPYRIGHT: Copyright 2015 Benedikt Freisen <b.freisen@gmx.net>
6 */
7
8#pragma once
9
10#define NUM_COLORS 28
11
13{
18};
19
20/* CLASSES **********************************************************/
21
23{
24private:
29
30 void NotifyColorChanged();
32 static HBRUSH CreateDitherBrush(COLORREF color, COLORREF monoColor0, COLORREF monoColor1);
33
34public:
37 void SelectPalette(PAL_TYPE nPalette);
38 COLORREF GetColor(UINT nIndex) const;
39 void SetColor(UINT nIndex, COLORREF newColor);
40 COLORREF GetFgColor() const;
41 void SetFgColor(COLORREF newColor);
42 COLORREF GetBgColor() const;
43 void SetBgColor(COLORREF newColor);
47};
PAL_TYPE SelectedPalette()
COLORREF GetBgColor() const
void SetFgColor(COLORREF newColor)
HBRUSH CreateBgBrush()
Definition: palettemodel.h:46
HBRUSH CreateFgBrush()
Definition: palettemodel.h:45
void SetBgColor(COLORREF newColor)
void SelectPalette(PAL_TYPE nPalette)
void NotifyPaletteChanged()
void SetColor(UINT nIndex, COLORREF newColor)
COLORREF GetFgColor() const
HBRUSH CreateColorBrush(COLORREF color)
PAL_TYPE m_nSelectedPalette
Definition: palettemodel.h:26
static HBRUSH CreateDitherBrush(COLORREF color, COLORREF monoColor0, COLORREF monoColor1)
COLORREF GetColor(UINT nIndex) const
COLORREF m_fgColor
Definition: palettemodel.h:27
COLORREF m_colors[NUM_COLORS]
Definition: palettemodel.h:25
COLORREF m_bgColor
Definition: palettemodel.h:28
void NotifyColorChanged()
GLuint color
Definition: glext.h:6243
unsigned int UINT
Definition: ndis.h:50
PAL_TYPE
Definition: palettemodel.h:13
@ PAL_MONOCHROME
Definition: palettemodel.h:17
@ PAL_GRAYSCALE
Definition: palettemodel.h:16
@ PAL_MODERN
Definition: palettemodel.h:14
@ PAL_OLDTYPE
Definition: palettemodel.h:15
#define NUM_COLORS
Definition: palettemodel.h:10
DWORD COLORREF
Definition: windef.h:100