Get mapping between event name and module action name Then call overridden doAction in order to call appropriate module action
| 99 | // Get mapping between event name and module action name |
| 100 | // Then call overridden doAction in order to call appropriate module action |
| 101 | auto AModule::doAction(const std::string& name) -> void { |
| 102 | if (!name.empty()) { |
| 103 | const std::map<std::string, std::string>::const_iterator& recA{eventActionMap_.find(name)}; |
| 104 | // Call overridden action if derived class has implemented it |
| 105 | if (recA != eventActionMap_.cend() && name != recA->second) this->doAction(recA->second); |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | void AModule::setCursor(Gdk::CursorType const& c) { |
| 110 | auto gdk_window = event_box_.get_window(); |