/* * Copyright 2002-2025, Haiku. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: * DarkWyrm (darkwyrm@earthlink.net) * Rene Gollent (rene@gollent.com) * Stephan Aßmus * Joseph Groover */ #ifndef COLORS_VIEW_H_ #define COLORS_VIEW_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include class ColorsView : public BView { public: ColorsView(const char *name); virtual ~ColorsView(); virtual void AttachedToWindow(); virtual void MessageReceived(BMessage *msg); void LoadSettings(); void SetDefaults(); void Revert(); bool IsDefaultable(); bool IsRevertable(); private: void _CreateItems(); void _UpdatePreviews(const BMessage& colors); void _SetColor(int32 index, rgb_color color); void _SetColor(color_which which, rgb_color color); void _SetCurrentColor(rgb_color color); void _SetUIColors(const BMessage& colors); private: BColorControl* fPicker; BCheckBox* fAutoSelectCheckBox; BListView* fAttrList; color_which fWhich; BScrollView* fScrollView; BPrivate::BColorPreview* fColorPreview; BMessage fPrevColors; BMessage fDefaultColors; BMessage fCurrentColors; }; #endif // COLORS_VIEW_H_