diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-11-24 13:26:29 +0100 |
---|---|---|
committer | bstoeger <32835590+bstoeger@users.noreply.github.com> | 2019-12-04 13:00:23 +0100 |
commit | 7787bfbf9e39595d98c459e4af121f3174762c7d (patch) | |
tree | 6791a300e342ad9b87edcb4781f56f9712e411f3 /core/selection.h | |
parent | d0b3a06e036cf5523cf03c22ec698742bd01048a (diff) | |
download | subsurface-7787bfbf9e39595d98c459e4af121f3174762c7d.tar.gz |
Selection: move commands/command_private.* to core/selection.*
The file command_private.cpp had functions concerning selections
only. To make these functions accessible from outside the undo
machinery, turn it into a part of the core-library. Currently,
only C++ functions are exported. We might think about also
exporting a C interface.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/selection.h')
-rw-r--r-- | core/selection.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/core/selection.h b/core/selection.h new file mode 100644 index 000000000..0fb226949 --- /dev/null +++ b/core/selection.h @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0 +// Selection related functions + +#ifndef SELECTION_H +#define SELECTION_H + +/*** C++-only functions ***/ + +#ifdef __cplusplus +#include <vector> + +struct dive; + +// Reset the selection to the dives of the "selection" vector and send the appropriate signals. +// Set the current dive to "currentDive". "currentDive" must be an element of "selection" (or +// null if "seletion" is empty). +void setSelection(const std::vector<dive *> &selection, dive *currentDive); + +// Get currently selectd dives +std::vector<dive *> getDiveSelection(); + +#endif // __cplusplus + +#endif // SELECTION_H |