The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
gui2::event_mode_controller Class Reference

Controller for WML event and menu item handler views. More...

Inheritance diagram for gui2::event_mode_controller:
Inheritance graph

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_descriptorpages_
 

Additional Inherited Members

- Protected Attributes inherited from gui2::single_mode_controller
tgamestate_inspector::modelmodel_
 
std::string name_
 

Detailed Description

Controller for WML event and menu item handler views.

Definition at line 331 of file gamestate_inspector.cpp.

Member Typedef Documentation

Definition at line 438 of file gamestate_inspector.cpp.

Definition at line 437 of file gamestate_inspector.cpp.

Member Enumeration Documentation

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.

Constructor & Destructor Documentation

gui2::event_mode_controller::event_mode_controller ( const std::string name,
tgamestate_inspector::model m,
HANDLER_TYPE  handler_type 
)
inline

Constructor.

Parameters
nameView name displayed on the UI.
mInspector model reference.
wml_nodeWML node key. Should be either "event" or "menu_item".

Definition at line 349 of file gamestate_inspector.cpp.

Member Function Documentation

virtual void gui2::event_mode_controller::handle_stuff_list_selection ( )
inlinevirtual
virtual void gui2::event_mode_controller::show_stuff_list ( )
inlinevirtual
virtual void gui2::event_mode_controller::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().

Member Data Documentation

HANDLER_TYPE gui2::event_mode_controller::handler_type_
private

Definition at line 440 of file gamestate_inspector.cpp.

Referenced by show_stuff_list().

std::vector<page_descriptor> gui2::event_mode_controller::pages_
private

Definition at line 441 of file gamestate_inspector.cpp.

Referenced by handle_stuff_list_selection(), and show_stuff_list().


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