____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
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"#include <widgets.h>

Public Member Functions | |
| ImageButton () | |
| ImageButton (const std::string &caption) | |
| virtual void | draw (gcn::Graphics *graphics) |
| virtual void | adjustSize () |
| void | setNormalImage (gcn::Image *image) |
| void | setPressedImage (gcn::Image *image) |
| void | setDisabledImage (gcn::Image *image) |
Public Attributes | |
| gcn::Image * | normalImage |
| gcn::Image * | pressedImage |
| gcn::Image * | disabledImage |
Definition at line 88 of file widgets.h.
| ImageButton::ImageButton | ( | ) |
ImageButton constructor
Definition at line 309 of file widgets.cpp.
References gcn::Widget::setForegroundColor().
| ImageButton::ImageButton | ( | const std::string & | caption | ) |
ImageButton constructor
| caption | Caption text |
Definition at line 321 of file widgets.cpp.
References gcn::Widget::setForegroundColor().
| void ImageButton::draw | ( | gcn::Graphics * | graphics | ) | [virtual] |
Draw the image button
| graphics | Graphics object to draw with |
Reimplemented from gcn::Button.
Definition at line 333 of file widgets.cpp.
References gcn::Graphics::CENTER, disabledImage, gcn::Graphics::drawImage(), gcn::Graphics::drawRectangle(), gcn::Graphics::drawText(), GCN_EXCEPTION, gcn::Button::getAlignment(), gcn::Button::getCaption(), gcn::Widget::getFont(), gcn::Widget::getForegroundColor(), gcn::Widget::getHeight(), gcn::Image::getHeight(), gcn::Widget::getWidth(), gcn::Image::getWidth(), gcn::Widget::hasFocus(), gcn::Widget::hasMouse(), gcn::Widget::isEnabled(), gcn::Button::isPressed(), gcn::Graphics::LEFT, normalImage, pressedImage, gcn::Graphics::RIGHT, gcn::Graphics::setColor(), and gcn::Graphics::setFont().
| void ImageButton::adjustSize | ( | ) | [virtual] |
Automatically adjust the size of an image button
Reimplemented from gcn::Button.
Definition at line 389 of file widgets.cpp.
References gcn::Image::getHeight(), gcn::Image::getWidth(), normalImage, gcn::Widget::setHeight(), and gcn::Widget::setWidth().
Referenced by setNormalImage().
| void ImageButton::setNormalImage | ( | gcn::Image * | image | ) | [inline] |
| void ImageButton::setPressedImage | ( | gcn::Image * | image | ) | [inline] |
| void ImageButton::setDisabledImage | ( | gcn::Image * | image | ) | [inline] |
1.5.6