1c2c66affSColin Finck /* 2c2c66affSColin Finck * PROJECT: PAINT for ReactOS 38f1f1c7aSStanislav Motylkov * LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later) 4c2c66affSColin Finck * PURPOSE: Keep track of palette data, notify listeners 5*f5200e6cSStanislav Motylkov * COPYRIGHT: Copyright 2015 Benedikt Freisen <b.freisen@gmx.net> 6c2c66affSColin Finck */ 7c2c66affSColin Finck 84db1f987SAmine Khaldi #pragma once 94db1f987SAmine Khaldi 10d30e5eb5SKatayama Hirofumi MZ #define NUM_COLORS 28 11d30e5eb5SKatayama Hirofumi MZ 12d30e5eb5SKatayama Hirofumi MZ enum PAL_TYPE 13d30e5eb5SKatayama Hirofumi MZ { 14d30e5eb5SKatayama Hirofumi MZ PAL_MODERN = 1, 15d30e5eb5SKatayama Hirofumi MZ PAL_OLDTYPE = 2, 16d30e5eb5SKatayama Hirofumi MZ }; 17d30e5eb5SKatayama Hirofumi MZ 18c2c66affSColin Finck /* CLASSES **********************************************************/ 19c2c66affSColin Finck 20c2c66affSColin Finck class PaletteModel 21c2c66affSColin Finck { 22c2c66affSColin Finck private: 23d30e5eb5SKatayama Hirofumi MZ COLORREF m_colors[NUM_COLORS]; 24d30e5eb5SKatayama Hirofumi MZ PAL_TYPE m_nSelectedPalette; 25d30e5eb5SKatayama Hirofumi MZ COLORREF m_fgColor; 26d30e5eb5SKatayama Hirofumi MZ COLORREF m_bgColor; 27c2c66affSColin Finck 28c2c66affSColin Finck void NotifyColorChanged(); 29c2c66affSColin Finck void NotifyPaletteChanged(); 30c2c66affSColin Finck 31c2c66affSColin Finck public: 32c2c66affSColin Finck PaletteModel(); 33d30e5eb5SKatayama Hirofumi MZ PAL_TYPE SelectedPalette(); 34d30e5eb5SKatayama Hirofumi MZ void SelectPalette(PAL_TYPE nPalette); 35d30e5eb5SKatayama Hirofumi MZ COLORREF GetColor(UINT nIndex) const; 36d30e5eb5SKatayama Hirofumi MZ void SetColor(UINT nIndex, COLORREF newColor); 37d30e5eb5SKatayama Hirofumi MZ COLORREF GetFgColor() const; 38d30e5eb5SKatayama Hirofumi MZ void SetFgColor(COLORREF newColor); 39d30e5eb5SKatayama Hirofumi MZ COLORREF GetBgColor() const; 40d30e5eb5SKatayama Hirofumi MZ void SetBgColor(COLORREF newColor); 41c2c66affSColin Finck }; 42