CanvasCV: CanvasCV-doxygen/src/canvascv/themes/theme.h Source File
CanvasCV  1.0.0
theme.h
1 #ifndef THEME_H
2 #define THEME_H
3 
4 #include <opencv2/core.hpp>
5 
6 namespace canvascv
7 {
8 
9 class Widget;
10 class Shape;
11 
17 class Theme
18 {
19 public:
25  virtual void applyStyle(Widget *widget) = 0;
26 
32  virtual void applyStyle(Shape *shape) = 0;
33 
41  virtual void allocateBG(cv::Mat &dst, const cv::Size &size, const cv::Scalar &color) = 0;
42 
49  virtual void flat(cv::Mat &bg, const cv::Scalar &color) = 0;
50 
57  virtual void raised(cv::Mat &bg, const cv::Scalar &color) = 0;
58 
65  virtual void sunken(cv::Mat &bg, const cv::Scalar &color) = 0;
66 
67 
74  virtual void selected(cv::Mat &bg, const cv::Scalar &color) = 0;
75 };
76 
77 }
78 
83 #endif // THEME_H
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
virtual void flat(cv::Mat &bg, const cv::Scalar &color)=0
flat will cause bg to appear flat
virtual void applyStyle(Widget *widget)=0
applyStyle is called for every new widget created by the WidgetFactory
virtual void sunken(cv::Mat &bg, const cv::Scalar &color)=0
sunken will cause bg to appear sunken
virtual void raised(cv::Mat &bg, const cv::Scalar &color)=0
raised will cause bg to appear raised
This namespace holds all the classes of the CanvasCV library.
Definition: canvas.h:20
The Widget class.
Definition: widget.h:28
virtual void selected(cv::Mat &bg, const cv::Scalar &color)=0
selected will cause bg to appear selecte
virtual void allocateBG(cv::Mat &dst, const cv::Size &size, const cv::Scalar &color)=0
allocateBG creates the rect background for widgets