____                _       __
    / __ )____  _____   | |     / /___ ___________
   / __  / __ \/ ___/   | | /| / / __ `/ ___/ ___/
  / /_/ / /_/ (__  )    | |/ |/ / /_/ / /  (__  )
 /_____/\____/____/     |__/|__/\__,_/_/  /____/

       A futuristic real-time strategy game.
          This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project. Distributed under the "GNU General Public License"

StatBoxWidget Class Reference

#include <widgets.h>

Inheritance diagram for StatBoxWidget:

gcn::Widget

List of all members.

Public Member Functions

 StatBoxWidget (int width, int height)
virtual void draw (gcn::Graphics *graphics)
void setCaption (const std::string &s)
const std::string & getCaption () const
void setPercent (const int percent)
int getPercent () const


Detailed Description

Definition at line 281 of file widgets.h.


Constructor & Destructor Documentation

StatBoxWidget::StatBoxWidget ( int  width,
int  height 
)


Member Function Documentation

void StatBoxWidget::draw ( gcn::Graphics graphics  )  [virtual]

Draw StatBoxWidget.

Parameters:
graphics Graphic driver used to draw.
Todo:
caption seem to be placed upper than the middle.
Todo:
set direction (hor./vert.) and growing direction(up/down, left/rigth).

Implements gcn::Widget.

Definition at line 1395 of file widgets.cpp.

References gcn::Graphics::drawRectangle(), gcn::Graphics::drawText(), gcn::Graphics::fillRectangle(), gcn::Widget::getBackgroundColor(), gcn::Widget::getBaseColor(), getCaption(), gcn::Widget::getFont(), gcn::Widget::getForegroundColor(), gcn::Widget::getHeight(), gcn::Widget::getWidth(), gcn::Widget::getX(), gcn::Widget::getY(), gcn::Graphics::setColor(), and gcn::Graphics::setFont().

void StatBoxWidget::setCaption ( const std::string &  caption  ) 

Set caption of StatBoxWidget.

Parameters:
caption New value.

Definition at line 1427 of file widgets.cpp.

References gcn::Widget::setDirty().

const std::string & StatBoxWidget::getCaption (  )  const

Get caption of StatBoxWidget.

Definition at line 1437 of file widgets.cpp.

Referenced by draw().

void StatBoxWidget::setPercent ( const int  percent  ) 

Set percent of StatBoxWidget.

Parameters:
percent New value.

Definition at line 1447 of file widgets.cpp.

References gcn::Widget::setDirty().

int StatBoxWidget::getPercent (  )  const

Get percent of StatBoxWidget.

Definition at line 1456 of file widgets.cpp.


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

Generated on Sat Feb 21 00:28:25 2009 for Bos Wars by  doxygen 1.5.6