-
Notifications
You must be signed in to change notification settings - Fork 2
/
ColorSelector.h
42 lines (31 loc) · 983 Bytes
/
ColorSelector.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* Copyright 2012 Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef COLOR_SELECTOR_H
#define COLOR_SELECTOR_H
#include <Control.h>
#define MSG_COLOR_SELECTOR 'CSel'
#define INDICATOR_RECT BRect(8.0, 0.0, 20.0, 12.0)
#define COLOR_RECT BRect(4.0, 16.0, 22.0, 34.0)
class ColorSelector : public BControl {
public:
ColorSelector();
virtual ~ColorSelector();
virtual void Draw(BRect updateRect);
virtual status_t Invoke(BMessage* mesesage = NULL);
virtual void MouseMoved(BPoint where, uint32 code,
const BMessage* message);
virtual void MouseDown(BPoint where);
virtual void Hide();
virtual void Show();
bool IsHidden();
virtual rgb_color GetColor() const;
virtual void SetColor(long int color);
virtual void SetColor(rgb_color color);
protected:
rgb_color fColor;
bool fIsHidden;
bool fMouseOver;
};
#endif // COLOR_SELECTOR_H