Controller for WML event and menu item handler views. More...
Public Types | |
enum | HANDLER_TYPE { EVENT_HANDLER, WMI_HANDLER } |
WML event handler tag identifier. More... | |
Public Member Functions | |
event_mode_controller (const std::string &name, tgamestate_inspector::model &m, HANDLER_TYPE handler_type) | |
Constructor. More... | |
virtual void | show_stuff_list () |
Populates the list of pages for this view. More... | |
virtual void | handle_stuff_list_selection () |
Updates the page display for the currently selected item in this view. More... | |
virtual void | update_view_from_model () |
Updates the whole view (page list and page display). More... | |
Public Member Functions inherited from gui2::single_mode_controller | |
single_mode_controller (const std::string &name, tgamestate_inspector::model &m) | |
virtual | ~single_mode_controller () |
std::string | name () const |
Private Types | |
typedef boost::shared_ptr < std::string > | shared_string_ptr |
typedef std::pair < shared_string_ptr, unsigned > | page_descriptor |
Private Attributes | |
HANDLER_TYPE | handler_type_ |
std::vector< page_descriptor > | pages_ |
Additional Inherited Members | |
Protected Attributes inherited from gui2::single_mode_controller | |
tgamestate_inspector::model & | model_ |
std::string | name_ |
Controller for WML event and menu item handler views.
Definition at line 331 of file gamestate_inspector.cpp.
|
private |
Definition at line 438 of file gamestate_inspector.cpp.
|
private |
Definition at line 437 of file gamestate_inspector.cpp.
WML event handler tag identifier.
Enumerator | |
---|---|
EVENT_HANDLER |
Standard WML event handler ([event]). |
WMI_HANDLER |
WML menu item handler ([menu_item]). |
Definition at line 335 of file gamestate_inspector.cpp.
|
inline |
Constructor.
name | View name displayed on the UI. |
m | Inspector model reference. |
wml_node | WML node key. Should be either "event" or "menu_item". |
Definition at line 349 of file gamestate_inspector.cpp.
|
inlinevirtual |
Updates the page display for the currently selected item in this view.
Implements gui2::single_mode_controller.
Definition at line 409 of file gamestate_inspector.cpp.
References gui2::tlistbox::get_selected_row(), gui2::single_mode_controller::model_, pages_, gui2::tgamestate_inspector::model::set_inspect_window_text(), and gui2::tgamestate_inspector::model::stuff_list.
Referenced by update_view_from_model().
|
inlinevirtual |
Populates the list of pages for this view.
Implements gui2::single_mode_controller.
Definition at line 361 of file gamestate_inspector.cpp.
References gui2::tgamestate_inspector::model::add_row_to_stuff_list(), config::child_range(), gui2::tgamestate_inspector::model::clear_stuff_list(), resources::game_events, gui2::tgamestate_inspector::model::get_num_page(), handler_type_, i, gui2::single_mode_controller::model_, pages_, gui2::tgamestate_inspector::model::set_inspect_window_text(), WMI_HANDLER, and game_events::manager::write_events().
Referenced by update_view_from_model().
|
inlinevirtual |
Updates the whole view (page list and page display).
Implements gui2::single_mode_controller.
Definition at line 424 of file gamestate_inspector.cpp.
References handle_stuff_list_selection(), and show_stuff_list().
|
private |
Definition at line 440 of file gamestate_inspector.cpp.
Referenced by show_stuff_list().
|
private |
Definition at line 441 of file gamestate_inspector.cpp.
Referenced by handle_stuff_list_selection(), and show_stuff_list().