reset_controller.cpp
766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include "reset_controller.h"
extern "C" {
#include <assert.h>
}
#include <poincare.h>
using namespace Poincare;
namespace HardwareTest {
ResetController::ResetController(Responder * parentResponder) :
ViewController(parentResponder),
m_view()
{
}
View * ResetController::view() {
return &m_view;
}
bool ResetController::handleEvent(Ion::Events::Event event) {
return true;
}
ResetController::ContentView::ContentView() :
m_resetTextView()
{
m_resetTextView.setText("RESET");
}
void ResetController::ContentView::layoutSubviews() {
m_resetTextView.setFrame(bounds());
}
int ResetController::ContentView::numberOfSubviews() const {
return 1;
}
View * ResetController::ContentView::subviewAtIndex(int index) {
return &m_resetTextView;
}
}