[API] Include ImPlot (#56)

* Add implot submodule.

* Add implot to generateLibs

* Add _implot.h

* Add placeholder ImPlot java classes.

* Create demo window.

* Try to show the ImPlot demo in the window.

* Create ImPlot context.

* Fix final check.

* Implement ImPlotFlags.

* Implement the rest of the enums.

* Make classes final.

* Implement ImPlotContext and related methods

* Added more methods to ImPlot wrapper (mostly plot utils)

* Implement ImPlotPoint

* Implement ImPlotRange

* Switch native method to static in ImPlotPoint

* Implement ImPlotLimits

* Finish ImPlot Plot Utils bindings

* Implement more ImPlot methods (Miscellaneous)

* Implement more ImPlot methods (Legend utils/tools)

* Implement more ImPlot methods (Drag and drop utils)

* Implement more ImPlot methods (Plot tools)

* Implement more ImPlot methods (most plot items)

* Fix compile error (casting to double and not Double)

* Fix ImDrawData.getCmdListCmdBufferTextureId()

* Implement more ImPlot methods (rest of plot items)
(except for PlotImage, which is not currently supported)

* Fix ImGui binding problems due to API changes

* Adhere to style guidelines.

* Fix imguizmo submodule

* Fix API

* Implement ImPlotStyle

* Implement more ImPlot methods (Plot and Item styling)

* Implement remainder of ImPlot methods (Colormaps)

* Modify ImPlot example program

* Fix ImPlot example program bug

* ImPlot bugfixes

* Update ImPlot Demo

* Revert merge errors.

* Make the submodules the version on master.

* Fix URL/style in ExampleImPlot

* Fix merge conflicts with example ImPlot context creation

* Remove unneccesary static block for field declarations

* Revert libimgui-java64.so

* Change construction to use define (vs passing a pointer)

* Fixed memory leaks
Changed ImPlotLimits, ImPlotRange, and ImPlotPoint to extend ImGuiStructDestroyable instead of ImGuiStruct so user-created instances can be destroyed. Methods that create instances that must be destroyed manually specify this in the docs.

* Fix style violations

* Fix compile error

* Replace exception type

Co-authored-by: Perry MacMurray <perrymacmurray@gmail.com>
Co-authored-by: Perry <pmacmurray@ihmc.org>
Co-authored-by: SpaiR <klimbetoo@gmail.com>
This commit is contained in:
authored and GitHub committed 2021-06-21 16:07:16 +03:00
1 parent 2c6f52a73f
commit 92fa416657
23 files changed
+2931 -1

No files matched your search

@@ -0,0 +1,55 @@
package imgui.extension.implot;
import imgui.ImVec2;
import imgui.binding.ImGuiStructDestroyable;
public final class ImPlotPoint extends ImGuiStructDestroyable {
public ImPlotPoint(final long ptr) {
super(ptr);
}
public ImPlotPoint() {
this(0, 0);
}
public ImPlotPoint(final ImVec2 vec) {
this(vec.x, vec.y);
}
public ImPlotPoint(final double x, final double y) {
this(0);
ptr = create(x, y);
}
/*JNI
#include "_common.h"
#include "_implot.h"
#define IMPLOT_POINT ((ImPlotPoint*)STRUCT_PTR)
*/
@Override
protected native long create(); /*
return (intptr_t)(new ImPlotPoint(0, 0));
*/
protected native long create(double x, double y); /*
return (intptr_t)(new ImPlotPoint(x, y));
*/
public native double getX(); /*
return IMPLOT_POINT->x;
*/
public native double getY(); /*
return IMPLOT_POINT->y;
*/
public native void setX(double value); /*
IMPLOT_POINT->x = value;
*/
public native void setY(double value); /*
IMPLOT_POINT->y = value;
*/
}