$treeview $search $mathjax
Stratagus
2.2.7
$projectbrief
|
$projectbrief
|
$searchbox |
_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
#include <label.h>
Public Member Functions | |
Label () | |
Label (const std::string &caption) | |
virtual const std::string & | getCaption () const |
virtual void | setCaption (const std::string &caption) |
virtual void | setAlignment (unsigned int alignment) |
virtual unsigned int | getAlignment () |
virtual void | adjustSize () |
virtual void | draw (Graphics *graphics) |
virtual void | drawBorder (Graphics *graphics) |
gcn::Label::Label | ( | ) |
Constructor.
gcn::Label::Label | ( | const std::string & | caption | ) |
const std::string & gcn::Label::getCaption | ( | ) | const [virtual] |
void gcn::Label::setCaption | ( | const std::string & | caption | ) | [virtual] |
void gcn::Label::setAlignment | ( | unsigned int | alignment | ) | [virtual] |
Sets the alignment for the caption.
alignment | Graphics::LEFT, Graphics::CENTER or Graphics::RIGHT. |
unsigned int gcn::Label::getAlignment | ( | ) | [virtual] |
Gets the alignment for the caption.
void gcn::Label::adjustSize | ( | ) | [virtual] |
Adjusts the Label size to fit the font size.
void gcn::Label::draw | ( | Graphics * | graphics | ) | [virtual] |
Draws the Widget. It is called by the parent widget when it is time for the Widget to draw itself. The graphics object is set up so that all drawing is relative to the Widget, i.e coordinate (0,0) is the top-left corner of the Widget. It is not possible to draw outside of a Widgets dimension.
graphics | a Graphics object to draw with. |
Implements gcn::Widget.
void gcn::Label::drawBorder | ( | Graphics * | ) | [virtual] |
Draws a the Widget border. A border is drawn around a Widget. The width and height of the border is therefore the Widgets height+2*bordersize. Think of a painting that has a certain size, the border surrounds the painting.
graphics | a Graphics object to draw with. |
Reimplemented from gcn::Widget.