public final class ImNodes
extends java.lang.Object
Refer to the library's Github page for examples and support
Modifier and Type | Method and Description |
---|---|
static void |
beginInputAttribute(int id)
Create an input attribute block.
|
static void |
beginInputAttribute(int id,
int imNodesPinShape) |
static void |
beginNode(int node) |
static void |
beginNodeEditor()
The top-level function call.
|
static void |
beginNodeTitleBar()
Place your node title bar content (such as the node title, using ImGui::Text) between the
following function calls.
|
static void |
beginOutputAttribute(int id)
Create an output attribute block.
|
static void |
beginOutputAttribute(int id,
int imNodesPinShape) |
static void |
beginStaticAttribute(int id)
Create a static attribute block.
|
static void |
clearLinkSelection() |
static void |
clearNodeSelection()
Clears the list of selected nodes/links.
|
static void |
createContext()
Initialize the node editor system.
|
static void |
destroyContext() |
static ImNodesContext |
editorContextCreate() |
static void |
editorContextFree(ImNodesContext context) |
static void |
editorContextGetPanning(ImVec2 result) |
static void |
editorContextSet(ImNodesContext context) |
static void |
editorMoveToNode(int node) |
static void |
editorResetPanning(float x,
float y) |
static void |
endInputAttribute() |
static void |
endNode() |
static void |
endNodeEditor() |
static void |
endNodeTitleBar() |
static void |
endOutputAttribute() |
static void |
endStaticAttribute() |
static int |
getActiveAttribute()
Binding notice: getActiveAttribute() returns id the active attribute.
|
static int |
getHoveredLink() |
static int |
getHoveredNode() |
static int |
getHoveredPin() |
static void |
getNodeDimensions(int node,
ImVec2 result) |
static float |
getNodeDimensionsX(int node) |
static float |
getNodeDimensionsY(int node) |
static void |
getNodeEditorSpacePos(int node,
ImVec2 result) |
static float |
getNodeEditorSpacePosX(int node) |
static float |
getNodeEditorSpacePosY(int node) |
static void |
getNodeGridSpacePos(int node,
ImVec2 dst) |
static float |
getNodeGridSpacePosX(int node) |
static float |
getNodeGridSpacePosY(int node) |
static void |
getNodeScreenSpacePos(int node,
ImVec2 result) |
static float |
getNodeScreenSpacePosX(int node) |
static float |
getNodeScreenSpacePosY(int node) |
static void |
getSelectedLinks(int[] linkIds) |
static void |
getSelectedNodes(int[] nodeIds)
Get the selected node/link ids.
|
static ImNodesStyle |
getStyle()
Returns the global style struct.
|
static boolean |
isAttributeActive()
Was the previous attribute active? This will continuously return true while the left mouse button
is being pressed over the UI content of the attribute.
|
static boolean |
isEditorHovered()
Returns true if the current node editor canvas is being hovered over by the mouse, and is not
blocked by any other windows.
|
static boolean |
isLinkCreated(ImInt startedAtAttributeId,
ImInt endedAtAttributeId)
Did the user finish creating a new link?
|
static boolean |
isLinkCreated(ImInt startedAtNodeId,
ImInt startedAtAttributeId,
ImInt endedAtNodeId,
ImInt endedAtAttributeId,
ImBoolean createdFromSnap) |
static boolean |
isLinkDestroyed(ImInt linkId)
Was an existing link detached from a pin by the user? The detached link's id is assigned to the
output argument link_id.
|
static boolean |
isLinkDropped(ImInt startedAtAttributeId,
boolean includingDetachedLinks)
Did the user drop the dragged link before attaching it to a pin?
There are two different kinds of situations to consider when handling this event:
1) a link which is created at a pin and then dropped
2) an existing link which is detached from a pin and then dropped
Use the including_detached_links flag to control whether this function triggers when the user
detaches a link and drops it.
|
static boolean |
isLinkStarted(ImInt startAtAttributeId)
Did the user start dragging a new link from a pin?
|
static void |
link(int id,
int source,
int target)
Render a link between attributes.
|
static void |
loadCurrentEditorStateFromIniFile(java.lang.String fileName) |
static void |
loadCurrentEditorStateFromIniString(java.lang.String data,
int dataSize) |
static void |
loadEditorStateFromIniFile(ImNodesContext context,
java.lang.String fileName) |
static void |
loadEditorStateFromIniString(ImNodesContext context,
java.lang.String data,
int dataSize) |
static void |
miniMap(float miniMapSizeFraction,
int miniMapLocation) |
static int |
numSelectedLinks() |
static int |
numSelectedNodes()
Use The following two functions to query the number of selected nodes or links in the current
editor.
|
static void |
popColorStyle() |
static void |
popStyleVar() |
static void |
pushAttributeFlag(int imNodesAttributeFlags)
Push a single AttributeFlags value.
|
static void |
pushColorStyle(int imNodesStyleColor,
int color)
Use PushColorStyle and PopColorStyle to modify ImNodesColorStyle mid-frame.
|
static void |
pushStyleVar(int imNodesStyleVar,
float value) |
static void |
saveCurrentEditorStateToIniFile(java.lang.String fileName) |
static java.lang.String |
saveCurrentEditorStateToIniString() |
static void |
saveEditorStateToIniFile(ImNodesContext context,
java.lang.String fileName) |
static java.lang.String |
saveEditorStateToIniString(ImNodesContext context) |
static void |
setNodeDraggable(int node,
boolean isDraggable)
Enable or disable the ability to click and drag a specific node.
|
static void |
setNodeEditorSpacePos(int node,
float x,
float y) |
static void |
setNodeGridSpacePos(int node,
float x,
float y) |
static void |
setNodeScreenSpacePos(int node,
float x,
float y) |
static void |
styleColorsClassic() |
static void |
styleColorsDark() |
static void |
styleColorsLight() |
public static ImNodesContext editorContextCreate()
public static void editorContextFree(ImNodesContext context)
public static void editorContextSet(ImNodesContext context)
public static void createContext()
public static void destroyContext()
public static ImNodesStyle getStyle()
public static void styleColorsDark()
public static void styleColorsClassic()
public static void styleColorsLight()
public static void pushColorStyle(int imNodesStyleColor, int color)
public static void popColorStyle()
public static void pushStyleVar(int imNodesStyleVar, float value)
public static void popStyleVar()
public static void beginNodeEditor()
public static void endNodeEditor()
public static void beginNode(int node)
public static void endNode()
public static void link(int id, int source, int target)
public static void beginNodeTitleBar()
public static void endNodeTitleBar()
public static void beginStaticAttribute(int id)
public static void endStaticAttribute()
public static void beginInputAttribute(int id)
public static void beginInputAttribute(int id, int imNodesPinShape)
public static void endInputAttribute()
public static void beginOutputAttribute(int id)
public static void beginOutputAttribute(int id, int imNodesPinShape)
public static void pushAttributeFlag(int imNodesAttributeFlags)
public static void endOutputAttribute()
public static boolean isEditorHovered()
public static int getHoveredNode()
public static int getHoveredLink()
public static int getHoveredPin()
public static int getActiveAttribute()
This method implemented instead of the original bool ImNodes::IsAnyAttributeActive(int* attribute_id) for convenience.
public static boolean isAttributeActive()
public static boolean isLinkStarted(ImInt startAtAttributeId)
public static boolean isLinkDropped(ImInt startedAtAttributeId, boolean includingDetachedLinks)
public static boolean isLinkCreated(ImInt startedAtAttributeId, ImInt endedAtAttributeId)
public static boolean isLinkCreated(ImInt startedAtNodeId, ImInt startedAtAttributeId, ImInt endedAtNodeId, ImInt endedAtAttributeId, ImBoolean createdFromSnap)
public static boolean isLinkDestroyed(ImInt linkId)
public static int numSelectedNodes()
public static int numSelectedLinks()
public static void getSelectedNodes(int[] nodeIds)
public static void getSelectedLinks(int[] linkIds)
public static void clearNodeSelection()
public static void clearLinkSelection()
public static void setNodeDraggable(int node, boolean isDraggable)
public static void getNodeDimensions(int node, ImVec2 result)
public static float getNodeDimensionsX(int node)
public static float getNodeDimensionsY(int node)
public static void setNodeScreenSpacePos(int node, float x, float y)
public static void setNodeEditorSpacePos(int node, float x, float y)
public static void setNodeGridSpacePos(int node, float x, float y)
public static void getNodeScreenSpacePos(int node, ImVec2 result)
public static float getNodeScreenSpacePosX(int node)
public static float getNodeScreenSpacePosY(int node)
public static void getNodeEditorSpacePos(int node, ImVec2 result)
public static float getNodeEditorSpacePosX(int node)
public static float getNodeEditorSpacePosY(int node)
public static void getNodeGridSpacePos(int node, ImVec2 dst)
public static float getNodeGridSpacePosX(int node)
public static float getNodeGridSpacePosY(int node)
public static void editorResetPanning(float x, float y)
public static void editorContextGetPanning(ImVec2 result)
public static void editorMoveToNode(int node)
public static java.lang.String saveCurrentEditorStateToIniString()
public static java.lang.String saveEditorStateToIniString(ImNodesContext context)
public static void loadCurrentEditorStateFromIniString(java.lang.String data, int dataSize)
public static void loadEditorStateFromIniString(ImNodesContext context, java.lang.String data, int dataSize)
public static void saveCurrentEditorStateToIniFile(java.lang.String fileName)
public static void saveEditorStateToIniFile(ImNodesContext context, java.lang.String fileName)
public static void loadCurrentEditorStateFromIniFile(java.lang.String fileName)
public static void loadEditorStateFromIniFile(ImNodesContext context, java.lang.String fileName)
public static void miniMap(float miniMapSizeFraction, int miniMapLocation)