16#include "../json_helper.h"
87 void SetComment(
int nodeId,
const std::string& text);
97 void SetColor(
int nodeId,
float r,
float g,
float b,
float a);
109 const std::map<int, NodeAnnotation>&
GetAll()
const;
ComponentTypeID GetComponentTypeID_Static()
Manages per-node annotations (breakpoints, comments, colors)
void ClearAnnotation(int nodeId)
Remove all annotation data for a node.
json ToJson() const
Serialize all annotations to JSON.
void SetComment(int nodeId, const std::string &text)
Set comment for a node.
void SetBreakpoint(int nodeId, bool enabled)
Set breakpoint state for a node.
const std::map< int, NodeAnnotation > & GetAll() const
Get all annotations (for serialization / rendering)
std::map< int, NodeAnnotation > m_annotations
NodeAnnotation * GetAnnotation(int nodeId)
Get annotation for a node (non-const)
NodeAnnotation & GetOrCreate(int nodeId)
Get or create annotation for a node.
void FromJson(const json &j)
Deserialize annotations from JSON.
void SetColor(int nodeId, float r, float g, float b, float a)
Set custom color for a node.
~NodeAnnotationsManager()=default
bool HasAnnotation(int nodeId) const
Check if a node has any annotation.
NodeAnnotationsManager()=default
< Provides AssetID and INVALID_ASSET_ID
Holds annotation data for a single node.