CanvasCV: CanvasCV-doxygen/src/canvascv/widgets/layout.h Source File
CanvasCV  1.0.0
layout.h
1 #ifndef LAYOUT_H
2 #define LAYOUT_H
3 
4 #include <opencv2/core.hpp>
5 #include <memory>
6 #include "widget.h"
7 
8 namespace canvascv
9 {
10 
17 class Layout
18 {
19 protected:
21  virtual void addWidget(const std::shared_ptr<Widget> &widget) = 0;
22 
31  virtual std::shared_ptr<Widget> rmvWidget(const std::shared_ptr<Widget> &widget) = 0;
32 
33  friend class WidgetFactory;
34  template <class T> friend class WidgetFactoryT;
35  friend class Widget;
36 
37  virtual std::shared_ptr<Widget> rmvWidget(Widget* widget) = 0;
38 
39  // returns the growth limit as calculated by the layout
40  virtual const cv::Rect getBoundaries() const = 0;
41 
42  virtual bool addDirtyWidget(Widget *widget) = 0;
43  virtual void rmvDirtyWidget(Widget *widget) = 0;
44 
45  virtual bool hasDirtyWidgets() = 0;
46 
47  virtual void updateDirtyWidgets() = 0;
48 };
49 
50 }
51 
52 #endif // LAYOUT_H
The WidgetFactory class.
Definition: widgetfactory.h:24
This namespace holds all the classes of the CanvasCV library.
Definition: canvas.h:20
The Layout class.
Definition: layout.h:17
virtual std::shared_ptr< Widget > rmvWidget(const std::shared_ptr< Widget > &widget)=0
rmvWidget
The WidgetFactoryT class.
Definition: widgetfactory.h:58
The Widget class.
Definition: widget.h:28
virtual void addWidget(const std::shared_ptr< Widget > &widget)=0
adds the widget to this Layout after removing it from it&#39;s previous layout