Style update.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28707 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -23,100 +23,104 @@ class BTextControl;
|
|||||||
|
|
||||||
|
|
||||||
class BColorControl : public BControl {
|
class BColorControl : public BControl {
|
||||||
public:
|
public:
|
||||||
BColorControl(BPoint start, color_control_layout layout,
|
BColorControl(BPoint start,
|
||||||
float cellSize, const char* name,
|
color_control_layout layout,
|
||||||
BMessage* message = NULL, bool useOffscreen = false);
|
float cellSize, const char* name,
|
||||||
BColorControl(BMessage* archive);
|
BMessage* message = NULL,
|
||||||
virtual ~BColorControl();
|
bool useOffscreen = false);
|
||||||
|
BColorControl(BMessage* archive);
|
||||||
|
virtual ~BColorControl();
|
||||||
|
|
||||||
static BArchivable* Instantiate(BMessage* archive);
|
static BArchivable* Instantiate(BMessage* archive);
|
||||||
virtual status_t Archive(BMessage* archive, bool deep = true) const;
|
virtual status_t Archive(BMessage* archive,
|
||||||
|
bool deep = true) const;
|
||||||
|
|
||||||
virtual void SetLayout(BLayout* layout);
|
virtual void SetLayout(BLayout* layout);
|
||||||
|
|
||||||
virtual void SetValue(int32 color_value);
|
virtual void SetValue(int32 color_value);
|
||||||
void SetValue(rgb_color color);
|
void SetValue(rgb_color color);
|
||||||
rgb_color ValueAsColor();
|
rgb_color ValueAsColor();
|
||||||
|
|
||||||
virtual void SetEnabled(bool state);
|
virtual void SetEnabled(bool state);
|
||||||
|
|
||||||
virtual void AttachedToWindow();
|
virtual void AttachedToWindow();
|
||||||
virtual void MessageReceived(BMessage* message);
|
virtual void MessageReceived(BMessage* message);
|
||||||
virtual void Draw(BRect updateRect);
|
virtual void Draw(BRect updateRect);
|
||||||
virtual void MouseDown(BPoint where);
|
virtual void MouseDown(BPoint where);
|
||||||
virtual void KeyDown(const char* bytes, int32 numBytes);
|
virtual void KeyDown(const char* bytes, int32 numBytes);
|
||||||
|
|
||||||
virtual void SetCellSize(float size);
|
virtual void SetCellSize(float size);
|
||||||
float CellSize() const;
|
float CellSize() const;
|
||||||
virtual void SetLayout(color_control_layout layout);
|
virtual void SetLayout(color_control_layout layout);
|
||||||
color_control_layout Layout() const;
|
color_control_layout Layout() const;
|
||||||
|
|
||||||
virtual void WindowActivated(bool state);
|
virtual void WindowActivated(bool state);
|
||||||
virtual void MouseUp(BPoint point);
|
virtual void MouseUp(BPoint point);
|
||||||
virtual void MouseMoved(BPoint point, uint32 code,
|
virtual void MouseMoved(BPoint point, uint32 code,
|
||||||
const BMessage* dragMessage);
|
const BMessage* dragMessage);
|
||||||
virtual void DetachedFromWindow();
|
virtual void DetachedFromWindow();
|
||||||
virtual void GetPreferredSize(float* _width, float* _height);
|
virtual void GetPreferredSize(float* _width, float* _height);
|
||||||
virtual void ResizeToPreferred();
|
virtual void ResizeToPreferred();
|
||||||
virtual status_t Invoke(BMessage* message = NULL);
|
virtual status_t Invoke(BMessage* message = NULL);
|
||||||
virtual void FrameMoved(BPoint newPosition);
|
virtual void FrameMoved(BPoint newPosition);
|
||||||
virtual void FrameResized(float newWidth, float newHeight);
|
virtual void FrameResized(float newWidth, float newHeight);
|
||||||
|
|
||||||
virtual BHandler* ResolveSpecifier(BMessage* message, int32 index,
|
virtual BHandler* ResolveSpecifier(BMessage* message, int32 index,
|
||||||
BMessage* specifier, int32 what,
|
BMessage* specifier, int32 what,
|
||||||
const char* property);
|
const char* property);
|
||||||
virtual status_t GetSupportedSuites(BMessage* data);
|
virtual status_t GetSupportedSuites(BMessage* data);
|
||||||
|
|
||||||
virtual void MakeFocus(bool state = true);
|
virtual void MakeFocus(bool state = true);
|
||||||
virtual void AllAttached();
|
virtual void AllAttached();
|
||||||
virtual void AllDetached();
|
virtual void AllDetached();
|
||||||
|
|
||||||
|
private:
|
||||||
|
virtual status_t Perform(perform_code d, void *arg);
|
||||||
|
// this can be made public again if needed
|
||||||
|
|
||||||
|
virtual void _ReservedColorControl1();
|
||||||
|
virtual void _ReservedColorControl2();
|
||||||
|
virtual void _ReservedColorControl3();
|
||||||
|
virtual void _ReservedColorControl4();
|
||||||
|
|
||||||
|
BColorControl& operator=(const BColorControl &other);
|
||||||
|
|
||||||
|
void _InitData(color_control_layout layout,
|
||||||
|
float size, bool useOffscreen,
|
||||||
|
BMessage* archive = NULL);
|
||||||
|
void _LayoutView();
|
||||||
|
void _InitOffscreen();
|
||||||
|
void _DrawColorArea(BView* target, BRect update);
|
||||||
|
void _DrawSelectors(BView* target);
|
||||||
|
void _ColorRamp(BRect rect, BView* target,
|
||||||
|
rgb_color baseColor, rgb_color compColor,
|
||||||
|
int16 flag, bool focused, BRect update);
|
||||||
|
BPoint _SelectorPosition(const BRect& rampRect,
|
||||||
|
uint8 shade) const;
|
||||||
|
BRect _PaletteSelectorFrame(uint8 colorIndex) const;
|
||||||
|
BRect _RampFrame(uint8 rampIndex) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual status_t Perform(perform_code d, void *arg);
|
BRect fPaletteFrame;
|
||||||
// this can be made public again if needed
|
int16 fSelectedPaletteColorIndex;
|
||||||
|
int16 fPreviousSelectedPaletteColorIndex;
|
||||||
|
|
||||||
virtual void _ReservedColorControl1();
|
float fCellSize;
|
||||||
virtual void _ReservedColorControl2();
|
int32 fRows;
|
||||||
virtual void _ReservedColorControl3();
|
int32 fColumns;
|
||||||
virtual void _ReservedColorControl4();
|
bool fPaletteMode;
|
||||||
|
bool _unused[3];
|
||||||
|
|
||||||
BColorControl& operator=(const BColorControl &other);
|
BTextControl* fRedText;
|
||||||
|
BTextControl* fGreenText;
|
||||||
|
BTextControl* fBlueText;
|
||||||
|
|
||||||
void _InitData(color_control_layout layout,
|
BBitmap* fBitmap;
|
||||||
float size, bool useOffscreen,
|
BView* fOffscreenView;
|
||||||
BMessage* archive = NULL);
|
|
||||||
void _LayoutView();
|
|
||||||
void _InitOffscreen();
|
|
||||||
void _DrawColorArea(BView* target, BRect update);
|
|
||||||
void _DrawSelectors(BView* target);
|
|
||||||
void _ColorRamp(BRect rect, BView* target,
|
|
||||||
rgb_color baseColor, rgb_color compColor,
|
|
||||||
int16 flag, bool focused, BRect update);
|
|
||||||
BPoint _SelectorPosition(const BRect& rampRect, uint8 shade) const;
|
|
||||||
BRect _PaletteSelectorFrame(uint8 colorIndex) const;
|
|
||||||
BRect _RampFrame(uint8 rampIndex) const;
|
|
||||||
|
|
||||||
private:
|
int32 fFocusedComponent;
|
||||||
BRect fPaletteFrame;
|
uint32 _reserved[2];
|
||||||
int16 fSelectedPaletteColorIndex;
|
|
||||||
int16 fPreviousSelectedPaletteColorIndex;
|
|
||||||
|
|
||||||
float fCellSize;
|
|
||||||
int32 fRows;
|
|
||||||
int32 fColumns;
|
|
||||||
bool fPaletteMode;
|
|
||||||
bool _unused[3];
|
|
||||||
|
|
||||||
BTextControl* fRedText;
|
|
||||||
BTextControl* fGreenText;
|
|
||||||
BTextControl* fBlueText;
|
|
||||||
|
|
||||||
BBitmap* fBitmap;
|
|
||||||
BView* fOffscreenView;
|
|
||||||
|
|
||||||
int32 fFocusedComponent;
|
|
||||||
uint32 _reserved[2];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
|
|||||||
Reference in New Issue
Block a user