|
Home2L - C/C++ API v1.4-2-g83f4c (2025-08-23)
Smart Tools for a Private Home
|
Floorplan widget.
This is a mini view of the floorplan with 256x128 pixels.
Definition at line 129 of file floorplan.H.
#include "floorplan.H"

Public Member Functions | |
| void | Setup (int x0, int y0, class CFloorplan *_floorplan=NULL, TTicks _tInterval=FP_UPDATE_INTERVAL) |
| Setup the widget. | |
| void | Activate (bool on=true) |
| (De-)Activate automatic updates of the mini-floorplan. | |
Public Member Functions inherited from CButton | |
| void | SetLabel (SDL_Surface *_icon, SDL_Rect *srcRect=NULL, bool takeOwnership=false) |
| Set '_icon' as the button label. | |
| void | SetLabel (const char *text, TColor textColor=WHITE, TTF_Font *font=NULL) |
| Set a text-only label. | |
| void | SetLabel (SDL_Surface *_icon, const char *text, TColor textColor=WHITE, TTF_Font *font=NULL) |
| Set icon (and optionally text) label. The icon has its own color(s). | |
| void | SetLabel (TColor color, const char *iconName, const char *text=NULL, TTF_Font *font=NULL) |
| Set icon (and optionally text) label. Both have the same color. | |
| void | ClearLabel () |
| Remove label. | |
| void | SetLabelAlignment (int _hAlign=0, int _vAlign=0) |
| Set/change label alignment. | |
| void | SetHotkey (SDL_Keycode _hotkey) |
| Set hotkey which activates the button callback. | |
| virtual bool | HandleEvent (SDL_Event *ev) |
| Handle an event and return 'true' if the event was consumed and is to be ignored by later widgets. | |
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'. | |
| 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. | |
Public Member Functions inherited from CTimer | |
| CTimer (FTimerCallback *_func, void *_data=NULL, void *_creator=NULL) | |
| Construct with a callback function. | |
| CTimer (TTicks _time, TTicks _interval=0, FTimerCallback *_func=NULL, void *_data=NULL, void *_creator=NULL) | |
| Construct with a time/interval specification and eventually a callback function. | |
| void | Set (FTimerCallback *_func, void *_data=NULL, void *_creator=NULL) |
| Setup timer without (re-)scheduling it. | |
| void | Set (TTicks _time, TTicks _interval=0, FTimerCallback *_func=NULL, void *_data=NULL, void *_creator=NULL) |
| Setup and (re-)schedule timer. | |
| void | Reschedule (TTicks _time, TTicks _interval=0) |
| Change a timer (like 'Set'), but leave function and creator unchanged. | |
| void | Clear () |
| Remove timer from the event list. | |
| bool | Pending () |
| Indicate whether the timer is pending and may be executed in the future. | |
Protected Member Functions | |
| virtual void | OnTime () |
| [T:timer] Virtual function called when the timer triggers. | |
| virtual SDL_Surface * | GetSurface () |
| Get an up-to-date surface or 'NULL' if none is available. | |
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. | |
Additional Inherited Members | |
Static Public Member Functions inherited from CTimer | |
| static void | DelByCreator (void *_creator) |
Remove all timers created by _creator from the event list. | |
| void CWidgetFloorplan::Activate | ( | bool | on = true | ) |
(De-)Activate automatic updates of the mini-floorplan.
This implies (un-)claiming the attached floorplan object. I.e., when active, an automatic timer runs 'CFloorplan::Iterate ()', and during activation, the floorplan's view level is set accordingly. This method should be called from the owning screen's Activate() method accordingly.