The Battle for Wesnoth  1.15.0-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 312 of file gamestate_inspector.cpp.

Member Typedef Documentation

◆ node_callback

Definition at line 480 of file gamestate_inspector.cpp.

◆ node_callback_map

Definition at line 481 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 316 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 367 of file gamestate_inspector.cpp.

References c, 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 387 of file gamestate_inspector.cpp.

Friends And Related Function Documentation

◆ single_mode_controller

friend class single_mode_controller
friend

Definition at line 314 of file gamestate_inspector.cpp.

Member Data Documentation

◆ callbacks

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

Definition at line 483 of file gamestate_inspector.cpp.

◆ controllers

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

Definition at line 482 of file gamestate_inspector.cpp.

◆ dc_

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

Definition at line 486 of file gamestate_inspector.cpp.

◆ events_

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

Definition at line 485 of file gamestate_inspector.cpp.

◆ model_

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

Definition at line 478 of file gamestate_inspector.cpp.

◆ vars_

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

Definition at line 484 of file gamestate_inspector.cpp.

◆ view_

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

Definition at line 479 of file gamestate_inspector.cpp.


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