mp::gamebrowser Class Reference

#include <multiplayer_lobby.hpp>

Inheritance diagram for mp::gamebrowser:

Inheritance graph
[legend]
Collaboration diagram for mp::gamebrowser:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 gamebrowser (CVideo &video, const config *map_hashes)
void scroll (unsigned int pos)
void handle_event (const SDL_Event &event)
void set_inner_location (const SDL_Rect &rect)
void set_item_height (unsigned int height)
void set_game_items (const config &cfg, const config &game_config)
void draw ()
void draw_contents ()
void draw_row (const size_t row_index, const SDL_Rect &rect, ROW_TYPE type)
SDL_Rect get_item_rect (size_t index) const
bool empty () const
bool selection_is_joinable () const
bool selection_is_observable () const
bool selected () const
void reset_selection ()
int selection () const
game_item selected_game ()

Protected Member Functions

unsigned int row_height () const

Private Attributes

image::locator gold_icon_locator_
image::locator xp_icon_locator_
image::locator vision_icon_locator_
image::locator time_limit_icon_locator_
image::locator observer_icon_locator_
image::locator no_observer_icon_locator_
const configmap_hashes_
unsigned int item_height_
int margin_
int minimap_size_
int h_padding_
int header_height_
size_t selected_
std::pair< size_t, size_t > visible_range_
std::vector< game_itemgames_
std::vector< size_t > redraw_items_
std::vector< int > widths_
bool double_clicked_
bool ignore_next_doubleclick_
bool last_was_doubleclick_

Classes

struct  game_item


Detailed Description

Definition at line 33 of file multiplayer_lobby.hpp.


Constructor & Destructor Documentation

mp::gamebrowser::gamebrowser ( CVideo video,
const config map_hashes 
)

Definition at line 44 of file multiplayer_lobby.cpp.

References gui::menu::set_numeric_keypress_selection().


Member Function Documentation

void mp::gamebrowser::scroll ( unsigned int  pos  )  [virtual]

void mp::gamebrowser::handle_event ( const SDL_Event &  event  )  [virtual]

void mp::gamebrowser::set_inner_location ( const SDL_Rect &  rect  )  [virtual]

void mp::gamebrowser::set_item_height ( unsigned int  height  ) 

void mp::gamebrowser::set_game_items ( const config cfg,
const config game_config 
)

void mp::gamebrowser::draw (  )  [virtual]

void mp::gamebrowser::draw_contents (  )  [virtual]

void mp::gamebrowser::draw_row ( const size_t  row_index,
const SDL_Rect &  rect,
ROW_TYPE  type 
) [virtual]

SDL_Rect mp::gamebrowser::get_item_rect ( size_t  index  )  const

Definition at line 76 of file multiplayer_lobby.cpp.

References gui::scrollarea::inner_location(), loc, row_height(), and visible_range_.

Referenced by draw_contents(), and handle_event().

bool mp::gamebrowser::empty (  )  const [inline]

bool mp::gamebrowser::selection_is_joinable (  )  const [inline]

Definition at line 70 of file multiplayer_lobby.hpp.

References empty(), games_, and selected_.

Referenced by mp::lobby::gamelist_updated(), handle_event(), and mp::lobby::process_event().

bool mp::gamebrowser::selection_is_observable (  )  const [inline]

Definition at line 72 of file multiplayer_lobby.hpp.

References empty(), games_, and selected_.

Referenced by mp::lobby::gamelist_updated(), handle_event(), and mp::lobby::process_event().

bool mp::gamebrowser::selected (  )  const [inline]

Definition at line 73 of file multiplayer_lobby.hpp.

References double_clicked_, and empty().

Referenced by mp::lobby::process_event().

void mp::gamebrowser::reset_selection (  )  [inline]

Reimplemented from gui::menu.

Definition at line 74 of file multiplayer_lobby.hpp.

References double_clicked_.

Referenced by mp::lobby::process_event().

int mp::gamebrowser::selection (  )  const [inline]

Reimplemented from gui::menu.

Definition at line 75 of file multiplayer_lobby.hpp.

References selected_.

Referenced by mp::lobby::process_event().

game_item mp::gamebrowser::selected_game (  )  [inline]

Definition at line 76 of file multiplayer_lobby.hpp.

References games_, and selected_.

Referenced by mp::lobby::process_event(), and set_game_items().

unsigned int mp::gamebrowser::row_height (  )  const [inline, protected]


Member Data Documentation

Definition at line 80 of file multiplayer_lobby.hpp.

Referenced by draw_row().

Definition at line 81 of file multiplayer_lobby.hpp.

Referenced by draw_row().

Definition at line 82 of file multiplayer_lobby.hpp.

Referenced by draw_row().

Definition at line 83 of file multiplayer_lobby.hpp.

Referenced by draw_row().

Definition at line 84 of file multiplayer_lobby.hpp.

Referenced by draw_row().

Definition at line 85 of file multiplayer_lobby.hpp.

Referenced by draw_row().

Definition at line 87 of file multiplayer_lobby.hpp.

Referenced by set_game_items().

unsigned int mp::gamebrowser::item_height_ [private]

Reimplemented from gui::menu.

Definition at line 89 of file multiplayer_lobby.hpp.

Referenced by row_height(), and set_game_items().

int mp::gamebrowser::margin_ [private]

Definition at line 90 of file multiplayer_lobby.hpp.

Referenced by draw_contents(), and draw_row().

Definition at line 91 of file multiplayer_lobby.hpp.

Referenced by draw_row(), and set_game_items().

Definition at line 92 of file multiplayer_lobby.hpp.

Referenced by draw_row().

Definition at line 93 of file multiplayer_lobby.hpp.

size_t mp::gamebrowser::selected_ [private]

std::pair<size_t, size_t> mp::gamebrowser::visible_range_ [private]

std::vector<game_item> mp::gamebrowser::games_ [private]

std::vector<size_t> mp::gamebrowser::redraw_items_ [private]

Definition at line 97 of file multiplayer_lobby.hpp.

std::vector<int> mp::gamebrowser::widths_ [private]

Definition at line 98 of file multiplayer_lobby.hpp.

Reimplemented from gui::menu.

Definition at line 99 of file multiplayer_lobby.hpp.

Referenced by handle_event(), reset_selection(), and selected().

Reimplemented from gui::menu.

Definition at line 100 of file multiplayer_lobby.hpp.

Referenced by handle_event().

Reimplemented from gui::menu.

Definition at line 101 of file multiplayer_lobby.hpp.

Referenced by handle_event().


The documentation for this class was generated from the following files:

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs