The Battle for Wesnoth  1.15.11+dev
Classes | Enumerations | Functions | Variables
gui Namespace Reference

General purpose widgets. More...

Classes

class  button
 A button is a control that can be pushed to start an action or close a dialog. More...
 
class  dialog_frame
 
struct  dialog_manager
 
class  floating_textbox
 
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)
 

Variables

const int ButtonHPadding = 10
 
const int ButtonVPadding = 10
 
const int default_font_size = font::SIZE_BUTTON
 

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

◆ DIALOG_RESULT

Enumerator
DIALOG_BACK 
DIALOG_FORWARD 
CREATE_ITEM 
DELETE_ITEM 
ESCAPE_DIALOG 
CONTINUE_DIALOG 
CLOSE_DIALOG 

Definition at line 30 of file show_dialog.hpp.

◆ TEXTBOX_MODE

Enumerator
TEXTBOX_NONE 
TEXTBOX_SEARCH 
TEXTBOX_MESSAGE 
TEXTBOX_COMMAND 
TEXTBOX_AI 

Definition at line 30 of file floating_textbox.hpp.

Function Documentation

◆ in_dialog()

bool gui::in_dialog ( )

Definition at line 52 of file show_dialog.cpp.

References gui2::is_in_dialog().

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

◆ is_valid_image()

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

Definition at line 375 of file button.cpp.

References IMAGE_PREFIX.

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

Variable Documentation

◆ ButtonHPadding

const int gui::ButtonHPadding = 10

Definition at line 41 of file show_dialog.cpp.

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

◆ ButtonVPadding

const int gui::ButtonVPadding = 10

Definition at line 42 of file show_dialog.cpp.

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

◆ default_font_size

const int gui::default_font_size = font::SIZE_BUTTON

Definition at line 39 of file button.cpp.