CanvasCV: canvascv::Theme Class Reference
CanvasCV  1.0.0
canvascv::Theme Class Referenceabstract

The Theme controls appearance of widgets and shapes. More...

#include <theme.h>

Inheritance diagram for canvascv::Theme:
canvascv::TwoColoredTheme canvascv::ThemeDarkBlue canvascv::ThemeDarkOrange

Public Member Functions

virtual void applyStyle (Widget *widget)=0
 applyStyle is called for every new widget created by the WidgetFactory More...
 
virtual void applyStyle (Shape *shape)=0
 applyStyle is called for every new Shape created by the ShapeFactory More...
 
virtual void allocateBG (cv::Mat &dst, const cv::Size &size, const cv::Scalar &color)=0
 allocateBG creates the rect background for widgets More...
 
virtual void flat (cv::Mat &bg, const cv::Scalar &color)=0
 flat will cause bg to appear flat More...
 
virtual void raised (cv::Mat &bg, const cv::Scalar &color)=0
 raised will cause bg to appear raised More...
 
virtual void sunken (cv::Mat &bg, const cv::Scalar &color)=0
 sunken will cause bg to appear sunken More...
 
virtual void selected (cv::Mat &bg, const cv::Scalar &color)=0
 selected will cause bg to appear selecte More...
 

Detailed Description

Themes are added to the ThemeRepository. You can add your own external themes.

Member Function Documentation

virtual void canvascv::Theme::allocateBG ( cv::Mat &  dst,
const cv::Size &  size,
const cv::Scalar &  color 
)
pure virtual
Parameters
dstis a Mat dedicated to hold the background will be filled with 4 channels
sizewill be the size of dst when done
coloris the requested color, with alpha, which the theme is allowed to ignore

Implemented in canvascv::TwoColoredTheme.

virtual void canvascv::Theme::applyStyle ( Widget widget)
pure virtual
Parameters
widgetwill have setters invoked according to the theme

Implemented in canvascv::TwoColoredTheme.

virtual void canvascv::Theme::applyStyle ( Shape shape)
pure virtual
Parameters
shapewill have setters invoked according to the theme

Implemented in canvascv::TwoColoredTheme.

virtual void canvascv::Theme::flat ( cv::Mat &  bg,
const cv::Scalar &  color 
)
pure virtual
Parameters
bgwas previously allocated by allocateBG()
colorcould be used for drawing, but the theme is allowed to ignore it

Implemented in canvascv::TwoColoredTheme.

virtual void canvascv::Theme::raised ( cv::Mat &  bg,
const cv::Scalar &  color 
)
pure virtual
Parameters
bgwas previously allocated by allocateBG()
colorcould be used for drawing, but the theme is allowed to ignore it

Implemented in canvascv::TwoColoredTheme.

virtual void canvascv::Theme::selected ( cv::Mat &  bg,
const cv::Scalar &  color 
)
pure virtual
Parameters
bgwas previously allocated by allocateBG()
colorcould be used for drawing, but the theme is allowed to ignore it

Implemented in canvascv::TwoColoredTheme.

virtual void canvascv::Theme::sunken ( cv::Mat &  bg,
const cv::Scalar &  color 
)
pure virtual
Parameters
bgwas previously allocated by allocateBG()
colorcould be used for drawing, but the theme is allowed to ignore it

Implemented in canvascv::TwoColoredTheme.


The documentation for this class was generated from the following file:
  • CanvasCV-doxygen/src/canvascv/themes/theme.h