MenuChoice Class Reference

#include <menulist.h>

Inheritance diagram for MenuChoice:

Inheritance graph
[legend]
Collaboration diagram for MenuChoice:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MenuChoice (Shape_frame *on, Shape_frame *off, int xpos, int ypos, Font *fnt)
virtual ~MenuChoice ()
void add_choice (const char *s)
int get_choice ()
void set_choice (int c)
virtual void paint (Game_window *gwin)
virtual bool handle_event (SDL_Event &event)

Private Attributes

std::vector< std::string > * choices
int choice
Fontfont
int max_choice_width

Detailed Description

Definition at line 62 of file menulist.h.


Constructor & Destructor Documentation

MenuChoice::MenuChoice ( Shape_frame on,
Shape_frame off,
int  xpos,
int  ypos,
Font fnt 
)

Definition at line 69 of file menulist.cc.

References choice, choices, font, MenuObject::frame_off, MenuObject::frame_on, Shape_frame::get_height(), Shape_frame::get_width(), max_choice_width, MenuObject::selected, MenuObject::x, MenuObject::x1, MenuObject::x2, MenuObject::y, MenuObject::y1, and MenuObject::y2.

Here is the call graph for this function:

virtual MenuChoice::~MenuChoice (  )  [inline, virtual]

Definition at line 70 of file menulist.h.

References choices.


Member Function Documentation

void MenuChoice::add_choice ( const char *  s  ) 

Definition at line 87 of file menulist.cc.

References choices, font, Font::get_text_width(), len, max_choice_width, MenuObject::x, and MenuObject::x2.

Referenced by ExultMenu::setup().

Here is the call graph for this function:

int MenuChoice::get_choice (  )  [inline]

Definition at line 72 of file menulist.h.

References choice.

Referenced by ExultMenu::setup().

void MenuChoice::set_choice ( int  c  )  [inline]

Definition at line 73 of file menulist.h.

References choice.

Referenced by ExultMenu::setup().

void MenuChoice::paint ( Game_window gwin  )  [virtual]

Implements MenuObject.

Definition at line 95 of file menulist.cc.

References choice, MenuObject::dirty, Font::draw_text(), Image_window8::fill8(), font, MenuObject::frame_off, MenuObject::frame_on, Image_window8::get_ib8(), Shape_manager::get_instance(), Font::get_text_height(), Shape_frame::get_width(), Game_window::get_win(), gwin, max_choice_width, Shape_manager::paint_shape(), MenuObject::selected, Image_window::show(), MenuObject::x, MenuObject::x1, MenuObject::x2, MenuObject::y, MenuObject::y1, and MenuObject::y2.

Here is the call graph for this function:

bool MenuChoice::handle_event ( SDL_Event &  event  )  [virtual]

Implements MenuObject.

Definition at line 117 of file menulist.cc.

References choice, choices, and MenuObject::dirty.


Member Data Documentation

std::vector<std::string>* MenuChoice::choices [private]

Definition at line 64 of file menulist.h.

Referenced by add_choice(), handle_event(), MenuChoice(), and ~MenuChoice().

int MenuChoice::choice [private]

Definition at line 65 of file menulist.h.

Referenced by get_choice(), handle_event(), MenuChoice(), paint(), and set_choice().

Font* MenuChoice::font [private]

Definition at line 66 of file menulist.h.

Referenced by add_choice(), MenuChoice(), and paint().

int MenuChoice::max_choice_width [private]

Definition at line 67 of file menulist.h.

Referenced by add_choice(), MenuChoice(), and paint().


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