ASPiK SDK
uicolorslider.h
1 // This file is part of VSTGUI. It is subject to the license terms
2 // in the LICENSE file found in the top-level directory of this
3 // distribution and at http://github.com/steinbergmedia/vstgui/LICENSE
4 
5 #ifndef __uicolorslider__
6 #define __uicolorslider__
7 
8 #include "../../lib/vstguibase.h"
9 
10 #if VSTGUI_LIVE_EDITING
11 
12 #include "../../lib/controls/cslider.h"
13 
14 namespace VSTGUI {
15 class UIColor;
16 
17 //----------------------------------------------------------------------------------------------------
18 //----------------------------------------------------------------------------------------------------
19 //----------------------------------------------------------------------------------------------------
20 //----------------------------------------------------------------------------------------------------
21 //----------------------------------------------------------------------------------------------------
22 class UIColorSlider : public CSlider
23 {
24 public:
25  enum {
26  kHue,
27  kSaturation,
28  kLightness,
29  kRed,
30  kGreen,
31  kBlue,
32  kAlpha
33  };
34  UIColorSlider (UIColor* color, int32_t style);
35  ~UIColorSlider () override;
36 
37 protected:
38  void draw (CDrawContext* context) override;
39  void setViewSize (const CRect& rect, bool invalid = true) override;
40  CMessageResult notify (CBaseObject* sender, IdStringPtr message) override;
41  void updateBackground (CDrawContext* context);
42  void updateHandle (CDrawContext* context);
43 
44  SharedPointer<UIColor> color;
45  int32_t style;
46 };
47 
48 
49 } // namespace
50 
51 #endif // VSTGUI_LIVE_EDITING
52 
53 #endif // __uicolorslider__
Definition: customcontrols.cpp:8