50 const std::string&
id,
60 std::replace(this->name.begin(), this->name.end(),
' ',
'_');
75 const std::unique_ptr<pump_impl>
impl_;
108 void put_wml_message(
const std::string& logger,
const std::string& message,
bool in_chat);
121 const std::string&
id,
126 void raise(
const std::string& event,
127 const std::string&
id,
132 inline void raise(
const std::string& event,
137 raise(event,
"", loc1, loc2,
data);
A config object defines a single node in a WML file, with access to child nodes.
The game event manager loads the scenario configuration object, and ensures that events are handled a...
void set_action_canceled()
Sets whether or not wml wants to abort the currently executed user action.
void show_wml_errors()
Shows a summary of the errors encountered in WML so far, to avoid a lot of the same messages to be sh...
bool undo_disabled()
Context: The general environment within which events are processed.
bool context_skip_messages()
Returns whether or not we are skipping messages.
void flush_messages()
Flushes WML messages and errors.
const std::unique_ptr< pump_impl > impl_
void show_wml_messages()
Shows a summary of the messages generated so far by WML.
bool action_canceled()
Returns whether or not wml wants to abort the currently executed user action.
pump_result_t fire(const std::string &event, const entity_location &loc1=entity_location::null_entity, const entity_location &loc2=entity_location::null_entity, const config &data=config())
Function to fire an event.
pump_result_t operator()()
void set_undo_disabled(bool mutated)
[allow_undo] implementation
void process_event(handler_ptr &handler_p, const queued_event &ev)
Processes an event through a single event handler.
wml_event_pump(manager &)
void fill_wml_messages_map(std::map< std::string, int > &msg_map, std::stringstream &source)
Helper function for show_wml_messages(), which gathers the messages from a stringstream.
void put_wml_message(const std::string &logger, const std::string &message, bool in_chat)
Helper function which determines whether a wml_message text can really be pushed into the wml_message...
Definitions for the interface to Wesnoth Markup Language (WML).
Define locations as used by the game's events mechanism.
std::string id
Text to match against addon_info.tags()
std::tuple< bool, bool > pump_result_t
std::shared_ptr< event_handler > handler_ptr
static const entity_location null_entity
queued_event(const std::string &name, const std::string &id, const entity_location &loc1, const entity_location &loc2, const config &data)