gui2 Namespace Reference


Classes

class  taddon_connect
class  tlanguage_selection
class  tmp_method_selection
class  tbutton
class  tline
 Definition of a line shape. More...
class  trectangle
 Definition of a rectangle shape. More...
class  timage
 Definition of an image shape. More...
class  ttext
 Definition of a text shape. More...
class  tcanvas
 Base class for the canvas which allows drawing, a later version may implement a cache which allows the same scripts with the same input to store their output surface. More...
class  tcontainer_
 A generic container base class. More...
class  tcontrol
 Base class for all visible items. More...
class  tevent_handler
class  tformula
 Template class can hold a value or a formula calculating the value. More...
class  tgrid
 Base container class which needs to size children. More...
struct  tpoint
struct  terror
class  tlabel
class  tlistbox
class  tpanel
 Visible container to hold children. More...
class  tscrollbar_
 Base class for a scroll bar. More...
struct  tstate_definition
 Contains the state info for a resolution. More...
struct  tresolution_definition_
 Base class of a resolution, contains the common keys for a resolution. More...
struct  tcontrol_definition
struct  tbutton_definition
struct  tlabel_definition
struct  tlistbox_definition
struct  tpanel_definition
struct  tspacer_definition
struct  ttext_box_definition
struct  ttoggle_button_definition
struct  ttooltip_definition
struct  tvertical_scrollbar_definition
struct  twindow_definition
struct  tgui_definition
class  tspacer
class  ttext_
 Base class for text items will get two base decendends
  • ttext_box a single line text
  • ttext_area a multi line text.
More...
class  ttext_history
 Class for text input history. More...
class  ttext_box
 Class for a single line text area. More...
class  ttoggle_button
class  ttooltip
class  tvertical_scrollbar
 A vertical scrollbar. More...
class  tevent_executor
 Base class with all possible events, most widgets can ignore most of these, but they are available. More...
class  twidget
 Base class for all widgets. More...
class  tselectable_
 Small abstract helper class. More...
class  twindow
 base class of top level items, the only item which needs to store the final canvase to draw on More...
struct  tbuilder_control
struct  tbuilder_button
struct  tbuilder_label
struct  tbuilder_listbox
struct  tbuilder_panel
struct  tbuilder_spacer
struct  tbuilder_text_box
struct  tbuilder_toggle_button
struct  tbuilder_vertical_scrollbar
struct  tbuilder_widget
 Contains the info needed to instantiate a widget. More...
struct  tbuilder_grid
class  twindow_builder

Namespaces

namespace  settings

Typedefs

typedef boost::intrusive_ptr
< tbuilder_widget
tbuilder_widget_ptr
typedef boost::intrusive_ptr
< const tbuilder_widget
const_tbuilder_widget_ptr

Enumerations

enum  twindow_type { ADDON_CONNECT, LANGUAGE_SELECTION, MP_METHOD_SELECTION, DUMMY }

Functions

static Uint32 hover_callback (Uint32, void *param)
static Uint32 popup_callback (Uint32, void *)
bool init ()
SDL_Rect create_rect (const tpoint &origin, const tpoint &size)
std::ostream & operator<< (std::ostream &stream, const tpoint &point)
int decode_font_style (const std::string &style)
Uint32 decode_colour (const std::string &colour)
surface save_background (const surface &background, const SDL_Rect &rect)
 Copies a portion of a surface.
void restore_background (const surface &restorer, surface &background, const SDL_Rect &rect)
 Copies one surface unto another one.
static tlistboxget_listbox (twidget *widget)
static void callback_select_list_item (twidget *caller)
static void callback_scrollbar (twidget *caller)
static void callback_scrollbar_button (twidget *caller)
std::vector< std::string > window_type_list (DUMMY)
 Vector with all known windows, these are validated on existance on startup.
static void fill_window_types ()
const std::string & get_id (const twindow_type window_type)
void load_settings ()
 Loads the setting for the theme.
tresolution_definition_get_control (const std::string &control_type, const std::string &definition)
std::vector
< twindow_builder::tresolution >
::const_iterator 
get_window_builder (const std::string &type)
static surface render_text (const std::string &text, unsigned font_size)
static unsigned get_v_align (const std::string &v_align)
static unsigned get_h_align (const std::string &h_align)
static unsigned get_border (const std::vector< std::string > &border)
static unsigned read_flags (const config &cfg)
twindow build (CVideo &video, const std::string &type)

Variables

static bool initialized_ = false
std::map< std::string,
twindow_builder
windows
 Map with all known windows, (the builder class builds a window).
std::map< std::string,
tgui_definition
guis
 Map with all known guis.
std::map< std::string,
tgui_definition >
::const_iterator 
current_gui = guis.end()
 Points to the current gui.


Typedef Documentation

typedef boost::intrusive_ptr<const tbuilder_widget> gui2::const_tbuilder_widget_ptr

Definition at line 50 of file window_builder.hpp.

typedef boost::intrusive_ptr<tbuilder_widget> gui2::tbuilder_widget_ptr

Definition at line 49 of file window_builder.hpp.


Enumeration Type Documentation

Enumerator:
ADDON_CONNECT 
LANGUAGE_SELECTION 
MP_METHOD_SELECTION 
DUMMY  mp game the user wants to play.

Definition at line 33 of file gui/widgets/settings.hpp.


Function Documentation

twindow gui2::build ( CVideo video,
const std::string &  type 
)

static void gui2::callback_scrollbar ( twidget *  caller  )  [static]

Definition at line 64 of file listbox.cpp.

References get_listbox(), and gui2::tlistbox::scrollbar_moved().

Referenced by gui2::tlistbox::finalize_setup().

static void gui2::callback_scrollbar_button ( twidget *  caller  )  [static]

Definition at line 69 of file listbox.cpp.

References get_listbox(), and gui2::tlistbox::scrollbar_click().

Referenced by gui2::tlistbox::finalize_setup().

static void gui2::callback_select_list_item ( twidget *  caller  )  [static]

SDL_Rect gui2::create_rect ( const tpoint &  origin,
const tpoint &  size 
)

Uint32 gui2::decode_colour ( const std::string &  colour  ) 

Definition at line 97 of file helper.cpp.

References utils::split().

int gui2::decode_font_style ( const std::string &  style  ) 

Definition at line 80 of file helper.cpp.

References ERR_G.

static void gui2::fill_window_types (  )  [static]

static unsigned gui2::get_border ( const std::vector< std::string > &  border  )  [static]

tresolution_definition_ * gui2::get_control ( const std::string &  control_type,
const std::string &  definition 
)

static unsigned gui2::get_h_align ( const std::string &  h_align  )  [static]

const std::string & gui2::get_id ( const twindow_type  window_type  ) 

static tlistbox* gui2::get_listbox ( twidget *  widget  )  [static]

static unsigned gui2::get_v_align ( const std::string &  v_align  )  [static]

std::vector< twindow_builder::tresolution >::const_iterator gui2::get_window_builder ( const std::string &  type  ) 

Definition at line 886 of file gui/widgets/settings.cpp.

References boost::foreach_detail_::end().

Referenced by build().

static Uint32 gui2::hover_callback ( Uint32  ,
void *  param 
) [static]

Definition at line 38 of file event_handler.cpp.

References data, DBG_G_E, and HOVER_EVENT.

Referenced by gui2::tevent_handler::set_hover().

bool gui2::init (  ) 

void gui2::load_settings (  ) 

std::ostream & gui2::operator<< ( std::ostream &  stream,
const tpoint &  point 
)

Definition at line 73 of file helper.cpp.

References gui2::tpoint::x, and gui2::tpoint::y.

static Uint32 gui2::popup_callback ( Uint32  ,
void *   
) [static]

static unsigned gui2::read_flags ( const config cfg  )  [static]

static surface gui2::render_text ( const std::string &  text,
unsigned  font_size 
) [static]

void gui2::restore_background ( const surface restorer,
surface background,
const SDL_Rect &  rect 
)

Copies one surface unto another one.

Parameters:
restore The surface to copy to the background.
background The surface to copy unto.
rect The area to copy to on the background.

Definition at line 147 of file helper.cpp.

References surface_lock::pixels().

Referenced by gui2::tlistbox::draw(), and gui2::tcontrol::restore_background().

surface gui2::save_background ( const surface background,
const SDL_Rect &  rect 
)

Copies a portion of a surface.

Unlike get_surface_portion it copies rather then using SDL_Blit. Using SDL_Blit gives problems with transparent surfaces.

Parameters:
background The surface to safe a portion from, this surface shouldn't be a RLE surface.
rect The part of the surface to copy, the part of the rect should be entirely on the surface.
Returns:
A copy of the wanted part of the background.

Definition at line 115 of file helper.cpp.

References surface_lock::pixels().

Referenced by gui2::tlistbox::draw(), and gui2::tcontrol::save_background().

std::vector<std::string> gui2::@348::window_type_list ( DUMMY   )  [static]

Vector with all known windows, these are validated on existance on startup.

The enum twindow_type is the index of the array.

Referenced by fill_window_types(), get_id(), and gui2::tgui_definition::read().


Variable Documentation

std::map<std::string, tgui_definition>::const_iterator gui2::current_gui = guis.end() [static]

Points to the current gui.

Definition at line 74 of file gui/widgets/settings.cpp.

std::map<std::string, tgui_definition> gui2::guis [static]

Map with all known guis.

Definition at line 71 of file gui/widgets/settings.cpp.

bool gui2::initialized_ = false [static]

Definition at line 47 of file helper.cpp.

Referenced by init().

std::map<std::string, twindow_builder> gui2::windows [static]

Map with all known windows, (the builder class builds a window).

Definition at line 68 of file gui/widgets/settings.cpp.


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