The Battle for Wesnoth  1.19.5+dev
Public Member Functions | Private Types | Private Attributes | Friends | List of all members
gui2::dialogs::gamestate_inspector::controller Class Reference

Public Member Functions

 controller (model &m, view &v, const config &vars, const game_events::manager &events, const display_context &dc)
 
void handle_stuff_list_item_clicked (widget &tree)
 
void handle_copy_button_clicked ()
 
void handle_lua_button_clicked (window &window)
 
void handle_page_button_clicked (bool next)
 
template<typename T >
std::shared_ptr< T > get_controller ()
 
template<typename C >
void set_node_callback (const std::vector< int > &node_path, void(C::*fcn)(tree_view_node &))
 
template<typename C , typename T >
void set_node_callback (const std::vector< int > &node_path, void(C::*fcn)(tree_view_node &, T), T param)
 
void bind (window &window)
 
void build_stuff_list (window &window)
 

Private Types

using node_callback = std::function< void(tree_view_node &)>
 
using node_callback_map = std::map< std::vector< int >, node_callback >
 

Private Attributes

modelmodel_
 
viewview_
 
std::vector< std::shared_ptr< single_mode_controller > > controllers
 
node_callback_map callbacks
 
const configvars_
 
const game_events::managerevents_
 
const display_contextdc_
 

Friends

class single_mode_controller
 

Detailed Description

Definition at line 298 of file gamestate_inspector.cpp.

Member Typedef Documentation

◆ node_callback

Definition at line 461 of file gamestate_inspector.cpp.

◆ node_callback_map

Definition at line 462 of file gamestate_inspector.cpp.

Constructor & Destructor Documentation

◆ controller()

gui2::dialogs::gamestate_inspector::controller::controller ( model m,
view v,
const config vars,
const game_events::manager events,
const display_context dc 
)
inline

Definition at line 302 of file gamestate_inspector.cpp.

Member Function Documentation

◆ bind()

void gui2::dialogs::gamestate_inspector::controller::bind ( window window)
inline

◆ build_stuff_list()

void gui2::dialogs::gamestate_inspector::controller::build_stuff_list ( window window)
inline

◆ get_controller()

template<typename T >
std::shared_ptr<T> gui2::dialogs::gamestate_inspector::controller::get_controller ( )
inline

Definition at line 353 of file gamestate_inspector.cpp.

References c, controllers, and p.

◆ handle_copy_button_clicked()

void gui2::dialogs::gamestate_inspector::controller::handle_copy_button_clicked ( )
inline

◆ handle_lua_button_clicked()

void gui2::dialogs::gamestate_inspector::controller::handle_lua_button_clicked ( window window)
inline

◆ handle_page_button_clicked()

void gui2::dialogs::gamestate_inspector::controller::handle_page_button_clicked ( bool  next)
inline

◆ handle_stuff_list_item_clicked()

void gui2::dialogs::gamestate_inspector::controller::handle_stuff_list_item_clicked ( widget tree)
inline

◆ set_node_callback() [1/2]

template<typename C >
void gui2::dialogs::gamestate_inspector::controller::set_node_callback ( const std::vector< int > &  node_path,
void(C::*)(tree_view_node &)  fcn 
)
inline

◆ set_node_callback() [2/2]

template<typename C , typename T >
void gui2::dialogs::gamestate_inspector::controller::set_node_callback ( const std::vector< int > &  node_path,
void(C::*)(tree_view_node &, T)  fcn,
param 
)
inline

Definition at line 373 of file gamestate_inspector.cpp.

References callbacks.

Friends And Related Function Documentation

◆ single_mode_controller

friend class single_mode_controller
friend

Definition at line 300 of file gamestate_inspector.cpp.

Member Data Documentation

◆ callbacks

node_callback_map gui2::dialogs::gamestate_inspector::controller::callbacks
private

◆ controllers

std::vector<std::shared_ptr<single_mode_controller> > gui2::dialogs::gamestate_inspector::controller::controllers
private

Definition at line 463 of file gamestate_inspector.cpp.

Referenced by get_controller(), and handle_lua_button_clicked().

◆ dc_

const display_context& gui2::dialogs::gamestate_inspector::controller::dc_
private

◆ events_

const game_events::manager& gui2::dialogs::gamestate_inspector::controller::events_
private

◆ model_

model& gui2::dialogs::gamestate_inspector::controller::model_
private

◆ vars_

const config& gui2::dialogs::gamestate_inspector::controller::vars_
private

◆ view_

view& gui2::dialogs::gamestate_inspector::controller::view_
private

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