49#include <unordered_set>
51#include "../ConditionPreset/ConditionPreset.h"
52#include "../ConditionPreset/ConditionPresetRegistry.h"
53#include "../ConditionPreset/NodeConditionRef.h"
54#include "../ConditionPreset/DynamicDataPin.h"
55#include "../ConditionPreset/DynamicDataPinManager.h"
ComponentTypeID GetComponentTypeID_Static()
Manages the global pool of ConditionPreset objects.
Generates, tracks, and invalidates DynamicDataPin objects for a node.
Renders a NodeBranch using ImGui/ImNodes with 4 sections.
static constexpr float kTitleB
static constexpr float kDynPinG
void RenderSectionSeparator()
DynamicDataPinManager & m_pinManager
Shared dynamic pin manager.
void NotifyPresetChanged(const std::string &changedPresetID)
Notifies the renderer that a preset has been updated.
void SetupDynamicPinConnectors(const NodeBranchData &data)
Sets up ImNodes connectors for each dynamic pin.
static constexpr float kDynPinB
void RenderConditionsSection(const NodeBranchData &data)
Renders Section 3: read-only conditions preview (green text).
int GetLastClickedConditionIndex() const
Returns the index of the last condition row that was clicked, or -1 if none.
void RenderTitleSection(const NodeBranchData &data)
Renders Section 1: title bar with blue background.
~NodeBranchRenderer()=default
bool m_refreshPending
Dirty flag.
static constexpr float kTitleR
Blue title bar background color (#0066CC equivalent).
void ClearRefreshPending()
Clears the refresh-pending flag (called after refresh is complete).
void RenderExecPinsSection(const NodeBranchData &data)
Renders Section 2: static exec pins (In / Then / Else).
static constexpr float kDynPinR
Yellow dynamic-pin label color (#FFD700 equivalent).
NodeBranchRenderer(const NodeBranchRenderer &)=delete
int m_lastClickedCondition
Interaction state.
NodeBranchRenderer & operator=(const NodeBranchRenderer &)=delete
void RenderSectionHeader(const char *label)
void ClearLastClickedCondition()
Resets the last-clicked condition index to -1.
bool IsRefreshPending() const
Returns true if any preset change notification is pending (dirty).
std::function< void(int)> OnConditionClicked
Fired when the user clicks on a condition row.
void RenderDynamicPinsSection(const NodeBranchData &data, const std::unordered_set< int > &connectedAttrIDs={})
Renders Section 4: dynamic data pins (yellow, conditional).
static constexpr float kTitleG
ConditionPresetRegistry & m_registry
Shared global registry.
void TriggerPinRegeneration(std::vector< NodeConditionRef > &conditionRefs)
Regenerates dynamic data pins from an updated condition list.
void RenderNode(const NodeBranchData &data, const std::unordered_set< int > &connectedAttrIDs={})
Renders the full NodeBranch node in the current ImNodes context.
< Provides AssetID and INVALID_ASSET_ID
Lightweight snapshot of a NodeBranch required for rendering.
std::string nodeName
Display name (e.g. "Branch #3")
std::vector< DynamicDataPin > dynamicPins
Generated dynamic data pins.
std::vector< NodeConditionRef > conditionRefs
Ordered condition references.
bool breakpoint
Whether a breakpoint is set.
int nodeID
Numeric node identifier (for ImNodes attribute UIDs)