Home2L - C/C++ API  v1.2-2-ga4fe (2023-04-15)
Smart Tools for a Private Home
List of all members
CInputScreen Class Reference

Description

Screen with an input line widget.

Since the on-screen keyboard requires some space, it is useful to use CInputLine indirectly with this screen. It shows an input line on top and a button bar below. The button bar shows a back/escape button on the left, an "OK" and standard editing buttons on the right and may contain optional user buttons in the center.

Definition at line 899 of file ui_widgets.H.

#include "ui_widgets.H"

Inheritance diagram for CInputScreen:
Inheritance graph
[legend]

Public Member Functions

Setup ...
void Setup (const char *label, const char *inputPreset, TColor color=GREY, int userBtns=0, CButton **userBtnList=NULL, const int *userBtnWidth=NULL)
 
Accessing the input line ...
CInputLineInputLine ()
 
void SetInput (const char *_inputStr=NULL, int _mark0=0, int _markD=0)
 see CInputLine::SetInput ().
 
void GetInput (CString *ret)
 see CInputLine::GetInput ().
 
bool InputModified ()
 see CInputLine::InputModified ().
 
- Public Member Functions inherited from CScreen
void AddWidget (CWidget *widget, int layer=0)
 
void DelWidget (CWidget *widget)
 
void DelAllWidgets ()
 
void Run ()
 Activate the screen, iterate until Return() is called and then return to the previously active screen. More...
 
void Return ()
 Let Run() return at next occasion.
 
void SetKeyboard (bool on)
 
bool HasKeyboard ()
 
bool IsActive ()
 
virtual void Activate (bool on=true)
 
void Deactivate ()
 

Protected Member Functions

Callbacks for derived classes ...
virtual void Commit ()
 Called on push of the "OK" button. May call Return() on success or not to continue editing.
 
virtual void Cancel ()
 
virtual void OnUserButtonPushed (CButton *btn, bool longPush)
 Called on push of any user button.
 

Additional Inherited Members

- Static Public Member Functions inherited from CScreen
static void ClassInit ()
 
static void ClassDone ()
 
static void Refresh ()
 Refresh screen (e.g. after the app has been woken up in Android).
 
static void EmulateOff (bool off)
 Emulate screen off.
 
static void EmulateStandby (bool standby)
 Emulate screen standby mode.
 
static class CScreenActiveScreen ()
 

Member Function Documentation

◆ Setup()

void CInputScreen::Setup ( const char *  label,
const char *  inputPreset,
TColor  color = GREY,
int  userBtns = 0,
CButton **  userBtnList = NULL,
const int *  userBtnWidth = NULL 
)

Set up the screen.

Parameters
labelis an optional label printed before the input line (may be NULL for no label).
inputPresetis the preset for the input string.
coloris the button color, individual colors may be set afterwards.
userBtnsis the number of user buttons.
userBtnListis a list of pointers to the user button (may be NULL if userBtns == 0).
userBtnWidthis a list of width arguments for the user button (see LayoutRow(); may be NULL if userBtns == 0). For the user buttons, the area and color are set according to the parameters. The label must be set by the caller.

◆ Cancel()

virtual void CInputScreen::Cancel ( )
inlineprotectedvirtual

Called on push of the "back" button and after an eventual "are you sure?" confirmation. Must call Return().

Definition at line 938 of file ui_widgets.H.


The documentation for this class was generated from the following file: