41 Dialog1(
const __FlashStringHelper * caption,
int left,
int top,
int width,
int height):
Dialog(caption,left,top,width,height)
47 _btnDlg2=
new Button(0,0,0,0,F(
"Get"));
63 return _txtNumber1->GetNumber();
68 return _txtNumber2->GetNumber();
74 Label *label=
new Label(10,43+offset,150,25,text);
83 btn->
Move(left,top,width,25);
91 if(window == _btnDlg2)
95 IDialogClosedEventReceiver::DialogResults dlgResults=this->DoDialog(dlg);
96 if(dlgResults == IDialogClosedEventReceiver::OK)
void DoControlMessage(Window *window)
Process touch message from child controls.
Definition: Dialog1.h:89
Dialog1(const __FlashStringHelper *caption, int left, int top, int width, int height)
Constructor.
Definition: Dialog1.h:41
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 SetIsReadOnly(bool isReadOnly)
Defines whether window is readonly.
Definition: TextBoxNumber.h:64
float GetNumber()
Return value from text box.
Definition: Dialog2.h:51
Button * _btnCancel
Button Cancel has to be initialized in derived class.
Definition: Dialog.h:32
Button * _btnOK
Button OK has to be initialized in derived class.
Definition: Dialog.h:30
Text box for numbers.
Definition: TextBoxNumber.h:24
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 SetNumber(float number2)
Init text box value.
Definition: Dialog2.h:46
Example window with yellow background.
Definition: Dialog2.h:24
Base class for dialog objects. See Dialogs example Provides basic window functionality.
Definition: Dialog.h:25
void InitButton(Button *btn, int left, int top, int width)
Create child button.
Definition: Dialog1.h:81
void InitNumbers(float number1, float number2)
Init text box values.
Definition: Dialog1.h:55
Example Dialog with one edit, one readonly field + button that activates another dialog.
Definition: Dialog1.h:24
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
TextBoxNumber * InitNumberFields(int offset, const __FlashStringHelper *text)
create child text box fields
Definition: Dialog1.h:72
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