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

General purpose widgets. More...

Classes

class  button
 
class  dialog_frame
 
struct  dialog_manager
 
class  floating_textbox
 
class  label
 
class  menu
 
class  scrollarea
 
class  scrollbar
 Scrollbar. More...
 
class  textbox
 
class  tristate_button
 
class  widget
 

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
}
 

Functions

bool in_dialog ()
 
static bool is_valid_image (const std::string &str)
 
static std::pair< int, int > parse_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.

Enumeration Type Documentation

Enumerator
DIALOG_BACK 
DIALOG_FORWARD 
CREATE_ITEM 
DELETE_ITEM 
ESCAPE_DIALOG 
CONTINUE_DIALOG 
CLOSE_DIALOG 

Definition at line 32 of file show_dialog.hpp.

Enumerator
TEXTBOX_NONE 
TEXTBOX_SEARCH 
TEXTBOX_MESSAGE 
TEXTBOX_COMMAND 
TEXTBOX_AI 

Definition at line 32 of file floating_textbox.hpp.

Function Documentation

bool gui::in_dialog ( )

Definition at line 56 of file show_dialog.cpp.

References gui2::is_in_dialog().

Referenced by controller_base::handle_event(), and display::redraw_everything().

static bool gui::is_valid_image ( const std::string &  str)
static

Definition at line 397 of file button.cpp.

References IMAGE_PREFIX.

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

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 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

Definition at line 42 of file show_dialog.cpp.

Referenced by gui::dialog_frame::draw(), and gui::dialog_frame::layout().

const int gui::ButtonVPadding = 10

Definition at line 43 of file show_dialog.cpp.

Referenced by gui::dialog_frame::bottom_padding(), and gui::dialog_frame::layout().

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 42 of file button.cpp.

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

Definition at line 44 of file button.cpp.