CanvasCV: CanvasCV-doxygen/src/canvascv/widgets/verticallayout.h Source File
CanvasCV  1.0.0
verticallayout.h
1 #ifndef VERTICALLAYOUT_H
2 #define VERTICALLAYOUT_H
3 
4 #include "autolayout.h"
5 
6 namespace canvascv
7 {
8 
42 class VerticalLayout : public AutoLayout
43 {
44 public:
45 
53  static std::shared_ptr<VerticalLayout> create(Layout &layout,
54  const cv::Point &pos = cv::Point(0,0));
55 
57  int getSpacing() const;
58 
60  void setSpacing(int value);
61 
62  virtual const char *getType() const;
63 
64  static const char *type;
65 
66 protected:
67  friend class WidgetFactory;
68  template <class T> friend class WidgetFactoryT;
69 
70  VerticalLayout(const cv::Point &pos);
71 
72  virtual void recalcCompound();
73 
74  /* TODO - write/read widgets to file for a designer app
75  virtual void writeInternals(FileStorage &fs) const;
76  virtual void readInternals(const FileNode &node);
77  */
78 
79 private:
80 
81  int spacing;
82 };
83 
84 }
85 
86 #endif // VERTICALLAYOUT_H
The WidgetFactory class.
Definition: widgetfactory.h:24
The VerticalLayout class.
Definition: verticallayout.h:42
int getSpacing() const
returns pixel spacing between items
The AutoLayout class.
Definition: autolayout.h:15
This namespace holds all the classes of the CanvasCV library.
Definition: canvas.h:20
virtual void recalcCompound()
recalcCompound
static std::shared_ptr< VerticalLayout > create(Layout &layout, const cv::Point &pos=cv::Point(0, 0))
create a VerticalLayout widget
The Layout class.
Definition: layout.h:17
void setSpacing(int value)
sets pixel spacing between items
The WidgetFactoryT class.
Definition: widgetfactory.h:58
virtual const char * getType() const
getType is always implemented by derived to return the same static pointer per widget.