[API] Move extensions into separate package
This commit is contained in:
1 parent
70ac8e70c5
commit
9e8f9ee025
17 files changed
+70
-69
No files matched your search
+2
-1
@@ -1,6 +1,7 @@
|
||||
package imgui.imnodes;
|
||||
package imgui.extension.imnodes;
|
||||
|
||||
import imgui.ImVec2;
|
||||
import imgui.extension.imnodes.flag.ImNodesPinShape;
|
||||
import imgui.type.ImBoolean;
|
||||
import imgui.type.ImInt;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package imgui.imnodes;
|
||||
package imgui.extension.imnodes;
|
||||
|
||||
import imgui.binding.ImGuiStructDestroyable;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package imgui.imnodes;
|
||||
package imgui.extension.imnodes;
|
||||
|
||||
import imgui.binding.ImGuiStruct;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package imgui.imnodes;
|
||||
package imgui.extension.imnodes;
|
||||
|
||||
/**
|
||||
* This enum controls the way the attribute pins behave.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package imgui.imnodes;
|
||||
package imgui.extension.imnodes;
|
||||
|
||||
public final class ImNodesColorStyle {
|
||||
private ImNodesColorStyle() {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package imgui.imnodes;
|
||||
package imgui.extension.imnodes;
|
||||
|
||||
/**
|
||||
* This enum controls the way attribute pins look.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package imgui.imnodes;
|
||||
package imgui.extension.imnodes;
|
||||
|
||||
public final class ImNodesStyleFlags {
|
||||
private ImNodesStyleFlags() {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package imgui.imnodes;
|
||||
package imgui.extension.imnodes;
|
||||
|
||||
public final class ImNodesStyleVar {
|
||||
private ImNodesStyleVar() {
|
||||
+12
-12
@@ -1,4 +1,4 @@
|
||||
package imgui.nodeditor;
|
||||
package imgui.extension.nodeditor;
|
||||
|
||||
import imgui.ImDrawList;
|
||||
import imgui.ImVec2;
|
||||
@@ -20,14 +20,14 @@ import imgui.type.ImLong;
|
||||
* Binding notice: instead of special types for ids of nodes, links and pins which used in native library
|
||||
* we use longs to reduce boilerplate and garbage production
|
||||
*/
|
||||
public final class ImNodeEditor {
|
||||
public final class NodeEditor {
|
||||
private static final ImDrawList HINT_FOREGROUND_DRAW_LIST = new ImDrawList(0);
|
||||
private static final ImDrawList HINT_BACKGROUND_DRAW_LIST = new ImDrawList(0);
|
||||
private static final ImDrawList NODE_BACKGROUND_DRAW_LIST = new ImDrawList(0);
|
||||
|
||||
private static ImNodeEditorStyle style;
|
||||
private static NodeEditorStyle style;
|
||||
|
||||
private ImNodeEditor() {
|
||||
private NodeEditor() {
|
||||
}
|
||||
|
||||
/*JNI
|
||||
@@ -43,22 +43,22 @@ public final class ImNodeEditor {
|
||||
/**
|
||||
* This method exists for api consistency and you can just call NodeEditorContext manually
|
||||
*/
|
||||
public static ImNodeEditorContext createEditor() {
|
||||
return new ImNodeEditorContext();
|
||||
public static NodeEditorContext createEditor() {
|
||||
return new NodeEditorContext();
|
||||
}
|
||||
|
||||
public static ImNodeEditorContext createEditor(final ImNodeEditorConfig config) {
|
||||
return new ImNodeEditorContext(config);
|
||||
public static NodeEditorContext createEditor(final NodeEditorConfig config) {
|
||||
return new NodeEditorContext(config);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method exists for api consistency and you can just call NodeEditorContext.destroy() manually
|
||||
*/
|
||||
public static void destroyEditor(final ImNodeEditorContext editorContext) {
|
||||
public static void destroyEditor(final NodeEditorContext editorContext) {
|
||||
editorContext.destroy();
|
||||
}
|
||||
|
||||
public static void setCurrentEditor(final ImNodeEditorContext editorContext) {
|
||||
public static void setCurrentEditor(final NodeEditorContext editorContext) {
|
||||
nSetCurrentEditor(editorContext.ptr);
|
||||
}
|
||||
|
||||
@@ -127,9 +127,9 @@ public final class ImNodeEditor {
|
||||
return ed::CanvasToScreen(ImVec2(0.0f, canvasSpacePosY)).y;
|
||||
*/
|
||||
|
||||
public static ImNodeEditorStyle getStyle() {
|
||||
public static NodeEditorStyle getStyle() {
|
||||
if (style == null) {
|
||||
style = new ImNodeEditorStyle(nGetStyle());
|
||||
style = new NodeEditorStyle(nGetStyle());
|
||||
}
|
||||
return style;
|
||||
}
|
||||
+4
-4
@@ -1,12 +1,12 @@
|
||||
package imgui.nodeditor;
|
||||
package imgui.extension.nodeditor;
|
||||
|
||||
import imgui.binding.ImGuiStructDestroyable;
|
||||
|
||||
public final class ImNodeEditorConfig extends ImGuiStructDestroyable {
|
||||
public ImNodeEditorConfig() {
|
||||
public final class NodeEditorConfig extends ImGuiStructDestroyable {
|
||||
public NodeEditorConfig() {
|
||||
}
|
||||
|
||||
public ImNodeEditorConfig(final long ptr) {
|
||||
public NodeEditorConfig(final long ptr) {
|
||||
super(ptr);
|
||||
}
|
||||
|
||||
+5
-5
@@ -1,16 +1,16 @@
|
||||
package imgui.nodeditor;
|
||||
package imgui.extension.nodeditor;
|
||||
|
||||
import imgui.binding.ImGuiStructDestroyable;
|
||||
|
||||
public final class ImNodeEditorContext extends ImGuiStructDestroyable {
|
||||
public ImNodeEditorContext() {
|
||||
public final class NodeEditorContext extends ImGuiStructDestroyable {
|
||||
public NodeEditorContext() {
|
||||
}
|
||||
|
||||
public ImNodeEditorContext(final ImNodeEditorConfig config) {
|
||||
public NodeEditorContext(final NodeEditorConfig config) {
|
||||
this(nCreate(config.ptr));
|
||||
}
|
||||
|
||||
public ImNodeEditorContext(final long ptr) {
|
||||
public NodeEditorContext(final long ptr) {
|
||||
super(ptr);
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
package imgui.nodeditor;
|
||||
package imgui.extension.nodeditor;
|
||||
|
||||
import imgui.ImVec2;
|
||||
import imgui.ImVec4;
|
||||
import imgui.binding.ImGuiStruct;
|
||||
|
||||
public final class ImNodeEditorStyle extends ImGuiStruct {
|
||||
public ImNodeEditorStyle(final long ptr) {
|
||||
public final class NodeEditorStyle extends ImGuiStruct {
|
||||
public NodeEditorStyle(final long ptr) {
|
||||
super(ptr);
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package imgui.nodeditor;
|
||||
package imgui.extension.nodeditor.flag;
|
||||
|
||||
public final class ImNodeEditorPinKind {
|
||||
private ImNodeEditorPinKind() {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package imgui.nodeditor;
|
||||
package imgui.extension.nodeditor.flag;
|
||||
|
||||
public final class ImNodeEditorStyleColor {
|
||||
private ImNodeEditorStyleColor() {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package imgui.nodeditor;
|
||||
package imgui.extension.nodeditor.flag;
|
||||
|
||||
public final class ImNodeEditorStyleVar {
|
||||
private ImNodeEditorStyleVar() {
|
||||
Reference in new issue
Block a user