Some cleanups to ColorSet in anticipation of future cleanups for Appearance app
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13156 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -29,9 +29,9 @@
|
||||
#define COLORSET_H_
|
||||
|
||||
#include <Locker.h>
|
||||
#include "RGBColor.h"
|
||||
#include <Message.h>
|
||||
#include <String.h>
|
||||
#include <ColorUtils.h>
|
||||
|
||||
/*!
|
||||
\class ColorSet ColorSet.h
|
||||
@@ -40,60 +40,68 @@
|
||||
class ColorSet : public BLocker
|
||||
{
|
||||
public:
|
||||
ColorSet(void);
|
||||
ColorSet(const ColorSet &cs);
|
||||
ColorSet & operator=(const ColorSet &cs);
|
||||
void SetColors(const ColorSet &cs);
|
||||
void PrintToStream(void) const;
|
||||
bool ConvertToMessage(BMessage *msg) const;
|
||||
bool ConvertFromMessage(const BMessage *msg);
|
||||
void SetToDefaults(void);
|
||||
RGBColor StringToColor(const char *string);
|
||||
RGBColor AttributeToColor(int32 which);
|
||||
status_t SetColor(const char *string, rgb_color value);
|
||||
ColorSet(void);
|
||||
ColorSet(const ColorSet &cs);
|
||||
ColorSet & operator=(const ColorSet &cs);
|
||||
|
||||
BString name;
|
||||
void SetColors(const ColorSet &cs);
|
||||
void PrintToStream(void) const;
|
||||
|
||||
RGBColor panel_background,
|
||||
panel_text,
|
||||
|
||||
document_background,
|
||||
document_text,
|
||||
|
||||
control_background,
|
||||
control_text,
|
||||
control_highlight,
|
||||
control_border,
|
||||
|
||||
tooltip_background,
|
||||
tooltip_text,
|
||||
|
||||
menu_background,
|
||||
menu_selected_background,
|
||||
menu_text,
|
||||
menu_selected_text,
|
||||
menu_selected_border,
|
||||
|
||||
keyboard_navigation_base,
|
||||
keyboard_navigation_pulse,
|
||||
bool ConvertToMessage(BMessage *msg) const;
|
||||
bool ConvertFromMessage(const BMessage *msg);
|
||||
|
||||
void SetToDefaults(void);
|
||||
|
||||
rgb_color StringToColor(const char *string);
|
||||
rgb_color AttributeToColor(int32 which);
|
||||
|
||||
status_t SetColor(const char *string, rgb_color value);
|
||||
|
||||
|
||||
rgb_color panel_background,
|
||||
panel_text,
|
||||
|
||||
document_background,
|
||||
document_text,
|
||||
|
||||
control_background,
|
||||
control_text,
|
||||
control_highlight,
|
||||
control_border,
|
||||
|
||||
tooltip_background,
|
||||
tooltip_text,
|
||||
|
||||
menu_background,
|
||||
menu_selected_background,
|
||||
menu_text,
|
||||
menu_selected_text,
|
||||
menu_selected_border,
|
||||
|
||||
keyboard_navigation_base,
|
||||
keyboard_navigation_pulse,
|
||||
|
||||
success,
|
||||
failure,
|
||||
shine,
|
||||
shadow,
|
||||
window_tab,
|
||||
|
||||
// Not all of these guys don't exist in InterfaceDefs.h,
|
||||
// but we keep them as part of the color set anyway -
|
||||
// they're important nonetheless
|
||||
window_tab_text,
|
||||
inactive_window_tab,
|
||||
inactive_window_tab_text;
|
||||
|
||||
success,
|
||||
failure,
|
||||
shine,
|
||||
shadow,
|
||||
window_tab,
|
||||
|
||||
// Not all of these guys don't exist in InterfaceDefs.h, but we keep
|
||||
// them as part of the color set anyway - they're important nonetheless
|
||||
window_tab_text,
|
||||
inactive_window_tab,
|
||||
inactive_window_tab_text;
|
||||
private:
|
||||
RGBColor *StringToMember(const char *string);
|
||||
|
||||
rgb_color * StringToMember(const char *string);
|
||||
void PrintMember(const rgb_color &color) const;
|
||||
};
|
||||
|
||||
|
||||
bool LoadGUIColors(ColorSet *set);
|
||||
void SaveGUIColors(const ColorSet &set);
|
||||
status_t LoadColorSet(const char *path, ColorSet *set);
|
||||
status_t SaveColorSet(const char *path, const ColorSet &set);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user