36 lines
884 B
C++
36 lines
884 B
C++
#ifndef T_IOT_901_CONVOYOR_GUICONTAINER_H
|
|
#define T_IOT_901_CONVOYOR_GUICONTAINER_H
|
|
|
|
#include <vector>
|
|
#include "GUIWidget.h"
|
|
|
|
namespace gui {
|
|
|
|
class AGUIScreen {
|
|
public:
|
|
AGUIScreen();
|
|
~AGUIScreen() = default;
|
|
virtual const char* getName() const = 0;
|
|
virtual int setup() = 0;
|
|
int update();
|
|
int addWidget(AGUIWidget* widget);
|
|
int removeWidget(AGUIWidget* widget);
|
|
int removeWidget(int index);
|
|
int removeWidget(const char* name);
|
|
std::vector<AGUIWidget*> getWidgets() const;
|
|
protected:
|
|
std::vector<AGUIWidget*> widgets;
|
|
};
|
|
|
|
class DefaultGuiScreen : public AGUIScreen {
|
|
public:
|
|
DefaultGuiScreen();
|
|
~DefaultGuiScreen() = default;
|
|
const char* getName() const override;
|
|
int setup() override;
|
|
};
|
|
|
|
}
|
|
|
|
#endif //T_IOT_901_CONVOYOR_GUICONTAINER_H
|