Home2L - C/C++ API v1.4-2-g83f4c (2025-08-23)
Smart Tools for a Private Home
Loading...
Searching...
No Matches
Public Member Functions | List of all members
CFlatButton Class Reference

Description

Flat Push-button widget.

This is a piece of text without a visible button, which behaves just like a push-button. Examples are the launch buttons on the home screen.

Definition at line 306 of file ui_widgets.H.

#include "ui_widgets.H"

Inheritance diagram for CFlatButton:
Inheritance graph
[legend]

Public Member Functions

virtual SDL_Surface * GetSurface ()
 Get an up-to-date surface or 'NULL' if none is available.
 
- 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.
 

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.
 

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