Home2L - C/C++ API v1.4-0-g38cc (2024-05-25)
Smart Tools for a Private Home
Friends | List of all members
CScreen Class Reference

Description

Screen object.

Definition at line 293 of file ui_screen.H.

#include "ui_screen.H"

Inheritance diagram for CScreen:
Inheritance graph
[legend]

Public Member Functions

Widget management ...

"Add"/"Del" methods do not pass ownership, caller remains owner. Layer 0 is the normal screen layer, layer 1 the layer of modal dialogs.

void AddWidget (CWidget *widget, int layer=0)
 
void DelWidget (CWidget *widget)
 
void DelAllWidgets ()
 
Screen stacking ...
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.
 
On-screen keyboard ...
void SetKeyboard (bool on)
 
bool HasKeyboard ()
 

Static Public Member Functions

Class methods ...

'Screen[Init|Done]()' are mapped to the following methods.

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.
 

Friends

class CWidget
 
void UiIterate (bool noWait)
 

(De-)activation ...

bool IsActive ()
 
virtual void Activate (bool on=true)
 
void Deactivate ()
 
static class CScreenActiveScreen ()
 

Member Function Documentation

◆ Run()

void CScreen::Run ( )

Activate the screen, iterate until Return() is called and then return to the previously active screen.

It is allowed to call this method from 'HandleEvent', e.g. for modal dialogs. If another screen is activated by 'Activate', this method returns immediately and does not switch back to the previous screen.

Friends And Related Function Documentation

◆ UiIterate

void UiIterate ( bool  noWait)
friend

Iterate the application's main event loop:

  • Check for SDL events and call 'HandleEvent' for the active screen on new events
  • Check timers and execute their callbacks
  • Redraw UI if changes are pending
  • Do some housekeeping related to window mapping, pause/resume in Android, ...
  • On a long push, generate an SDL_MOUSEBUTTONDOWN event with 'clicks == 2'

Execution may take a longer period of time if a) no events occur (sleep mode) and 'noWait == false' or b) some event handler calls 'CScreen::Run' for a new screen.


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