Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

GUIButton Class Reference

#include <gui_button.hxx>

Inheritance diagram for GUIButton:

Inheritance graph
[legend]
Collaboration diagram for GUIButton:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GUIButton (GUIManager *parent)
 GUIButton (const std::string &title, int x_pos_, int y_pos_, int width_, int height_)
void draw_border_hover (GraphicContext *)
void draw_border_pressed (GraphicContext *)
void draw_border_normal (GraphicContext *)
void on_mouse_enter ()
void on_mouse_leave ()
void on_primary_button_press (int x, int y)
void on_primary_button_release (int x, int y)
void draw (GraphicContext *)
virtual void draw_content (GraphicContext *)
virtual void on_click ()

Protected Attributes

std::string title
bool mouse_over
bool pressed

Constructor & Destructor Documentation

GUIButton::GUIButton GUIManager   parent
 

Definition at line 22 of file gui_button.cxx.

GUIButton::GUIButton const std::string &    title,
int    x_pos_,
int    y_pos_,
int    width_,
int    height_
 

Definition at line 33 of file gui_buttons.cxx.

References mouse_over, and pressed.


Member Function Documentation

void GUIButton::draw GraphicContext   [virtual]
 

Implements GUIComponent.

Definition at line 71 of file gui_buttons.cxx.

References draw_border_hover(), draw_border_normal(), draw_border_pressed(), draw_content(), GraphicContext::draw_fill_rect(), mouse_over, and pressed.

void GUIButton::draw_border_hover GraphicContext  
 

Definition at line 109 of file gui_buttons.cxx.

References GraphicContext::draw_rect().

Referenced by draw().

void GUIButton::draw_border_normal GraphicContext  
 

Definition at line 123 of file gui_buttons.cxx.

References GraphicContext::draw_rect().

Referenced by draw().

void GUIButton::draw_border_pressed GraphicContext  
 

Definition at line 116 of file gui_buttons.cxx.

References GraphicContext::draw_rect().

Referenced by draw().

void GUIButton::draw_content GraphicContext   [virtual]
 

Reimplemented in GUIRunButton, GUISlowMoButton, and GUIGenericButton.

Definition at line 103 of file gui_buttons.cxx.

References GraphicContext::draw_string_centered().

Referenced by draw(), GUIGenericButton::draw_content(), GUISlowMoButton::draw_content(), and GUIRunButton::draw_content().

void GUIButton::on_click   [virtual]
 

Reimplemented in GUIRunButton, GUISlowMoButton, GUIZoomInButton, GUIZoomOutButton, GUIQuitButton, GUILoadButton, and GUIGenericButton.

Definition at line 135 of file gui_buttons.cxx.

Referenced by on_primary_button_release().

void GUIButton::on_mouse_enter   [virtual]
 

Reimplemented from GUIComponent.

Definition at line 43 of file gui_buttons.cxx.

References mouse_over.

void GUIButton::on_mouse_leave   [virtual]
 

Reimplemented from GUIComponent.

Definition at line 49 of file gui_buttons.cxx.

References mouse_over.

void GUIButton::on_primary_button_press int    x,
int    y
[virtual]
 

Reimplemented from GUIComponent.

Definition at line 55 of file gui_buttons.cxx.

References GUIManager::grab_mouse(), WorldGUIManager::instance(), and pressed.

void GUIButton::on_primary_button_release int    x,
int    y
[virtual]
 

Reimplemented from GUIComponent.

Definition at line 62 of file gui_buttons.cxx.

References WorldGUIManager::instance(), GUIComponent::is_at(), on_click(), pressed, and GUIManager::ungrab_mouse().


Member Data Documentation

bool GUIButton::mouse_over [protected]
 

Definition at line 32 of file gui_buttons.hxx.

Referenced by draw(), GUIRunButton::draw_content(), GUIButton(), on_mouse_enter(), and on_mouse_leave().

bool GUIButton::pressed [protected]
 

Definition at line 33 of file gui_buttons.hxx.

Referenced by draw(), GUIRunButton::draw_content(), GUIButton(), on_primary_button_press(), and on_primary_button_release().

std::string GUIButton::title [protected]
 

Definition at line 30 of file gui_buttons.hxx.


The documentation for this class was generated from the following files:
Generated on Thu Jul 24 10:25:16 2003 for Construo by doxygen1.3-rc3