The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Typedefs | Enumerations | Functions | Variables
gui Namespace Reference

General purpose widgets. More...

Classes

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

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 (CVideo &video, 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 is_valid_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, intparse_fraction (const std::string &s)
 
static int xp_to_advance (const std::string &s)
 

Variables

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

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

Definition at line 24 of file combo_drag.hpp.

Definition at line 30 of file drop_target.hpp.

Definition at line 29 of file drop_target.hpp.

Definition at line 26 of file drop_target.hpp.

typedef Uint32 gui::msecs

Definition at line 334 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 33 of file show_dialog.hpp.

Enumerator
MESSAGE 
OK_ONLY 
YES_NO 
OK_CANCEL 
CANCEL_ONLY 
CLOSE_ONLY 
NULL_DIALOG 

Definition at line 165 of file show_dialog.hpp.

Enumerator
TEXTBOX_NONE 
TEXTBOX_SEARCH 
TEXTBOX_MESSAGE 
TEXTBOX_COMMAND 
TEXTBOX_AI 

Definition at line 33 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
bool gui::in_dialog ( )
static bool gui::is_valid_image ( const std::string str)
static

Definition at line 580 of file button.cpp.

References IMAGE_PREFIX.

Referenced by gui::button::set_image(), gui::button::set_label(), and gui::button::set_overlay().

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().

static const std::string gui::path_up ( ".."  )
static
int gui::show_dialog ( CVideo video,
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().

Variable Documentation

const int gui::ButtonHPadding = 10
const int gui::ButtonVPadding = 10
const int gui::checkbox_horizontal_padding = font::SIZE_SMALL / 2
const int gui::font_size = font::SIZE_SMALL
const int gui::horizontal_padding = font::SIZE_SMALL

Definition at line 43 of file button.cpp.

const int gui::vertical_padding = font::SIZE_SMALL / 2

Definition at line 45 of file button.cpp.