|
Home2L - C/C++ API v1.4-2-g83f4c (2025-08-23)
Smart Tools for a Private Home
|
Widget that can pop up on a screen, such as a menu or a message box.
Definition at line 77 of file ui_widgets.H.
#include "ui_widgets.H"

Public Member Functions | |
Running the widget ... | |
| int | Run (CScreen *_screen) |
| Run the widget until it is cancelled or a status >= 0 is set; return status. | |
| virtual void | Start (CScreen *_screen) |
| Just start the modal widget. | |
| bool | IsRunning () |
| Must be invoked regularly (in each UI iteration), if Run() is not used. | |
| virtual void | Stop () |
| Remove widget from screen (e.g. useful for inactivity timeout). | |
Status ... | |
| int | GetStatus () |
| Get status: -2: running, -1: cancelled (e.g. by touching outside), >= 0: success, user-defined code set by 'SetStatus'. | |
| void | SetStatus (int _status) |
| Set a status code. | |
Behaviour for events outside the widget ... | |
| void | SetNoCancelArea (SDL_Rect _rNoCancel) |
| Set the no-cancel area. | |
Callbacks... | |
| virtual bool | HandleEvent (SDL_Event *ev) |
| Handle event: must always be called last. | |
Public Member Functions inherited from CWidget | |
| void | SetSurface (SDL_Surface *_surface) |
| Set the static surface to display. The caller stays owner of surface, must not delete it as long as it is set here. The surface dimensions must match 'area'. | |
| virtual SDL_Surface * | GetSurface () |
| Get an up-to-date surface or 'NULL' if none is available. | |
| void | GetRenderArea (SDL_Rect *ra) |
| Transpose 'area' to the current screen coordinates to be passed to all SDL rendering functions. | |
| virtual SDL_Texture * | GetTexture () |
| Return an up-to-date texture. | |
| void | SetTextureBlendMode (SDL_BlendMode _sdlBlendMode) |
| Set the blend mode for the texture created by the default implementation of GetTexture(). The default is SDL_BLENDMODE_NONE. | |
| virtual void | Render (SDL_Renderer *ren) |
| Render this widget. | |
| void | ClearTexture () |
| Clear the internally cached texture object to save memory. | |
Additional Inherited Members | |
Protected Member Functions inherited from CWidget | |
| void | ChangedSurface () |
| Mark (only) the surface as changed to trigger a redrawing at next occasion. | |
| void | Changed () |
| Anything may have changed: Trigger a redrawing at next occasion. | |
|
inline |
Set the no-cancel area.
A touch outside this area is interpreted as a "cancel" operation. Normally and by default, this is equal
to the area of this menu ('rFrame'), but there may be cases where this area needs to be extended,
for example, if a combination of menus are presented simultaneously such as the month/year selector in the calendar app.
Definition at line 97 of file ui_widgets.H.