Skip to content

Commit

Permalink
[API] Dear ImGui v1.84.1
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaiR committed Aug 29, 2021
1 parent babb8ed commit 9026dcd
Show file tree
Hide file tree
Showing 9 changed files with 155 additions and 87 deletions.
14 changes: 14 additions & 0 deletions imgui-binding/src/main/java/imgui/ImFont.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,20 @@ public ImFontGlyph getFallbackGlyph() {
IM_FONT->EllipsisChar = (ImWchar)ellipsisChar;
*/

/**
* Character used for ellipsis rendering (if a single '...' character isn't found)
*/
public native short getDotChar(); /*
return IM_FONT->DotChar;
*/

/**
* Character used for ellipsis rendering (if a single '...' character isn't found)
*/
public native void setDotChar(int dotChar); /*
IM_FONT->DotChar = (ImWchar)dotChar;
*/

public native boolean getDirtyLookupTables(); /*
return IM_FONT->DirtyLookupTables;
*/
Expand Down
22 changes: 22 additions & 0 deletions imgui-binding/src/main/java/imgui/ImGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -5085,6 +5085,28 @@ public static <T> T getDragDropPayload(final Class<T> aClass) {
return ImGui::GetDragDropPayload()->IsDataType(dataType);
*/

/**
* Disable all user interactions and dim items visuals (applying style.DisabledAlpha over current colors)
* BeginDisabled(false) essentially does nothing useful but is provided to facilitate use of boolean expressions.
* If you can avoid calling BeginDisabled(False)/EndDisabled() best to avoid it.
*/
public static void beginDisabled() {
beginDisabled(true);
}

/**
* Disable all user interactions and dim items visuals (applying style.DisabledAlpha over current colors)
* BeginDisabled(false) essentially does nothing useful but is provided to facilitate use of boolean expressions.
* If you can avoid calling BeginDisabled(False)/EndDisabled() best to avoid it.
*/
public static native void beginDisabled(boolean disabled); /*
ImGui::BeginDisabled(disabled);
*/

public static native void endDisabled(); /*
ImGui::EndDisabled();
*/

// Clipping
// - Mouse hovering is affected by ImGui::PushClipRect() calls, unlike direct calls to ImDrawList::PushClipRect() which are render only.

Expand Down
16 changes: 15 additions & 1 deletion imgui-binding/src/main/java/imgui/ImGuiIO.java
Original file line number Diff line number Diff line change
Expand Up @@ -1212,9 +1212,23 @@ public ImVec2 getMouseDelta() {
*/

/**
* Clear the text input buffer manually.
* Notifies Dear ImGui when hosting platform windows lose or gain input focus
*/
public native void addFocusEvent(boolean focused); /*
IO->AddFocusEvent(focused);
*/

/**
* [Internal] Clear the text input buffer manually
*/
public native void clearInputCharacters(); /*
IO->ClearInputCharacters();
*/

/**
* [Internal] Release all keys
*/
public native void clearInputKeys(); /*
IO->ClearInputKeys();
*/
}
14 changes: 14 additions & 0 deletions imgui-binding/src/main/java/imgui/ImGuiStyle.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,20 @@ protected long create() {
IMGUI_STYLE->Alpha = alpha;
*/

/**
* Additional alpha multiplier applied by BeginDisabled(). Multiply over current value of Alpha.
*/
public native float getDisabledAlpha(); /*
return IMGUI_STYLE->DisabledAlpha;
*/

/**
* Additional alpha multiplier applied by BeginDisabled(). Multiply over current value of Alpha.
*/
public native void setDisabledAlpha(float disabledAlpha); /*
IMGUI_STYLE->DisabledAlpha = disabledAlpha;
*/

/**
* Padding within a window.
*/
Expand Down
35 changes: 0 additions & 35 deletions imgui-binding/src/main/java/imgui/ImGuiWindowClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,41 +147,6 @@ public boolean hasDockNodeFlagsOverrideSet(final int flags) {
return (getDockNodeFlagsOverrideSet() & flags) != 0;
}

/**
* [EXPERIMENTAL]
*/
public native int getDockNodeFlagsOverrideClear(); /*
return IMGUI_WINDOW_CLASS->DockNodeFlagsOverrideClear;
*/

/**
* [EXPERIMENTAL]
*/
public native void setDockNodeFlagsOverrideClear(int dockNodeFlagsOverrideClear); /*
IMGUI_WINDOW_CLASS->DockNodeFlagsOverrideClear = dockNodeFlagsOverrideClear;
*/

/**
* [EXPERIMENTAL]
*/
public void addDockNodeFlagsOverrideClear(final int flags) {
setDockNodeFlagsOverrideClear(getDockNodeFlagsOverrideClear() | flags);
}

/**
* [EXPERIMENTAL]
*/
public void removeDockNodeFlagsOverrideClear(final int flags) {
setDockNodeFlagsOverrideClear(getDockNodeFlagsOverrideClear() & ~(flags));
}

/**
* [EXPERIMENTAL]
*/
public boolean hasDockNodeFlagsOverrideClear(final int flags) {
return (getDockNodeFlagsOverrideClear() & flags) != 0;
}

/**
* Set to true to enforce single floating windows of this class always having their own docking node
* (equivalent of setting the global io.ConfigDockingAlwaysTabBar)
Expand Down
52 changes: 28 additions & 24 deletions imgui-binding/src/main/java/imgui/flag/ImGuiStyleVar.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,97 +17,101 @@ private ImGuiStyleVar() {
* float Alpha
*/
public static final int Alpha = 0;
/**
* float DisabledAlpha
*/
public static final int DisabledAlpha = 1;
/**
* ImVec2 WindowPadding
*/
public static final int WindowPadding = 1;
public static final int WindowPadding = 2;
/**
* float WindowRounding
*/
public static final int WindowRounding = 2;
public static final int WindowRounding = 3;
/**
* float WindowBorderSize
*/
public static final int WindowBorderSize = 3;
public static final int WindowBorderSize = 4;
/**
* ImVec2 WindowMinSize
*/
public static final int WindowMinSize = 4;
public static final int WindowMinSize = 5;
/**
* ImVec2 WindowTitleAlign
*/
public static final int WindowTitleAlign = 5;
public static final int WindowTitleAlign = 6;
/**
* float ChildRounding
*/
public static final int ChildRounding = 6;
public static final int ChildRounding = 7;
/**
* float ChildBorderSize
*/
public static final int ChildBorderSize = 7;
public static final int ChildBorderSize = 8;
/**
* float PopupRounding
*/
public static final int PopupRounding = 8;
public static final int PopupRounding = 9;
/**
* float PopupBorderSize
*/
public static final int PopupBorderSize = 9;
public static final int PopupBorderSize = 10;
/**
* ImVec2 FramePadding
*/
public static final int FramePadding = 10;
public static final int FramePadding = 11;
/**
* float FrameRounding
*/
public static final int FrameRounding = 11;
public static final int FrameRounding = 12;
/**
* float FrameBorderSize
*/
public static final int FrameBorderSize = 12;
public static final int FrameBorderSize = 13;
/**
* ImVec2 ItemSpacing
*/
public static final int ItemSpacing = 13;
public static final int ItemSpacing = 14;
/**
* ImVec2 ItemInnerSpacing
*/
public static final int ItemInnerSpacing = 14;
public static final int ItemInnerSpacing = 15;
/**
* float IndentSpacing
*/
public static final int IndentSpacing = 15;
public static final int IndentSpacing = 16;
/**
* ImVec2 CellPadding
*/
public static final int CellPadding = 16;
public static final int CellPadding = 17;
/**
* float ScrollbarSize
*/
public static final int ScrollbarSize = 17;
public static final int ScrollbarSize = 18;
/**
* float ScrollbarRounding
*/
public static final int ScrollbarRounding = 18;
public static final int ScrollbarRounding = 19;
/**
* float GrabMinSize
*/
public static final int GrabMinSize = 19;
public static final int GrabMinSize = 20;
/**
* float GrabRounding
*/
public static final int GrabRounding = 20;
public static final int GrabRounding = 21;
/**
* float TabRounding
*/
public static final int TabRounding = 21;
public static final int TabRounding = 22;
/**
* ImVec2 ButtonTextAlign
*/
public static final int ButtonTextAlign = 22;
public static final int ButtonTextAlign = 23;
/**
* ImVec2 SelectableTextAlign
*/
public static final int SelectableTextAlign = 23;
public static final int COUNT = 24;
public static final int SelectableTextAlign = 24;
public static final int COUNT = 25;
}
48 changes: 28 additions & 20 deletions imgui-binding/src/main/java/imgui/flag/ImGuiTableColumnFlags.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,86 +9,94 @@ private ImGuiTableColumnFlags() {

// Input configuration flags
public static final int None = 0;
/**
* Overriding/master disable flag: hide column, won't show in context menu (unlike calling TableSetColumnEnabled() which manipulates the user accessible state)
*/
public static final int Disabled = 1;
/**
* Default as a hidden/disabled column.
*/
public static final int DefaultHide = 1;
public static final int DefaultHide = 1 << 1;
/**
* Default as a sorting column.
*/
public static final int DefaultSort = 1 << 1;
public static final int DefaultSort = 1 << 2;
/**
* Column will stretch. Preferable with horizontal scrolling disabled (default if table sizing policy is _SizingStretchSame or _SizingStretchProp).
*/
public static final int WidthStretch = 1 << 2;
public static final int WidthStretch = 1 << 3;
/**
* Column will not stretch. Preferable with horizontal scrolling enabled (default if table sizing policy is _SizingFixedFit and table is resizable).
*/
public static final int WidthFixed = 1 << 3;
public static final int WidthFixed = 1 << 4;
/**
* Disable manual resizing.
*/
public static final int NoResize = 1 << 4;
public static final int NoResize = 1 << 5;
/**
* Disable manual reordering this column, this will also prevent other columns from crossing over this column.
*/
public static final int NoReorder = 1 << 5;
public static final int NoReorder = 1 << 6;
/**
* Disable ability to hide/disable this column.
*/
public static final int NoHide = 1 << 6;
public static final int NoHide = 1 << 7;
/**
* Disable clipping for this column (all NoClip columns will render in a same draw command).
*/
public static final int NoClip = 1 << 7;
public static final int NoClip = 1 << 8;
/**
* Disable ability to sort on this field (even if ImGuiTableFlags_Sortable is set on the table).
*/
public static final int NoSort = 1 << 8;
public static final int NoSort = 1 << 9;
/**
* Disable ability to sort in the ascending direction.
*/
public static final int NoSortAscending = 1 << 9;
public static final int NoSortAscending = 1 << 10;
/**
* Disable ability to sort in the descending direction.
*/
public static final int NoSortDescending = 1 << 10;
public static final int NoSortDescending = 1 << 11;
/**
* TableHeadersRow() will not submit label for this column. Convenient for some small columns. Name will still appear in context menu.
*/
public static final int NoHeaderLabel = 1 << 12;
/**
* Disable header text width contribution to automatic column width.
*/
public static final int NoHeaderWidth = 1 << 11;
public static final int NoHeaderWidth = 1 << 13;
/**
* Make the initial sort direction Ascending when first sorting on this column (default).
*/
public static final int PreferSortAscending = 1 << 12;
public static final int PreferSortAscending = 1 << 14;
/**
* Make the initial sort direction Descending when first sorting on this column.
*/
public static final int PreferSortDescending = 1 << 13;
public static final int PreferSortDescending = 1 << 15;
/**
* Use current Indent value when entering cell (default for column 0).
*/
public static final int IndentEnable = 1 << 14;
public static final int IndentEnable = 1 << 16;
/**
* Ignore current Indent value when entering cell (default for columns {@code >} 0). Indentation changes _within_ the cell will still be honored.
*/
public static final int IndentDisable = 1 << 15;
public static final int IndentDisable = 1 << 17;

// Output status flags, read-only via TableGetColumnFlags()
/**
* Status: is enabled == not hidden by user/api (referred to as "Hide" in _DefaultHide and _NoHide) flags.
*/
public static final int IsEnabled = 1 << 20;
public static final int IsEnabled = 1 << 24;
/**
* Status: is visible == is enabled AND not clipped by scrolling.
*/
public static final int IsVisible = 1 << 21;
public static final int IsVisible = 1 << 25;
/**
* Status: is currently part of the sort specs
*/
public static final int IsSorted = 1 << 22;
public static final int IsSorted = 1 << 26;
/**
* Status: is hovered by mouse
*/
public static final int IsHovered = 1 << 23;
public static final int IsHovered = 1 << 27;
}
Loading

0 comments on commit 9026dcd

Please sign in to comment.