SDLLabel(3)

NAME
SDLLabel - Text label.

SYNOPSIS

#include <sdllabel.h>

Inherits SDLWidget.

Inherited by SDLListBoxBaseItem.

  Public Methods
SDLLabel (SDLWidget* parent, SDL_Rect& r, char* text, bool storebackground = true)
Only constructor.
~SDLLabel ()
Only destructor.
void SetText (char* text)
Sets text.
void SetTextFormat (char* text, ...)
Sets formated text (like printf).
char* GetText ()
Returns text.
void SetAlignment (int a)
Sets text alignment.
void GetTextExtend (char* text, int& width, int &height)
SDL_Surface* SetIcon (char* filename)
SDL_Surface* SetIcon (SDL_Surface* icon)

  Static Public Methods
void GetTextExtend (char* text, int& width, int &height, TTF_Font* font = NULL)

  Protected Methods
void eventDraw (SDL_Surface* surface, SDL_Rect* rect)
Draw event handler.
void eventBlit (SDL_Surface* srf, SDL_Rect* src, SDL_Rect* dst)

  Protected Attributes
SDL_Surface* my_srfIcon

DETAILED DESCRIPTION

Text label.

Author(s):
 Alexander Pipelka

 A text label (unmodifiable by end user). Has attributes for font style, alignment, etc.

Definition at line 52 of file sdllabel.h.

CONSTRUCTOR & DESTRUCTOR DOCUMENTATION

  SDLLabel::SDLLabel (SDLWidget * parent, SDL_Rect & r, char * text, bool storebackground = true)

Only constructor.

Parameters:

parent Parent widget.

r Rectangle to draw in, relative to parent.

text Text displayed by label.

storebackground Whether or not label has an internal background.

  SDLLabel::~SDLLabel ()

Only destructor.

MEMBER FUNCTION DOCUMENTATION

  char * SDLLabel::GetText ()

Returns text.

  void SDLLabel::GetTextExtend (char * text, int & width, int & height)

  void SDLLabel::GetTextExtend (char * text, int & width, int & height, TTF_Font * font = NULL) [static]

  void SDLLabel::SetAlignment (int a)

Sets text alignment.

  SDL_Surface * SDLLabel::SetIcon (SDL_Surface * icon)

  SDL_Surface * SDLLabel::SetIcon (char * filename)

  void SDLLabel::SetText (char * text)

Sets text.

  void SDLLabel::SetTextFormat (char * text, ...)

Sets formated text (like printf).

  void SDLLabel::eventBlit (SDL_Surface * srf, SDL_Rect * src, SDL_Rect * dst) [protected, virtual]

Reimplemented from SDLDrawObject.

Reimplemented in SDLColumnItem, and SDLListBoxItem.

  void SDLLabel::eventDraw (SDL_Surface * surface, SDL_Rect * rect) [protected, virtual]

Draw event handler.

Parameters:

SDL_Surface Surface to draw to.

rect Rectangle to draw in, relative to surface.

Reimplemented from SDLDrawObject.

Reimplemented in SDLColumnItem.

MEMBER DATA DOCUMENTATION

  SDL_Surface * SDLLabel::my_srfIcon [protected]

Definition at line 103 of file sdllabel.h.

AUTHOR

Generated automatically by Doxygen for ParaGUI from the source code.