From 4d00f348a3c715052e074439bf3d384cf4f50bc0 Mon Sep 17 00:00:00 2001 From: SpaiR Date: Mon, 10 Feb 2020 23:58:54 +0300 Subject: [PATCH] Convert enums comments to JavaDoc --- .../java/imgui/enums/ImDrawCornerFlags.java | 46 ++++-- .../java/imgui/enums/ImDrawListFlags.java | 16 ++- .../java/imgui/enums/ImFontAtlasFlags.java | 10 +- .../java/imgui/enums/ImGuiBackendFlags.java | 20 ++- .../src/main/java/imgui/enums/ImGuiCol.java | 45 ++++-- .../java/imgui/enums/ImGuiColorEditFlags.java | 131 ++++++++++++++---- .../java/imgui/enums/ImGuiComboFlags.java | 35 ++++- .../src/main/java/imgui/enums/ImGuiCond.java | 22 ++- .../java/imgui/enums/ImGuiConfigFlags.java | 45 ++++-- .../main/java/imgui/enums/ImGuiDataType.java | 50 +++++-- .../java/imgui/enums/ImGuiDragDropFlags.java | 58 ++++++-- .../java/imgui/enums/ImGuiFocusedFlags.java | 16 ++- .../java/imgui/enums/ImGuiHoveredFlags.java | 42 ++++-- .../java/imgui/enums/ImGuiInputTextFlags.java | 97 ++++++++++--- .../src/main/java/imgui/enums/ImGuiKey.java | 30 +++- .../java/imgui/enums/ImGuiMouseCursor.java | 40 ++++-- .../main/java/imgui/enums/ImGuiNavInput.java | 66 +++++++-- .../imgui/enums/ImGuiSelectableFlags.java | 25 +++- .../main/java/imgui/enums/ImGuiStyleVar.java | 115 ++++++++++++--- .../java/imgui/enums/ImGuiTabBarFlags.java | 41 ++++-- .../java/imgui/enums/ImGuiTabItemFlags.java | 22 ++- .../java/imgui/enums/ImGuiTreeNodeFlags.java | 72 ++++++++-- .../java/imgui/enums/ImGuiWindowFlags.java | 97 ++++++++++--- 23 files changed, 918 insertions(+), 223 deletions(-) diff --git a/imgui-binding/src/main/java/imgui/enums/ImDrawCornerFlags.java b/imgui-binding/src/main/java/imgui/enums/ImDrawCornerFlags.java index 44e2028..5d0773a 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImDrawCornerFlags.java +++ b/imgui-binding/src/main/java/imgui/enums/ImDrawCornerFlags.java @@ -5,13 +5,41 @@ public final class ImDrawCornerFlags { } public static final int None = 0; - public static final int TopLeft = 1; // 0x1 - public static final int TopRight = 1 << 1; // 0x2 - public static final int BotLeft = 1 << 2; // 0x4 - public static final int BotRight = 1 << 3; // 0x8 - public static final int Top = TopLeft | TopRight; // 0x3 - public static final int Bot = BotLeft | BotRight; // 0xC - public static final int Left = TopLeft | BotLeft; // 0x5 - public static final int Right = TopRight | BotRight; // 0xA - public static final int All = 0xF; // In your function calls you may use ~0 (= all bits sets) instead of All, as a convenience + /** + * 0x1 + */ + public static final int TopLeft = 1; + /** + * 0x2 + */ + public static final int TopRight = 1 << 1; + /** + * 0x4 + */ + public static final int BotLeft = 1 << 2; + /** + * 0x8 + */ + public static final int BotRight = 1 << 3; + /** + * 0x3 + */ + public static final int Top = TopLeft | TopRight; + /** + * 0xC + */ + public static final int Bot = BotLeft | BotRight; + /** + * 0x5 + */ + public static final int Left = TopLeft | BotLeft; + + /** + * 0xA + */ + public static final int Right = TopRight | BotRight; + /** + * In your function calls you may use ~0 (= all bits sets) instead of All, as a convenience + */ + public static final int All = 0xF; } diff --git a/imgui-binding/src/main/java/imgui/enums/ImDrawListFlags.java b/imgui-binding/src/main/java/imgui/enums/ImDrawListFlags.java index a814797..9b594d7 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImDrawListFlags.java +++ b/imgui-binding/src/main/java/imgui/enums/ImDrawListFlags.java @@ -5,7 +5,17 @@ public final class ImDrawListFlags { } public static final int None = 0; - public static final int AntiAliasedLines = 1; // Lines are anti-aliased (*2 the number of triangles for 1.0f wide line, otherwise *3 the number of triangles) - public static final int AntiAliasedFill = 1 << 1; // Filled shapes have anti-aliased edges (*2 the number of vertices) - public static final int AllowVtxOffset = 1 << 2; // Can emit 'VtxOffset > 0' to allow large meshes. Set when 'ImGuiBackendFlags_RendererHasVtxOffset' is enabled. + + /** + * Lines are anti-aliased (*2 the number of triangles for 1.0f wide line, otherwise *3 the number of triangles) + */ + public static final int AntiAliasedLines = 1; + /** + * Filled shapes have anti-aliased edges (*2 the number of vertices) + */ + public static final int AntiAliasedFill = 1 << 1; + /** + * Can emit 'VtxOffset > 0' to allow large meshes. Set when 'ImGuiBackendFlags_RendererHasVtxOffset' is enabled. + */ + public static final int AllowVtxOffset = 1 << 2; } diff --git a/imgui-binding/src/main/java/imgui/enums/ImFontAtlasFlags.java b/imgui-binding/src/main/java/imgui/enums/ImFontAtlasFlags.java index 25a56ed..ef1e154 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImFontAtlasFlags.java +++ b/imgui-binding/src/main/java/imgui/enums/ImFontAtlasFlags.java @@ -5,6 +5,12 @@ public final class ImFontAtlasFlags { } public static final int None = 0; - public static final int NoPowerOfTwoHeight = 1; // Don't round the height to next power of two - public static final int NoMouseCursors = 1 << 1; // Don't build software mouse cursors into the atlas + /** + * Don't round the height to next power of two + */ + public static final int NoPowerOfTwoHeight = 1; + /** + * Don't build software mouse cursors into the atlas + */ + public static final int NoMouseCursors = 1 << 1; } diff --git a/imgui-binding/src/main/java/imgui/enums/ImGuiBackendFlags.java b/imgui-binding/src/main/java/imgui/enums/ImGuiBackendFlags.java index 4332a09..c005323 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImGuiBackendFlags.java +++ b/imgui-binding/src/main/java/imgui/enums/ImGuiBackendFlags.java @@ -8,8 +8,20 @@ public final class ImGuiBackendFlags { } public static final int None = 0; - public static final int HasGamepad = 1; // Back-end Platform supports gamepad and currently has one connected. - public static final int HasMouseCursors = 1 << 1; // Back-end Platform supports honoring GetMouseCursor() value to change the OS cursor shape. - public static final int HasSetMousePos = 1 << 2; // Back-end Platform supports io.WantSetMousePos requests to reposition the OS mouse position (only used if ImGuiConfigFlags_NavEnableSetMousePos is set). - public static final int RendererHasVtxOffset = 1 << 3; // Back-end Renderer supports ImDrawCmd::VtxOffset. This enables output of large meshes (64K+ vertices) while still using 16-bit indices. + /** + * Back-end Platform supports gamepad and currently has one connected. + */ + public static final int HasGamepad = 1; + /** + * Back-end Platform supports honoring GetMouseCursor() value to change the OS cursor shape. + */ + public static final int HasMouseCursors = 1 << 1; + /** + * Back-end Platform supports io.WantSetMousePos requests to reposition the OS mouse position (only used if ImGuiConfigFlags_NavEnableSetMousePos is set). + */ + public static final int HasSetMousePos = 1 << 2; + /** + * Back-end Renderer supports ImDrawCmd::VtxOffset. This enables output of large meshes (64K+ vertices) while still using 16-bit indices. + */ + public static final int RendererHasVtxOffset = 1 << 3; } diff --git a/imgui-binding/src/main/java/imgui/enums/ImGuiCol.java b/imgui-binding/src/main/java/imgui/enums/ImGuiCol.java index 05542cb..608bd2c 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImGuiCol.java +++ b/imgui-binding/src/main/java/imgui/enums/ImGuiCol.java @@ -9,12 +9,24 @@ public final class ImGuiCol { public static final int Text = 0; public static final int TextDisabled = 1; - public static final int WindowBg = 2; // Background of normal windows - public static final int ChildBg = 3; // Background of child windows - public static final int PopupBg = 4; // Background of popups, menus, tooltips windows + /** + * Background of normal windows + */ + public static final int WindowBg = 2; // + /** + * Background of child windows + */ + public static final int ChildBg = 3; + /** + * Background of popups, menus, tooltips windows + */ + public static final int PopupBg = 4; public static final int Border = 5; public static final int BorderShadow = 6; - public static final int FrameBg = 7; // Background of checkbox, radio button, plot, slider, text input + /** + * Background of checkbox, radio button, plot, slider, text input + */ + public static final int FrameBg = 7; public static final int FrameBgHovered = 8; public static final int FrameBgActive = 9; public static final int TitleBg = 10; @@ -31,7 +43,10 @@ public final class ImGuiCol { public static final int Button = 21; public static final int ButtonHovered = 22; public static final int ButtonActive = 23; - public static final int Header = 24; // Header* colors are used for CollapsingHeader, TreeNode, Selectable, MenuItem + /** + * Header* colors are used for CollapsingHeader, TreeNode, Selectable, MenuItem + */ + public static final int Header = 24; public static final int HeaderHovered = 25; public static final int HeaderActive = 26; public static final int Separator = 27; @@ -51,10 +66,22 @@ public final class ImGuiCol { public static final int PlotHistogramHovered = 41; public static final int TextSelectedBg = 42; public static final int DragDropTarget = 43; - public static final int NavHighlight = 44; // Gamepad/keyboard: current highlighted item - public static final int NavWindowingHighlight = 45; // Highlight window when using CTRL+TAB - public static final int NavWindowingDimBg = 46; // Darken/colorize entire screen behind the CTRL+TAB window list, when active - public static final int ModalWindowDimBg = 47; // Darken/colorize entire screen behind a modal window, when one is active + /** + * Gamepad/keyboard: current highlighted item + */ + public static final int NavHighlight = 44; + /** + * Highlight window when using CTRL+TAB + */ + public static final int NavWindowingHighlight = 45; + /** + * Darken/colorize entire screen behind the CTRL+TAB window list, when active + */ + public static final int NavWindowingDimBg = 46; + /** + * Darken/colorize entire screen behind a modal window, when one is active + */ + public static final int ModalWindowDimBg = 47; public static final int COUNT = 48; } diff --git a/imgui-binding/src/main/java/imgui/enums/ImGuiColorEditFlags.java b/imgui-binding/src/main/java/imgui/enums/ImGuiColorEditFlags.java index 5b317b4..0f78547 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImGuiColorEditFlags.java +++ b/imgui-binding/src/main/java/imgui/enums/ImGuiColorEditFlags.java @@ -8,32 +8,115 @@ public final class ImGuiColorEditFlags { } public static final int None = 0; - public static final int NoAlpha = 1 << 1; // // ColorEdit, ColorPicker, ColorButton: ignore Alpha component (will only read 3 components from the input pointer). - public static final int NoPicker = 1 << 2; // // ColorEdit: disable picker when clicking on colored square. - public static final int NoOptions = 1 << 3; // // ColorEdit: disable toggling options menu when right-clicking on inputs/small preview. - public static final int NoSmallPreview = 1 << 4; // // ColorEdit, ColorPicker: disable colored square preview next to the inputs. (e.g. to show only the inputs) - public static final int NoInputs = 1 << 5; // // ColorEdit, ColorPicker: disable inputs sliders/text widgets (e.g. to show only the small preview colored square). - public static final int NoTooltip = 1 << 6; // // ColorEdit, ColorPicker, ColorButton: disable tooltip when hovering the preview. - public static final int NoLabel = 1 << 7; // // ColorEdit, ColorPicker: disable display of inline text label (the label is still forwarded to the tooltip and picker). - public static final int NoSidePreview = 1 << 8; // // ColorPicker: disable bigger color preview on right side of the picker, use small colored square preview instead. - public static final int NoDragDrop = 1 << 9; // // ColorEdit: disable drag and drop target. ColorButton: disable drag and drop source. + /** + * ColorEdit, ColorPicker, ColorButton: ignore Alpha component (will only read 3 components from the input pointer). + */ + public static final int NoAlpha = 1 << 1; + /** + * ColorEdit: disable picker when clicking on colored square. + */ + public static final int NoPicker = 1 << 2; + /** + * ColorEdit: disable toggling options menu when right-clicking on inputs/small preview. + */ + public static final int NoOptions = 1 << 3; + /** + * ColorEdit, ColorPicker: disable colored square preview next to the inputs. (e.g. to show only the inputs) + */ + public static final int NoSmallPreview = 1 << 4; + /** + * ColorEdit, ColorPicker: disable inputs sliders/text widgets (e.g. to show only the small preview colored square). + */ + public static final int NoInputs = 1 << 5; + /** + * ColorEdit, ColorPicker, ColorButton: disable tooltip when hovering the preview. + */ + public static final int NoTooltip = 1 << 6; + /** + * ColorEdit, ColorPicker: disable display of inline text label (the label is still forwarded to the tooltip and picker). + */ + public static final int NoLabel = 1 << 7; + /** + * ColorPicker: disable bigger color preview on right side of the picker, use small colored square preview instead. + */ + public static final int NoSidePreview = 1 << 8; + /** + * ColorEdit: disable drag and drop target. ColorButton: disable drag and drop source. + */ + public static final int NoDragDrop = 1 << 9; // User Options (right-click on widget to change some of them). - public static final int AlphaBar = 1 << 16; // // ColorEdit, ColorPicker: show vertical alpha bar/gradient in picker. - public static final int AlphaPreview = 1 << 17; // // ColorEdit, ColorPicker, ColorButton: display preview as a transparent color over a checkerboard, instead of opaque. - public static final int AlphaPreviewHalf = 1 << 18; // // ColorEdit, ColorPicker, ColorButton: display half opaque / half checkerboard, instead of opaque. - public static final int HDR = 1 << 19; // // (WIP) ColorEdit: Currently only disable 0.0f..1.0f limits in RGBA edition (note: you probably want to use ImGuiColorEditFlags_Float flag as well). - public static final int DisplayRGB = 1 << 20; // [Display] // ColorEdit: override _display_ type among RGB/HSV/Hex. ColorPicker: select any combination using one or more of RGB/HSV/Hex. - public static final int DisplayHSV = 1 << 21; // [Display] // " - public static final int DisplayHex = 1 << 22; // [Display] // " - public static final int Uint8 = 1 << 23; // [DataType] // ColorEdit, ColorPicker, ColorButton: _display_ values formatted as 0..255. - public static final int Float = 1 << 24; // [DataType] // ColorEdit, ColorPicker, ColorButton: _display_ values formatted as 0.0f..1.0f floats instead of 0..255 integers. No round-trip of value via integers. - public static final int PickerHueBar = 1 << 25; // [Picker] // ColorPicker: bar for Hue, rectangle for Sat/Value. - public static final int PickerHueWheel = 1 << 26; // [Picker] // ColorPicker: wheel for Hue, triangle for Sat/Value. - public static final int InputRGB = 1 << 27; // [Input] // ColorEdit, ColorPicker: input and output data in RGB format. - public static final int InputHSV = 1 << 28; // [Input] // ColorEdit, ColorPicker: input and output data in HSV format. - // Defaults Options. You can set application defaults using SetColorEditOptions(). The intent is that you probably don't want to - // override them in most of your calls. Let the user choose via the option menu and/or call SetColorEditOptions() once during startup. + /** + * ColorEdit, ColorPicker: show vertical alpha bar/gradient in picker. + */ + public static final int AlphaBar = 1 << 16; + /** + * ColorEdit, ColorPicker, ColorButton: display preview as a transparent color over a checkerboard, instead of opaque. + */ + public static final int AlphaPreview = 1 << 17; + /** + * ColorEdit, ColorPicker, ColorButton: display half opaque / half checkerboard, instead of opaque. + */ + public static final int AlphaPreviewHalf = 1 << 18; + /** + * (WIP) ColorEdit: Currently only disable 0.0f..1.0f limits in RGBA edition (note: you probably want to use ImGuiColorEditFlags_Float flag as well). + */ + public static final int HDR = 1 << 19; + /** + * [Display] + *

+ * ColorEdit: override _display_ type among RGB/HSV/Hex. ColorPicker: select any combination using one or more of RGB/HSV/Hex. + */ + public static final int DisplayRGB = 1 << 20; + /** + * [Display] + */ + public static final int DisplayHSV = 1 << 21; + /** + * [Display] + */ + public static final int DisplayHex = 1 << 22; + /** + * [DataType] + *

+ * ColorEdit, ColorPicker, ColorButton: _display_ values formatted as 0..255. + */ + public static final int Uint8 = 1 << 23; + /** + * [DataType] + *

+ * ColorEdit, ColorPicker, ColorButton: _display_ values formatted as 0.0f..1.0f floats instead of 0..255 integers. No round-trip of value via integers. + */ + public static final int Float = 1 << 24; + /** + * [Picker] + *

+ * ColorPicker: bar for Hue, rectangle for Sat/Value. + */ + public static final int PickerHueBar = 1 << 25; + /** + * [Picker] + *

+ * ColorPicker: wheel for Hue, triangle for Sat/Value. + */ + public static final int PickerHueWheel = 1 << 26; + /** + * [Input] + *

+ * ColorEdit, ColorPicker: input and output data in RGB format. + */ + public static final int InputRGB = 1 << 27; + /** + * [Input] + *

+ * ColorEdit, ColorPicker: input and output data in HSV format. + */ + public static final int InputHSV = 1 << 28; + + /** + * Defaults Options. You can set application defaults using SetColorEditOptions(). The intent is that you probably don't want to + * override them in most of your calls. Let the user choose via the option menu and/or call SetColorEditOptions() once during startup. + */ public static final int OptionsDefault = Uint8 | DisplayRGB | InputRGB | PickerHueBar; } diff --git a/imgui-binding/src/main/java/imgui/enums/ImGuiComboFlags.java b/imgui-binding/src/main/java/imgui/enums/ImGuiComboFlags.java index a4a49ba..a0a05b5 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImGuiComboFlags.java +++ b/imgui-binding/src/main/java/imgui/enums/ImGuiComboFlags.java @@ -8,12 +8,33 @@ public final class ImGuiComboFlags { } public static final int None = 0; - public static final int PopupAlignLeft = 1; // Align the popup toward the left by default - public static final int HeightSmall = 1 << 1; // Max ~4 items visible. Tip: If you want your combo popup to be a specific size you can use SetNextWindowSizeConstraints() prior to calling BeginCombo() - public static final int HeightRegular = 1 << 2; // Max ~8 items visible (default) - public static final int HeightLarge = 1 << 3; // Max ~20 items visible - public static final int HeightLargest = 1 << 4; // As many fitting items as possible - public static final int NoArrowButton = 1 << 5; // Display on the preview box without the square arrow button - public static final int NoPreview = 1 << 6; // Display only a square arrow button + /** + * Align the popup toward the left by default + */ + public static final int PopupAlignLeft = 1; + /** + * Max ~4 items visible. Tip: If you want your combo popup to be a specific size you can use SetNextWindowSizeConstraints() prior to calling BeginCombo() + */ + public static final int HeightSmall = 1 << 1; + /** + * Max ~8 items visible (default) + */ + public static final int HeightRegular = 1 << 2; + /** + * Max ~20 items visible + */ + public static final int HeightLarge = 1 << 3; + /** + * As many fitting items as possible + */ + public static final int HeightLargest = 1 << 4; + /** + * Display on the preview box without the square arrow button + */ + public static final int NoArrowButton = 1 << 5; + /** + * Display only a square arrow button + */ + public static final int NoPreview = 1 << 6; public static final int HeightMask_ = HeightSmall | HeightRegular | HeightLarge | HeightLargest; } diff --git a/imgui-binding/src/main/java/imgui/enums/ImGuiCond.java b/imgui-binding/src/main/java/imgui/enums/ImGuiCond.java index 0202a98..eeb7a18 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImGuiCond.java +++ b/imgui-binding/src/main/java/imgui/enums/ImGuiCond.java @@ -1,7 +1,7 @@ package imgui.enums; /** - * Enumateration for ImGui::SetWindow***(), SetNextWindow***(), SetNextItem***() functions + * Enumeration for ImGui::SetWindow***(), SetNextWindow***(), SetNextItem***() functions * Represent a condition. * Important: Treat as a regular enum! Do NOT combine multiple values using binary operators! All the functions above treat 0 as a shortcut to ImGuiCond_Always. */ @@ -9,8 +9,20 @@ public final class ImGuiCond { private ImGuiCond() { } - public static final int Always = 1; // Set the variable - public static final int Once = 1 << 1; // Set the variable once per runtime session (only the first call with succeed) - public static final int FirstUseEver = 1 << 2; // Set the variable if the object/window has no persistently saved data (no entry in .ini file) - public static final int Appearing = 1 << 3; // Set the variable if the object/window is appearing after being hidden/inactive (or the first time) + /** + * Set the variable + */ + public static final int Always = 1; + /** + * Set the variable once per runtime session (only the first call with succeed) + */ + public static final int Once = 1 << 1; + /** + * Set the variable if the object/window has no persistently saved data (no entry in .ini file) + */ + public static final int FirstUseEver = 1 << 2; + /** + * Set the variable if the object/window is appearing after being hidden/inactive (or the first time) + */ + public static final int Appearing = 1 << 3; } diff --git a/imgui-binding/src/main/java/imgui/enums/ImGuiConfigFlags.java b/imgui-binding/src/main/java/imgui/enums/ImGuiConfigFlags.java index d78857a..dd512f2 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImGuiConfigFlags.java +++ b/imgui-binding/src/main/java/imgui/enums/ImGuiConfigFlags.java @@ -8,14 +8,43 @@ public final class ImGuiConfigFlags { } public static final int None = 0; - public static final int NavEnableKeyboard = 1; // Master keyboard navigation enable flag. NewFrame() will automatically fill io.NavInputs[] based on io.KeysDown[]. - public static final int NavEnableGamepad = 1 << 1; // Master gamepad navigation enable flag. This is mostly to instruct your imgui back-end to fill io.NavInputs[]. Back-end also needs to set ImGuiBackendFlags_HasGamepad. - public static final int NavEnableSetMousePos = 1 << 2; // Instruct navigation to move the mouse cursor. May be useful on TV/console systems where moving a virtual mouse is awkward. Will update io.MousePos and set io.WantSetMousePos=true. If enabled you MUST honor io.WantSetMousePos requests in your binding, otherwise ImGui will react as if the mouse is jumping around back and forth. - public static final int NavNoCaptureKeyboard = 1 << 3; // Instruct navigation to not set the io.WantCaptureKeyboard flag when io.NavActive is set. - public static final int NoMouse = 1 << 4; // Instruct imgui to clear mouse position/buttons in NewFrame(). This allows ignoring the mouse information set by the back-end. - public static final int NoMouseCursorChange = 1 << 5; // Instruct back-end to not alter mouse cursor shape and visibility. Use if the back-end cursor changes are interfering with yours and you don't want to use SetMouseCursor() to change mouse cursor. You may want to honor requests from imgui by reading GetMouseCursor() yourself instead. + /** + * Master keyboard navigation enable flag. NewFrame() will automatically fill io.NavInputs[] based on io.KeysDown[]. + */ + public static final int NavEnableKeyboard = 1; + /** + * Master gamepad navigation enable flag. This is mostly to instruct your imgui back-end to fill io.NavInputs[]. Back-end also needs to set ImGuiBackendFlags_HasGamepad. + */ + public static final int NavEnableGamepad = 1 << 1; + /** + * Instruct navigation to move the mouse cursor. + * May be useful on TV/console systems where moving a virtual mouse is awkward. Will update io.MousePos and set io.WantSetMousePos=true. + * If enabled you MUST honor io.WantSetMousePos requests in your binding, otherwise ImGui will react as if the mouse is jumping around back and forth. + */ + public static final int NavEnableSetMousePos = 1 << 2; + /** + * Instruct navigation to not set the io.WantCaptureKeyboard flag when io.NavActive is set. + */ + public static final int NavNoCaptureKeyboard = 1 << 3; + /** + * Instruct imgui to clear mouse position/buttons in NewFrame(). This allows ignoring the mouse information set by the back-end. + */ + public static final int NoMouse = 1 << 4; + /** + * Instruct back-end to not alter mouse cursor shape and visibility. + * Use if the back-end cursor changes are interfering with yours and you don't want to use SetMouseCursor() to change mouse cursor. + * You may want to honor requests from imgui by reading GetMouseCursor() yourself instead. + */ + public static final int NoMouseCursorChange = 1 << 5; // User storage (to allow your back-end/engine to communicate to code that may be shared between multiple projects. Those flags are not used by core Dear ImGui) - public static final int IsSRGB = 1 << 20; // Application is SRGB-aware. - public static final int IsTouchScreen = 1 << 21; // Application is using a touch screen instead of a mouse. + + /** + * Application is SRGB-aware. + */ + public static final int IsSRGB = 1 << 20; + /** + * Application is using a touch screen instead of a mouse. + */ + public static final int IsTouchScreen = 1 << 21; } diff --git a/imgui-binding/src/main/java/imgui/enums/ImGuiDataType.java b/imgui-binding/src/main/java/imgui/enums/ImGuiDataType.java index 2d4d68b..e326671 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImGuiDataType.java +++ b/imgui-binding/src/main/java/imgui/enums/ImGuiDataType.java @@ -7,15 +7,45 @@ public final class ImGuiDataType { private ImGuiDataType() { } - public static final int S8 = 0; // signed char / char (with sensible compilers) - public static final int U8 = 1; // unsigned char - public static final int S16 = 2; // short - public static final int U16 = 3; // unsigned short - public static final int S32 = 4; // int - public static final int U32 = 5; // unsigned int - public static final int S64 = 6; // long long / __int64 - public static final int U64 = 7; // unsigned long long / unsigned __int64 - public static final int Float = 8; // float - public static final int Double = 9; // double + /** + * signed char / char (with sensible compilers) + */ + public static final int S8 = 0; + /** + * unsigned char + */ + public static final int U8 = 1; + /** + * short + */ + public static final int S16 = 2; + /** + * unsigned short + */ + public static final int U16 = 3; + /** + * int + */ + public static final int S32 = 4; + /** + * unsigned int + */ + public static final int U32 = 5; + /** + * long long / __int64 + */ + public static final int S64 = 6; + /** + * unsigned long long / unsigned __int64 + */ + public static final int U64 = 7; + /** + * float + */ + public static final int Float = 8; + /** + * double + */ + public static final int Double = 9; public static final int COUNT = 10; } diff --git a/imgui-binding/src/main/java/imgui/enums/ImGuiDragDropFlags.java b/imgui-binding/src/main/java/imgui/enums/ImGuiDragDropFlags.java index a4d166e..6bc001b 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImGuiDragDropFlags.java +++ b/imgui-binding/src/main/java/imgui/enums/ImGuiDragDropFlags.java @@ -8,16 +8,54 @@ public final class ImGuiDragDropFlags { } public static final int None = 0; + // BeginDragDropSource() flags - public static final int SourceNoPreviewTooltip = 1; // By default, a successful call to BeginDragDropSource opens a tooltip so you can display a preview or description of the source contents. This flag disable this behavior. - public static final int SourceNoDisableHover = 1 << 1; // By default, when dragging we clear data so that IsItemHovered() will return false, to avoid subsequent user code submitting tooltips. This flag disable this behavior so you can still call IsItemHovered() on the source item. - public static final int SourceNoHoldToOpenOthers = 1 << 2; // Disable the behavior that allows to open tree nodes and collapsing header by holding over them while dragging a source item. - public static final int SourceAllowNullID = 1 << 3; // Allow items such as Text(), Image() that have no unique identifier to be used as drag source, by manufacturing a temporary identifier based on their window-relative position. This is extremely unusual within the dear imgui ecosystem and so we made it explicit. - public static final int SourceExtern = 1 << 4; // External source (from outside of dear imgui), won't attempt to read current item/window info. Will always return true. Only one Extern source can be active simultaneously. - public static final int SourceAutoExpirePayload = 1 << 5; // Automatically expire the payload if the source cease to be submitted (otherwise payloads are persisting while being dragged) + + /** + * By default, a successful call to BeginDragDropSource opens a tooltip so you can display a preview or description of the source contents. This flag disable this behavior. + */ + public static final int SourceNoPreviewTooltip = 1; + /** + * By default, when dragging we clear data so that IsItemHovered() will return false, to avoid subsequent user code submitting tooltips. + * This flag disable this behavior so you can still call IsItemHovered() on the source item. + */ + public static final int SourceNoDisableHover = 1 << 1; + /** + * Disable the behavior that allows to open tree nodes and collapsing header by holding over them while dragging a source item. + */ + public static final int SourceNoHoldToOpenOthers = 1 << 2; + /** + * Allow items such as Text(), Image() that have no unique identifier to be used as drag source, + * by manufacturing a temporary identifier based on their window-relative position. + * This is extremely unusual within the dear imgui ecosystem and so we made it explicit. + */ + public static final int SourceAllowNullID = 1 << 3; + /** + * External source (from outside of dear imgui), won't attempt to read current item/window info. Will always return true. + * Only one Extern source can be active simultaneously. + */ + public static final int SourceExtern = 1 << 4; + /** + * Automatically expire the payload if the source cease to be submitted (otherwise payloads are persisting while being dragged) + */ + public static final int SourceAutoExpirePayload = 1 << 5; + // AcceptDragDropPayload() flags - public static final int AcceptBeforeDelivery = 1 << 10; // AcceptDragDropPayload() will returns true even before the mouse button is released. You can then call IsDelivery() to test if the payload needs to be delivered. - public static final int AcceptNoDrawDefaultRect = 1 << 11; // Do not draw the default highlight rectangle when hovering over target. - public static final int AcceptNoPreviewTooltip = 1 << 12; // Request hiding the BeginDragDropSource tooltip from the BeginDragDropTarget site. - public static final int AcceptPeekOnly = AcceptBeforeDelivery | AcceptNoDrawDefaultRect; // For peeking ahead and inspecting the payload before delivery. + + /** + * AcceptDragDropPayload() will returns true even before the mouse button is released. You can then call IsDelivery() to test if the payload needs to be delivered. + */ + public static final int AcceptBeforeDelivery = 1 << 10; + /** + * Do not draw the default highlight rectangle when hovering over target. + */ + public static final int AcceptNoDrawDefaultRect = 1 << 11; + /** + * Request hiding the BeginDragDropSource tooltip from the BeginDragDropTarget site. + */ + public static final int AcceptNoPreviewTooltip = 1 << 12; + /** + * For peeking ahead and inspecting the payload before delivery. + */ + public static final int AcceptPeekOnly = AcceptBeforeDelivery | AcceptNoDrawDefaultRect; } diff --git a/imgui-binding/src/main/java/imgui/enums/ImGuiFocusedFlags.java b/imgui-binding/src/main/java/imgui/enums/ImGuiFocusedFlags.java index d8b41c3..414a463 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImGuiFocusedFlags.java +++ b/imgui-binding/src/main/java/imgui/enums/ImGuiFocusedFlags.java @@ -8,8 +8,18 @@ public final class ImGuiFocusedFlags { } public static final int None = 0; - public static final int ChildWindows = 1; // IsWindowFocused(): Return true if any children of the window is focused - public static final int RootWindow = 1 << 1; // IsWindowFocused(): Test from root window (top most parent of the current hierarchy) - public static final int AnyWindow = 1 << 2; // IsWindowFocused(): Return true if any window is focused. Important: If you are trying to tell how to dispatch your low-level inputs, do NOT use this. Use ImGui::GetIO().WantCaptureMouse instead. + /** + * IsWindowFocused(): Return true if any children of the window is focused + */ + public static final int ChildWindows = 1; + /** + * IsWindowFocused(): Test from root window (top most parent of the current hierarchy) + */ + public static final int RootWindow = 1 << 1; + /** + * IsWindowFocused(): Return true if any window is focused. + * Important: If you are trying to tell how to dispatch your low-level inputs, do NOT use this. Use ImGui::GetIO().WantCaptureMouse instead. + */ + public static final int AnyWindow = 1 << 2; public static final int RootAndChildWindows = RootWindow | ChildWindows; } diff --git a/imgui-binding/src/main/java/imgui/enums/ImGuiHoveredFlags.java b/imgui-binding/src/main/java/imgui/enums/ImGuiHoveredFlags.java index 4083b5a..ebc3863 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImGuiHoveredFlags.java +++ b/imgui-binding/src/main/java/imgui/enums/ImGuiHoveredFlags.java @@ -9,15 +9,39 @@ public final class ImGuiHoveredFlags { private ImGuiHoveredFlags() { } - public static final int None = 0; // Return true if directly over the item/window, not obstructed by another window, not obstructed by an active popup or modal blocking inputs under them. - public static final int ChildWindows = 1; // IsWindowHovered() only: Return true if any children of the window is hovered - public static final int RootWindow = 1 << 1; // IsWindowHovered() only: Test from root window (top most parent of the current hierarchy) - public static final int AnyWindow = 1 << 2; // IsWindowHovered() only: Return true if any window is hovered - public static final int AllowWhenBlockedByPopup = 1 << 3; // Return true even if a popup window is normally blocking access to this item/window - //ImGuiHoveredFlags_AllowWhenBlockedByModal = 1 << 4, // Return true even if a modal popup window is normally blocking access to this item/window. FIXME-TODO: Unavailable yet. - public static final int AllowWhenBlockedByActiveItem = 1 << 5; // Return true even if an active item is blocking access to this item/window. Useful for Drag and Drop patterns. - public static final int AllowWhenOverlapped = 1 << 6; // Return true even if the position is obstructed or overlapped by another window - public static final int AllowWhenDisabled = 1 << 7; // Return true even if the item is disabled + /** + * Return true if directly over the item/window, not obstructed by another window, not obstructed by an active popup or modal blocking inputs under them. + */ + public static final int None = 0; + /** + * IsWindowHovered() only: Return true if any children of the window is hovered + */ + public static final int ChildWindows = 1; + /** + * IsWindowHovered() only: Test from root window (top most parent of the current hierarchy) + */ + public static final int RootWindow = 1 << 1; + /** + * IsWindowHovered() only: Return true if any window is hovered + */ + public static final int AnyWindow = 1 << 2; + /** + * Return true even if a popup window is normally blocking access to this item/window + */ + public static final int AllowWhenBlockedByPopup = 1 << 3; + //ImGuiHoveredFlags_AllowWhenBlockedByModal = 1 << 4, //Return true even if a modal popup window is normally blocking access to this item/window. FIXME-TODO: Unavailable yet. + /** + * Return true even if an active item is blocking access to this item/window. Useful for Drag and Drop patterns. + */ + public static final int AllowWhenBlockedByActiveItem = 1 << 5; + /** + * Return true even if the position is obstructed or overlapped by another window + */ + public static final int AllowWhenOverlapped = 1 << 6; + /** + * Return true even if the item is disabled + */ + public static final int AllowWhenDisabled = 1 << 7; public static final int RectOnly = AllowWhenBlockedByPopup | AllowWhenBlockedByActiveItem | AllowWhenOverlapped; public static final int RootAndChildWindows = RootWindow | ChildWindows; } diff --git a/imgui-binding/src/main/java/imgui/enums/ImGuiInputTextFlags.java b/imgui-binding/src/main/java/imgui/enums/ImGuiInputTextFlags.java index 1847ea6..1469f2a 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImGuiInputTextFlags.java +++ b/imgui-binding/src/main/java/imgui/enums/ImGuiInputTextFlags.java @@ -8,23 +8,82 @@ public final class ImGuiInputTextFlags { } public static final int None = 0; - public static final int CharsDecimal = 1; // Allow 0123456789.+-*/ - public static final int CharsHexadecimal = 1 << 1; // Allow 0123456789ABCDEFabcdef - public static final int CharsUppercase = 1 << 2; // Turn a..z into A..Z - public static final int CharsNoBlank = 1 << 3; // Filter out spaces, tabs - public static final int AutoSelectAll = 1 << 4; // Select entire text when first taking mouse focus - public static final int EnterReturnsTrue = 1 << 5; // Return 'true' when Enter is pressed (as opposed to every time the value was modified). Consider looking at the IsItemDeactivatedAfterEdit() function. - public static final int CallbackCompletion = 1 << 6; // Callback on pressing TAB (for completion handling) - public static final int CallbackHistory = 1 << 7; // Callback on pressing Up/Down arrows (for history handling) - public static final int CallbackAlways = 1 << 8; // Callback on each iteration. User code may query cursor position, modify text buffer. - public static final int CallbackCharFilter = 1 << 9; // Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard. - public static final int AllowTabInput = 1 << 10; // Pressing TAB input a '\t' character into the text field - public static final int CtrlEnterForNewLine = 1 << 11; // In multi-line mode, unfocus with Enter, add new line with Ctrl+Enter (default is opposite: unfocus with Ctrl+Enter, add line with Enter). - public static final int NoHorizontalScroll = 1 << 12; // Disable following the cursor horizontally - public static final int AlwaysInsertMode = 1 << 13; // Insert mode - public static final int ReadOnly = 1 << 14; // Read-only mode - public static final int Password = 1 << 15; // Password mode, display all characters as '*' - public static final int NoUndoRedo = 1 << 16; // Disable undo/redo. Note that input text owns the text data while active, if you want to provide your own undo/redo stack you need e.g. to call ClearActiveID(). - public static final int CharsScientific = 1 << 17; // Allow 0123456789.+-*/eE (Scientific notation input) - public static final int CallbackResize = 1 << 18; // Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow. Notify when the string wants to be resized (for string types which hold a cache of their Size). You will be provided a new BufSize in the callback and NEED to honor it. (see misc/cpp/imgui_stdlib.h for an example of using this) + /** + * Allow 0123456789.+-* / + */ + public static final int CharsDecimal = 1; + /** + * Allow 0123456789ABCDEFabcdef + */ + public static final int CharsHexadecimal = 1 << 1; + /** + * Turn a..z into A..Z + */ + public static final int CharsUppercase = 1 << 2; + /** + * Filter out spaces, tabs + */ + public static final int CharsNoBlank = 1 << 3; + /** + * Select entire text when first taking mouse focus + */ + public static final int AutoSelectAll = 1 << 4; + /** + * Return 'true' when Enter is pressed (as opposed to every time the value was modified). Consider looking at the IsItemDeactivatedAfterEdit() function. + */ + public static final int EnterReturnsTrue = 1 << 5; + /** + * Callback on pressing TAB (for completion handling) + */ + public static final int CallbackCompletion = 1 << 6; + /** + * Callback on pressing Up/Down arrows (for history handling) + */ + public static final int CallbackHistory = 1 << 7; + /** + * Callback on each iteration. User code may query cursor position, modify text buffer. + */ + public static final int CallbackAlways = 1 << 8; + /** + * Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard. + */ + public static final int CallbackCharFilter = 1 << 9; + /** + * Pressing TAB input a '\t' character into the text field + */ + public static final int AllowTabInput = 1 << 10; + /** + * In multi-line mode, unfocus with Enter, add new line with Ctrl+Enter (default is opposite: unfocus with Ctrl+Enter, add line with Enter). + */ + public static final int CtrlEnterForNewLine = 1 << 11; + /** + * Disable following the cursor horizontally + */ + public static final int NoHorizontalScroll = 1 << 12; + /** + * Insert mode + */ + public static final int AlwaysInsertMode = 1 << 13; + /** + * Read-only mode + */ + public static final int ReadOnly = 1 << 14; + /** + * Password mode, display all characters as '*' + */ + public static final int Password = 1 << 15; + /** + * Disable undo/redo. Note that input text owns the text data while active, if you want to provide your own undo/redo stack you need e.g. to call ClearActiveID(). + */ + public static final int NoUndoRedo = 1 << 16; + /** + * Allow 0123456789.+-* /eE (Scientific notation input) + */ + public static final int CharsScientific = 1 << 17; + /** + * Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow. + * Notify when the string wants to be resized (for string types which hold a cache of their Size). + * You will be provided a new BufSize in the callback and NEED to honor it. (see misc/cpp/imgui_stdlib.h for an example of using this) + */ + public static final int CallbackResize = 1 << 18; } diff --git a/imgui-binding/src/main/java/imgui/enums/ImGuiKey.java b/imgui-binding/src/main/java/imgui/enums/ImGuiKey.java index 9ea13aa..53c577b 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImGuiKey.java +++ b/imgui-binding/src/main/java/imgui/enums/ImGuiKey.java @@ -23,11 +23,29 @@ public final class ImGuiKey { public static final int Enter = 13; public static final int Escape = 14; public static final int KeyPadEnter = 15; - public static final int A = 16; // for text edit CTRL+A: select all - public static final int C = 17; // for text edit CTRL+C: copy - public static final int V = 18; // for text edit CTRL+V: paste - public static final int X = 19; // for text edit CTRL+X: cut - public static final int Y = 20; // for text edit CTRL+Y: redo - public static final int Z = 21; // for text edit CTRL+Z: undo + /** + * for text edit CTRL+A: select all + */ + public static final int A = 16; + /** + * for text edit CTRL+C: copy + */ + public static final int C = 17; + /** + * for text edit CTRL+V: paste + */ + public static final int V = 18; + /** + * for text edit CTRL+X: cut + */ + public static final int X = 19; + /** + * for text edit CTRL+Y: redo + */ + public static final int Y = 20; + /** + * for text edit CTRL+Z: undo + */ + public static final int Z = 21; public static final int COUNT = 22; } diff --git a/imgui-binding/src/main/java/imgui/enums/ImGuiMouseCursor.java b/imgui-binding/src/main/java/imgui/enums/ImGuiMouseCursor.java index cf7187b..1065537 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImGuiMouseCursor.java +++ b/imgui-binding/src/main/java/imgui/enums/ImGuiMouseCursor.java @@ -10,13 +10,37 @@ public final class ImGuiMouseCursor { public static final int None = -1; public static final int Arrow = 0; - public static final int TextInput = 1; // When hovering over InputText, etc. - public static final int ResizeAll = 2; // (Unused by Dear ImGui functions) - public static final int ResizeNS = 3; // When hovering over an horizontal border - public static final int ResizeEW = 4; // When hovering over a vertical border or a column - public static final int ResizeNESW = 5; // When hovering over the bottom-left corner of a window - public static final int ResizeNWSE = 6; // When hovering over the bottom-right corner of a window - public static final int Hand = 7; // (Unused by Dear ImGui functions. Use for e.g. hyperlinks) - public static final int NotAllowed = 8; // When hovering something with disallowed interaction. Usually a crossed circle. + /** + * When hovering over InputText, etc. + */ + public static final int TextInput = 1; + /** + * (Unused by Dear ImGui functions) + */ + public static final int ResizeAll = 2; + /** + * When hovering over an horizontal border + */ + public static final int ResizeNS = 3; + /** + * When hovering over a vertical border or a column + */ + public static final int ResizeEW = 4; + /** + * When hovering over the bottom-left corner of a window + */ + public static final int ResizeNESW = 5; + /** + * When hovering over the bottom-right corner of a window + */ + public static final int ResizeNWSE = 6; + /** + * (Unused by Dear ImGui functions. Use for e.g. hyperlinks) + */ + public static final int Hand = 7; + /** + * When hovering something with disallowed interaction. Usually a crossed circle. + */ + public static final int NotAllowed = 8; public static final int COUNT = 9; } diff --git a/imgui-binding/src/main/java/imgui/enums/ImGuiNavInput.java b/imgui-binding/src/main/java/imgui/enums/ImGuiNavInput.java index 65193a7..9b21d82 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImGuiNavInput.java +++ b/imgui-binding/src/main/java/imgui/enums/ImGuiNavInput.java @@ -13,20 +13,60 @@ public final class ImGuiNavInput { private ImGuiNavInput() { } - public static final int Activate = 0; // activate / open / toggle / tweak value // e.g. Cross (PS4), A (Xbox), A (Switch), Space (Keyboard) - public static final int Cancel = 1; // cancel / close / exit // e.g. Circle (PS4), B (Xbox), B (Switch), Escape (Keyboard) - public static final int Input = 2; // text input / on-screen keyboard // e.g. Triang.(PS4), Y (Xbox), X (Switch), Return (Keyboard) - public static final int Menu = 3; // tap: toggle menu / hold: focus, move, resize // e.g. Square (PS4), X (Xbox), Y (Switch), Alt (Keyboard) - public static final int DpadLeft = 4; // move / tweak / resize window (w/ PadMenu) // e.g. D-pad Left/Right/Up/Down (Gamepads), Arrow keys (Keyboard) + /** + * activate / open / toggle / tweak value + * e.g. Cross (PS4), A (Xbox), A (Switch), Space (Keyboard) + */ + public static final int Activate = 0; + /** + * cancel / close / exit + * e.g. Circle (PS4), B (Xbox), B (Switch), Escape (Keyboard) + */ + public static final int Cancel = 1; + /** + * text input / on-screen keyboard + * e.g. Triang.(PS4), Y (Xbox), X (Switch), Return (Keyboard) + */ + public static final int Input = 2; + /** + * tap: toggle menu / hold: focus, move, resize + * e.g. Square (PS4), X (Xbox), Y (Switch), Alt (Keyboard) + */ + public static final int Menu = 3; + /** + * move / tweak / resize window (w/ PadMenu) + * e.g. D-pad Left/Right/Up/Down (Gamepads), Arrow keys (Keyboard) + */ + public static final int DpadLeft = 4; public static final int DpadRight = 5; public static final int DpadUp = 6; public static final int DpadDown = 7; - public static final int LStickLeft = 8; // scroll / move window (w/ PadMenu) // e.g. Left Analog Stick Left/Right/Up/Down - public static final int LStickRight = 9; // - public static final int LStickUp = 10; // - public static final int LStickDown = 11; // - public static final int FocusPrev = 12; // next window (w/ PadMenu) // e.g. L1 or L2 (PS4), LB or LT (Xbox), L or ZL (Switch) - public static final int FocusNext = 13; // prev window (w/ PadMenu) // e.g. R1 or R2 (PS4), RB or RT (Xbox), R or ZL (Switch) - public static final int TweakSlow = 14; // slower tweaks // e.g. L1 or L2 (PS4), LB or LT (Xbox), L or ZL (Switch) - public static final int TweakFast = 15; // faster tweaks // e.g. R1 or R2 (PS4), RB or RT (Xbox), R or ZL (Switch) + /** + * scroll / move window (w/ PadMenu) + * e.g. Left Analog Stick Left/Right/Up/Down + */ + public static final int LStickLeft = 8; + public static final int LStickRight = 9; + public static final int LStickUp = 10; + public static final int LStickDown = 11; + /** + * next window (w/ PadMenu) + * e.g. L1 or L2 (PS4), LB or LT (Xbox), L or ZL (Switch) + */ + public static final int FocusPrev = 12; + /** + * prev window (w/ PadMenu) + * e.g. R1 or R2 (PS4), RB or RT (Xbox), R or ZL (Switch) + */ + public static final int FocusNext = 13; + /** + * slower tweaks + * e.g. L1 or L2 (PS4), LB or LT (Xbox), L or ZL (Switch) + */ + public static final int TweakSlow = 14; + /** + * faster tweaks + * e.g. R1 or R2 (PS4), RB or RT (Xbox), R or ZL (Switch) + */ + public static final int TweakFast = 15; } diff --git a/imgui-binding/src/main/java/imgui/enums/ImGuiSelectableFlags.java b/imgui-binding/src/main/java/imgui/enums/ImGuiSelectableFlags.java index a191d94..823f2f9 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImGuiSelectableFlags.java +++ b/imgui-binding/src/main/java/imgui/enums/ImGuiSelectableFlags.java @@ -8,9 +8,24 @@ public final class ImGuiSelectableFlags { } public static final int None = 0; - public static final int DontClosePopups = 1; // Clicking this don't close parent popup window - public static final int SpanAllColumns = 1 << 1; // Selectable frame can span all columns (text will still fit in current column) - public static final int AllowDoubleClick = 1 << 2; // Generate press events on double clicks too - public static final int Disabled = 1 << 3; // Cannot be selected, display grayed out text - public static final int AllowItemOverlap = 1 << 4; // (WIP) Hit testing to allow subsequent widgets to overlap this one + /** + * Clicking this don't close parent popup window + */ + public static final int DontClosePopups = 1; + /** + * Selectable frame can span all columns (text will still fit in current column) + */ + public static final int SpanAllColumns = 1 << 1; + /** + * Generate press events on double clicks too + */ + public static final int AllowDoubleClick = 1 << 2; + /** + * Cannot be selected, display grayed out text + */ + public static final int Disabled = 1 << 3; + /** + * (WIP) Hit testing to allow subsequent widgets to overlap this one + */ + public static final int AllowItemOverlap = 1 << 4; } diff --git a/imgui-binding/src/main/java/imgui/enums/ImGuiStyleVar.java b/imgui-binding/src/main/java/imgui/enums/ImGuiStyleVar.java index 2e0ee7d..cfa7ec6 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImGuiStyleVar.java +++ b/imgui-binding/src/main/java/imgui/enums/ImGuiStyleVar.java @@ -9,28 +9,97 @@ public final class ImGuiStyleVar { private ImGuiStyleVar() { } - public static final int Alpha = 0; // float Alpha - public static final int WindowPadding = 1; // ImVec2 WindowPadding - public static final int WindowRounding = 2; // float WindowRounding - public static final int WindowBorderSize = 3; // float WindowBorderSize - public static final int WindowMinSize = 4; // ImVec2 WindowMinSize - public static final int WindowTitleAlign = 5; // ImVec2 WindowTitleAlign - public static final int ChildRounding = 6; // float ChildRounding - public static final int ChildBorderSize = 7; // float ChildBorderSize - public static final int PopupRounding = 8; // float PopupRounding - public static final int PopupBorderSize = 9; // float PopupBorderSize - public static final int FramePadding = 10; // ImVec2 FramePadding - public static final int FrameRounding = 11; // float FrameRounding - public static final int FrameBorderSize = 12; // float FrameBorderSize - public static final int ItemSpacing = 13; // ImVec2 ItemSpacing - public static final int ItemInnerSpacing = 14; // ImVec2 ItemInnerSpacing - public static final int IndentSpacing = 15; // float IndentSpacing - public static final int ScrollbarSize = 16; // float ScrollbarSize - public static final int ScrollbarRounding = 17; // float ScrollbarRounding - public static final int GrabMinSize = 18; // float GrabMinSize - public static final int GrabRounding = 19; // float GrabRounding - public static final int TabRounding = 20; // float TabRounding - public static final int ButtonTextAlign = 21; // ImVec2 ButtonTextAlign - public static final int SelectableTextAlign = 22; // ImVec2 SelectableTextAlign + /** + * float Alpha + */ + public static final int Alpha = 0; + /** + * ImVec2 WindowPadding + */ + public static final int WindowPadding = 1; + /** + * float WindowRounding + */ + public static final int WindowRounding = 2; + /** + * float WindowBorderSize + */ + public static final int WindowBorderSize = 3; + /** + * ImVec2 WindowMinSize + */ + public static final int WindowMinSize = 4; + /** + * ImVec2 WindowTitleAlign + */ + public static final int WindowTitleAlign = 5; + /** + * float ChildRounding + */ + public static final int ChildRounding = 6; + /** + * float ChildBorderSize + */ + public static final int ChildBorderSize = 7; + /** + * float PopupRounding + */ + public static final int PopupRounding = 8; + /** + * float PopupBorderSize + */ + public static final int PopupBorderSize = 9; + /** + * ImVec2 FramePadding + */ + public static final int FramePadding = 10; + /** + * float FrameRounding + */ + public static final int FrameRounding = 11; + /** + * float FrameBorderSize + */ + public static final int FrameBorderSize = 12; + /** + * ImVec2 ItemSpacing + */ + public static final int ItemSpacing = 13; + /** + * ImVec2 ItemInnerSpacing + */ + public static final int ItemInnerSpacing = 14; + /** + * float IndentSpacing + */ + public static final int IndentSpacing = 15; + /** + * float ScrollbarSize + */ + public static final int ScrollbarSize = 16; + /** + * float ScrollbarRounding + */ + public static final int ScrollbarRounding = 17; + /** + * float GrabMinSize + */ + public static final int GrabMinSize = 18; + /** + * float GrabRounding + */ + public static final int GrabRounding = 19; + /** + * float TabRounding + */ + public static final int TabRounding = 20; + /** + * ImVec2 ButtonTextAlign + */ + public static final int ButtonTextAlign = 21; + /** + * ImVec2 SelectableTextAlign + */ + public static final int SelectableTextAlign = 22; public static final int COUNT = 23; } diff --git a/imgui-binding/src/main/java/imgui/enums/ImGuiTabBarFlags.java b/imgui-binding/src/main/java/imgui/enums/ImGuiTabBarFlags.java index 2ec1ccc..3957443 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImGuiTabBarFlags.java +++ b/imgui-binding/src/main/java/imgui/enums/ImGuiTabBarFlags.java @@ -8,14 +8,39 @@ public final class ImGuiTabBarFlags { } public static final int None = 0; - public static final int Reorderable = 1; // Allow manually dragging tabs to re-order them + New tabs are appended at the end of list - public static final int AutoSelectNewTabs = 1 << 1; // Automatically select new tabs when they appear - public static final int TabListPopupButton = 1 << 2; // Disable buttons to open the tab list popup - public static final int NoCloseWithMiddleMouseButton = 1 << 3; // Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false. - public static final int NoTabListScrollingButtons = 1 << 4; // Disable scrolling buttons (apply when fitting policy is ImGuiTabBarFlags_FittingPolicyScroll) - public static final int NoTooltip = 1 << 5; // Disable tooltips when hovering a tab - public static final int FittingPolicyResizeDown = 1 << 6; // Resize tabs when they don't fit - public static final int FittingPolicyScroll = 1 << 7; // Add scroll buttons when tabs don't fit + /** + * Allow manually dragging tabs to re-order them + New tabs are appended at the end of list + */ + public static final int Reorderable = 1; + /** + * Automatically select new tabs when they appear + */ + public static final int AutoSelectNewTabs = 1 << 1; + /** + * Disable buttons to open the tab list popup + */ + public static final int TabListPopupButton = 1 << 2; + /** + * Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. + * You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false. + */ + public static final int NoCloseWithMiddleMouseButton = 1 << 3; + /** + * Disable scrolling buttons (apply when fitting policy is ImGuiTabBarFlags_FittingPolicyScroll) + */ + public static final int NoTabListScrollingButtons = 1 << 4; + /** + * Disable tooltips when hovering a tab + */ + public static final int NoTooltip = 1 << 5; + /** + * Resize tabs when they don't fit + */ + public static final int FittingPolicyResizeDown = 1 << 6; + /** + * Add scroll buttons when tabs don't fit + */ + public static final int FittingPolicyScroll = 1 << 7; public static final int FittingPolicyMask_ = FittingPolicyResizeDown | FittingPolicyScroll; public static final int FittingPolicyDefault_ = FittingPolicyResizeDown; } diff --git a/imgui-binding/src/main/java/imgui/enums/ImGuiTabItemFlags.java b/imgui-binding/src/main/java/imgui/enums/ImGuiTabItemFlags.java index 8eb79fb..b6aa3d0 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImGuiTabItemFlags.java +++ b/imgui-binding/src/main/java/imgui/enums/ImGuiTabItemFlags.java @@ -8,8 +8,22 @@ public final class ImGuiTabItemFlags { } public static final int None = 0; - public static final int UnsavedDocument = 1; // Append '*' to title without affecting the ID, as a convenience to avoid using the ### operator. Also: tab is selected on closure and closure is deferred by one frame to allow code to undo it without flicker. - public static final int SetSelected = 1 << 1; // Trigger flag to programmatically make the tab selected when calling BeginTabItem() - public static final int NoCloseWithMiddleMouseButton = 1 << 2; // Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false. - public static final int NoPushId = 1 << 3; // Don't call PushID(tab->ID)/PopID() on BeginTabItem()/EndTabItem() + /** + * Append '*' to title without affecting the ID, as a convenience to avoid using the ### operator. + * Also: tab is selected on closure and closure is deferred by one frame to allow code to undo it without flicker. + */ + public static final int UnsavedDocument = 1; + /** + * Trigger flag to programmatically make the tab selected when calling BeginTabItem() + */ + public static final int SetSelected = 1 << 1; + /** + * Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. + * You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false. + */ + public static final int NoCloseWithMiddleMouseButton = 1 << 2; + /** + * Don't call PushID(tab->ID)/PopID() on BeginTabItem()/EndTabItem() + */ + public static final int NoPushId = 1 << 3; } diff --git a/imgui-binding/src/main/java/imgui/enums/ImGuiTreeNodeFlags.java b/imgui-binding/src/main/java/imgui/enums/ImGuiTreeNodeFlags.java index 51418b8..214cbc1 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImGuiTreeNodeFlags.java +++ b/imgui-binding/src/main/java/imgui/enums/ImGuiTreeNodeFlags.java @@ -8,20 +8,64 @@ public final class ImGuiTreeNodeFlags { } public static final int None = 0; - public static final int Selected = 1; // Draw as selected - public static final int Framed = 1 << 1; // Full colored frame (e.g. for CollapsingHeader) - public static final int AllowItemOverlap = 1 << 2; // Hit testing to allow subsequent widgets to overlap this one - public static final int NoTreePushOnOpen = 1 << 3; // Don't do a TreePush() when open (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack - public static final int NoAutoOpenOnLog = 1 << 4; // Don't automatically and temporarily open node when Logging is active (by default logging will automatically open tree nodes) - public static final int DefaultOpen = 1 << 5; // Default node to be open - public static final int OpenOnDoubleClick = 1 << 6; // Need double-click to open node - public static final int OpenOnArrow = 1 << 7; // Only open when clicking on the arrow part. If ImGuiTreeNodeFlags_OpenOnDoubleClick is also set, single-click arrow or double-click all box to open. - public static final int Leaf = 1 << 8; // No collapsing, no arrow (use as a convenience for leaf nodes). - public static final int Bullet = 1 << 9; // Display a bullet instead of arrow - public static final int FramePadding = 1 << 1; // Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding(). - public static final int SpanAvailWidth = 1 << 1; // Extend hit box to the right-most edge, even if not framed. This is not the default in order to allow adding other items on the same line. In the future we may refactor the hit system to be front-to-back, allowing natural overlaps and then this can become the default. - public static final int SpanFullWidth = 1 << 1; // Extend hit box to the left-most and right-most edges (bypass the indented area). - public static final int NavLeftJumpsBackHere = 1 << 1; // (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop) + /** + * Draw as selected + */ + public static final int Selected = 1; + /** + * Full colored frame (e.g. for CollapsingHeader) + */ + public static final int Framed = 1 << 1; + /** + * Hit testing to allow subsequent widgets to overlap this one + */ + public static final int AllowItemOverlap = 1 << 2; + /** + * Don't do a TreePush() when open (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack + */ + public static final int NoTreePushOnOpen = 1 << 3; + /** + * Don't automatically and temporarily open node when Logging is active (by default logging will automatically open tree nodes) + */ + public static final int NoAutoOpenOnLog = 1 << 4; + /** + * Default node to be open + */ + public static final int DefaultOpen = 1 << 5; + /** + * Need double-click to open node + */ + public static final int OpenOnDoubleClick = 1 << 6; + /** + * Only open when clicking on the arrow part. If ImGuiTreeNodeFlags_OpenOnDoubleClick is also set, single-click arrow or double-click all box to open. + */ + public static final int OpenOnArrow = 1 << 7; + /** + * No collapsing, no arrow (use as a convenience for leaf nodes). + */ + public static final int Leaf = 1 << 8; + /** + * Display a bullet instead of arrow + */ + public static final int Bullet = 1 << 9; + /** + * Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding(). + */ + public static final int FramePadding = 1 << 1; + /** + * Extend hit box to the right-most edge, even if not framed. + * This is not the default in order to allow adding other items on the same line. + * In the future we may refactor the hit system to be front-to-back, allowing natural overlaps and then this can become the default. + */ + public static final int SpanAvailWidth = 1 << 1; + /** + * Extend hit box to the left-most and right-most edges (bypass the indented area). + */ + public static final int SpanFullWidth = 1 << 1; + /** + * (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop) + */ + public static final int NavLeftJumpsBackHere = 1 << 1; //ImGuiTreeNodeFlags_NoScrollOnOpen = 1 << 14; // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible public static final int CollapsingHeader = Framed | NoTreePushOnOpen | NoAutoOpenOnLog; } diff --git a/imgui-binding/src/main/java/imgui/enums/ImGuiWindowFlags.java b/imgui-binding/src/main/java/imgui/enums/ImGuiWindowFlags.java index 43a3e9a..ab0d3a3 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImGuiWindowFlags.java +++ b/imgui-binding/src/main/java/imgui/enums/ImGuiWindowFlags.java @@ -8,26 +8,83 @@ public final class ImGuiWindowFlags { } public static final int None = 0; - public static final int NoTitleBar = 1; // Disable title-bar - public static final int NoResize = 1 << 1; // Disable user resizing with the lower-right grip - public static final int NoMove = 1 << 2; // Disable user moving the window - public static final int NoScrollbar = 1 << 3; // Disable scrollbars (window can still scroll with mouse or programmatically) - public static final int NoScrollWithMouse = 1 << 4; // Disable user vertically scrolling with mouse wheel. On child window, mouse wheel will be forwarded to the parent unless NoScrollbar is also set. - public static final int NoCollapse = 1 << 5; // Disable user collapsing window by double-clicking on it - public static final int AlwaysAutoResize = 1 << 6; // Resize every window to its content every frame - public static final int NoBackground = 1 << 7; // Disable drawing background color (WindowBg, etc.) and outside border. Similar as using SetNextWindowBgAlpha(0.0f). - public static final int NoSavedSettings = 1 << 8; // Never load/save settings in .ini file - public static final int NoMouseInputs = 1 << 9; // Disable catching mouse, hovering test with pass through. - public static final int MenuBar = 1 << 10; // Has a menu-bar - public static final int HorizontalScrollbar = 1 << 11; // Allow horizontal scrollbar to appear (off by default). You may use SetNextWindowContentSize(ImVec2(width,0.0f)); prior to calling Begin() to specify width. Read code in imgui_demo in the "Horizontal Scrolling" section. - public static final int NoFocusOnAppearing = 1 << 12; // Disable taking focus when transitioning from hidden to visible state - public static final int NoBringToFrontOnFocus = 1 << 13; // Disable bringing window to front when taking focus (e.g. clicking on it or programmatically giving it focus) - public static final int AlwaysVerticalScrollbar = 1 << 14; // Always show vertical scrollbar (even if ContentSize.y < Size.y) - public static final int AlwaysHorizontalScrollbar = 1 << 15; // Always show horizontal scrollbar (even if ContentSize.x < Size.x) - public static final int AlwaysUseWindowPadding = 1 << 16; // Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient) - public static final int NoNavInputs = 1 << 17; // No gamepad/keyboard navigation within the window - public static final int NoNavFocus = 1 << 18; // No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB) - public static final int UnsavedDocument = 1 << 20; // Append '*' to title without affecting the ID, as a convenience to avoid using the ### operator. When used in a tab/docking context, tab is selected on closure and closure is deferred by one frame to allow code to cancel the closure (with a confirmation popup, etc.) without flicker. + public static final int NoTitleBar = 1; + /** + * Disable user resizing with the lower-right grip + */ + public static final int NoResize = 1 << 1; + /** + * Disable user moving the window + */ + public static final int NoMove = 1 << 2; + /** + * Disable scrollbars (window can still scroll with mouse or programmatically) + */ + public static final int NoScrollbar = 1 << 3; + /** + * Disable user vertically scrolling with mouse wheel. On child window, mouse wheel will be forwarded to the parent unless NoScrollbar is also set. + */ + public static final int NoScrollWithMouse = 1 << 4; + /** + * Disable user collapsing window by double-clicking on it + */ + public static final int NoCollapse = 1 << 5; + /** + * Resize every window to its content every frame + */ + public static final int AlwaysAutoResize = 1 << 6; + /** + * Disable drawing background color (WindowBg, etc.) and outside border. Similar as using SetNextWindowBgAlpha(0.0f). + */ + public static final int NoBackground = 1 << 7; + /** + * Never load/save settings in .ini file + */ + public static final int NoSavedSettings = 1 << 8; + /** + * Disable catching mouse, hovering test with pass through. + */ + public static final int NoMouseInputs = 1 << 9; + /** + * Has a menu-bar + */ + public static final int MenuBar = 1 << 10; + /** + * Allow horizontal scrollbar to appear (off by default). You may use SetNextWindowContentSize(ImVec2(width,0.0f)); prior to calling Begin() to specify width. Read code in imgui_demo in the "Horizontal Scrolling" section. + */ + public static final int HorizontalScrollbar = 1 << 11; + /** + * Disable taking focus when transitioning from hidden to visible state + */ + public static final int NoFocusOnAppearing = 1 << 12; + /** + * Disable bringing window to front when taking focus (e.g. clicking on it or programmatically giving it focus) + */ + public static final int NoBringToFrontOnFocus = 1 << 13; + /** + * Always show vertical scrollbar (even if ContentSize.y < Size.y) + */ + public static final int AlwaysVerticalScrollbar = 1 << 14; + /** + * Always show horizontal scrollbar (even if ContentSize.x < Size.x) + */ + public static final int AlwaysHorizontalScrollbar = 1 << 15; + /** + * Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient) + */ + public static final int AlwaysUseWindowPadding = 1 << 16; + /** + * No gamepad/keyboard navigation within the window + */ + public static final int NoNavInputs = 1 << 17; + /** + * No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB) + */ + public static final int NoNavFocus = 1 << 18; + /** + * Append '*' to title without affecting the ID, as a convenience to avoid using the ### operator. When used in a tab/docking context, tab is selected on closure and closure is deferred by one frame to allow code to cancel the closure (with a confirmation popup, etc.) without flicker. + */ + public static final int UnsavedDocument = 1 << 20; public static final int NoNav = NoNavInputs | NoNavFocus; public static final int NoDecoration = NoTitleBar | NoResize | NoScrollbar | NoCollapse; public static final int NoInputs = NoMouseInputs | NoNavInputs | NoNavFocus;