1 #ifndef INCLUDE_GAZE_GUI_VISUALIZEABLE_H_
2 #define INCLUDE_GAZE_GUI_VISUALIZEABLE_H_
7 #include "dlib/gui_widgets.h"
9 #include "gaze/util/data.h"
50 template<
typename w
idget_type>
107 template<
typename w
idget_type>
110 widget->set_size(width, height);
124 template<
typename w
idget_type>
127 widget->set_text(text);
139 template<
typename w
idget_type>
142 adjust_widget(widget, width, height, text,
143 typename traits::widget_trait<widget_type>::tag());
155 template<
typename w
idget_type>
191 dlib::drawable_window& parent,
192 int width,
int height,
222 template<
typename w
idget_type = dlib::label>
234 dlib::drawable_window& parent,
235 int width,
int height,
237 widget = create_widget<widget_type>(parent);
238 adjust_widget<widget_type>(
widget, width, height, text);
246 if (this->widget && this->widget.get()) {
247 this->widget->disable();
256 typedef Visualizeable<dlib::label> LabelVisualizeable;
261 typedef Visualizeable<dlib::image_display> ImageVisualizeable;
266 typedef Visualizeable<dlib::perspective_display> PerspectiveVisualizeable;
272 #endif // INCLUDE_GAZE_GUI_VISUALIZEABLE_H_
std::shared_ptr< widget_type > widget
A tag for resizeable widgets.
virtual std::shared_ptr< dlib::drawable > init(dlib::drawable_window &parent, int width, int height, std::string text="No visualization.")=0
Abstract base class for Visualizeable to allow generic pointers.
void remove_widget() override
virtual void remove_widget()
std::shared_ptr< dlib::drawable > init(dlib::drawable_window &parent, int width, int height, std::string text="No visualization.") final
Implements VisualizeableBase for several widget types.
A tag for widgets which contain text messages.
virtual void visualize(util::Data &data)=0
virtual ~VisualizeableBase()=default
Wraps the data acquired per frame into a single instance.