Add overload of GetSelectedSet that just returns the selection

Originally committed to SVN as r4627.
This commit is contained in:
Thomas Goyne 2010-06-28 07:12:52 +00:00
parent 9ff34fb00d
commit 894d55d7a2
2 changed files with 6 additions and 1 deletions

View file

@ -143,7 +143,8 @@ public:
virtual void SetActiveLine(AssDialogue *new_line);
virtual AssDialogue * GetActiveLine() const { return active_line; }
virtual void SetSelectedSet(const Selection &new_selection);
virtual void GetSelectedSet(Selection &res) const { res.insert(selection.begin(), selection.end()); }
virtual void GetSelectedSet(Selection &res) const { res = selection; }
virtual Selection GetSelectedSet() const { return selection; }
virtual void NextLine();
virtual void PrevLine();

View file

@ -131,6 +131,10 @@ public:
/// @param[out] selection Filled with the selected set on return
virtual void GetSelectedSet(Selection &selection) const = 0;
/// @brief Obtain the selected set
/// @return The selected set
virtual Selection GetSelectedSet() const = 0;
/// @brief Change the active line to the next in sequence
///
/// If there is no logical next line in sequence, no change happens. This should