Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

CSLabel Class Reference

#include <CSLabel.h>

Inheritance diagram for CSLabel:

CSGrafikElement CSMessageDispatchable CSMessageListener

Public Member Functions

 CSLabel ()
 CSLabel (const std::string &string)
virtual std::string getType ()
virtual void paint (SDL_Surface *destination, SDL_Rect *parentViewport)
virtual bool isFocusable ()
virtual void setText (const std::string &t)
virtual void layoutSetup ()

Static Public Attributes

const char * CLASS = "CSLabel"
 static element, name of this class (introsepection)


Protected Member Functions

virtual void layoutSetupLabel ()

Constructor & Destructor Documentation

CSLabel::CSLabel  ) 
 

Definition at line 12 of file CSLabel.cpp.

References LOG_ENTER, and LOG_EXIT.

00012                  : CSGrafikElement(0, 0)
00013 {
00014     static char *functionName="CSLabel";
00015     LOG_ENTER 
00016     mString = "";
00017     LOG_EXIT
00018 }

CSLabel::CSLabel const std::string &  string  ) 
 

Definition at line 20 of file CSLabel.cpp.

References LOG_ENTER, and LOG_EXIT.

00020                                         : CSGrafikElement(0, 0)
00021 {
00022     static char *functionName="CSLabel";
00023     LOG_ENTER 
00024     mString = string;
00025     LOG_EXIT
00026 }


Member Function Documentation

void CSLabel::layoutSetupLabel  )  [protected, virtual]
 

Definition at line 37 of file CSLabel.cpp.

References CSGrafikElement::getFont(), CSFont::getHeight(), CSFont::getWidth(), LOG_ENTER, and LOG_EXIT.

Referenced by layoutSetup().

00038 {
00039     static char *functionName="layoutSetupLabel";
00040     LOG_ENTER 
00041     mMinHeight = mHeight = getFont()->getHeight()-2;
00042     mMinWidth = mWidth = getFont()->getWidth(mString.c_str());
00043     LOG_EXIT
00044 }

Here is the call graph for this function:

virtual std::string CSLabel::getType  )  [inline, virtual]
 

Reimplemented from CSGrafikElement.

Definition at line 29 of file CSLabel.h.

References CLASS.

00029 {return (std::string) CLASS;}

void CSLabel::paint SDL_Surface *  destination,
SDL_Rect *  parentViewport
[virtual]
 

Reimplemented from CSGrafikElement.

Definition at line 28 of file CSLabel.cpp.

References CSGrafikElement::getElementArea(), CSGrafikElement::getHorizontalElementSpacing(), CSGrafikElement::getTextColor(), CSGrafikElement::getVerticalElementSpacing(), and CSGrafikElement::putString().

00029 {
00030     static char *functionName="paint";
00031     SDL_Rect elementArea = getElementArea();
00032     elementArea.x += parentViewport->x;
00033     elementArea.y += parentViewport->y;
00034     putString(destination, &elementArea, getHorizontalElementSpacing(), getVerticalElementSpacing(), getTextColor(), mString.c_str());
00035 }

Here is the call graph for this function:

virtual bool CSLabel::isFocusable  )  [inline, virtual]
 

Definition at line 32 of file CSLabel.h.

00032 {return false;}

virtual void CSLabel::setText const std::string &  t  )  [inline, virtual]
 

Definition at line 33 of file CSLabel.h.

References CSGrafikElement::layoutChanged().

Referenced by HTMLElement::buildDisplay().

00033 {mString = t; layoutChanged(true);}

Here is the call graph for this function:

virtual void CSLabel::layoutSetup  )  [inline, virtual]
 

Reimplemented from CSGrafikElement.

Definition at line 34 of file CSLabel.h.

References layoutSetupLabel().

00034 {layoutSetupLabel();}

Here is the call graph for this function:


Field Documentation

const char * CSLabel::CLASS = "CSLabel" [static]
 

static element, name of this class (introsepection)

Reimplemented from CSGrafikElement.

Definition at line 10 of file CSLabel.cpp.

Referenced by CSLAF::getAreaInternal(), CSLAF::getBorderInternal(), and getType().


Generated on Wed Jul 14 00:44:32 2004 for CSLib by doxygen 1.3.6