mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-24 08:10:50 +01:00
[apps/code] Empty controller in the var box
This commit is contained in:
34
apps/code/variable_box_empty_controller.h
Normal file
34
apps/code/variable_box_empty_controller.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef APPS_CODE_VARIABLE_BOX_EMPTY_CONTROLLER_H
|
||||
#define APPS_CODE_VARIABLE_BOX_EMPTY_CONTROLLER_H
|
||||
|
||||
#include <apps/variable_box_empty_controller.h>
|
||||
|
||||
namespace Code {
|
||||
|
||||
class VariableBoxEmptyController : public ::VariableBoxEmptyController {
|
||||
public:
|
||||
VariableBoxEmptyController() :
|
||||
::VariableBoxEmptyController(),
|
||||
m_view()
|
||||
{}
|
||||
// View Controller
|
||||
View * view() override { return &m_view; }
|
||||
private:
|
||||
class VariableBoxEmptyView : public ::VariableBoxEmptyController::VariableBoxEmptyView {
|
||||
public:
|
||||
constexpr static int k_numberOfMessages = 2;
|
||||
VariableBoxEmptyView();
|
||||
private:
|
||||
int numberOfMessageTextViews() const override { return k_numberOfMessages; }
|
||||
MessageTextView * messageTextViewAtIndex(int index) override {
|
||||
assert(index >= 0 && index < k_numberOfMessages);
|
||||
return &m_messages[index];
|
||||
}
|
||||
MessageTextView m_messages[k_numberOfMessages];
|
||||
};
|
||||
VariableBoxEmptyView m_view;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user