Text_button Class Reference

#include <Text_button.h>

Inheritance diagram for Text_button:

Inheritance graph
[legend]
Collaboration diagram for Text_button:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Text_button (Gump *p, const std::string &str, int x, int y, int w=0, int h=0)
virtual void paint ()
virtual int on_widget (int mx, int my)
virtual int on_button (int mx, int my)

Protected Member Functions

void init ()

Protected Attributes

std::string text
int text_x
int text_y
int width
int height

Detailed Description

Definition at line 25 of file Text_button.h.


Constructor & Destructor Documentation

Text_button::Text_button ( Gump p,
const std::string &  str,
int  x,
int  y,
int  w = 0,
int  h = 0 
)

Definition at line 47 of file Text_button.cc.

References init().

Here is the call graph for this function:


Member Function Documentation

void Text_button::init (  )  [protected]

Definition at line 53 of file Text_button.cc.

References Shape_manager::get_font(), Font::get_text_width(), height, Game_singletons::sman, TB_FONTNUM, text, text_x, text_y, and width.

Referenced by Gump_ToggleTextButton::activate(), Enabled_button::activate(), Enabled_button::Enabled_button(), Gump_ToggleTextButton::Gump_ToggleTextButton(), and Text_button().

Here is the call graph for this function:

void Text_button::paint (  )  [virtual]

Reimplemented from Gump_button.

Definition at line 71 of file Text_button.cc.

References Image_window8::fill8(), Game_window::get_win(), Gump::get_x(), Gump::get_y(), Game_singletons::gwin, height, offset, Shape_manager::paint_text(), Gump_widget::parent, Gump_button::pushed, Game_singletons::sman, TB_BACKGROUND, TB_FONTNUM, TB_INNER_BORDER_BL_CORNER, TB_INNER_BORDER_CORNER, TB_INNER_BORDER_HIGHLIGHT, TB_INNER_BORDER_LOWLIGHT, TB_INNER_BORDER_TR_CORNER, TB_INNER_BORDER_TR_HIGH, TB_OUTER_BORDER, TB_OUTER_BORDER_CORNER, TB_OUTER_BORDER_PUSHED_TOP, TB_RT_HIGHLIGHT, text, text_x, text_y, width, Gump_widget::x, and Gump_widget::y.

Referenced by Gump_ToggleTextButton::activate(), and Enabled_button::activate().

Here is the call graph for this function:

int Text_button::on_widget ( int  mx,
int  my 
) [virtual]

Reimplemented from Gump_widget.

Definition at line 155 of file Text_button.cc.

References Gump::get_x(), Gump::get_y(), height, Gump_widget::parent, width, Gump_widget::x, and Gump_widget::y.

Referenced by on_button().

Here is the call graph for this function:

virtual int Text_button::on_button ( int  mx,
int  my 
) [inline, virtual]

Reimplemented from Gump_button.

Definition at line 42 of file Text_button.h.

References on_widget().

Here is the call graph for this function:


Member Data Documentation

std::string Text_button::text [protected]

Definition at line 28 of file Text_button.h.

Referenced by VideoOptions_button::activate(), Newfile_Textbutton::activate(), Gump_ToggleTextButton::activate(), GameplayOptions_button::activate(), Gamemenu_button::activate(), Enabled_button::activate(), CombatOptions_button::activate(), AudioOptions_button::activate(), Enabled_button::Enabled_button(), Gump_ToggleTextButton::Gump_ToggleTextButton(), init(), and paint().

int Text_button::text_x [protected]

Definition at line 29 of file Text_button.h.

Referenced by init(), and paint().

int Text_button::text_y [protected]

Definition at line 30 of file Text_button.h.

Referenced by init(), and paint().

int Text_button::width [protected]

Definition at line 31 of file Text_button.h.

Referenced by init(), on_widget(), and paint().

int Text_button::height [protected]

Definition at line 32 of file Text_button.h.

Referenced by init(), on_widget(), and paint().


The documentation for this class was generated from the following files:
Generated on Mon Jul 9 15:04:14 2007 for ExultEngine by  doxygen 1.5.1