CanvasCV: CanvasCV-doxygen/src/canvascv/themes/twocoloredtheme.h Source File
CanvasCV  1.0.0
twocoloredtheme.h
1 #ifndef TWOCOLOREDTHEME_H
2 #define TWOCOLOREDTHEME_H
3 
4 #include "theme.h"
5 
6 namespace canvascv
7 {
8 
13 class TwoColoredTheme : public Theme
14 {
15 public:
16  virtual void applyStyle(Widget *widget);
17  virtual void applyStyle(Shape *shape);
18 
19  virtual void allocateBG(cv::Mat &dst, const cv::Size &size, const cv::Scalar &color);
20  virtual void flat(cv::Mat &bg, const cv::Scalar &color);
21  virtual void raised(cv::Mat &bg, const cv::Scalar &color);
22  virtual void sunken(cv::Mat &bg, const cv::Scalar &color);
23  virtual void selected(cv::Mat &bg, const cv::Scalar &color);
24 
25 protected:
26  TwoColoredTheme(const cv::Scalar &fgColorVal, const cv::Scalar &bgColorVal);
27  virtual ~TwoColoredTheme();
28 
29  const cv::Scalar fgColor;
30  const cv::Scalar bgColor;
31 };
32 
33 }
34 
39 #endif // TWOCOLOREDTHEME_H
virtual void sunken(cv::Mat &bg, const cv::Scalar &color)
sunken will cause bg to appear sunken
virtual void applyStyle(Widget *widget)
applyStyle is called for every new widget created by the WidgetFactory
virtual void allocateBG(cv::Mat &dst, const cv::Size &size, const cv::Scalar &color)
allocateBG creates the rect background for widgets
virtual void flat(cv::Mat &bg, const cv::Scalar &color)
flat will cause bg to appear flat
The ThemeDark class implements a 2 colored theme base class.
Definition: twocoloredtheme.h:13
The Shape class hierarchy is for geomertric user interaction.
Definition: shape.h:32
The Theme controls appearance of widgets and shapes.
Definition: theme.h:17
This namespace holds all the classes of the CanvasCV library.
Definition: canvas.h:20
virtual void selected(cv::Mat &bg, const cv::Scalar &color)
selected will cause bg to appear selecte
virtual void raised(cv::Mat &bg, const cv::Scalar &color)
raised will cause bg to appear raised
The Widget class.
Definition: widget.h:28