Mercurial > hg > svgui
diff view/ViewManager.h @ 711:084fd76deb89 tonioni
Allow per-pane overrides for tool mode
author | Chris Cannam |
---|---|
date | Thu, 09 Jan 2014 16:41:55 +0000 |
parents | ad12e428785b |
children | f831ca41d4a5 |
line wrap: on
line diff
--- a/view/ViewManager.h Thu Jan 09 09:18:17 2014 +0000 +++ b/view/ViewManager.h Thu Jan 09 16:41:55 2014 +0000 @@ -98,7 +98,7 @@ enum ToolMode { NavigateMode, SelectMode, - EditMode, + EditMode, DrawMode, EraseMode, MeasureMode, @@ -107,6 +107,13 @@ ToolMode getToolMode() const { return m_toolMode; } void setToolMode(ToolMode mode); + /// Override the tool mode for a specific view + void setToolModeFor(const View *v, ToolMode mode); + /// Return override mode if it exists for this view or global mode otherwise + ToolMode getToolModeFor(const View *v) const; + /// Clear all current view-specific overrides + void clearToolModeOverrides(); + bool getPlayLoopMode() const { return m_playLoopMode; } void setPlayLoopMode(bool on); @@ -274,6 +281,7 @@ Clipboard m_clipboard; ToolMode m_toolMode; + std::map<const View *, ToolMode> m_toolModeOverrides; bool m_playLoopMode; bool m_playSelectionMode;