23#include "../third_party/nlohmann/json.hpp"
82 int CreateGroup(
const std::string& name,
const std::vector<int>& nodeIds);
ComponentTypeID GetComponentTypeID_Static()
Singleton that owns all NodeGroup instances for the active graph.
static GroupManager & Get()
Returns the single shared instance.
void LoadFromJson(const nlohmann::json &j)
void ExpandGroup(int groupId)
Marks the group as expanded.
void Clear()
Removes all groups and resets the ID counter.
void DeleteGroup(int groupId)
Deletes the group with the given ID.
NodeGroup * GetGroup(int groupId)
Returns a pointer to the group with the given ID.
int CreateGroup(const std::string &name, const std::vector< int > &nodeIds)
Creates a new group from the given node IDs.
int GetGroupCount() const
Returns the total number of groups.
std::vector< NodeGroup > m_Groups
void CollapseGroup(int groupId)
Marks the group as collapsed.
void SaveToJson(nlohmann::json &j) const
< Provides AssetID and INVALID_ASSET_ID
A named set of node IDs that can be collapsed into a single header.
unsigned int headerColor
RGBA packed (default: blue)
bool isCollapsed
True = render as header only.
float collapsedPosX
Position used when collapsed.
static NodeGroup FromJson(const nlohmann::json &j)
std::string name
Display name for the group.
nlohmann::json ToJson() const
std::vector< int > nodeIds
IDs of member nodes.