20 #include "MainWindow.h" 21 #include "TextBoxString.h" 22 #include "DefaultDecorators.h" 43 _btnDlg1=
new Button(70,
Height()/2,190,50,F(
"Get numbers"));
54 Label *label=
new Label(10,43+offset,150,25,text);
64 if(window == _btnDlg1)
67 dlg->
InitNumbers(_txtNumber1->GetNumber(),_txtNumber2->GetNumber());
69 IDialogClosedEventReceiver::DialogResults dlgResults=this->DoDialog(dlg);
70 if(dlgResults == IDialogClosedEventReceiver::OK)
Dialogs(int wnd_width, int wnd_height)
Constructor.
Definition: Dialogs.h:37
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
float GetNumber1()
Return value from text box 1.
Definition: Dialog1.h:61
void Initialize()
Initilizes child controls.
Definition: Dialogs.h:41
Text box for numbers.
Definition: TextBoxNumber.h:24
Dialogs main window.
Definition: Dialogs.h:26
TextBoxNumber * InitNumberFields(int offset, const __FlashStringHelper *text)
create child text box fields
Definition: Dialogs.h:52
int Height()
Returns window height.
Definition: Window.h:189
void InitNumbers(float number1, float number2)
Init text box values.
Definition: Dialog1.h:55
Dialog * FindDialog(const __FlashStringHelper *id)
Finds registered dialog by the name.
Definition: MainWindow.h:69
Example Dialog with one edit, one readonly field + button that activates another dialog.
Definition: Dialog1.h:24
void NotifyTouch(Window *window)
Events routing for gui interaction (see RegisterTouchEventReceiver and public ITouchEventReceiver dec...
Definition: Dialogs.h:62
float GetNumber2()
Return value from text box 2.
Definition: Dialog1.h:66
void AddChild(Window *window)
Adds window child window.
Definition: Window.h:194
void SetNumber(float number)
Initialize window with number.
Definition: TextBoxNumber.h:74
Base class for main application window. Each application has to have one main window, which is root parent for all other application windows.
Definition: MainWindow.h:38
Interface that provides screen touch notifications. If you want receive this notification in the targ...
Definition: ITouchEventReceiver.h:24
Implement Label control.
Definition: Label.h:24
void SetMargins(int offset_x, int offset_y)
Defines offset from left and top for text.
Definition: TextBox.h:58