Logo Search packages:      
Sourcecode: wesnoth-1.9 version File versions  Download package

gui2::twindow Class Reference

#include <window.hpp>

Inheritance diagram for gui2::twindow:

gui2::tpanel gui2::tcontainer_ gui2::tcontrol gui2::twidget gui2::tevent_executor gui2::event::tdispatcher

List of all members.


Detailed Description

base class of top level items, the only item which needs to store the final canvase to draw on

Definition at line 52 of file window.hpp.


Public Types

enum  tdrawing_action { DRAWN, PARTLY_DRAWN, NOT_DRAWN }
enum  tevent_type { pre = 1, child = 2, post = 4 }
enum  tmouse_behaviour { all, hit, none }
enum  tposition {
  front_pre_child, back_pre_child, front_child, back_child,
  front_post_child, back_post_child
}
enum  tretval { NONE = 0, OK = -1, CANCEL = -2, AUTO_CLOSE = -3 }
enum  tstatus { NEW, SHOWING, REQUEST_CLOSE, CLOSED }
enum  tvisible { VISIBLE, HIDDEN, INVISIBLE }

Public Member Functions

void add_linked_widget (const std::string &id, twidget *widget)
unsigned add_row (const unsigned count=1)
void add_to_dirty_list (const std::vector< twidget * > &call_stack)
void add_to_keyboard_chain (twidget *widget)
tgrid::iterator begin ()
bool can_wrap () const
tcanvascanvas (const unsigned index)
std::vector< tcanvas > & canvas ()
void capture_mouse ()
void close ()
void connect ()
template<tevent E>
boost::enable_if
< boost::mpl::has_key
< tset_event_notification,
boost::mpl::int_< E >
> >::type 
connect_signal (const tsignal_notification_function &signal, const tposition position=back_child)
template<tevent E>
boost::enable_if
< boost::mpl::has_key
< tset_event_keyboard,
boost::mpl::int_< E >
> >::type 
connect_signal (const tsignal_keyboard_function &signal, const tposition position=back_child)
template<tevent E>
boost::enable_if
< boost::mpl::has_key
< tset_event_mouse,
boost::mpl::int_< E >
> >::type 
connect_signal (const tsignal_mouse_function &signal, const tposition position=back_child)
template<tevent E>
boost::enable_if
< boost::mpl::has_key
< tset_event, boost::mpl::int_
< E > > >::type 
connect_signal (const tsignal_function &signal, const tposition position=back_child)
const std::string & definition () const
void demand_reduce_height (const unsigned maximum_height)
void demand_reduce_width (const unsigned maximum_width)
tdialogdialog ()
bool disable_click_dismiss () const
template<tevent E>
boost::enable_if
< boost::mpl::has_key
< tset_event_notification,
boost::mpl::int_< E >
> >::type 
disconnect_signal (const tsignal_notification_function &signal, const tposition position=back_child)
template<tevent E>
boost::enable_if
< boost::mpl::has_key
< tset_event_keyboard,
boost::mpl::int_< E >
> >::type 
disconnect_signal (const tsignal_keyboard_function &signal, const tposition position=back_child)
template<tevent E>
boost::enable_if
< boost::mpl::has_key
< tset_event_mouse,
boost::mpl::int_< E >
> >::type 
disconnect_signal (const tsignal_mouse_function &signal, const tposition position=back_child)
template<tevent E>
boost::enable_if
< boost::mpl::has_key
< tset_event, boost::mpl::int_
< E > > >::type 
disconnect_signal (const tsignal_function &signal, const tposition position=back_child)
void do_remove_tooltip ()
void do_show_tooltip (const tpoint &location, const t_string &tooltip)
bool does_click_dismiss () const
void draw ()
void draw_background (surface &frame_buffer)
void draw_children (surface &frame_buffer)
void draw_foreground (surface &frame_buffer)
tgrid::iterator end ()
bool execute_hotkey (const hotkey::HOTKEY_COMMAND id)
const twidgetfind (const std::string &id, const bool must_be_active) const
twidgetfind (const std::string &id, const bool must_be_active)
const twidgetfind_at (const tpoint &coordinate, const bool must_be_active) const
twidgetfind_at (const tpoint &coordinate, const bool must_be_active)
bool fire (const tevent event, twidget &target, void *)
bool fire (const tevent event, twidget &target, const SDLKey key, const SDLMod modifier, const Uint16 unicode)
bool fire (const tevent event, twidget &target, const tpoint &coordinate)
bool fire (const tevent event, twidget &target)
bool get_active () const
tpoint get_best_size () const
virtual SDL_Rect get_client_rect () const
unsigned int get_cols () const
tpoint get_config_default_size () const
tpoint get_config_maximum_size () const
tpoint get_config_minimum_size () const
bool get_dirty () const
SDL_Rect get_dirty_rect () const
tdrawing_action get_drawing_action () const
unsigned get_height () const
tmouse_behaviour get_mouse_behaviour () const
bool get_need_layout () const
tpoint get_origin () const
SDL_Rect get_rect () const
unsigned int get_rows () const
tpoint get_size () const
unsigned get_state () const
PangoAlignment get_text_alignment () const
bool get_use_markup () const
bool get_use_tooltip_on_label_overflow () const
tvisible get_visible () const
unsigned get_width () const
const twindowget_window () const
twindowget_window ()
int get_x () const
int get_y () const
tgridgrid ()
const tgridgrid () const
bool has_event (const tevent event, const tevent_type event_type)
bool has_linked_size_group (const std::string &id)
bool has_widget (const twidget *widget) const
const t_string & help_message () const
const std::string & id () const
void impl_draw_children (surface &frame_buffer)
void init_grid (const boost::intrusive_ptr< tbuilder_grid > &grid_builder)
void init_linked_size_group (const std::string &id, const bool fixed_width, const bool fixed_height)
void invalidate_layout ()
void keyboard_capture (twidget *widget)
const t_string & label () const
void layout_init (const bool full_initialization)
void load_config ()
void mouse_capture (const bool capture=true)
twidgetparent ()
void place (const tpoint &origin, const tpoint &size)
void populate_dirty_list (twindow &caller, std::vector< twidget * > &call_stack)
void reduce_height (const unsigned maximum_height)
void reduce_width (const unsigned maximum_width)
void register_hotkey (const hotkey::HOTKEY_COMMAND id, const thotkey_function &function)
void release_mouse ()
void remove_from_keyboard_chain (twidget *widget)
void remove_linked_widget (const std::string &id, const twidget *widget)
void request_reduce_height (const unsigned maximum_height)
void request_reduce_width (const unsigned maximum_width)
void set_active (const bool active)
void set_child (twidget *widget, const unsigned row, const unsigned col, const unsigned flags, const unsigned border_size)
void set_click_dismiss (const bool click_dismiss)
void set_cols (const unsigned cols)
void set_column_grow_factor (const unsigned column, const unsigned factor)
void set_debug_border_color (const unsigned debug_border_color)
void set_debug_border_mode (const unsigned debug_border_mode)
void set_definition (const std::string &definition)
void set_dirty (const bool dirty=true)
void set_enter_disabled (const bool enter_disabled)
void set_escape_disabled (const bool escape_disabled)
void set_help_message (const t_string &help_message)
void set_id (const std::string &id)
virtual void set_label (const t_string &label)
void set_linked_group (const std::string &linked_group)
virtual void set_members (const string_map &data)
void set_mouse_behaviour (const tmouse_behaviour mouse_behaviour)
void set_origin (const tpoint &origin)
void set_owner (tdialog *owner)
void set_parent (twidget *parent)
void set_retval (const int retval, const bool close_window=true)
void set_row_grow_factor (const unsigned row, const unsigned factor)
void set_rows (const unsigned rows)
void set_rows_cols (const unsigned rows, const unsigned cols)
virtual void set_size (const tpoint &size)
void set_text_alignment (const PangoAlignment text_alignment)
void set_tooltip (const t_string &tooltip)
virtual void set_use_markup (bool use_markup)
void set_use_tooltip_on_label_overflow (const bool use_tooltip=true)
void set_visible (const tvisible visible)
void set_visible_area (const SDL_Rect &area)
void set_wants_mouse_hover (const bool hover=true)
void set_wants_mouse_left_double_click (const bool click=true)
void set_wants_mouse_middle_double_click (const bool click=true)
tevent_executorset_wants_mouse_right_double_click (const bool click=true)
void set_x (const int x)
void set_y (const int y)
int show (const bool restore=true, const unsigned auto_close_timeout=0)
const t_string & tooltip () const
 twindow (CVideo &video, tformula< unsigned >x, tformula< unsigned >y, tformula< unsigned >w, tformula< unsigned >h, const bool automatic_placement, const unsigned horizontal_placement, const unsigned vertical_placement, const unsigned maximum_width, const unsigned maximum_height, const std::string &definition)
CVideo & video ()
bool wants_mouse_hover () const
bool wants_mouse_left_double_click () const
bool wants_mouse_middle_double_click () const
bool wants_mouse_right_double_click () const

Static Public Member Functions

static tretval get_retval_by_id (const std::string &id)
static void set_sunset (const unsigned interval)
static void update_screen_size ()
static twindowwindow_instance (const unsigned handle)

Protected Member Functions

void child_populate_dirty_list (twindow &caller, const std::vector< twidget * > &call_stack)
tresolution_definition_const_ptr config () const
tresolution_definition_ptr config ()
int get_text_maximum_height () const
int get_text_maximum_width () const
void layout_children ()
const tpointlayout_size () const
void set_config (tresolution_definition_ptr config)
void set_layout_size (const tpoint &size)
virtual void update_canvas ()

Private Member Functions

bool click_dismiss ()
void do_remove_help_popup ()
void do_show_help_popup (const tpoint &location, const t_string &help_popup)
void draw (surface &surface, const bool force=false, const bool invalidate_background=false)
void finalize (const boost::intrusive_ptr< tbuilder_grid > &content_grid)
void generate_dot_file (const std::string &, const unsigned)
const std::string & get_control_type () const
void layout ()
void layout_linked_widgets ()
void signal_handler_click_dismiss (const event::tevent event, bool &handled, bool &halt)
void signal_handler_sdl_key_down (const event::tevent event, bool &handled, const SDLKey key)
void signal_handler_sdl_video_resize (const event::tevent event, bool &handled, const tpoint &new_size)

Private Attributes

const bool automatic_placement_
bool click_dismiss_
std::vector< std::vector
< twidget * > > 
dirty_list_
bool enter_disabled_
bool escape_disabled_
event::tdistributorevent_distributor_
tformula< unsigned > h_
ttooltip help_popup_
const unsigned horizontal_placement_
bool invalidate_layout_blocked_
std::map< std::string,
tlinked_size
linked_size_
unsigned maximum_height_
unsigned maximum_width_
bool need_layout_
tdialogowner_
surface restorer_
int retval_
tstatus status_
bool suspend_drawing_
ttooltip tooltip_
surface tooltip_restorer_
const unsigned vertical_placement_
CVideo & video_
tformula< unsigned > w_
tformula< unsigned > x_
tformula< unsigned > y_

Static Private Attributes

static unsigned sunset_ = 0

Friends

twindowbuild (CVideo &, const twindow_builder::tresolution *)
class tdebug_layout_graph
class tinvalidate_layout_blocker
struct twindow_implementation

Classes

class  tinvalidate_layout_blocker
struct  tlinked_size

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index