____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
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 | |
| ImageRadioButton () | |
| ImageRadioButton (const std::string &caption, const std::string &group, bool marked) | |
| virtual void | drawBox (gcn::Graphics *graphics) |
| virtual void | draw (gcn::Graphics *graphics) |
| virtual void | mousePress (int x, int y, int button) |
| virtual void | mouseRelease (int x, int y, int button) |
| virtual void | mouseClick (int x, int y, int button, int count) |
| virtual void | adjustSize () |
| void | setUncheckedNormalImage (gcn::Image *image) |
| void | setUncheckedPressedImage (gcn::Image *image) |
| void | setCheckedNormalImage (gcn::Image *image) |
| void | setCheckedPressedImage (gcn::Image *image) |
Public Attributes | |
| gcn::Image * | uncheckedNormalImage |
| gcn::Image * | uncheckedPressedImage |
| gcn::Image * | checkedNormalImage |
| gcn::Image * | checkedPressedImage |
| bool | mMouseDown |
Definition at line 106 of file widgets.h.
| ImageRadioButton::ImageRadioButton | ( | ) |
ImageRadioButton constructor
Definition at line 407 of file widgets.cpp.
| ImageRadioButton::ImageRadioButton | ( | const std::string & | caption, | |
| const std::string & | group, | |||
| bool | marked | |||
| ) |
ImageRadioButton constructor
Definition at line 417 of file widgets.cpp.
| void ImageRadioButton::drawBox | ( | gcn::Graphics * | graphics | ) | [virtual] |
Draw the image radio button (not the caption)
Reimplemented from gcn::RadioButton.
Definition at line 429 of file widgets.cpp.
References checkedNormalImage, checkedPressedImage, gcn::Graphics::drawImage(), gcn::Image::getHeight(), gcn::Widget::getHeight(), gcn::Image::getWidth(), gcn::RadioButton::isMarked(), mMouseDown, uncheckedNormalImage, and uncheckedPressedImage.
Referenced by draw().
| void ImageRadioButton::draw | ( | gcn::Graphics * | graphics | ) | [virtual] |
Draw the image radio button
Reimplemented from gcn::RadioButton.
Definition at line 458 of file widgets.cpp.
References drawBox(), gcn::Graphics::drawRectangle(), gcn::Graphics::drawText(), gcn::RadioButton::getCaption(), gcn::Widget::getFont(), gcn::Widget::getForegroundColor(), gcn::Widget::getHeight(), gcn::Widget::getWidth(), gcn::Image::getWidth(), gcn::Widget::hasFocus(), gcn::Graphics::setColor(), gcn::Graphics::setFont(), and uncheckedNormalImage.
| void ImageRadioButton::mousePress | ( | int | x, | |
| int | y, | |||
| int | button | |||
| ) | [virtual] |
Mouse button pressed callback
Reimplemented from gcn::MouseListener.
Definition at line 484 of file widgets.cpp.
References gcn::Widget::hasMouse(), gcn::MouseInput::LEFT, and mMouseDown.
| void ImageRadioButton::mouseRelease | ( | int | x, | |
| int | y, | |||
| int | button | |||
| ) | [virtual] |
Mouse button released callback
Reimplemented from gcn::MouseListener.
Definition at line 494 of file widgets.cpp.
References gcn::MouseInput::LEFT, and mMouseDown.
| void ImageRadioButton::mouseClick | ( | int | x, | |
| int | y, | |||
| int | button, | |||
| int | count | |||
| ) | [virtual] |
Mouse clicked callback
Reimplemented from gcn::RadioButton.
Definition at line 504 of file widgets.cpp.
References gcn::Widget::generateAction(), gcn::MouseInput::LEFT, and gcn::RadioButton::setMarked().
| void ImageRadioButton::adjustSize | ( | ) | [virtual] |
Adjusts the size to fit the image and font size
Reimplemented from gcn::RadioButton.
Definition at line 515 of file widgets.cpp.
References gcn::Widget::getFont(), gcn::Image::getHeight(), gcn::Widget::getWidth(), gcn::Image::getWidth(), gcn::RadioButton::mCaption, gcn::Widget::setHeight(), gcn::Widget::setWidth(), and uncheckedNormalImage.
| void ImageRadioButton::setUncheckedNormalImage | ( | gcn::Image * | image | ) | [inline] |
| void ImageRadioButton::setUncheckedPressedImage | ( | gcn::Image * | image | ) | [inline] |
| void ImageRadioButton::setCheckedNormalImage | ( | gcn::Image * | image | ) | [inline] |
| void ImageRadioButton::setCheckedPressedImage | ( | gcn::Image * | image | ) | [inline] |
Definition at line 126 of file widgets.h.
Referenced by adjustSize(), draw(), drawBox(), and setUncheckedNormalImage().
Definition at line 130 of file widgets.h.
Referenced by drawBox(), mousePress(), and mouseRelease().
1.5.6