21 #include "PumpController.h" 29 TabManual(
PumpController *pumpController,
const __FlashStringHelper * name,
int left,
int top,
int width,
int height):
Window(name,left,top,width,height)
31 _pumpController = pumpController;
35 _btnStart =
new Button(0, 0, 0, 0, F(
"Start"));
36 initButton(_btnStart);
38 _btnStop =
new Button(0, 0, 0, 0, F(
"Stop"));
42 void initButton(
Button *btn)
47 virtual void Move(
int left,
int top,
int width,
int height)
50 _btnStart->
Move(5, 70, 135, 50);
51 _btnStop->
Move(172, 70, 135, 50);
56 if (window == _btnStart)
59 _pumpController->startPump();
61 else if (window == _btnStop)
63 _pumpController->stopPump();
void RegisterTouchEventReceiver(ITouchEventReceiver *touchEventReceiver)
Registers receiver for touch event.
Definition: Window.h:102
Base class for all window objects. Provides basic window functionality.
Definition: Window.h:34
virtual void Move(int left, int top, int width, int height)
Moves and resizes window relativly to the parent window.
Definition: TabManual.h:47
static Environment * Get()
Returns singltone instance of environment.
Definition: Environment.h:44
virtual void Move(int left, int top, int width, int height)
Moves and resizes window relativly to the parent window.
Definition: Window.h:149
void Invalidate()
If function is called than the window manager updates the window.
Definition: Window.h:157
Window(const __FlashStringHelper *name, int left, int top, int width, int height)
Constructor.
Definition: Window.h:60
void AddChild(Window *window)
Adds window child window.
Definition: Window.h:194
virtual void SetDecorators(DecoratorList *decorators)
Sets window decorators list.
Definition: Window.h:76
void NotifyTouch(Window *window)
Events routing for gui interaction (see RegisterTouchEventReceiver and public ITouchEventReceiver dec...
Definition: TabManual.h:54
Interface that provides screen touch notifications. If you want receive this notification in the targ...
Definition: ITouchEventReceiver.h:24
Tab for manual control of the pump.
Definition: TabManual.h:23
Implements pump control logic.
Definition: PumpController.h:22
void SetMargins(int offset_x, int offset_y)
Defines offset from left and top for text.
Definition: TextBox.h:58