Classes | Typedefs | Enumerations | Functions | Variables

gui Namespace Reference

General purpose widgets. More...

Classes

struct  dialog_process_info
class  dialog_image
class  dialog_textbox
class  filter_textbox
class  dialog_button
class  standard_dialog_button
class  dialog
class  floating_textbox
struct  dialog_manager
class  dialog_frame
class  dialog_button_action
struct  dialog_button_info
struct  check_item
class  preview_pane
class  button
class  combo
class  combo_drag
class  drop_target
 Handles droping for drag able ui items. More...
class  drop_group_manager
 Used to create and destroy drop groups. More...
struct  match_begin
class  file_menu
 A widget where the user may navigate through directories and choose a file. More...
class  label
class  menu
class  progress_bar
class  scrollarea
class  scrollbar
 Scrollbar. More...
class  scrollpane
 Scrollpane. More...
class  slider
class  list_slider
class  textbox
class  widget

Typedefs

typedef Uint32 msecs
typedef boost::shared_ptr
< combo_drag
combo_drag_ptr
typedef boost::shared_ptr
< drop_target
drop_target_ptr
typedef int drop_target_group
typedef boost::shared_ptr
< drop_group_manager
drop_group_manager_ptr

Enumerations

enum  TEXTBOX_MODE {
  TEXTBOX_NONE, TEXTBOX_SEARCH, TEXTBOX_MESSAGE, TEXTBOX_COMMAND,
  TEXTBOX_AI
}
enum  DIALOG_RESULT {
  DIALOG_BACK = -7, DIALOG_FORWARD = -6, CREATE_ITEM = -5, DELETE_ITEM = -4,
  ESCAPE_DIALOG = -3, CONTINUE_DIALOG = -2, CLOSE_DIALOG = -1
}
enum  DIALOG_TYPE {
  MESSAGE, OK_ONLY, YES_NO, OK_CANCEL,
  CANCEL_ONLY, CLOSE_ONLY, NULL_DIALOG
}

Functions

bool in_dialog ()
int show_dialog (display &screen, surface image, const std::string &caption, const std::string &message, DIALOG_TYPE type, const std::vector< std::string > *menu_items, const std::vector< preview_pane * > *preview_panes, const std::string &text_widget_label, std::string *text_widget_text, const int text_widget_max_chars, std::vector< check_item > *options, int xloc, int yloc, const dialog_frame::style *dialog_style, std::vector< dialog_button_info > *action_buttons, const menu::sorter *sorter, menu::style *menu_style)
void check_quit (CVideo &video)
static bool not_image (const std::string &str)
static const std::string dir_picture ("misc/folder-icon.png")
static const std::string path_up ("..")
static std::pair< int, int > parse_fraction (const std::string &s)
static int xp_to_advance (const std::string &s)

Variables

const int ButtonHPadding = 10
const int ButtonVPadding = 10
const int font_size = font::SIZE_SMALL
const int horizontal_padding = font::SIZE_SMALL
const int checkbox_horizontal_padding = font::SIZE_SMALL / 2
const int vertical_padding = font::SIZE_SMALL / 2
menuempty_menu = NULL

Detailed Description

General purpose widgets.

This module primarily contains a number of common, general purpose widgets for the construction of composite user interfaces.


Typedef Documentation

typedef boost::shared_ptr<combo_drag> gui::combo_drag_ptr

Definition at line 25 of file combo_drag.hpp.

typedef boost::shared_ptr<drop_group_manager> gui::drop_group_manager_ptr

Definition at line 31 of file drop_target.hpp.

Definition at line 30 of file drop_target.hpp.

typedef boost::shared_ptr<drop_target> gui::drop_target_ptr

Definition at line 27 of file drop_target.hpp.

typedef Uint32 gui::msecs

Definition at line 322 of file construct_dialog.hpp.


Enumeration Type Documentation

Enumerator:
DIALOG_BACK 
DIALOG_FORWARD 
CREATE_ITEM 
DELETE_ITEM 
ESCAPE_DIALOG 
CONTINUE_DIALOG 
CLOSE_DIALOG 

Definition at line 34 of file show_dialog.hpp.

Enumerator:
MESSAGE 
OK_ONLY 
YES_NO 
OK_CANCEL 
CANCEL_ONLY 
CLOSE_ONLY 
NULL_DIALOG 

Definition at line 156 of file show_dialog.hpp.

Enumerator:
TEXTBOX_NONE 
TEXTBOX_SEARCH 
TEXTBOX_MESSAGE 
TEXTBOX_COMMAND 
TEXTBOX_AI 

Definition at line 34 of file floating_textbox.hpp.


Function Documentation

void gui::check_quit ( CVideo video  ) 
static const std::string gui::dir_picture ( "misc/folder-icon.png"   )  [static]

Referenced by gui::file_menu::display_current_files().

Here is the caller graph for this function:

bool gui::in_dialog (  ) 

Referenced by hotkey::basic_handler::handle_event(), and controller_base::handle_event().

Here is the caller graph for this function:

static bool gui::not_image ( const std::string &  str  )  [static]

Definition at line 257 of file button.cpp.

References IMAGE_PREFIX.

static std::pair<int, int> gui::parse_fraction ( const std::string &  s  )  [static]

Definition at line 106 of file menu.cpp.

References utils::split().

Referenced by xp_to_advance().

Here is the call graph for this function:

Here is the caller graph for this function:

static const std::string gui::path_up ( ".."   )  [static]
int gui::show_dialog ( display screen,
surface  image,
const std::string &  caption,
const std::string &  message,
DIALOG_TYPE  type,
const std::vector< std::string > *  menu_items,
const std::vector< preview_pane * > *  preview_panes,
const std::string &  text_widget_label,
std::string *  text_widget_text,
const int  text_widget_max_chars,
std::vector< check_item > *  options,
int  xloc,
int  yloc,
const dialog_frame::style *  dialog_style,
std::vector< dialog_button_info > *  action_buttons,
const menu::sorter *  sorter,
menu::style *  menu_style 
)
static int gui::xp_to_advance ( const std::string &  s  )  [static]

Definition at line 115 of file menu.cpp.

References parse_fraction().

Referenced by gui::menu::basic_sorter::less().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

const int gui::ButtonHPadding = 10
const int gui::ButtonVPadding = 10

Definition at line 38 of file button.cpp.

Referenced by gui::button::calculate_size(), and gui::button::draw_contents().

Definition at line 37 of file button.cpp.

Referenced by gui::button::calculate_size().

Definition at line 39 of file button.cpp.

Referenced by gui::button::calculate_size().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:20:07 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs