Skip to content

feat(api) update imnodes to latest version #270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions imgui-binding/src/generated/java/imgui/ImDrawData.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

import imgui.binding.ImGuiStruct;




import java.nio.ByteBuffer;
import java.nio.ByteOrder;

Expand All @@ -13,6 +16,7 @@
* BINDING NOTICE: Since it's impossible to do a 1:1 mapping with JNI, current class provides "getCmdList*()" methods.
* Those are used to get the data needed to do a rendering.
*/

public final class ImDrawData extends ImGuiStruct {
private static final int RESIZE_FACTOR = 5_000;
private static ByteBuffer dataBuffer = ByteBuffer.allocateDirect(25_000).order(ByteOrder.nativeOrder());
Expand Down Expand Up @@ -144,7 +148,7 @@ public ByteBuffer getCmdListVtxBufferData(final int cmdListIdx) {

///////// End of Render Methods

/**
/**
* Only valid after Render() is called and before the next NewFrame() is called.
*/
public boolean getValid() {
Expand All @@ -155,7 +159,7 @@ public boolean getValid() {
return THIS->Valid;
*/

/**
/**
* Number of ImDrawList* to render
*/
public int getCmdListsCount() {
Expand All @@ -166,7 +170,7 @@ public int getCmdListsCount() {
return THIS->CmdListsCount;
*/

/**
/**
* For convenience, sum of all ImDrawList's IdxBuffer.Size
*/
public int getTotalIdxCount() {
Expand All @@ -177,7 +181,7 @@ public int getTotalIdxCount() {
return THIS->TotalIdxCount;
*/

/**
/**
* For convenience, sum of all ImDrawList's VtxBuffer.Size
*/
public int getTotalVtxCount() {
Expand All @@ -188,7 +192,7 @@ public int getTotalVtxCount() {
return THIS->TotalVtxCount;
*/

/**
/**
* Upper-left position of the viewport to render (== upper-left of the orthogonal projection matrix to use)
*/
public ImVec2 getDisplayPos() {
Expand Down Expand Up @@ -230,7 +234,7 @@ public void getDisplayPos(final ImVec2 dst) {
return THIS->DisplayPos.y;
*/

/**
/**
* Size of the viewport to render (== io.DisplaySize for the main viewport)
* (DisplayPos + DisplaySize == lower-right of the orthogonal projection matrix to use)
*/
Expand Down Expand Up @@ -276,7 +280,7 @@ public void getDisplaySize(final ImVec2 dst) {
return THIS->DisplaySize.y;
*/

/**
/**
* Amount of pixels for each unit of DisplaySize. Based on io.DisplayFramebufferScale. Generally (1,1) on normal display, (2,2) on OSX with Retina display.
*/
public ImVec2 getFramebufferScale() {
Expand Down Expand Up @@ -318,7 +322,7 @@ public void getFramebufferScale(final ImVec2 dst) {
return THIS->FramebufferScale.y;
*/

/**
/**
* Viewport carrying the ImDrawData instance, might be of use to the renderer (generally not).
*/
public ImGuiViewport getOwnerViewport() {
Expand All @@ -331,7 +335,7 @@ public ImGuiViewport getOwnerViewport() {

// Functions

/**
/**
* Helper to convert all buffers from indexed to non-indexed, in case you cannot render indexed. Note: this is slow and most likely a waste of resources.
* Always prefer indexed rendering!
*/
Expand All @@ -343,7 +347,7 @@ public void deIndexAllBuffers() {
THIS->DeIndexAllBuffers();
*/

/**
/**
* Helper to scale the ClipRect field of each ImDrawCmd. Use if your final output buffer is at a different scale than Dear ImGui expects,
* or if there is a difference between your window resolution and framebuffer resolution.
*/
Expand Down
24 changes: 15 additions & 9 deletions imgui-binding/src/generated/java/imgui/ImDrawList.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

import imgui.binding.ImGuiStruct;






/**
* Draw command list
* This is the low-level list of polygons that ImGui:: functions are filling. At the end of the frame,
Expand All @@ -13,6 +18,7 @@
* but you are totally free to apply whatever transformation matrix to want to the data (if you apply such transformation you'll want to apply it to ClipRect as well)
* Important: Primitives are always added to the list and not culled (culling is done at higher-level by ImGui:: functions), if you use this API a lot consider coarse culling your drawn objects.
*/

public final class ImDrawList extends ImGuiStruct {
public ImDrawList(final long ptr) {
super(ptr);
Expand All @@ -23,7 +29,7 @@ public ImDrawList(final long ptr) {
#define THIS ((ImDrawList*)STRUCT_PTR)
*/

/**
/**
* Flags, you may poke into these to adjust anti-aliasing settings per-primitive.
*/
public int getFlags() {
Expand Down Expand Up @@ -66,7 +72,7 @@ public boolean hasFlags(final int flags) {
THIS->Flags = value;
*/

/**
/**
* Render-level scissoring.
* This is passed down to your render function but not used for CPU-side coarse clipping.
* Prefer using higher-level ImGui::PushClipRect() to affect logic (hit-testing and widget culling)
Expand Down Expand Up @@ -770,7 +776,7 @@ public void addPolyline(final ImVec2[] points, final int numPoint, final int col
THIS->AddPolyline(points, numPoint, col, imDrawFlags, thickness);
*/

/**
/**
* Note: Anti-aliased filling requires points to be in clockwise order.
*/
public void addConvexPolyFilled(final ImVec2[] points, final int numPoints, final int col) {
Expand All @@ -789,7 +795,7 @@ public void addConvexPolyFilled(final ImVec2[] points, final int numPoints, fina
THIS->AddConvexPolyFilled(points, numPoints, col);
*/

/**
/**
* Cubic Bezier (4 control points)
*/
public void addBezierCubic(final ImVec2 p1, final ImVec2 p2, final ImVec2 p3, final ImVec2 p4, final int col, final float thickness) {
Expand Down Expand Up @@ -833,7 +839,7 @@ public void addBezierCubic(final float p1X, final float p1Y, final float p2X, fi
THIS->AddBezierCubic(p1, p2, p3, p4, col, thickness, numSegments);
*/

/**
/**
* Quadratic Bezier (3 control points)
*/
public void addBezierQuadratic(final ImVec2 p1, final ImVec2 p2, final ImVec2 p3, final int col, final float thickness) {
Expand Down Expand Up @@ -1119,7 +1125,7 @@ public void pathLineToMergeDuplicate(final float posX, final float posY) {
THIS->PathLineToMergeDuplicate(pos);
*/

/**
/**
* Note: Anti-aliased filling requires points to be in clockwise order.
*/
public void pathFillConvex(final int col) {
Expand Down Expand Up @@ -1188,7 +1194,7 @@ public void pathArcTo(final float centerX, final float centerY, final float radi
THIS->PathArcTo(center, radius, aMin, aMax, numSegments);
*/

/**
/**
* Use precomputed angles for a 12 steps circle
*/
public void pathArcToFast(final ImVec2 center, final float radius, final int aMinOf12, final int aMaxOf12) {
Expand All @@ -1207,7 +1213,7 @@ public void pathArcToFast(final float centerX, final float centerY, final float
THIS->PathArcToFast(center, radius, aMinOf12, aMaxOf12);
*/

/**
/**
* Cubic Bezier (4 control points)
*/
public void pathBezierCubicCurveTo(final ImVec2 p2, final ImVec2 p3, final ImVec2 p4) {
Expand Down Expand Up @@ -1249,7 +1255,7 @@ public void pathBezierCubicCurveTo(final float p2X, final float p2Y, final float
THIS->PathBezierCubicCurveTo(p2, p3, p4, numSegments);
*/

/**
/**
* Quadratic Bezier (3 control points)
*/
public void pathBezierQuadraticCurveTo(final ImVec2 p2, final ImVec2 p3) {
Expand Down
27 changes: 17 additions & 10 deletions imgui-binding/src/generated/java/imgui/ImFont.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@

import imgui.binding.ImGuiStructDestroyable;







/**
* Font runtime data and rendering
* ImFontAtlas automatically loads a default embedded font for you when you call GetTexDataAsAlpha8() or GetTexDataAsRGBA32().
*/

public final class ImFont extends ImGuiStructDestroyable {
public ImFont() {
super();
Expand All @@ -31,7 +38,7 @@ protected long create() {

// TODO IndexAdvanceX

/**
/**
* = FallbackGlyph.AdvanceX
*/
public float getFallbackAdvanceX() {
Expand All @@ -53,7 +60,7 @@ public void setFallbackAdvanceX(final float value) {
THIS->FallbackAdvanceX = value;
*/

/**
/**
* Height of characters/line, set during loading (don't change after loading)
*/
public float getFontSize() {
Expand All @@ -77,7 +84,7 @@ public void setFontSize(final float value) {

// TODO IndexLookup, Glyphs

private static final ImFontGlyph _GETFALLBACKGLYPH_1 = new ImFontGlyph(0);
private static final ImFontGlyph _GETFALLBACKGLYPH_1 = new ImFontGlyph(0);

/**
* = FindGlyph(FontFallbackChar)
Expand All @@ -104,7 +111,7 @@ public void setFallbackGlyph(final ImFontGlyph value) {

// TODO ContainerAtlas, ConfigData

/**
/**
* Number of ImFontConfig involved in creating this font.
* Bigger than 1 when merging multiple font sources into one ImFont.
*/
Expand All @@ -128,7 +135,7 @@ public void setConfigDataCount(final short value) {
THIS->ConfigDataCount = value;
*/

/**
/**
* Character used for ellipsis rendering.
*/
public short getEllipsisChar() {
Expand All @@ -150,7 +157,7 @@ public void setEllipsisChar(final short value) {
THIS->EllipsisChar = value;
*/

/**
/**
* Character used for ellipsis rendering (if a single '...' character isn't found)
*/
public short getDotChar() {
Expand Down Expand Up @@ -188,7 +195,7 @@ public void setDirtyLookupTables(final boolean value) {
THIS->DirtyLookupTables = value;
*/

/**
/**
* Base font scale, multiplied by the per-window font scale which you can adjust with SetWindowFontScale()
*/
public float getScale() {
Expand All @@ -210,7 +217,7 @@ public void setScale(final float value) {
THIS->Scale = value;
*/

/**
/**
* Ascent: distance from top to bottom of e.g. 'A' [0..FontSize]
*/
public float getAscent() {
Expand Down Expand Up @@ -248,7 +255,7 @@ public void setDescent(final float value) {
THIS->Descent = value;
*/

/**
/**
* Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, we approximate the cost of padding between glyphs)
*/
public int getMetricsTotalSurface() {
Expand Down Expand Up @@ -312,7 +319,7 @@ public String getDebugName() {
return env->NewStringUTF(THIS->GetDebugName());
*/

/**
/**
* 'max_width' stops rendering after a certain width (could be turned into a 2d size). FLT_MAX to disable.
* 'wrap_width' enable automatic word-wrapping across multiple lines to fit into given width. 0.0f to disable.
*/
Expand Down
Loading