subsurface/core/selection.h
Berthold Stoeger 7787bfbf9e 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>
2019-12-04 13:00:23 +01:00

25 lines
608 B
C++

// 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