| 6035 | } |
| 6036 | |
| 6037 | std::vector<std::string> |
| 6038 | LayoutViewBase::mode_names () const |
| 6039 | { |
| 6040 | std::vector<std::string> names; |
| 6041 | |
| 6042 | std::vector<std::string> intrinsic_modes; |
| 6043 | intrinsic_mouse_modes (&intrinsic_modes); |
| 6044 | for (auto i = intrinsic_modes.begin (); i != intrinsic_modes.end (); ++i) { |
| 6045 | names.push_back (name_from_title (*i)); |
| 6046 | } |
| 6047 | |
| 6048 | for (auto i = mp_plugins.begin (); i != mp_plugins.end (); ++i) { |
| 6049 | std::string title; |
| 6050 | if ((*i) && (*i)->plugin_declaration () && (*i)->plugin_declaration ()->implements_mouse_mode (title)) { |
| 6051 | if (is_editable () || !edit_mode_from_title (title)) { |
| 6052 | names.push_back (name_from_title (title)); |
| 6053 | } |
| 6054 | } |
| 6055 | } |
| 6056 | |
| 6057 | return names; |
| 6058 | } |
| 6059 | |
| 6060 | std::string |
| 6061 | LayoutViewBase::mode_name () const |