feat(api): bump Dear ImGui from 1.88 to 1.89.9

resolves #134
resolves #135
resolves #145
resolves #220
resolves #310

- Bump imgui-node-editor to the latest coomit
- Bump implot from 0.13 to 0.16
This commit is contained in:
SpaiR authored and GitHub committed 2025-01-29 15:24:43 +02:00
1 parent 2a605f0d85
commit e70576f322
133 files changed
+21416 -19232

No files matched your search

@@ -199,6 +199,15 @@ public final class ImDrawData extends ImGuiStruct {
// Functions
@BindingMethod
public native void Clear();
/**
* Helper to add an external draw list into an existing ImDrawData.
*/
@BindingMethod
public native void AddDrawList(ImDrawList drawList);
/**
* 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!
@@ -74,11 +74,14 @@ public final class ImFont extends ImGuiStructDestroyable {
@BindingField
public short EllipsisChar;
/**
* Character used for ellipsis rendering (if a single '...' character isn't found)
*/
@BindingField
public short DotChar;
public short EllipsisCharCount;
@BindingField
public float EllipsisWidth;
@BindingField
public float EllipsisCharStep;
@BindingField
public boolean DirtyLookupTables;
@@ -271,6 +271,13 @@ public final class ImFontAtlas extends ImGuiStructDestroyable {
RETURN_GLYPH_2_SHORT(THIS->GetGlyphRangesDefault());
*/
/**
* Default + Greek and Coptic
*/
public native short[] getGlyphRangesGreek(); /*
RETURN_GLYPH_2_SHORT(THIS->GetGlyphRangesGreek());
*/
/**
* Default + Korean characters
*/
+114 -57
View File
@@ -276,7 +276,7 @@ public class ImGui {
public static native void ShowFontSelector(String label);
/**
* Add basic help/info block (not a window): how to manipulate ImGui as a end-user (mouse/keyboard controls).
* Add basic help/info block (not a window): how to manipulate ImGui as an end-user (mouse/keyboard controls).
*/
@BindingMethod
public static native void ShowUserGuide();
@@ -381,13 +381,14 @@ public class ImGui {
public static native float GetWindowDpiScale();
/**
* Get current window position in screen space (useful if you want to do your own drawing via the DrawList API)
* Get current window position in screen space (note: it is unlikely you need to use this.
* Consider using current layout pos instead, GetScreenCursorPos())
*/
@BindingMethod
public static native ImVec2 GetWindowPos();
/**
* Get current window size
* Get current window size (note: it is unlikely you need to use this. Consider using GetScreenCursorPos() and e.g. GetContentRegionAvail() instead)
*/
@BindingMethod
public static native ImVec2 GetWindowSize();
@@ -449,6 +450,12 @@ public class ImGui {
@BindingMethod
public static native void SetNextWindowFocus();
/**
* Set next window scrolling value (use {@code < 0.0f} to not affect a given axis).
*/
@BindingMethod
public static native void SetNextWindowScroll(ImVec2 scroll);
/**
* Set next window background color alpha. helper to easily override the Alpha component of ImGuiCol_WindowBg/ChildBg/PopupBg.
* You may also use ImGuiWindowFlags_NoBackground.
@@ -542,12 +549,14 @@ public class ImGui {
public static native ImVec2 GetWindowContentRegionMin();
/**
* Content boundaries max for the full window (roughly (0,0)+Size-Scroll) where Size can be override with SetNextWindowContentSize(), in window coordinates
* Content boundaries max for the full window (roughly (0,0)+Size-Scroll) where Size can be overridden with SetNextWindowContentSize(), in window coordinates
*/
@BindingMethod
public static native ImVec2 GetWindowContentRegionMax();
// Windows Scrolling
// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin().
// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY().
/**
* Get scrolling amount [0 .. GetScrollMaxX()]
@@ -657,13 +666,13 @@ public class ImGui {
public static native void PopStyleVar(@OptArg int count);
/**
* Allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets
* Tab stop enable. Allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets
*/
@BindingMethod
public static native void PushAllowKeyboardFocus(boolean allowKeyboardFocus);
public static native void PushTabStop(boolean tabStop);
@BindingMethod
public static native void PopAllowKeyboardFocus();
public static native void PopTabStop();
/**
* In 'repeat' mode, Button*() functions return repeated true in a typematic manner (using io.KeyRepeatDelay/io.KeyRepeatRate setting).
@@ -711,6 +720,7 @@ public class ImGui {
public static native void PopTextWrapPos();
// Style read access
// - Use the ShowStyleEditor() function to interactively see/edit the colors.
/**
* Get current font.
@@ -777,7 +787,7 @@ public class ImGui {
public static native void SameLine(@OptArg float offsetFromStartX, @OptArg float spacing);
/**
* Undo a SameLine() or force a new line when in an horizontal-layout context.
* Undo a SameLine() or force a new line when in a horizontal-layout context.
*/
@BindingMethod
public static native void NewLine();
@@ -898,12 +908,16 @@ public class ImGui {
public static native float GetFrameHeightWithSpacing();
// ID stack/scopes
// - Read the FAQ for more details about how ID are handled in dear imgui. If you are creating widgets in a loop you most
// likely want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them.
// - The resulting ID are hashes of the entire stack.
// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui.
// - Those questions are answered and impacted by understanding of the ID stack system:
// - "Q: Why is my widget not reacting when I click on it?"
// - "Q: How can I have widgets with an empty label?"
// - "Q: How can I have multiple widgets with the same label?"
// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely
// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them.
// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others.
// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed and used as an ID,
// whereas "strId" denote a string that is only used as an ID and not normally displayed.
// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID,
// whereas "str_id" denote a string that is only used as an ID and not normally displayed.
/**
* Push string into the ID stack (will hash string).
@@ -1015,6 +1029,12 @@ public class ImGui {
@BindingMethod
public static native void BulletText(String text, Void NULL);
/**
* Currently: formatted text with an horizontal line
*/
@BindingMethod
public static native void SeparatorText(String label);
// Widgets: Main
// - Most widgets return true when the value has been changed or when pressed/selected
// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state.
@@ -1043,15 +1063,6 @@ public class ImGui {
@BindingMethod
public static native boolean ArrowButton(String strId, int dir);
@BindingMethod
public static native void Image(@ArgValue(callPrefix = "(ImTextureID)(uintptr_t)") long userTextureId, ImVec2 size, @OptArg ImVec2 uv0, @OptArg ImVec2 uv1, @OptArg ImVec4 tintCol, @OptArg ImVec4 borderCol);
/**
* {@code <0} framePadding uses default frame padding settings. 0 for no padding
*/
@BindingMethod
public static native boolean ImageButton(@ArgValue(callPrefix = "(ImTextureID)(uintptr_t)") long userTextureId, ImVec2 size, @OptArg ImVec2 uv0, @OptArg ImVec2 uv1, @OptArg(callValue = "-1") int framePadding, @OptArg ImVec4 bgCol, @OptArg ImVec4 tintCol);
public static boolean checkbox(String label, boolean active) {
return nCheckbox(label, active);
}
@@ -1088,7 +1099,17 @@ public class ImGui {
@BindingMethod
public static native void Bullet();
// Widgets: Combo Box
// Widgets: Images
// - Read about ImTextureID here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples
@BindingMethod
public static native void Image(@ArgValue(callPrefix = "(ImTextureID)(uintptr_t)") long userTextureId, ImVec2 size, @OptArg ImVec2 uv0, @OptArg ImVec2 uv1, @OptArg ImVec4 tintCol, @OptArg ImVec4 borderCol);
@BindingMethod
public static native boolean ImageButton(String strId, @ArgValue(callPrefix = "(ImTextureID)(uintptr_t)") long userTextureId, ImVec2 size, @OptArg ImVec2 uv0, @OptArg ImVec2 uv1, @OptArg ImVec4 bgCol, @OptArg ImVec4 tintCol);
// Widgets: Combo Box (Dropdown)
// - The BeginCombo()/EndCombo() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() items.
// - The old Combo() api are helpers over BeginCombo()/EndCombo() which are kept available for convenience purpose.
@@ -1112,7 +1133,7 @@ public class ImGui {
// Widgets: Drag Sliders
// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped and can go off-bounds.
// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every functions, note that a 'float v[X]' function argument is the same as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x
// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x
// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
// - Format string may also be set to NULL or use the default format ("%f" or "%d").
// - Speed are per-pixel of mouse movement (vSpeed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For gamepad/keyboard navigation, minimum speed is Max(vSpeed, minimum_step_at_given_precision).
@@ -1120,7 +1141,7 @@ public class ImGui {
// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
// - Use vMin > vMax to lock edits.
// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
// - Legacy: Pre-1.78 there are DragXXX() function signatures that takes a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/**
@@ -1193,7 +1214,7 @@ public class ImGui {
// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped and can go off-bounds.
// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
// - Format string may also be set to NULL or use the default format ("%f" or "%d").
// - Legacy: Pre-1.78 there are SliderXXX() function signatures that takes a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/**
@@ -1637,7 +1658,7 @@ public class ImGui {
* ~ Indent()+PushId(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired.
*/
@BindingMethod
public static native void TreePush(@OptArg @ArgValue(callPrefix = "(void*)") long ptrId);
public static native void TreePush(@ArgValue(callPrefix = "(void*)") long ptrId);
/**
* ~ Unindent()+PopId()
@@ -1684,8 +1705,8 @@ public class ImGui {
// - This is essentially a thin wrapper to using BeginChild/EndChild with some stylistic changes.
// - The BeginListBox()/EndListBox() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() or any items.
// - The simplified/old ListBox() api are helpers over BeginListBox()/EndListBox() which are kept available for convenience purpose. This is analoguous to how Combos are created.
// - Choose frame width: size.x > 0.0f: custom / size.x < 0.0f or -FLT_MIN: right-align / size.x = 0.0f (default): use current ItemWidth
// - Choose frame height: size.y > 0.0f: custom / size.y < 0.0f or -FLT_MIN: bottom-align / size.y = 0.0f (default): arbitrary default height which can fit ~7 items
// - Choose frame width: size.x > 0.0f: custom / size.{@code x {@code <} 0.0f} or -FLT_MIN: right-align / size.x = 0.0f (default): use current ItemWidth
// - Choose frame height: size.y > 0.0f: custom / size.y {@code < 0.0f} or -FLT_MIN: bottom-align / size.y = 0.0f (default): arbitrary default height which can fit ~7 items
/**
* Open a framed scrolling region.
@@ -1786,23 +1807,44 @@ public class ImGui {
public static native boolean MenuItem(String label, String shortcut, ImBoolean pSelected, @OptArg boolean enabled);
// Tooltips
// - Tooltip are windows following the mouse. They do not take focus away.
// - Tooltips are windows following the mouse. They do not take focus away.
// - A tooltip window can contain items of any types. SetTooltip() is a shortcut for the 'if (BeginTooltip()) { Text(...); EndTooltip(); }' idiom.
/**
* Begin/append a tooltip window. to create full-featured tooltip (with any kind of items).
* Begin/append a tooltip window.
*/
@BindingMethod
public static native void BeginTooltip();
/**
* Only call EndTooltip() if BeginTooltip()/BeginItemTooltip() returns true!
*/
@BindingMethod
public static native void EndTooltip();
/**
* Set a text-only tooltip, typically use with ImGui::IsItemHovered(). override any previous call to SetTooltip().
* Set a text-only tooltip. Often used after a ImGui::IsItemHovered() check. Override any previous call to SetTooltip().
*/
@BindingMethod
public static native void SetTooltip(String text, Void NULL);
// Tooltips: helpers for showing a tooltip when hovering an item
// - BeginItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_Tooltip) && BeginTooltip())' idiom.
// - SetItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_Tooltip)) { SetTooltip(...); }' idiom.
// - Where 'ImGuiHoveredFlags_Tooltip' itself is a shortcut to use 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav' depending on active input type. For mouse it defaults to 'ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort'.
/**
* Begin/append a tooltip window if preceding item was hovered.
*/
@BindingMethod
public static native boolean BeginItemTooltip();
/**
* Set a text-only tooltip if preceeding item was hovered. override any previous call to SetTooltip().
*/
@BindingMethod
public static native void SetItemTooltip(String text, Void NULL);
// Popups, Modals
// - They block normal mouse hovering detection (and therefore most mouse interactions) behind them.
// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE.
@@ -1813,7 +1855,7 @@ public class ImGui {
// This is sometimes leading to confusing mistakes. May rework this in the future.
// Popups: begin/end functions
// - BeginPopup(): query popup state, if open start appending into the window. Call EndPopup() afterwards. ImGuiWindowFlags are forwarded to the window.
// - BeginPopupModal(): block every interactions behind the window, cannot be closed by user, add a dimming background, has a title bar.
// - BeginPopupModal(): block every interaction behind the window, cannot be closed by user, add a dimming background, has a title bar.
/**
* Return true if the popup is open, and you can start outputting to it.
@@ -1911,7 +1953,7 @@ public class ImGui {
// - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data.
// - 5. Populate contents:
// - In most situations you can use TableNextRow() + TableSetColumnIndex(N) to start appending into a column.
// - If you are using tables as a sort of grid, where every columns is holding the same type of contents,
// - If you are using tables as a sort of grid, where every column is holding the same type of contents,
// you may prefer using TableNextColumn() instead of TableNextRow() + TableSetColumnIndex().
// TableNextColumn() will automatically wrap-around into the next row if needed.
// - IMPORTANT: Comparatively to the old Columns() API, we need to call TableNextColumn() for the first column!
@@ -2088,7 +2130,7 @@ public class ImGui {
public static native int GetColumnsCount();
// Tab Bars, Tabs
// Note: Tabs are automatically created by the docking system. Use this to create tab bars/tabs yourself without docking being involved.
// - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself.
/**
* Create and append into a TabBar
@@ -2130,11 +2172,16 @@ public class ImGui {
// Docking
// [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable.
// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking!
// - To dock windows: if io.ConfigDockingWithShift == false (default) drag window from their title bar.
// - To dock windows: if io.ConfigDockingWithShift == true: hold SHIFT anywhere while moving windows.
// About DockSpace:
// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking/undocking.
// - Drag from window menu button (upper-left button) to undock an entire node (all windows).
// - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to _enable_ docking/undocking.
// About dockspaces:
// - Use DockSpaceOverViewport() to create an explicit dock node covering the screen or a specific viewport.
// This is often used with ImGuiDockNodeFlags_PassthruCentralNode to make it transparent.
// - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details.
// - DockSpace() needs to be submitted _before_ any window they can host. If you use a dockspace, submit it early in your app.
// - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame!
// - Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked.
// e.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly.
@BindingMethod
public static native int DockSpace(int imGuiID, @OptArg(callValue = "ImVec2(0,0)") ImVec2 size, @OptArg(callValue = "0") int imGuiDockNodeFlags, @OptArg ImGuiWindowClass windowClass);
@@ -2410,6 +2457,16 @@ public class ImGui {
@BindingMethod
public static native void SetKeyboardFocusHere(@OptArg int offset);
// Overlapping mode
/**
* Allow next item to be overlapped by a subsequent item.
* Useful with invisible buttons, selectable, treenode covering an area where subsequent items may need to be added.
* Note that both Selectable() and TreeNode() have dedicated flags doing this.
*/
@BindingMethod
public static native void SetNextItemAllowOverlap();
// Item/Widgets Utilities
// - Most of the functions are referring to the last/previous item we submitted.
// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions.
@@ -2435,7 +2492,8 @@ public class ImGui {
public static native boolean IsItemFocused();
/**
* Is the last item clicked? (e.g. button/node just clicked on) == {@code IsMouseClicked(mouseButton) && IsItemHovered()}
* Is the last item hovered and mouse clicked on? (**) == {@code IsMouseClicked(mouseButton) && IsItemHovered()}
* Important. (**) this is NOT equivalent to the behavior of e.g. Button(). Read comments in function definition.
*/
@BindingMethod
public static native boolean IsItemClicked(@OptArg int mouseButton);
@@ -2459,14 +2517,14 @@ public class ImGui {
public static native boolean IsItemActivated();
/**
* Was the last item just made inactive (item was previously active). Useful for Undo/Redo patterns with widgets that requires continuous editing.
* Was the last item just made inactive (item was previously active). Useful for Undo/Redo patterns with widgets that require continuous editing.
*/
@BindingMethod
public static native boolean IsItemDeactivated();
/**
* Was the last item just made inactive and made a value change when it was active? (e.g. Slider/Drag moved).
* Useful for Undo/Redo patterns with widgets that requires continuous editing.
* Useful for Undo/Redo patterns with widgets that require continuous editing.
* Note that you may get false positives (some widgets such as Combo()/ListBox()/Selectable() will return true even when clicking an already selected item).
*/
@BindingMethod
@@ -2495,6 +2553,12 @@ public class ImGui {
@BindingMethod
public static native boolean IsAnyItemFocused();
/**
* Get ID of last item (~~ often same ImGui::GetID(label) beforehand)
*/
@BindingMethod
public static native int GetItemID();
/**
* Get upper-left bounding rectangle of the last item (screen space)
*/
@@ -2513,12 +2577,6 @@ public class ImGui {
@BindingMethod
public static native ImVec2 GetItemRectSize();
/**
* Allow last item to be overlapped by a subsequent item. sometimes useful with invisible buttons, selectables, etc. to catch unused area.
*/
@BindingMethod
public static native void SetItemAllowOverlap();
// Viewports
// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows.
// - In 'docking' branch with multi-viewport enabled, we extend this concept to have multiple active viewports.
@@ -2633,12 +2691,11 @@ public class ImGui {
ImGui::ColorConvertHSVtoRGB(hsv[0], hsv[1], hsv[2], rgb[0], rgb[1], rgb[2]);
*/
// Inputs Utilities: Keyboard
// Without IMGUI_DISABLE_OBSOLETE_KEYIO: (legacy support)
// - For 'ImGuiKey key' you can still use your legacy native/user indices according to how your backend/engine stored them in io.KeysDown[].
// With IMGUI_DISABLE_OBSOLETE_KEYIO: (this is the way forward)
// - Any use of 'ImGuiKey' will assert when key < 512 will be passed, previously reserved as native/user keys indices
// - GetKeyIndex() is pass-through and therefore deprecated (gone if IMGUI_DISABLE_OBSOLETE_KEYIO is defined)
// Inputs Utilities: Keyboard/Mouse/Gamepad
// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...).
// - before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. About use of those legacy ImGuiKey values:
// - without IMGUI_DISABLE_OBSOLETE_KEYIO (legacy support): you can still use your legacy native/user indices (< 512) according to how your backend/engine stored them in io.KeysDown[], but need to cast them to ImGuiKey.
// - with IMGUI_DISABLE_OBSOLETE_KEYIO (this is the way forward): any use of ImGuiKey will assert with key < 512. GetKeyIndex() is pass-through and therefore deprecated (gone if IMGUI_DISABLE_OBSOLETE_KEYIO is defined).
/**
* Map ImGuiKey_* values into user's key index. == io.KeyMap[key]
@@ -2686,7 +2743,7 @@ public class ImGui {
@BindingMethod
public static native void SetNextFrameWantCaptureKeyboard(boolean wantCaptureKeyboard);
// Inputs Utilities: Mouse
// Inputs Utilities: Mouse specific
// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
@@ -2768,14 +2825,14 @@ public class ImGui {
public static native void ResetMouseDragDelta(@OptArg int button);
/**
* get desired cursor type, reset in ImGui::NewFrame(), this is updated during the frame. valid before Render().
* Get desired mouse cursor shape. Important: reset in ImGui::NewFrame(), this is updated during the frame. valid before Render().
* If you use software rendering by setting io.MouseDrawCursor ImGui will render those for you
*/
@BindingMethod
public static native int GetMouseCursor();
/**
* Set desired cursor type
* Set desired mouse cursor shape
*/
@BindingMethod
public static native void SetMouseCursor(int type);
+121 -58
View File
@@ -10,6 +10,7 @@ import imgui.binding.annotation.ReturnValue;
import imgui.binding.annotation.TypeArray;
import imgui.callback.ImStrConsumer;
import imgui.callback.ImStrSupplier;
import imgui.internal.ImGuiContext;
/**
* Communicate most settings and inputs/outputs to Dear ImGui using this structure.
@@ -72,36 +73,6 @@ public final class ImGuiIO extends ImGuiStruct {
@BindingField
public String LogFilename;
/**
* Time for a double-click, in seconds.
*/
@BindingField
public float MouseDoubleClickTime;
/**
* Distance threshold to stay in to validate a double-click, in pixels.
*/
@BindingField
public float MouseDoubleClickMaxDist;
/**
* Distance threshold before considering we are dragging.
*/
@BindingField
public float MouseDragThreshold;
/**
* When holding a key/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.).
*/
@BindingField
public float KeyRepeatDelay;
/**
* When holding a key/button, rate at which it repeats, in seconds.
*/
@BindingField
public float KeyRepeatRate;
/**
* Font atlas: load, rasterize and pack one or more fonts into a single texture.
*/
@@ -211,6 +182,12 @@ public final class ImGuiIO extends ImGuiStruct {
@BindingField
public boolean ConfigInputTextCursorBlink;
/**
* [BETA] Pressing Enter will keep item active and select contents (single-line only).
*/
@BindingField
public boolean ConfigInputTextEnterKeepActive;
/**
* [BETA] Enable turning DragXXX widgets into text input with a simple mouse click-release (without moving). Not desirable on devices without a keyboard.
*/
@@ -237,6 +214,78 @@ public final class ImGuiIO extends ImGuiStruct {
@BindingField
public boolean ConfigMemoryCompactTimer;
// Inputs Behaviors
// (other variables, ones which are expected to be tweaked within UI code, are exposed in ImGuiStyle)
/**
* Time for a double-click, in seconds.
*/
@BindingField
public float MouseDoubleClickTime;
/**
* Distance threshold to stay in to validate a double-click, in pixels.
*/
@BindingField
public float MouseDoubleClickMaxDist;
/**
* Distance threshold before considering we are dragging.
*/
@BindingField
public float MouseDragThreshold;
/**
* When holding a key/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.).
*/
@BindingField
public float KeyRepeatDelay;
/**
* When holding a key/button, rate at which it repeats, in seconds.
*/
@BindingField
public float KeyRepeatRate;
//------------------------------------------------------------------
// Debug options
//------------------------------------------------------------------
/**
* Tools to test correct Begin/End and BeginChild/EndChild behaviors.
* Presently Begin()/End() and BeginChild()/EndChild() needs to ALWAYS be called in tandem, regardless of return value of BeginXXX()
* This is inconsistent with other BeginXXX functions and create confusion for many users.
* We expect to update the API eventually. In the meanwhile we provide tools to facilitate checking user-code behavior.
* First-time calls to Begin()/BeginChild() will return false. NEEDS TO BE SET AT APPLICATION BOOT TIME if you don't want to miss windows.
*/
@BindingField
public boolean ConfigDebugBeginReturnValueOnce;
/**
* Some calls to Begin()/BeginChild() will return false. Will cycle through window depths then repeat.
* Suggested use: add "io.ConfigDebugBeginReturnValue = io.KeyShift" in your main loop then occasionally press SHIFT.
* Windows should be flickering while running.
*/
@BindingField
public boolean ConfigDebugBeginReturnValueLoop;
/**
* Option to deactivate io.AddFocusEvent(false) handling. May facilitate interactions with a debugger when focus loss leads to clearing inputs data.
* Backends may have other side-effects on focus loss, so this will reduce side-effects but not necessary remove all of them.
* Consider using e.g. Win32's IsDebuggerPresent() as an additional filter (or see ImOsIsDebuggerPresent() in imgui_test_engine/imgui_te_utils.cpp for a Unix compatible version).
* Ignore io.AddFocusEvent(false), consequently not calling io.ClearInputKeys() in input processing.
*/
@BindingField
public boolean ConfigDebugIgnoreFocusLoss;
/**
* Option to audit .ini data
* Save .ini data with extra comments (particularly helpful for Docking, but makes saving slower)
*/
@BindingField
public boolean ConfigDebugIniSettings;
//------------------------------------------------------------------
// Platform Functions
//------------------------------------------------------------------
@@ -284,6 +333,13 @@ public final class ImGuiIO extends ImGuiStruct {
THIS->GetClipboardTextFn = getClipboardTextStub;
*/
/**
* Optional: Platform locale
* [Experimental] Configure decimal point e.g. '.' or ',' useful for some languages (e.g. German), generally pulled from {@code *localeconv()->decimal_point}
*/
@BindingField
public short PlatformLocaleDecimalPoint;
//------------------------------------------------------------------
// Input - Call before calling NewFrame()
//------------------------------------------------------------------
@@ -315,11 +371,17 @@ public final class ImGuiIO extends ImGuiStruct {
public native void AddMouseButtonEvent(int button, boolean down);
/**
* Queue a mouse wheel update
* Queue a mouse wheel update.
*/
@BindingMethod
public native void AddMouseWheelEvent(float whX, float whY);
/**
* Queue a mouse source change (Mouse/TouchScreen/Pen)
*/
@BindingMethod
public native void AddMouseSourceEvent(@ArgValue(staticCast = "ImGuiMouseSource") int source);
/**
* Queue a mouse hovered viewport. Requires backend to set ImGuiBackendFlags_HasMouseHoveredViewport to call this (for multi-viewport support).
*/
@@ -339,13 +401,13 @@ public final class ImGuiIO extends ImGuiStruct {
public native void AddInputCharacter(@ArgValue(callPrefix = "(unsigned int)") int c);
/**
* Queue new character input from an UTF-16 character, it can be a surrogate
* Queue new character input from a UTF-16 character, it can be a surrogate
*/
@BindingMethod
public native void AddInputCharacterUTF16(@ArgValue(callPrefix = "(ImWchar16)") short c);
/**
* Queue new characters input from an UTF-8 string.
* Queue new characters input from a UTF-8 string.
*/
@BindingMethod
public native void AddInputCharactersUTF8(String str);
@@ -363,16 +425,10 @@ public final class ImGuiIO extends ImGuiStruct {
public native void SetAppAcceptingEvents(boolean acceptingEvents);
/**
* [Internal] Clear the text input buffer manually
* Clear all incoming events.
*/
@BindingMethod
public native void ClearInputCharacters();
/**
* [Internal] Release all keys
*/
@BindingMethod
public native void ClearInputKeys();
public native void ClearEventsQueue();
//------------------------------------------------------------------
// Output - Updated by NewFrame() or EndFrame()/Render()
@@ -430,8 +486,9 @@ public final class ImGuiIO extends ImGuiStruct {
public boolean NavVisible;
/**
* Application framerate estimate, in frame per second. Solely for convenience. Rolling average estimation based on io.DeltaTime over 120 frames.
* Solely for convenience. Rolling average estimation based on IO.DeltaTime over 120 frames
* Estimate of application framerate (rolling average over 60 frames, based on io.DeltaTime), in frame per second.
* Solely for convenience.
* Slow applications may not want to use a moving average or may want to reset underlying buffers occasionally.
*/
@BindingField
public float Framerate;
@@ -489,10 +546,24 @@ public final class ImGuiIO extends ImGuiStruct {
@Deprecated
public boolean[] KeysDown;
/**
* Gamepad inputs. Cleared back to zero by EndFrame(). Keyboard keys will be auto-mapped and be written here by NewFrame().
*/
@BindingField
@TypeArray(type = "float", size = "512")
public float[] NavInputs;
//------------------------------------------------------------------
// [Internal] Dear ImGui will maintain those fields. Forward compatibility not guaranteed!
//------------------------------------------------------------------
/**
* Parent UI context (needs to be set explicitly by parent).
*/
@BindingField
@ReturnValue(isStatic = true)
public ImGuiContext Ctx;
/**
* Mouse position, in pixels. Set to ImVec2(-FLT_MAX, -FLT_MAX) if mouse is unavailable (on another screen, etc.)
*/
@@ -551,13 +622,6 @@ public final class ImGuiIO extends ImGuiStruct {
@BindingField
public boolean KeySuper;
/**
* Gamepad inputs. Cleared back to zero by EndFrame(). Keyboard keys will be auto-mapped and be written here by NewFrame().
*/
@BindingField
@TypeArray(type = "float", size = "512")
public float[] NavInputs;
// Other state maintained from data above + IO function calls
/**
@@ -648,6 +712,13 @@ public final class ImGuiIO extends ImGuiStruct {
@TypeArray(type = "boolean", size = "5")
public boolean[] MouseDownOwnedUnlessPopupClose;
/**
* On a non-Mac system, holding SHIFT requests WheelY to perform the equivalent of a WheelX event.
* On a Mac system this is already enforced by the system.
*/
@BindingField
public boolean MouseWheelRequestAxisSwap;
/**
* Duration the mouse button has been down (0.0f == just clicked)
*/
@@ -676,14 +747,6 @@ public final class ImGuiIO extends ImGuiStruct {
@TypeArray(type = "float", size = "5")
public float[] MouseDragMaxDistanceSqr;
@BindingField
@TypeArray(type = "float", size = "ImGuiNavInput_COUNT")
public float[] NavInputsDownDuration;
@BindingField
@TypeArray(type = "float", size = "ImGuiNavInput_COUNT")
public float[] NavInputsDownDurationPrev;
/**
* Touch/Pen pressure (0.0f to 1.0f, should be {@code >}0.0f only when MouseDown[0] == true). Helper storage currently unused by Dear ImGui.
*/
@@ -4,6 +4,8 @@ import imgui.binding.ImGuiStruct;
import imgui.binding.annotation.BindingField;
import imgui.binding.annotation.BindingMethod;
import imgui.binding.annotation.BindingSource;
import imgui.binding.annotation.ReturnValue;
import imgui.internal.ImGuiContext;
/**
* Shared state of InputText(), passed as an argument to your callback when a ImGuiInputTextFlags_Callback* flag is used.<p>
@@ -27,6 +29,13 @@ public class ImGuiInputTextCallbackData extends ImGuiStruct {
#define THIS ((ImGuiInputTextCallbackData*)STRUCT_PTR)
*/
/**
* Parent UI context
*/
@BindingField
@ReturnValue(isStatic = true)
public ImGuiContext Ctx;
/**
* One ImGuiInputTextFlags_Callback*
*/
@@ -1,62 +1,148 @@
package imgui;
import imgui.binding.ImGuiStructDestroyable;
import imgui.binding.annotation.BindingField;
import imgui.binding.annotation.BindingMethod;
import imgui.binding.annotation.BindingSource;
import imgui.binding.annotation.OptArg;
import imgui.binding.annotation.ReturnValue;
import imgui.callback.ImListClipperCallback;
import imgui.internal.ImGuiContext;
import java.util.function.Consumer;
/**
* Helper: Manually clip large list of items.
* If you are submitting lots of evenly spaced items and you have a random access to the list, you can perform coarse
* clipping based on visibility to save yourself from processing those items at all.
* If you have lots evenly spaced items and you have random access to the list, you can perform coarse
* clipping based on visibility to only submit items that are in view.
* The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped.
* (Dear ImGui already clip items based on their bounds but it needs to measure text size to do so, whereas manual coarse clipping before submission makes this cost and your own data fetching/submission cost almost null)
* (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generally
* fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easily
* scale using lists with tens of thousands of items without a problem)
* Usage:
* <pre>
* ImGuiListClipper clipper;
* clipper.Begin(1000); // We have 1000 elements, evenly spaced.
* while (clipper.Step())
* for (int i = clipper.DisplayStart; i {@code <} clipper.DisplayEnd; i++)
* ImGui::Text("line number %d", i);
* ImGuiListClipper clipper;
* clipper.Begin(1000); // We have 1000 elements, evenly spaced.
* while (clipper.Step())
* for (int i = clipper.DisplayStart; i {@code <} clipper.DisplayEnd; i++)
* ImGui::Text("line number %d", i);
* </pre>
* Generally what happens is:
* - Clipper lets you process the first element (DisplayStart = 0, DisplayEnd = 1) regardless of it being visible or not.
* - User code submit one element.
* - User code submit that one element.
* - Clipper can measure the height of the first element
* - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element.
* - User code submit visible elements.
* - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc.
* <p>
* BINDING NOTICE:
* It's impossible to implement the same API like in the original. Method {@link #forEach(int, int, ImListClipperCallback)} could be used instead.
* <pre>
* ImGuiListClipper.forEach(1000, new ImListClipperCallback() {
* public void accept(int index) {
* ImGui.text(String.format("line number %d", index));
* }
* });
* </pre>
*/
public final class ImGuiListClipper {
private ImGuiListClipper() {
@BindingSource
public final class ImGuiListClipper extends ImGuiStructDestroyable {
public ImGuiListClipper() {
super();
}
public ImGuiListClipper(final long ptr) {
super(ptr);
}
@Override
protected long create() {
return nCreate();
}
/*JNI
#include "_common.h"
#define THIS ((ImGuiListClipper*)STRUCT_PTR)
*/
private native long nCreate(); /*
return (uintptr_t)(new ImGuiListClipper());
*/
/**
* Parent UI context
*/
@BindingField
@ReturnValue(isStatic = true)
public ImGuiContext Ctx;
@BindingField
public int DisplayStart;
@BindingField
public int DisplayEnd;
@BindingField(accessors = BindingField.Accessor.GETTER)
public int ItemsCount;
@BindingField(accessors = BindingField.Accessor.GETTER)
public float ItemsHeight;
@BindingField(accessors = BindingField.Accessor.GETTER)
public float StartPosY;
@BindingMethod
public native void Begin(int itemsCount, @OptArg float itemsHeight);
/**
* Automatically called on the last call of Step() that returns false.
*/
@BindingMethod
public native void End();
/**
* Call until it returns false. The DisplayStart/DisplayEnd fields will be set and you can process/draw those items.
*/
@BindingMethod
public native boolean Step();
/**
* Call IncludeItemByIndex() or IncludeItemsByIndex() *BEFORE* first call to Step() if you need a range of items to not be clipped, regardless of their visibility.
* (Due to alignment / padding of certain items it is possible that an extra item may be included on either end of the display range).
*/
@BindingMethod
public native void IncludeItemByIndex(int itemIndex);
/**
* Call IncludeItemByIndex() or IncludeItemsByIndex() *BEFORE* first call to Step() if you need a range of items to not be clipped, regardless of their visibility.
* (Due to alignment / padding of certain items it is possible that an extra item may be included on either end of the display range).
*
* @param itemEnd is exclusive e.g. use (42, 42+1) to make item 42 never clipped.
*/
@BindingMethod
public native void IncludeItemsByIndex(int itemBegin, int itemEnd);
/**
* Shortcut to use {@link ImGuiListClipper} instance.
*
* @param clipAction action to use inside the {@link ImGuiListClipper} instance
*/
public static void forEach(final Consumer<ImGuiListClipper> clipAction) {
final ImGuiListClipper clipper = new ImGuiListClipper();
clipAction.accept(clipper);
clipper.destroy();
}
/**
* @param itemsCount Use -1 to ignore (you can call Begin later).
* Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step).
* @param callback action to do in iterations
* @param callback action to do in iterations
* @deprecated Use approach from the native example or {@link #forEach(Consumer)} method.
*/
@Deprecated
public static void forEach(final int itemsCount, final ImListClipperCallback callback) {
forEach(itemsCount, -1, callback);
}
/**
* @param itemsCount Use -1 to ignore (you can call Begin later).
* Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step).
* @param itemsCount Use -1 to ignore (you can call Begin later).
* Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step).
* @param itemsHeight Use -1.0f to be calculated automatically on first step.
* Otherwise pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing().
* @param callback action to do in iterations
* Otherwise, pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing().
* @param callback action to do in iterations
* @deprecated Use approach from the native example or {@link #forEach(Consumer)} method.
*/
@Deprecated
public static native void forEach(int itemsCount, int itemsHeight, ImListClipperCallback callback); /*
ImGuiListClipper clipper;
clipper.Begin(itemsCount, itemsHeight);
@@ -66,4 +152,8 @@ public final class ImGuiListClipper {
}
}
*/
/*JNI
#undef THIS
*/
}
@@ -499,7 +499,14 @@ public final class ImGuiPlatformIO extends ImGuiStruct {
return IMGUI_PLATFORM_IO->Monitors.Size;
*/
public native void pushMonitors(float mainPosX, float mainPosY, float mainSizeX, float mainSizeY, float workPosX, float workPosY, float workSizeX, float workSizeY, float dpiScale); /*
public native void pushMonitors(
long platformHandle,
float mainPosX, float mainPosY,
float mainSizeX, float mainSizeY,
float workPosX, float workPosY,
float workSizeX, float workSizeY,
float dpiScale
); /*
ImGuiPlatformMonitor monitor;
monitor.MainPos = ImVec2(mainPosX, mainPosY);
@@ -509,6 +516,7 @@ public final class ImGuiPlatformIO extends ImGuiStruct {
monitor.WorkSize = ImVec2(workSizeX, workSizeY);
monitor.DpiScale = dpiScale;
monitor.PlatformHandle = (void*)platformHandle;
IMGUI_PLATFORM_IO->Monitors.push_back(monitor);
*/
@@ -51,6 +51,20 @@ public final class ImGuiPlatformMonitor extends ImGuiStruct {
@BindingField
public float DpiScale;
/**
* Backend dependant data (e.g. HMONITOR, GLFWmonitor*, SDL Display Index, NSScreen*)
*/
public native void setPlatformHandle(long platformHandle); /*
THIS->PlatformHandle = (void*)platformHandle;
*/
/**
* Backend dependant data (e.g. HMONITOR, GLFWmonitor*, SDL Display Index, NSScreen*)
*/
public native long getPlatformHandle(); /*
return (uintptr_t)THIS->PlatformHandle;
*/
/*JNI
#undef THIS
*/
@@ -67,7 +67,7 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
public float WindowBorderSize;
/**
* Minimum window size. This is a global setting. If you want to constraint individual windows, use SetNextWindowSizeConstraints().
* Minimum window size. This is a global setting. If you want to constrain individual windows, use SetNextWindowSizeConstraints().
*/
@BindingField
public ImVec2 WindowMinSize;
@@ -139,7 +139,7 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
public ImVec2 ItemInnerSpacing;
/**
* Padding within a table cell.
* Padding within a table cell. CellPadding.y may be altered between different rows.
*/
@BindingField
public ImVec2 CellPadding;
@@ -206,7 +206,7 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
public float TabBorderSize;
/**
* Minimum width for close button to appears on an unselected tab when hovered.
* Minimum width for close button to appear on an unselected tab when hovered.
* Set to 0.0f to always show when hovering, set to FLT_MAX to never show close button unless selected.
*/
@BindingField
@@ -231,6 +231,24 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
@BindingField
public ImVec2 SelectableTextAlign;
/**
* Thickkness of border in SeparatorText()
*/
@BindingField
public float SeparatorTextBorderSize;
/**
* Alignment of text within the separator. Defaults to (0.0f, 0.5f) (left aligned, center).
*/
@BindingField
public ImVec2 SeparatorTextAlign;
/**
* Horizontal offset of text from each edge of the separator + spacing on other axis. Generally small values. .y is recommended to be == FramePadding.y.
*/
@BindingField
public ImVec2 SeparatorTextPadding;
/**
* Window position are clamped to be visible within the display area by at least this amount. Only applies to regular windows.
*/
@@ -244,6 +262,12 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
@BindingField
public ImVec2 DisplaySafeAreaPadding;
/**
* Thickness of resizing border between docked windows
*/
@BindingField
public float DockingSeparatorSize;
/**
* Scale software rendered mouse cursor (when io.MouseDrawCursor is enabled). May be removed later.
*/
@@ -311,6 +335,39 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
THIS->Colors[col] = ImColor(value);
*/
// Behaviors
// (It is possible to modify those fields mid-frame if specific behavior need it, unlike e.g. configuration fields in ImGuiIO)
/**
* Delay for IsItemHovered(ImGuiHoveredFlags_Stationary). Time required to consider mouse stationary.
*/
@BindingField
public float HoverStationaryDelay;
/**
* Delay for IsItemHovered(ImGuiHoveredFlags_DelayShort). Usually used along with HoverStationaryDelay.
*/
@BindingField
public float HoverDelayShort;
/**
* Delay for IsItemHovered(ImGuiHoveredFlags_DelayNormal). "
*/
@BindingField
public float HoverDelayNormal;
/**
* Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip()/SetItemTooltip() while using mouse.
*/
@BindingField
public int HoverFlagsForTooltipMouse;
/**
* Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip()/SetItemTooltip() while using keyboard/gamepad.
*/
@BindingField
public int HoverFlagsForTooltipNav;
@BindingMethod
public native void ScaleAllSizes(float scaleFactor);
@@ -143,6 +143,12 @@ public final class ImGuiViewport extends ImGuiStruct {
return (uintptr_t)THIS->PlatformHandleRaw;
*/
/**
* Platform window has been created (Platform_CreateWindow() has been called). This is false during the first frame where a viewport is being created.
*/
@BindingField
public boolean PlatformWindowCreated;
/**
* Platform window requested move (e.g. window was moved by the OS / host window manager, authoritative position will be OS window position).
*/
@@ -4,6 +4,7 @@ import imgui.ImVec2;
import imgui.binding.annotation.ArgValue;
import imgui.binding.annotation.BindingMethod;
import imgui.binding.annotation.BindingSource;
import imgui.binding.annotation.ExcludedSource;
import imgui.binding.annotation.OptArg;
import imgui.binding.annotation.ReturnValue;
import imgui.extension.imguifiledialog.callback.ImGuiFileDialogPaneFun;
@@ -14,6 +15,7 @@ import java.util.HashMap;
* ImGuiFileDialog extension for ImGui
* Repo: <a href="https://github.com/aiekick/ImGuiFileDialog">https://github.com/aiekick/ImGuiFileDialog</a>
*/
@ExcludedSource
@BindingSource(callPtr = "ImGuiFileDialog::Instance()", callOperator = "->")
public final class ImGuiFileDialog {
private ImGuiFileDialog() {
@@ -1,5 +1,8 @@
package imgui.extension.imguifiledialog.callback;
import imgui.binding.annotation.ExcludedSource;
@ExcludedSource
public abstract class ImGuiFileDialogPaneFun {
public abstract void accept(String filter, long userDatas, boolean canContinue);
}
@@ -2,7 +2,9 @@ package imgui.extension.imguifiledialog.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
import imgui.binding.annotation.ExcludedSource;
@ExcludedSource
@BindingSource
public final class ImGuiFileDialogFlags {
private ImGuiFileDialogFlags() {
@@ -189,6 +189,7 @@ public final class ImPlot {
/**
* Sets an axis range limits. If ImPlotCond_Always is used, the axes limits will be locked.
* Inversion with {@code v_min > v_max} is not supported; use SetupAxisLimits instead.
*/
@BindingMethod
public static native void SetupAxisLimits(int axis, double vMin, double vMax, @OptArg int cond);
@@ -223,6 +224,24 @@ public final class ImPlot {
@BindingMethod
public static native void SetupAxisTicks(int axis, double vMin, double vMax, int nTicks, @OptArg(callValue = "NULL") String[] labels, @OptArg boolean keepDefault);
/**
* Sets an axis' scale using built-in options.
*/
@BindingMethod
public static native void SetupAxisScale(int axis, int scale);
/**
* Sets an axis' limits constraints.
*/
@BindingMethod
public static native void SetupAxisLimitsConstraints(int axis, double vMin, double vMax);
/**
* Sets an axis' zoom constraints.
*/
@BindingMethod
public static native void SetupAxisZoomConstraints(int axis, double vMin, double vMax);
/**
* Sets the label and/or flags for primary X and Y axes (shorthand for two calls to SetupAxis).
*/
@@ -379,19 +398,21 @@ public final class ImPlot {
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
@ArgValue(callValue = "LEN(values)") Void count,
@OptArg double xscale,
@OptArg double x0,
@OptArg double xstart,
@OptArg int flags,
@OptArg int offset);
/**
* Plots a standard 2D line plot.
*/
@BindingMethod
public static native void PlotLine(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double xscale,
@OptArg double x0,
@OptArg int offset);
@BindingMethod(callName = "PlotLine")
public static native void PlotLineV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double xscale,
@OptArg double xstart,
@OptArg int flags,
@OptArg int offset);
// xs,ys
@@ -402,17 +423,19 @@ public final class ImPlot {
public static native void PlotLine(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count);
@ArgValue(callValue = "LEN(xs)") Void count,
@OptArg int flags);
/**
* Plots a standard 2D line plot.
*/
@BindingMethod
public static native void PlotLine(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg int offset);
@BindingMethod(callName = "PlotLine")
public static native void PlotLineV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg int flags,
@OptArg int offset);
// values
@@ -424,88 +447,96 @@ public final class ImPlot {
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
@ArgValue(callValue = "LEN(values)") Void count,
@OptArg double xscale,
@OptArg double x0,
@OptArg double xstart,
@OptArg int flags,
@OptArg int offset);
/**
* Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle.
*/
@BindingMethod(callName = "PlotScatter")
public static native void PlotScatterV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double xscale,
@OptArg double xstart,
@OptArg int flags,
@OptArg int offset);
// xs,ys
/**
* Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle.
*/
@BindingMethod
public static native void PlotScatter(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count,
@OptArg int flags);
/**
* Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle.
*/
@BindingMethod(callName = "PlotScatter")
public static native void PlotScatterV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg int flags,
@OptArg int offset);
// values
/**
* Plots a stairstep graph. The y value is continued constantly from every x position, i.e. the interval [x[i], x[i+1]) has the value y[i].
*/
@BindingMethod
public static native void PlotStairs(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
@ArgValue(callValue = "LEN(values)") Void count,
@OptArg double xscale,
@OptArg double xstart,
@OptArg int flags,
@OptArg int offset);
/**
* Plots a stairstep graph. The y value is continued constantly from every x position, i.e. the interval [x[i], x[i+1]) has the value y[i].
*/
@BindingMethod(callName = "PlotStairs")
public static native void PlotStairsV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double xscale,
@OptArg double x0,
@OptArg double xstart,
@OptArg int flags,
@OptArg int offset);
// xs,ys
/**
* Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle.
* Plots a stairstep graph. The y value is continued constantly from every x position, i.e. the interval [x[i], x[i+1]) has the value y[i].
*/
@BindingMethod
public static native void PlotScatter(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count);
public static native void PlotStairs(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count,
@OptArg int flags);
/**
* Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle.
* Plots a stairstep graph. The y value is continued constantly from every x position, i.e. the interval [x[i], x[i+1]) has the value y[i].
*/
@BindingMethod
public static native void PlotScatter(String labelId,
@BindingMethod(callName = "PlotStairs")
public static native void PlotStairsV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg int flags,
@OptArg int offset);
// values
/**
* Plots a stairstep graph. The y value is continued constantly from every x position, i.e. the interval [x[i], x[i+1]) has the value y[i].
*/
@BindingMethod
public static native void PlotStairs(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
@ArgValue(callValue = "LEN(values)") Void count,
@OptArg double xscale,
@OptArg double x0,
@OptArg int offset);
/**
* Plots a stairstep graph. The y value is continued constantly from every x position, i.e. the interval [x[i], x[i+1]) has the value y[i].
*/
@BindingMethod
public static native void PlotStairs(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double xscale,
@OptArg double x0,
@OptArg int offset);
// xs,ys
/**
* Plots a stairstep graph. The y value is continued constantly from every x position, i.e. the interval [x[i], x[i+1]) has the value y[i].
*/
@BindingMethod
public static native void PlotStairs(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count);
/**
* Plots a stairstep graph. The y value is continued constantly from every x position, i.e. the interval [x[i], x[i+1]) has the value y[i].
*/
@BindingMethod
public static native void PlotStairs(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg int offset);
// values
/**
* Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set y_ref to +/-INFINITY for infinite fill extents.
*/
@@ -515,20 +546,22 @@ public final class ImPlot {
@ArgValue(callValue = "LEN(values)") Void count,
@OptArg double yRef,
@OptArg double xscale,
@OptArg double x0,
@OptArg double xstart,
@OptArg int flags,
@OptArg int offset);
/**
* Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set y_ref to +/-INFINITY for infinite fill extents.
*/
@BindingMethod
public static native void PlotShaded(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double yRef,
@OptArg double xscale,
@OptArg double x0,
@OptArg int offset);
@BindingMethod(callName = "PlotShaded")
public static native void PlotShadedV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double yRef,
@OptArg double xscale,
@OptArg double xstart,
@OptArg int flags,
@OptArg int offset);
// xs,ys
@@ -541,18 +574,20 @@ public final class ImPlot {
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count,
@OptArg double yRef,
@OptArg int flags,
@OptArg int offset);
/**
* Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set y_ref to +/-INFINITY for infinite fill extents.
*/
@BindingMethod
public static native void PlotShaded(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg double yRef,
@OptArg int offset);
@BindingMethod(callName = "PlotShaded")
public static native void PlotShadedV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg double yRef,
@OptArg int flags,
@OptArg int offset);
// xs,ys1,ys2
@@ -564,47 +599,51 @@ public final class ImPlot {
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys1,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys2,
@ArgValue(callValue = "LEN(xs)") Void count);
@ArgValue(callValue = "LEN(xs)") Void count,
@OptArg int flags);
/**
* Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set y_ref to +/-INFINITY for infinite fill extents.
*/
@BindingMethod
public static native void PlotShaded(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys1,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys2,
int count,
@OptArg int offset);
@BindingMethod(callName = "PlotShaded")
public static native void PlotShadedV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys1,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys2,
int count,
@OptArg int flags,
@OptArg int offset);
// values
/**
* Plots a vertical bar graph. #bar_width and #x0 are in X units.
* Plots a vertical bar graph. #bar_width and #xstart are in X units.
*/
@BindingMethod
public static native void PlotBars(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
@ArgValue(callValue = "LEN(values)") Void count,
@OptArg double barWidth,
@OptArg double x0,
@OptArg double xstart,
@OptArg int flags,
@OptArg int offset);
/**
* Plots a vertical bar graph. #bar_width and #x0 are in X units.
* Plots a vertical bar graph. #bar_width and #xstart are in X units.
*/
@BindingMethod
public static native void PlotBars(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double barWidth,
@OptArg double x0,
@OptArg int offset);
@BindingMethod(callName = "PlotBars")
public static native void PlotBarsV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double barWidth,
@OptArg double xstart,
@OptArg int flags,
@OptArg int offset);
// xs,ys
/**
* Plots a vertical bar graph. #bar_width and #x0 are in X units.
* Plots a vertical bar graph. #bar_width and #xstart are in X units.
*/
@BindingMethod
public static native void PlotBars(String labelId,
@@ -612,87 +651,31 @@ public final class ImPlot {
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count,
@ArgValue(callValue = "0.67") Void barWidth,
@OptArg int flags,
@OptArg int offset);
/**
* Plots a vertical bar graph. #bar_width and #x0 are in X units.
* Plots a vertical bar graph. #bar_width and #xstart are in X units.
*/
@BindingMethod
public static native void PlotBars(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count,
double barWidth,
@OptArg int offset);
/**
* Plots a vertical bar graph. #bar_width and #x0 are in X units.
*/
@BindingMethod
public static native void PlotBars(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
double barWidth,
@OptArg int offset);
// values
/**
* Plots a horizontal bar graph. #bar_height and #y0 are in Y units.
*/
@BindingMethod
public static native void PlotBarsH(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
@ArgValue(callValue = "LEN(values)") Void count,
@OptArg double barHeight,
@OptArg double y0,
@OptArg int offset);
/**
* Plots a horizontal bar graph. #bar_height and #y0 are in Y units.
*/
@BindingMethod
public static native void PlotBarsH(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double barHeight,
@OptArg double y0,
@OptArg int offset);
// xs,ys
/**
* Plots a horizontal bar graph. #bar_height and #y0 are in Y units.
*/
@BindingMethod
public static native void PlotBarsH(String labelId,
@BindingMethod(callName = "PlotBars")
public static native void PlotBarsV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count,
@ArgValue(callValue = "0.67") Void barHeight,
double barWidth,
@OptArg int flags,
@OptArg int offset);
/**
* Plots a horizontal bar graph. #bar_height and #y0 are in Y units.
* Plots a vertical bar graph. #bar_width and #xstart are in X units.
*/
@BindingMethod
public static native void PlotBarsH(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count,
double barHeight,
@OptArg int offset);
/**
* Plots a horizontal bar graph. #bar_height and #y0 are in Y units.
*/
@BindingMethod
public static native void PlotBarsH(String labelId,
@BindingMethod(callName = "PlotBars")
public static native void PlotBarsV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
double barHeight,
double barWidth,
@OptArg int flags,
@OptArg int offset);
/**
@@ -701,22 +684,22 @@ public final class ImPlot {
@BindingMethod
public static native void PlotBarGroups(String[] labelIds,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int itemCount,
@ArgValue(callValue = "LEN(values)") Void itemCount,
int groupCount,
@OptArg double groupWidth,
@OptArg double x0,
@OptArg double groupSize,
@OptArg double shift,
@OptArg int flags);
/**
* Plots a group of horizontal bars. #values is a row-major matrix with #item_count rows and #group_count cols. #label_ids should have #item_count elements.
* Plots a group of vertical bars. #values is a row-major matrix with #item_count rows and #group_count cols. #label_ids should have #item_count elements.
*/
@BindingMethod
public static native void PlotBarGroupsH(String[] labelIds,
@BindingMethod(callName = "PlotBarGroups")
public static native void PlotBarGroupsV(String[] labelIds,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int itemCount,
int groupCount,
@OptArg double groupHeight,
@OptArg double y0,
@OptArg double groupSize,
@OptArg double shift,
@OptArg int flags);
/**
@@ -727,73 +710,46 @@ public final class ImPlot {
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void err,
@ArgValue(callValue = "LEN(xs)") Void count);
/**
* Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar plot.
*/
@BindingMethod
public static native void PlotErrorBars(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void err,
int count,
@ArgValue(callValue = "LEN(xs)") Void count,
@OptArg int flags,
@OptArg int offset);
/**
* Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar plot.
*/
@BindingMethod
public static native void PlotErrorBars(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void neg,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void pos,
@ArgValue(callValue = "LEN(xs)") Void count);
/**
* Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar plot.
*/
@BindingMethod
public static native void PlotErrorBars(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void neg,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void pos,
int count,
@OptArg int offset);
/**
* Plots horizontal error bars. The label_id should be the same as the label_id of the associated line or bar plot.
*/
@BindingMethod
public static native void PlotErrorBarsH(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void err,
@ArgValue(callValue = "LEN(xs)") Void count);
/**
* Plots horizontal error bars. The label_id should be the same as the label_id of the associated line or bar plot.
*/
@BindingMethod
public static native void PlotErrorBarsH(String labelId,
@BindingMethod(callName = "PlotErrorBars")
public static native void PlotErrorBarsV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void err,
int count,
@OptArg int flags,
@OptArg int offset);
/**
* Plots horizontal error bars. The label_id should be the same as the label_id of the associated line or bar plot.
* Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar plot.
*/
@BindingMethod
public static native void PlotErrorBarsH(String labelId,
public static native void PlotErrorBars(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void neg,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void pos,
@ArgValue(callValue = "LEN(xs)") Void count,
@OptArg int flags,
@OptArg int offset);
/**
* Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar plot.
*/
@BindingMethod(callName = "PlotErrorBars")
public static native void PlotErrorBarsV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void neg,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void pos,
int count,
@OptArg int flags,
@OptArg int offset);
// values
@@ -807,20 +763,22 @@ public final class ImPlot {
@ArgValue(callValue = "LEN(values)") Void count,
@OptArg double yRef,
@OptArg double xscale,
@OptArg double x0,
@OptArg double xstart,
@OptArg int flags,
@OptArg int offset);
/**
* Plots vertical stems.
*/
@BindingMethod
public static native void PlotStems(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double yRef,
@OptArg double xscale,
@OptArg double x0,
@OptArg int offset);
@BindingMethod(callName = "PlotStems")
public static native void PlotStemsV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg double yRef,
@OptArg double scale,
@OptArg double start,
@OptArg int flags,
@OptArg int offset);
// xs,ys
@@ -832,53 +790,41 @@ public final class ImPlot {
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count,
@OptArg double yRef,
@OptArg double ref,
@OptArg int flags,
@OptArg int offset);
/**
* Plots vertical stems.
*/
@BindingMethod
public static native void PlotStems(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg double yRef,
@OptArg int offset);
/**
* Plots infinite vertical or horizontal lines (e.g. for references or asymptotes).
*/
@BindingMethod
public static native void PlotVLines(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgValue(callValue = "LEN(xs)") Void count);
/**
* Plots infinite vertical or horizontal lines (e.g. for references or asymptotes).
*/
@BindingMethod
public static native void PlotVLines(String labelId,
@BindingMethod(callName = "PlotStems")
public static native void PlotStemsV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg double yRef,
@OptArg int flags,
@OptArg int offset);
/**
* Plots infinite vertical or horizontal lines (e.g. for references or asymptotes).
*/
@BindingMethod
public static native void PlotHLines(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(ys)") Void count);
public static native void PlotInfLines(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
@ArgValue(callValue = "LEN(values)") int count,
@OptArg int flags,
@OptArg int offset);
/**
* Plots infinite vertical or horizontal lines (e.g. for references or asymptotes).
*/
@BindingMethod
public static native void PlotHLines(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg int offset);
@BindingMethod(callName = "PlotInfLines")
public static native void PlotInfLinesV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg int flags,
@OptArg int offset);
/**
* Plots a pie chart. If the sum of values{@code >}1 or normalize is true, each value will be normalized. Center and radius are in plot units. #label_fmt can be set to NULL for no labels.
@@ -890,23 +836,23 @@ public final class ImPlot {
double x,
double y,
double radius,
@OptArg(callValue = "false") boolean normalize,
@OptArg(callValue = "\"%.1f\"") String labelFmt,
@OptArg double angle0);
@OptArg double angle0,
@OptArg int flags);
/**
* Plots a pie chart. If the sum of values{@code >}1 or normalize is true, each value will be normalized. Center and radius are in plot units. #label_fmt can be set to NULL for no labels.
*/
@BindingMethod
public static native void PlotPieChart(String[] labelIds,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
double x,
double y,
double radius,
@OptArg(callValue = "false") boolean normalize,
@OptArg(callValue = "\"%.1f\"") String labelFmt,
@OptArg double angle0);
@BindingMethod(callName = "PlotPieChart")
public static native void PlotPieChartV(String[] labelIds,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
double x,
double y,
double radius,
@OptArg(callValue = "\"%.1f\"") String labelFmt,
@OptArg double angle0,
@OptArg int flags);
/**
* Plots a 2D heatmap chart. Values are expected to be in row-major order. Leave #scale_min and scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be set to NULL for no labels.
@@ -920,7 +866,8 @@ public final class ImPlot {
@OptArg double scaleMax,
@OptArg(callValue = "\"%.1f\"") String labelFmt,
@OptArg ImPlotPoint boundsMin,
@OptArg ImPlotPoint boundsMax);
@OptArg ImPlotPoint boundsMax,
@OptArg int flags);
/**
* Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #cumulative is true, each bin contains its count plus the counts of all previous bins.
@@ -932,27 +879,23 @@ public final class ImPlot {
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
@ArgValue(callValue = "LEN(values)") Void count,
@OptArg(callValue = "ImPlotBin_Sturges") int bins,
@OptArg boolean cumulative,
@OptArg boolean density,
@OptArg double barScale,
@OptArg(callValue = "ImPlotRange()") ImPlotRange range,
@OptArg(callValue = "true") boolean outliers,
@OptArg double barScale);
@OptArg int flags);
/**
* Plots a horizontal histogram. #bins can be a positive integer or an ImPlotBin_ method. If #cumulative is true, each bin contains its count plus the counts of all previous bins.
* If #density is true, the PDF is visualized. If both are true, the CDF is visualized. If #range is left unspecified, the min/max of #values will be used as the range.
* If #range is specified, outlier values outside of the range are not binned. However, outliers still count toward normalizing and cumulative counts unless #outliers is false. The largest bin count or density is returned.
*/
@BindingMethod
public static native double PlotHistogram(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
int bins,
@OptArg boolean cumulative,
@OptArg boolean density,
@OptArg(callValue = "ImPlotRange()") ImPlotRange range,
@OptArg(callValue = "true") boolean outliers,
@OptArg double barScale);
@BindingMethod(callName = "PlotHistogram")
public static native double PlotHistogramV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void values,
int count,
@OptArg int bins,
@OptArg double barScale,
@OptArg(callValue = "ImPlotRange()") ImPlotRange range,
@OptArg int flags);
/**
* Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #density is true, the PDF is visualized.
@@ -966,25 +909,23 @@ public final class ImPlot {
@ArgValue(callValue = "LEN(xs)") Void count,
@OptArg int xBins,
@OptArg int yBins,
@OptArg(callValue = "false") boolean density,
@OptArg(callValue = "ImPlotRect()") ImPlotRect range,
@OptArg boolean outliers);
@OptArg int flags);
/**
* Plots two dimensional, bivariate histogram as a heatmap. #x_bins and #y_bins can be a positive integer or an ImPlotBin. If #density is true, the PDF is visualized.
* If #range is left unspecified, the min/max of #xs an #ys will be used as the ranges. If #range is specified, outlier values outside of range are not binned.
* However, outliers still count toward the normalizing count for density plots unless #outliers is false. The largest bin count or density is returned.
*/
@BindingMethod
public static native double PlotHistogram2D(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
int xBins,
int yBins,
@OptArg(callValue = "false") boolean density,
@OptArg(callValue = "ImPlotRect()") ImPlotRect range,
@OptArg boolean outliers);
@BindingMethod(callName = "PlotHistogram2D")
public static native double PlotHistogram2DV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg int xBins,
@OptArg int yBins,
@OptArg(callValue = "ImPlotRect()") ImPlotRect range,
@OptArg int flags);
/**
* Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the bottom of the plot.
@@ -993,18 +934,21 @@ public final class ImPlot {
public static native void PlotDigital(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
@ArgValue(callValue = "LEN(xs)") Void count);
/**
* Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the bottom of the plot.
*/
@BindingMethod
public static native void PlotDigital(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@ArgValue(callValue = "LEN(xs)") Void count,
@OptArg int flags,
@OptArg int offset);
/**
* Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the bottom of the plot.
*/
@BindingMethod(callName = "PlotDigital")
public static native void PlotDigitalV(String labelId,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void xs,
@ArgVariant(type = {"short[]", "int[]", "long[]", "float[]", "double[]"}) Void ys,
int count,
@OptArg int flags,
@OptArg int offset);
/**
* Plots an axis-aligned image. #bounds_min/bounds_max are in plot coordinates (y-up) and #uv0/uv1 are in texture coordinates (y-down).
*/
@@ -1015,7 +959,8 @@ public final class ImPlot {
ImPlotPoint boundsMax,
@OptArg ImVec2 uv0,
@OptArg ImVec2 uv1,
@OptArg ImVec4 tintCol);
@OptArg ImVec4 tintCol,
@OptArg int flags);
/**
* Plots a centered text label at point x,y with an optional pixel offset. Text color can be changed with ImPlot::PushStyleColor(ImPlotCol_InlayText, ...).
@@ -1024,14 +969,14 @@ public final class ImPlot {
public static native void PlotText(String text,
double x,
double y,
@OptArg(callValue = "false") boolean vertical,
@OptArg ImVec2 pixOffset);
@OptArg(callValue = "ImVec2(0,0)") ImVec2 pixOffset,
@OptArg int flags);
/**
* Plots a dummy item (i.e. adds a legend entry colored by ImPlotCol_Line)
*/
@BindingMethod
public static native void PlotDummy(String labelID);
public static native void PlotDummy(String labelID, @OptArg int flags);
/*JNI
#undef LEN
@@ -1075,38 +1020,38 @@ public final class ImPlot {
* Annotations are always rendered on top.
*/
@BindingMethod
public static native void Annotation(double x, double y, ImVec4 color, ImVec2 pixOffset, boolean clamp, @OptArg boolean round);
public static native void Annotation(double x, double y, ImVec4 col, ImVec2 pixOffset, boolean clamp, @OptArg boolean round);
/**
* Shows an annotation callout at a chosen point with formatted text.
* Clamping keeps annotations in the plot area. Annotations are always rendered on top.
*/
@BindingMethod
public static native void Annotation(double x, double y, ImVec4 color, ImVec2 pixOffset, boolean clamp, String fmt, Void NULL);
public static native void Annotation(double x, double y, ImVec4 col, ImVec2 pixOffset, boolean clamp, String fmt, Void NULL);
/**
* Shows a x-axis tag at the specified coordinate value.
*/
@BindingMethod
public static native void TagX(double x, ImVec4 color, @OptArg boolean round);
public static native void TagX(double x, ImVec4 col, @OptArg boolean round);
/**
* Shows a x-axis tag at the specified coordinate value with formatted text.
*/
@BindingMethod
public static native void TagX(double x, ImVec4 color, String fmt, Void NULL);
public static native void TagX(double x, ImVec4 col, String fmt, Void NULL);
/**
* Shows a y-axis tag at the specified coordinate value.
*/
@BindingMethod
public static native void TagY(double y, ImVec4 color, @OptArg boolean round);
public static native void TagY(double y, ImVec4 col, @OptArg boolean round);
/**
* Shows a y-axis tag at the specified coordinate value with formatted text.
*/
@BindingMethod
public static native void TagY(double y, ImVec4 color, String fmt, Void NULL);
public static native void TagY(double y, ImVec4 col, String fmt, Void NULL);
//-----------------------------------------------------------------------------
// [SECTION] Plot Utils
@@ -1415,6 +1360,7 @@ public final class ImPlot {
*/
@BindingMethod
public static native void PushStyleVar(int idx, ImVec2 val);
/**
* Undo temporary style variable modification(s). Undo multiple pushes at once by increasing count.
*/
@@ -1554,7 +1500,13 @@ public final class ImPlot {
* Shows a vertical color scale with linear spaced ticks using the specified color map. Use double hashes to hide label (e.g. "##NoLabel").
*/
@BindingMethod
public static native void ColormapScale(String label, double scaleMin, double scaleMax, @OptArg(callValue = "ImVec2(0,0)") ImVec2 size, @OptArg(callValue = "IMPLOT_AUTO") int cmap, @OptArg String format);
public static native void ColormapScale(String label,
double scaleMin,
double scaleMax,
@OptArg(callValue = "ImVec2(0,0)") ImVec2 size,
@OptArg(callValue = "\"%g\"") String format,
@OptArg int flags,
@OptArg int cmap);
/**
* Shows a horizontal slider with a colormap gradient background.
@@ -119,9 +119,6 @@ public final class ImPlotStyle extends ImGuiStructDestroyable {
@BindingField
public int Colormap;
@BindingField
public boolean AntiAliasedLines;
@BindingField
public boolean UseLocalTime;
@@ -0,0 +1,13 @@
package imgui.extension.implot.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
@BindingSource
public final class ImPlotBarsFlags {
private ImPlotBarsFlags() {
}
@BindingAstEnum(file = "ast-implot.json", qualType = "ImPlotBarsFlags_")
public Void __;
}
@@ -0,0 +1,13 @@
package imgui.extension.implot.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
@BindingSource
public final class ImPlotErrorBarsFlags {
private ImPlotErrorBarsFlags() {
}
@BindingAstEnum(file = "ast-implot.json", qualType = "ImPlotErrorBarsFlags_")
public Void __;
}
@@ -0,0 +1,13 @@
package imgui.extension.implot.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
@BindingSource
public final class ImPlotHeatmapFlags {
private ImPlotHeatmapFlags() {
}
@BindingAstEnum(file = "ast-implot.json", qualType = "ImPlotHeatmapFlags_")
public Void __;
}
@@ -0,0 +1,13 @@
package imgui.extension.implot.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
@BindingSource
public final class ImPlotHistogramFlags {
private ImPlotHistogramFlags() {
}
@BindingAstEnum(file = "ast-implot.json", qualType = "ImPlotHistogramFlags_")
public Void __;
}
@@ -0,0 +1,13 @@
package imgui.extension.implot.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
@BindingSource
public final class ImPlotInfLinesFlags {
private ImPlotInfLinesFlags() {
}
@BindingAstEnum(file = "ast-implot.json", qualType = "ImPlotInfLinesFlags_")
public Void __;
}
@@ -0,0 +1,13 @@
package imgui.extension.implot.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
@BindingSource
public final class ImPlotItemFlags {
private ImPlotItemFlags() {
}
@BindingAstEnum(file = "ast-implot.json", qualType = "ImPlotItemFlags_")
public Void __;
}
@@ -0,0 +1,13 @@
package imgui.extension.implot.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
@BindingSource
public final class ImPlotLineFlags {
private ImPlotLineFlags() {
}
@BindingAstEnum(file = "ast-implot.json", qualType = "ImPlotLineFlags_")
public Void __;
}
@@ -0,0 +1,13 @@
package imgui.extension.implot.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
@BindingSource
public final class ImPlotPieChartFlags {
private ImPlotPieChartFlags() {
}
@BindingAstEnum(file = "ast-implot.json", qualType = "ImPlotPieChartFlags_")
public Void __;
}
@@ -0,0 +1,13 @@
package imgui.extension.implot.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
@BindingSource
public final class ImPlotScale {
private ImPlotScale() {
}
@BindingAstEnum(file = "ast-implot.json", qualType = "ImPlotScale_")
public Void __;
}
@@ -0,0 +1,13 @@
package imgui.extension.implot.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
@BindingSource
public final class ImPlotScatterFlags {
private ImPlotScatterFlags() {
}
@BindingAstEnum(file = "ast-implot.json", qualType = "ImPlotScatterFlags_")
public Void __;
}
@@ -0,0 +1,13 @@
package imgui.extension.implot.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
@BindingSource
public final class ImPlotStairsFlags {
private ImPlotStairsFlags() {
}
@BindingAstEnum(file = "ast-implot.json", qualType = "ImPlotStairsFlags_")
public Void __;
}
@@ -0,0 +1,13 @@
package imgui.extension.implot.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
@BindingSource
public final class ImPlotStemsFlags {
private ImPlotStemsFlags() {
}
@BindingAstEnum(file = "ast-implot.json", qualType = "ImPlotStemsFlags_")
public Void __;
}
@@ -0,0 +1,13 @@
package imgui.extension.implot.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
@BindingSource
public final class ImPlotTextFlags {
private ImPlotTextFlags() {
}
@BindingAstEnum(file = "ast-implot.json", qualType = "ImPlotTextFlags_")
public Void __;
}
@@ -3,6 +3,7 @@ package imgui.extension.nodeditor;
import imgui.binding.ImGuiStructDestroyable;
import imgui.binding.annotation.BindingField;
import imgui.binding.annotation.BindingSource;
import imgui.binding.annotation.ReturnValue;
@BindingSource
public final class NodeEditorConfig extends ImGuiStructDestroyable {
@@ -23,6 +24,22 @@ public final class NodeEditorConfig extends ImGuiStructDestroyable {
@BindingField
public String SettingsFile;
public int getCanvasSizeMode() {
return nGetCanvasSizeMode();
}
public void setCanvasSizeMode(final int value) {
nSetCanvasSizeMode(value);
}
public native int nGetCanvasSizeMode(); /*
return static_cast<int>(THIS->CanvasSizeMode);
*/
public native void nSetCanvasSizeMode(int value); /*
THIS->CanvasSizeMode = static_cast<ax::NodeEditor::CanvasSizeMode>(value);
*/
@BindingField
public int DragButtonIndex;
@@ -35,6 +52,12 @@ public final class NodeEditorConfig extends ImGuiStructDestroyable {
@BindingField
public int ContextMenuButtonIndex;
@BindingField
public boolean EnableSmoothZoom;
@BindingField
public float SmoothZoomPower;
/*JNI
#undef THIS
*/
@@ -30,9 +30,15 @@ public final class NodeEditorStyle extends ImGuiStruct {
@BindingField
public float HoveredNodeBorderWidth;
@BindingField
public float HoverNodeBorderOffset;
@BindingField
public float SelectedNodeBorderWidth;
@BindingField
public float SelectedNodeBorderOffset;
@BindingField
public float PinRounding;
@@ -87,6 +93,12 @@ public final class NodeEditorStyle extends ImGuiStruct {
@BindingField
public float GroupBorderWidth;
@BindingField
public float HighlightConnectedLinks;
@BindingField
public float SnapLinkToPinDir;
@BindingField
@TypeArray(type = "ImVec4", size = "ax::NodeEditor::StyleColor_Count")
public ImVec4[] Colors;
@@ -0,0 +1,13 @@
package imgui.extension.nodeditor.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
@BindingSource
public final class NodeEditorCanvasSizeMode {
private NodeEditorCanvasSizeMode() {
}
@BindingAstEnum(file = "ast-imgui_node_editor.json", qualType = "ax::NodeEditor::CanvasSizeMode")
public Void __;
}
@@ -5,11 +5,13 @@ import imgui.binding.ImGuiStructDestroyable;
import imgui.binding.annotation.ArgValue;
import imgui.binding.annotation.BindingMethod;
import imgui.binding.annotation.BindingSource;
import imgui.binding.annotation.ExcludedSource;
import imgui.binding.annotation.OptArg;
import imgui.binding.annotation.ReturnValue;
import java.util.Map;
@ExcludedSource
@BindingSource
public final class TextEditor extends ImGuiStructDestroyable {
public TextEditor() {
@@ -1,7 +1,10 @@
package imgui.extension.texteditor;
import imgui.binding.annotation.ExcludedSource;
import java.util.Objects;
@ExcludedSource
public final class TextEditorCoordinates implements Cloneable {
public int mLine;
public int mColumn;
@@ -4,11 +4,13 @@ import imgui.binding.ImGuiStructDestroyable;
import imgui.binding.annotation.BindingField;
import imgui.binding.annotation.BindingMethod;
import imgui.binding.annotation.BindingSource;
import imgui.binding.annotation.ExcludedSource;
import imgui.binding.annotation.ReturnValue;
import imgui.binding.annotation.TypeStdString;
import java.util.Map;
@ExcludedSource
@BindingSource
public final class TextEditorLanguageDefinition extends ImGuiStructDestroyable {
public TextEditorLanguageDefinition() {
@@ -2,7 +2,9 @@ package imgui.extension.texteditor.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
import imgui.binding.annotation.ExcludedSource;
@ExcludedSource
@BindingSource
public final class TextEditorPaletteIndex {
private TextEditorPaletteIndex() {
@@ -2,7 +2,9 @@ package imgui.extension.texteditor.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
import imgui.binding.annotation.ExcludedSource;
@ExcludedSource
@BindingSource
public final class TextEditorSelectionMode {
private TextEditorSelectionMode() {
@@ -4,13 +4,17 @@ import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
/**
* User fill ImGuiIO.KeyMap[] array with indices into the ImGuiIO.KeysDown[512] array
* A key identifier (ImGuiKey_XXX or ImGuiMod_XXX value): can represent Keyboard, Mouse and Gamepad values.
* All our named keys are {@code >=} 512. Keys value 0 to 511 are left unused as legacy native/opaque key values ({@code <} 1.87).
* Since {@code >=} 1.89 we increased typing (went from int to enum), some legacy code may need a cast to ImGuiKey.
* Read details about the 1.87 and 1.89 transition : https://github.com/ocornut/imgui/issues/4921
* Note that "Keys" related to physical keys and are not the same concept as input "Characters", the later are submitted via io.AddInputCharacter().
*/
@BindingSource
public final class ImGuiKey {
private ImGuiKey() {
}
@BindingAstEnum(file = "ast-imgui.json", qualType = "ImGuiKey_")
@BindingAstEnum(file = "ast-imgui.json", qualType = "ImGuiKey", sanitizeName = "ImGuiKey_")
public Void __;
}
@@ -1,16 +0,0 @@
package imgui.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
/**
* To test io.KeyMods (which is a combination of individual fields io.KeyCtrl, io.KeyShift, io.KeyAlt set by user/backend)
*/
@BindingSource
public final class ImGuiModFlags {
private ImGuiModFlags() {
}
@BindingAstEnum(file = "ast-imgui.json", qualType = "ImGuiModFlags_")
public Void __;
}
@@ -0,0 +1,19 @@
package imgui.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
/**
* Enumeration for AddMouseSourceEvent() actual source of Mouse Input data.
* Historically we use "Mouse" terminology everywhere to indicate pointer data, e.g. MousePos, IsMousePressed(), io.AddMousePosEvent()
* But that "Mouse" data can come from different source which occasionally may be useful for application to know about.
* You can submit a change of pointer type using io.AddMouseSourceEvent().
*/
@BindingSource
public final class ImGuiMouseSource {
private ImGuiMouseSource() {
}
@BindingAstEnum(file = "ast-imgui.json", qualType = "ImGuiMouseSource", sanitizeName = "ImGuiMouseSource_")
public Void __;
}
@@ -1,23 +0,0 @@
package imgui.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
/**
* Gamepad/Keyboard directional navigation
* Since {@code >=1.87} backends you generally don't need to care about this enum since io.NavInputs[] is setup automatically. This might become private/internal some day.
* Keyboard: Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard to enable.
* NewFrame() will automatically fill io.NavInputs[] based on your io.KeysDown[] + io.KeyMap[] arrays.
* Gamepad: Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad to enable.
* Backend: set ImGuiBackendFlags_HasGamepad and fill the io.NavInputs[] fields before calling NewFrame().
* Note that io.NavInputs[] is cleared by EndFrame().
* Read instructions in imgui.cpp for more details. Download PNG/PSD at http://dearimgui.org/controls_sheets.
*/
@BindingSource
public final class ImGuiNavInput {
private ImGuiNavInput() {
}
@BindingAstEnum(file = "ast-imgui.json", qualType = "ImGuiNavInput_")
public Void __;
}
@@ -90,10 +90,10 @@ public final class ImGui extends imgui.ImGui {
// Windows: Display Order and Focus Order
@BindingMethod
public static native void FocusWindow(ImGuiWindow window);
public static native void FocusWindow(ImGuiWindow window, @OptArg @ArgValue(staticCast = "ImGuiFocusRequestFlags") int flags);
@BindingMethod
public static native void FocusTopMostWindowUnderOne(ImGuiWindow underThisWindow, ImGuiWindow ignoreWindow);
public static native void FocusTopMostWindowUnderOne(ImGuiWindow underThisWindow, ImGuiWindow ignoreWindow, ImGuiViewport filterViewport, @ArgValue(staticCast = "ImGuiFocusRequestFlags") int flags);
@BindingMethod
public static native void BringWindowToFocusFront(ImGuiWindow window);
@@ -191,9 +191,6 @@ public final class ImGui extends imgui.ImGui {
// Basic Accessors
@BindingMethod
public static native int GetItemID();
@BindingMethod
public static native int GetItemStatusFlags();
@@ -244,7 +241,10 @@ public final class ImGui extends imgui.ImGui {
// TODO: ItemAdd
@BindingMethod
public static native boolean ItemHoverable(ImRect bb, int id);
public static native boolean ItemHoverable(ImRect bb, int id, @ArgValue(staticCast = "ImGuiItemFlags") int itemFlags);
@BindingMethod
public static native boolean IsWindowContentHoverable(ImGuiWindow window, @ArgValue(staticCast = "ImGuiHoveredFlags") int flags);
@BindingMethod
public static native boolean IsClippedEx(ImRect bb, int id);
@@ -338,26 +338,44 @@ public final class ImGui extends imgui.ImGui {
// Widgets
@BindingMethod
public static native void TextEx(String beginText, @OptArg String endText, @OptArg @ArgValue(staticCast = "ImGuiTextFlags_") int imGuiTextFlags);
public static native void TextEx(String beginText, @OptArg String endText, @OptArg @ArgValue(staticCast = "ImGuiTextFlags") int flags);
@BindingMethod
public static native boolean ButtonEx(String label, @OptArg(callValue = "ImVec2(0,0)") ImVec2 size, @OptArg @ArgValue(staticCast = "ImGuiButtonFlags") int imGuiButtonFlags);
public static native boolean ButtonEx(String label, @OptArg(callValue = "ImVec2(0,0)") ImVec2 size, @OptArg @ArgValue(staticCast = "ImGuiButtonFlags") int flags);
@BindingMethod
public static native boolean ArrowButtonEx(String strId,
@ArgValue(staticCast = "ImGuiDir") int dir,
ImVec2 size,
@OptArg @ArgValue(staticCast = "ImGuiButtonFlags") int flags);
@BindingMethod
public static native boolean ImageButtonEx(@ArgValue(callPrefix = "(ImGuiID)") int id,
@ArgValue(callPrefix = "(ImTextureID)(uintptr_t)") long textureId,
ImVec2 size,
ImVec2 uv0,
ImVec2 uv1,
ImVec4 bgCol,
ImVec4 tintCol,
@ArgValue(staticCast = "ImGuiButtonFlags") int flags);
@BindingMethod
public static native void SeparatorEx(@ArgValue(staticCast = "ImGuiSeparatorFlags") int flags, @OptArg float thickness);
@BindingMethod
public static native void SeparatorTextEx(@ArgValue(callPrefix = "(ImGuiID)") int id, String label, String labelEnd, float extraWidth);
// Widgets: Window Decorations
@BindingMethod
public static native boolean CloseButton(@ArgValue(callPrefix = "(ImGuiID)") int id, ImVec2 pos);
@BindingMethod
public static native boolean ArrowButtonEx(String strId, @ArgValue(staticCast = "ImGuiDir") int imGuiDir, ImVec2 size, @OptArg @ArgValue(staticCast = "ImGuiButtonFlags") int imGuiButtonFlags);
public static native boolean CollapseButton(@ArgValue(callPrefix = "(ImGuiID)") int id, ImVec2 pos, ImGuiDockNode dockNode);
@BindingMethod
public static native void Scrollbar(@ArgValue(staticCast = "ImGuiAxis") int axis);
@BindingMethod
public static native boolean ImageButtonEx(@ArgValue(callPrefix = "(ImGuiID)") int id, @ArgValue(callPrefix = "(ImTextureID)(uintptr_t)") long userTextureId, ImVec2 size, ImVec2 uv0, ImVec2 uv1, ImVec2 padding, ImVec4 bgCol, ImVec4 tintCol);
@BindingMethod
public static native void SeparatorEx(@ArgValue(staticCast = "ImGuiSeparatorFlags_") int imGuiSeparatorFlags);
@BindingMethod
public static native ImRect GetWindowScrollbarRect(ImGuiWindow imGuiWindow, @ArgValue(staticCast = "ImGuiAxis") int axis);
@@ -0,0 +1,13 @@
package imgui.internal.flag;
import imgui.binding.annotation.BindingAstEnum;
import imgui.binding.annotation.BindingSource;
@BindingSource
public final class ImGuiFocusRequestFlags {
private ImGuiFocusRequestFlags() {
}
@BindingAstEnum(file = "ast-imgui_internal.json", qualType = "ImGuiFocusRequestFlags_")
public Void __;
}
@@ -2,4 +2,3 @@
#include "_common.h"
#include "imgui_node_editor.h"
#include "imgui_node_editor_internal.h"
+1 -1
View File
@@ -10,6 +10,6 @@
#include <regex>
#include "_common.h"
#include "TextEditor.h"
//#include "TextEditor.h"
#include "jni_texteditor.h"
@@ -12,7 +12,7 @@ jmethodID jImPlatformFuncViewportStringAcceptMID;
jmethodID jImPlatformFuncViewportSuppImVec2GetMID;
jmethodID jImPlatformFuncViewportSuppBooleanGetMID;
jmethodID jImPlatformFuncViewportSuppFloatGetMID;
jmethodID jImGuiFileDialogPaneFunMID;
//jmethodID jImGuiFileDialogPaneFunMID;
namespace Jni
{
@@ -47,8 +47,8 @@ namespace Jni
jclass jImPlatformFuncViewportSuppFloat = env->FindClass("imgui/callback/ImPlatformFuncViewportSuppFloat");
jImPlatformFuncViewportSuppFloatGetMID = env->GetMethodID(jImPlatformFuncViewportSuppFloat, "get", "(Limgui/ImGuiViewport;)F");
jclass jImGuiFileDialogPaneFun = env->FindClass("imgui/extension/imguifiledialog/callback/ImGuiFileDialogPaneFun");
jImGuiFileDialogPaneFunMID = env->GetMethodID(jImGuiFileDialogPaneFun, "accept", "(Ljava/lang/String;JZ)V");
// jclass jImGuiFileDialogPaneFun = env->FindClass("imgui/extension/imguifiledialog/callback/ImGuiFileDialogPaneFun");
// jImGuiFileDialogPaneFunMID = env->GetMethodID(jImGuiFileDialogPaneFun, "accept", "(Ljava/lang/String;JZ)V");
}
void CallImListClipperCallback(JNIEnv* env, jobject consumer, int index) {
@@ -91,7 +91,7 @@ namespace Jni
return (jfloat)env->CallFloatMethod(func, jImPlatformFuncViewportSuppFloatGetMID, vp);
}
void CallImGuiFileDialogPaneFun(JNIEnv* env, jobject func, const char* filter, long user_datas, bool canWeContinue) {
env->CallVoidMethod(func, jImGuiFileDialogPaneFunMID, env->NewStringUTF(filter), user_datas, canWeContinue);
}
// void CallImGuiFileDialogPaneFun(JNIEnv* env, jobject func, const char* filter, long user_datas, bool canWeContinue) {
// env->CallVoidMethod(func, jImGuiFileDialogPaneFunMID, env->NewStringUTF(filter), user_datas, canWeContinue);
// }
}
@@ -26,5 +26,5 @@ namespace Jni
jfloat CallImPlatformFuncViewportSuppFloat(JNIEnv* env, jobject func, jobject vp);
void CallImGuiFileDialogPaneFun(JNIEnv* env, jobject func, const char* filter, long user_datas, bool canWeContinue);
// void CallImGuiFileDialogPaneFun(JNIEnv* env, jobject func, const char* filter, long user_datas, bool canWeContinue);
}
@@ -1,38 +1,38 @@
#include "jni_texteditor.h"
static jfieldID coordinatesLineID;
static jfieldID coordinatesColumnID;
//static jfieldID coordinatesLineID;
//static jfieldID coordinatesColumnID;
static void initialize(JNIEnv* env) {
static bool initialized = false;
if (initialized) {
return;
}
jclass coordinatesClass = env->FindClass("imgui/extension/texteditor/TextEditorCoordinates");
coordinatesLineID = env->GetFieldID(coordinatesClass, "mLine", "I");
coordinatesColumnID = env->GetFieldID(coordinatesClass, "mColumn", "I");
initialized = true;
}
//static void initialize(JNIEnv* env) {
// static bool initialized = false;
// if (initialized) {
// return;
// }
//
// jclass coordinatesClass = env->FindClass("imgui/extension/texteditor/TextEditorCoordinates");
// coordinatesLineID = env->GetFieldID(coordinatesClass, "mLine", "I");
// coordinatesColumnID = env->GetFieldID(coordinatesClass, "mColumn", "I");
//
// initialized = true;
//}
namespace Jni
{
void TextEditorCoordinatesCpy(JNIEnv* env, TextEditor::Coordinates* src, jobject dst) {
initialize(env);
env->SetIntField(dst, coordinatesLineID, src->mLine);
env->SetIntField(dst, coordinatesColumnID, src->mColumn);
}
void TextEditorCoordinatesCpy(JNIEnv* env, TextEditor::Coordinates src, jobject dst) {
initialize(env);
env->SetIntField(dst, coordinatesLineID, src.mLine);
env->SetIntField(dst, coordinatesColumnID, src.mColumn);
}
void TextEditorCoordinatesCpy(JNIEnv* env, jobject src, TextEditor::Coordinates* dst) {
initialize(env);
dst->mLine = env->GetIntField(src, coordinatesLineID);
dst->mColumn = env->GetIntField(src, coordinatesColumnID);
}
// void TextEditorCoordinatesCpy(JNIEnv* env, TextEditor::Coordinates* src, jobject dst) {
// initialize(env);
// env->SetIntField(dst, coordinatesLineID, src->mLine);
// env->SetIntField(dst, coordinatesColumnID, src->mColumn);
// }
//
// void TextEditorCoordinatesCpy(JNIEnv* env, TextEditor::Coordinates src, jobject dst) {
// initialize(env);
// env->SetIntField(dst, coordinatesLineID, src.mLine);
// env->SetIntField(dst, coordinatesColumnID, src.mColumn);
// }
//
// void TextEditorCoordinatesCpy(JNIEnv* env, jobject src, TextEditor::Coordinates* dst) {
// initialize(env);
// dst->mLine = env->GetIntField(src, coordinatesLineID);
// dst->mColumn = env->GetIntField(src, coordinatesColumnID);
// }
}
@@ -1,11 +1,11 @@
#pragma once
#include "jni.h"
#include "TextEditor.h"
//#include "TextEditor.h"
namespace Jni
{
void TextEditorCoordinatesCpy(JNIEnv* env, TextEditor::Coordinates* src, jobject dst);
void TextEditorCoordinatesCpy(JNIEnv* env, TextEditor::Coordinates src, jobject dst);
void TextEditorCoordinatesCpy(JNIEnv* env, jobject src, TextEditor::Coordinates* dst);
// void TextEditorCoordinatesCpy(JNIEnv* env, TextEditor::Coordinates* src, jobject dst);
// void TextEditorCoordinatesCpy(JNIEnv* env, TextEditor::Coordinates src, jobject dst);
// void TextEditorCoordinatesCpy(JNIEnv* env, jobject src, TextEditor::Coordinates* dst);
}