Files
anm2ed/src/ui/multiselect.h
T
shweet 40f6b554b5 Initialize with = instead of braces, and drop const from local autos
Scalars get = 0, = false or = nullptr. Standard containers and strings rely on their constructors.
Other types get = {} or = value, and lists keep = {...}.
glm types are left alone until they're replaced.
2026-11-22 17:27:24 -05:00

34 lines
886 B
C++

#pragma once
#include <set>
#include <vector>
#include <imgui/imgui.h>
class MultiSelectStorage : public std::set<int>
{
public:
ImGuiSelectionExternalStorage internal = {};
ImGuiMultiSelectIO* io = nullptr;
std::vector<int>* indexMap = nullptr;
using std::set<int>::set;
using std::set<int>::operator=;
using std::set<int>::begin;
using std::set<int>::rbegin;
using std::set<int>::end;
using std::set<int>::size;
using std::set<int>::insert;
using std::set<int>::erase;
MultiSelectStorage();
void start(size_t,
ImGuiMultiSelectFlags flags = ImGuiMultiSelectFlags_ClearOnEscape | ImGuiMultiSelectFlags_ScopeWindow);
void apply();
void finish();
void set_index_map(std::vector<int>*);
int resolve_index(int) const;
};
void external_storage_set(ImGuiSelectionExternalStorage*, int, bool);