22 #ifndef GUISelectedStorage_h 23 #define GUISelectedStorage_h 215 void save(
const std::string& filename)
const;
260 void save(
const std::string& filename);
288 std::string
load(
GUIGlObjectType type,
const std::string& filename,
bool restrictType, std::set<GUIGlID>& into);
291 static void save(
const std::string& filename,
const std::set<GUIGlID>& ids);
virtual void selectionUpdated()=0
called when selection is updated
const std::set< GUIGlID > & getSelected() const
Returns the set of ids of all selected objects.
~GUISelectedStorage()
Destructor.
std::set< GUIGlID > mySelected
The list of selected ids.
void toggleSelection(GUIGlID id)
Toggles selection of an object.
void select(GUIGlID id, bool update=true)
Adds the object with the given id.
friend class SingleTypeSelections
set SingleTypeSelections as friend class
void remove2Update()
Removes the dialog to be updated.
std::set< GUIGlID > myAllSelected
List of selected objects.
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
std::map< GUIGlObjectType, SingleTypeSelections > mySelections
map with the selections
std::set< GUIGlID > loadIDs(const std::string &filename, std::string &msgOut, GUIGlObjectType type=GLO_MAX, int maxErrors=16)
Loads a selection list (optionally with restricted type) and returns the ids of all active objects...
virtual ~UpdateTarget()
virtual destructor
A container for ids of selected objects of a certain type.
std::string load(const std::string &filename, GUIGlObjectType type=GLO_MAX)
Loads a selection list (optionally with restricted type)
Storage for "selected" objects.
void deselect(GUIGlID id)
Deselects the object with the given id.
void add2Update(UpdateTarget *updateTarget)
Adds a dialog to be updated.
void clear()
Clears the list of selected objects.
Static storage of an output device and its base (abstract) implementation.
GUISelectedStorage()
Constructor.
void save(GUIGlObjectType type, const std::string &filename)
Saves a selection list.
UpdateTarget * myUpdateTarget
The dialog to be updated.