Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | Related Pages

wftk::Label Class Reference

Display a text message onscreen. More...

#include <label.h>

Inheritance diagram for wftk::Label:

wftk::Widget wftk::ScreenArea List of all members.

Public Types

enum  align_t { ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER }
 Enumeration for horizontal text alignment.

Public Member Functions

 Label (const std::string &text="", const Font &font=Font())
 Construct this label with the given text, drawn with the given Font.
void setTextColor (const Color &fontCol)
 Set the text color (foreground only).
void setAlign (align_t align)
 Set the horizontal (left, center, right) alignment of this Label.
void setText (const std::string &)
 Set the text for this Label.
const std::string & getText () const
 Return the text of this Label.

Protected Member Functions

virtual void draw (Surface &, const Point &, const Region &)
 The area drawn to must lie within the given region.
virtual void setPackingInfo ()
 recalculate the object's prefered size

Detailed Description

Display a text message onscreen.


Member Function Documentation

void wftk::Label::draw Surface surf,
const Point p,
const Region r
[protected, virtual]
 

The area drawn to must lie within the given region.

This is protected so derived classes can call their parents' draw() in their own implementations.

Reimplemented from wftk::Widget.


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

Generated Mon Sep 6 21:58:16 2004.
Copyright © 1998-2003 by the respective authors.

This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.