Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gauthier Quesnel
irritator
Commits
20af706c
Commit
20af706c
authored
Nov 04, 2020
by
Gauthier Quesnel
Browse files
imnodes: bump to master branch
parent
fe01e209
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
app/gui/imnodes.cpp
View file @
20af706c
This diff is collapsed.
Click to expand it.
app/gui/imnodes.hpp
View file @
20af706c
...
...
@@ -2,15 +2,6 @@
#include
<stddef.h>
#if defined(__GNUC__) || defined(__clang__)
#define DEPRECATED __attribute__((deprecated))
#elif defined(_MSC_VER)
#define DEPRECATED __declspec(deprecated)
#else
#pragma message("WARNING: You need to implement DEPRECATED for this compiler")
#define DEPRECATED
#endif
struct
ImVec2
;
namespace
imnodes
{
...
...
@@ -219,6 +210,9 @@ BeginNode(int id);
void
EndNode
();
ImVec2
GetNodeDimensions
(
int
id
);
// Place your node title bar content (such as the node title, using ImGui::Text)
// between the following function calls. These functions have to be called
// before adding any attributes, or the layout of the node will be incorrect.
...
...
@@ -254,9 +248,6 @@ void
BeginStaticAttribute
(
int
id
);
void
EndStaticAttribute
();
// Can still be used with any of the three previous Begin{*}Attribute functions.
DEPRECATED
void
EndAttribute
();
// Push a single AttributeFlags value. By default, only AttributeFlags_None is
// set.
...
...
@@ -272,17 +263,35 @@ PopAttributeFlag();
void
Link
(
int
id
,
int
start_attribute_id
,
int
end_attribute_id
);
// Set's the node's position corresponding to the node id, either using screen
// space coordinates, or node editor grid coordinates. You can even set the
// position before the node has been created with BeginNode().
// Enable or disable the ability to click and drag a specific node.
void
SetNodeDraggable
(
int
node_id
,
const
bool
draggable
);
// The node's position can be expressed in three coordinate systems:
// * screen space coordinates, -- the origin is the upper left corner of the
// window.
// * editor space coordinates -- the origin is the upper left corner of the node
// editor window
// * grid space coordinates, -- the origin is the upper left corner of the node
// editor window, translated by the current editor panning vector (see
// EditorContextGetPanning() and EditorContextResetPanning())
// Use the following functions to get and set the node's coordinates in these
// coordinate systems.
void
SetNodeScreenSpacePos
(
int
node_id
,
const
ImVec2
&
screen_space_pos
);
void
SetNodeGridSpacePos
(
int
node_id
,
const
ImVec2
&
grid_pos
);
// Enable or disable the ability to click and drag a specific node.
SetNodeEditorSpacePos
(
int
node_id
,
const
ImVec2
&
editor_space_pos
);
void
SetNodeDraggable
(
int
node_id
,
const
bool
draggable
);
SetNodeGridSpacePos
(
int
node_id
,
const
ImVec2
&
grid_pos
);
ImVec2
GetNodeScreenSpacePos
(
const
int
node_id
);
ImVec2
GetNodeEditorSpacePos
(
const
int
node_id
);
ImVec2
GetNodeGridSpacePos
(
const
int
node_id
);
// Returns true if the current node editor canvas is being hovered over by the
// mouse, and is not blocked by any other windows.
...
...
@@ -312,6 +321,13 @@ GetSelectedNodes(int* node_ids);
void
GetSelectedLinks
(
int
*
link_ids
);
// Clears the list of selected nodes/links. Useful if you want to delete a
// selected node or link.
void
ClearNodeSelection
();
void
ClearLinkSelection
();
// 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.
bool
...
...
@@ -319,7 +335,7 @@ IsAttributeActive();
// Was any attribute active? If so, sets the active attribute id to the output
// function argument.
bool
IsAnyAttributeActive
(
int
*
attribute_id
=
0
);
IsAnyAttributeActive
(
int
*
attribute_id
=
NULL
);
// Use the following functions to query a change of state for an existing link,
// or new link. Call these after EndNodeEditor().
...
...
@@ -334,13 +350,20 @@ IsLinkStarted(int* started_at_attribute_id);
// including_detached_links flag to control whether this function triggers when
// the user detaches a link and drops it.
bool
IsLinkDropped
(
int
*
started_at_attribute_id
=
0
,
IsLinkDropped
(
int
*
started_at_attribute_id
=
NULL
,
bool
including_detached_links
=
true
);
// Did the user finish creating a new link?
bool
IsLinkCreated
(
int
*
started_at_attribute_id
,
int
*
ended_at_attribute_id
,
bool
*
created_from_snap
=
0
);
bool
*
created_from_snap
=
NULL
);
bool
IsLinkCreated
(
int
*
started_at_node_id
,
int
*
started_at_attribute_id
,
int
*
ended_at_node_id
,
int
*
ended_at_attribute_id
,
bool
*
created_from_snap
=
NULL
);
// Was an existing link detached from a pin by the user? The detached link's id
// is assigned to the output argument link_id.
bool
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment