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

       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"

ImageButton Class Reference

#include <widgets.h>

Inheritance diagram for ImageButton:

gcn::Button gcn::Widget gcn::MouseListener gcn::KeyListener

List of all members.

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::ImagenormalImage
gcn::ImagepressedImage
gcn::ImagedisabledImage


Detailed Description

Definition at line 88 of file widgets.h.


Constructor & Destructor Documentation

ImageButton::ImageButton (  ) 

ImageButton constructor

Definition at line 309 of file widgets.cpp.

References gcn::Widget::setForegroundColor().

ImageButton::ImageButton ( const std::string &  caption  ) 

ImageButton constructor

Parameters:
caption Caption text

Definition at line 321 of file widgets.cpp.

References gcn::Widget::setForegroundColor().


Member Function Documentation

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

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]

Definition at line 97 of file widgets.h.

References adjustSize(), and normalImage.

void ImageButton::setPressedImage ( gcn::Image image  )  [inline]

Definition at line 98 of file widgets.h.

References pressedImage.

void ImageButton::setDisabledImage ( gcn::Image image  )  [inline]

Definition at line 99 of file widgets.h.

References disabledImage.


Member Data Documentation

Definition at line 101 of file widgets.h.

Referenced by adjustSize(), draw(), and setNormalImage().

Definition at line 102 of file widgets.h.

Referenced by draw(), and setPressedImage().

Definition at line 103 of file widgets.h.

Referenced by draw(), and setDisabledImage().


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