Format like smack-a-brother, and write comments as sentences
Four-space indents, braces on their own lines, and one-statement bodies without braces. Semicolons in comments became full stops. Designated initializers may leave fields out without a warning.
This commit is contained in:
1 parent
40f6b554b5
commit
7afdf709c3
176 files changed
+20500
-19048
No files matched your search
+19
-19
@@ -5,8 +5,8 @@
|
||||
|
||||
#include "model/model.h"
|
||||
|
||||
enum class SelectionKind
|
||||
{
|
||||
enum class SelectionKind
|
||||
{
|
||||
ANIMATIONS,
|
||||
ANIMATION_GROUPS,
|
||||
TRACKS,
|
||||
@@ -20,27 +20,27 @@
|
||||
EVENTS,
|
||||
SOUNDS,
|
||||
LIBRARIES
|
||||
};
|
||||
};
|
||||
|
||||
// What is selected, by element uid, plus the focused animation/track/frame. uids follow elements through edits,
|
||||
// so nothing here is repaired by index; the UI reads it as References through a UidIndex.
|
||||
struct Selection
|
||||
{
|
||||
// What is selected, by element uid, plus the focused animation/track/frame. uids follow elements through edits,
|
||||
// so nothing here is repaired by index. The UI reads it as References through a UidIndex.
|
||||
struct Selection
|
||||
{
|
||||
std::map<SelectionKind, std::set<std::uint64_t>> uids;
|
||||
Handle focus = {};
|
||||
std::map<SelectionKind, std::uint64_t> focuses;
|
||||
|
||||
bool operator==(const Selection&) const = default;
|
||||
};
|
||||
};
|
||||
|
||||
std::set<Reference> selection_references_get(const Selection&, const UidIndex&, SelectionKind);
|
||||
void selection_references_set(Selection&, const Model&, SelectionKind, const std::set<Reference>&);
|
||||
Reference selection_focus_get(const Selection&, const UidIndex&);
|
||||
void selection_focus_set(Selection&, const Model&, Reference);
|
||||
// Content items (spritesheets, regions of the focused spritesheet, shaders, layers, ...) are selected by uid and
|
||||
// read back as ids.
|
||||
std::set<int> selection_ids_get(const Selection&, const Model&, SelectionKind);
|
||||
void selection_ids_set(Selection&, const Model&, SelectionKind, const std::set<int>&);
|
||||
int selection_focus_id_get(const Selection&, const Model&, SelectionKind);
|
||||
void selection_focus_id_set(Selection&, const Model&, SelectionKind, int);
|
||||
void selection_follow(Selection&, const Model&, const UidIndex&, Reference);
|
||||
std::set<Reference> selection_references_get(const Selection&, const UidIndex&, SelectionKind);
|
||||
void selection_references_set(Selection&, const Model&, SelectionKind, const std::set<Reference>&);
|
||||
Reference selection_focus_get(const Selection&, const UidIndex&);
|
||||
void selection_focus_set(Selection&, const Model&, Reference);
|
||||
// Content items (spritesheets, regions of the focused spritesheet, shaders, layers, ...) are selected by uid and
|
||||
// read back as ids.
|
||||
std::set<int> selection_ids_get(const Selection&, const Model&, SelectionKind);
|
||||
void selection_ids_set(Selection&, const Model&, SelectionKind, const std::set<int>&);
|
||||
int selection_focus_id_get(const Selection&, const Model&, SelectionKind);
|
||||
void selection_focus_id_set(Selection&, const Model&, SelectionKind, int);
|
||||
void selection_follow(Selection&, const Model&, const UidIndex&, Reference);
|
||||
Reference in new issue
Block a user