#ifndef SWATCH_GROUP_H
#define SWATCH_GROUP_H
#include <View.h>
#include "SelectedColorMode.h"
#include "Observer.h"
class AlphaSlider;
class ColorField;
class ColorPickerPanel;
class ColorSlider;
class CurrentColor;
class Group;
class SwatchView;
class SwatchGroup : public BView,
public Observer {
public:
SwatchGroup(BRect frame);
virtual ~SwatchGroup();
virtual void ObjectChanged(const Observable* object);
virtual void AttachedToWindow();
virtual void MessageReceived(BMessage* message);
void SetCurrentColor(CurrentColor* color);
private:
void _SetColor(rgb_color color);
void _SetColor(float h, float s, float v,
uint8 a);
SwatchView* fCurrentColorSV;
SwatchView* fSwatchViews[20];
ColorField* fColorField;
ColorSlider* fColorSlider;
AlphaSlider* fAlphaSlider;
Group* fTopSwatchViews;
Group* fBottomSwatchViews;
CurrentColor* fCurrentColor;
bool fIgnoreNotifications;
ColorPickerPanel* fColorPickerPanel;
SelectedColorMode fColorPickerMode;
BRect fColorPickerFrame;
};
#endif