Add rendering implementation for LWJGL
This commit is contained in:
1 parent
b01fe59dbb
commit
dc59810566
59 files changed
+6728
-16
No files matched your search
@@ -0,0 +1,28 @@
|
||||
package imgui.enums;
|
||||
|
||||
public class ImDrawCornerFlags {
|
||||
public static ImDrawCornerFlags TopLeft = new ImDrawCornerFlags(1 << 0);
|
||||
public static ImDrawCornerFlags TopRight = new ImDrawCornerFlags(1 << 1);
|
||||
public static ImDrawCornerFlags BotLeft = new ImDrawCornerFlags(1 << 2);
|
||||
public static ImDrawCornerFlags BotRight = new ImDrawCornerFlags(1 << 3);
|
||||
public static ImDrawCornerFlags Top = new ImDrawCornerFlags(TopLeft.getValue() | TopRight.getValue());
|
||||
public static ImDrawCornerFlags Bot = new ImDrawCornerFlags(BotLeft.getValue() | BotRight.getValue());
|
||||
public static ImDrawCornerFlags Left = new ImDrawCornerFlags(TopLeft.getValue() | BotLeft.getValue());
|
||||
public static ImDrawCornerFlags Right = new ImDrawCornerFlags(TopRight.getValue() | BotRight.getValue());
|
||||
public static ImDrawCornerFlags All = new ImDrawCornerFlags(0xF);
|
||||
private static ImDrawCornerFlags Custom = new ImDrawCornerFlags(0);
|
||||
int value;
|
||||
|
||||
private ImDrawCornerFlags(int code) {
|
||||
value = code;
|
||||
}
|
||||
|
||||
public ImDrawCornerFlags or(ImDrawCornerFlags otherEnum) {
|
||||
ImDrawCornerFlags.Custom.value = value | otherEnum.value;
|
||||
return ImDrawCornerFlags.Custom;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package imgui.enums;
|
||||
|
||||
/**
|
||||
* Back-end capabilities flags stored in io.BackendFlags. Set by imgui_impl_xxx or custom back-end.
|
||||
*/
|
||||
public class ImGuiBackendFlags {
|
||||
public static ImGuiBackendFlags None = new ImGuiBackendFlags(0);
|
||||
public static ImGuiBackendFlags HasGamepad = new ImGuiBackendFlags(1 << 0);
|
||||
public static ImGuiBackendFlags HasMouseCursors = new ImGuiBackendFlags(1 << 1);
|
||||
public static ImGuiBackendFlags HasSetMousePos = new ImGuiBackendFlags(1 << 2);
|
||||
private static ImGuiBackendFlags Custom = new ImGuiBackendFlags(0);
|
||||
int value;
|
||||
|
||||
private ImGuiBackendFlags(int code) {
|
||||
value = code;
|
||||
}
|
||||
|
||||
public ImGuiBackendFlags or(ImGuiBackendFlags otherEnum) {
|
||||
ImGuiBackendFlags.Custom.value = value | otherEnum.value;
|
||||
return ImGuiBackendFlags.Custom;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package imgui.enums;
|
||||
|
||||
public enum ImGuiCol {
|
||||
Text(0),
|
||||
TextDisabled(1),
|
||||
/**
|
||||
* Background of normal windows
|
||||
*/
|
||||
WindowBg(2),
|
||||
/**
|
||||
* Background of child windows
|
||||
*/
|
||||
ChildBg(3),
|
||||
/**
|
||||
* Background of popups, menus, tooltips windows
|
||||
*/
|
||||
PopupBg(4),
|
||||
Border(5),
|
||||
BorderShadow(6),
|
||||
/**
|
||||
* Background of checkbox, radio button, plot, slider, text input
|
||||
*/
|
||||
FrameBg(7),
|
||||
FrameBgHovered(8),
|
||||
FrameBgActive(9),
|
||||
TitleBg(10),
|
||||
TitleBgActive(11),
|
||||
TitleBgCollapsed(12),
|
||||
MenuBarBg(13),
|
||||
ScrollbarBg(14),
|
||||
ScrollbarGrab(15),
|
||||
ScrollbarGrabHovered(16),
|
||||
ScrollbarGrabActive(17),
|
||||
CheckMark(18),
|
||||
SliderGrab(19),
|
||||
SliderGrabActive(20),
|
||||
Button(21),
|
||||
ButtonHovered(22),
|
||||
ButtonActive(23),
|
||||
Header(24),
|
||||
HeaderHovered(25),
|
||||
HeaderActive(26),
|
||||
Separator(27),
|
||||
SeparatorHovered(28),
|
||||
SeparatorActive(29),
|
||||
ResizeGrip(30),
|
||||
ResizeGripHovered(31),
|
||||
ResizeGripActive(32),
|
||||
Tab(33),
|
||||
TabHovered(34),
|
||||
TabActive(35),
|
||||
TabUnfocused(36),
|
||||
TabUnfocusedActive(37),
|
||||
DockingPrevie(38),
|
||||
DockingEmptyBg(39),
|
||||
PlotLines(40),
|
||||
PlotLinesHovered(41),
|
||||
PlotHistogram(42),
|
||||
PlotHistogramHovered(43),
|
||||
TextSelectedBg(44),
|
||||
DragDropTarget(45),
|
||||
/**
|
||||
* Gamepad/keyboard: current highlighted item
|
||||
*/
|
||||
NavHighlight(46),
|
||||
/**
|
||||
* Highlight window when using CTRL+TAB
|
||||
*/
|
||||
NavWindowingHighlight(47),
|
||||
/**
|
||||
* Darken/colorize entire screen behind the CTRL+TAB window list, when active
|
||||
*/
|
||||
NavWindowingDimBg(48),
|
||||
/**
|
||||
* Darken/colorize entire screen behind a modal window, when one is active
|
||||
*/
|
||||
ModalWindowDimBg(49),
|
||||
COUNT(48);
|
||||
|
||||
int value;
|
||||
|
||||
ImGuiCol(int code) {
|
||||
value = code;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package imgui.enums;
|
||||
|
||||
/**
|
||||
* Enumeration for GetMouseCursor()
|
||||
* User code may request binding to display given cursor by calling SetMouseCursor(), which is why we have some cursors that are marked unused here
|
||||
*/
|
||||
public class ImGuiColorEditFlags {
|
||||
public static ImGuiColorEditFlags None = new ImGuiColorEditFlags(0);
|
||||
public static ImGuiColorEditFlags NoAlpha = new ImGuiColorEditFlags(1 << 1);
|
||||
public static ImGuiColorEditFlags NoPicker = new ImGuiColorEditFlags(1 << 2);
|
||||
public static ImGuiColorEditFlags NoOptions = new ImGuiColorEditFlags(1 << 3);
|
||||
public static ImGuiColorEditFlags NoSmallPreview = new ImGuiColorEditFlags(1 << 4);
|
||||
public static ImGuiColorEditFlags NoInputs = new ImGuiColorEditFlags(1 << 5);
|
||||
public static ImGuiColorEditFlags NoTooltip = new ImGuiColorEditFlags(1 << 6);
|
||||
public static ImGuiColorEditFlags NoLabel = new ImGuiColorEditFlags(1 << 7);
|
||||
public static ImGuiColorEditFlags NoSidePreview = new ImGuiColorEditFlags(1 << 8);
|
||||
public static ImGuiColorEditFlags NoDragDrop = new ImGuiColorEditFlags(1 << 9);
|
||||
public static ImGuiColorEditFlags AlphaBar = new ImGuiColorEditFlags(1 << 16);
|
||||
public static ImGuiColorEditFlags AlphaPreview = new ImGuiColorEditFlags(1 << 17);
|
||||
public static ImGuiColorEditFlags AlphaPreviewHalf = new ImGuiColorEditFlags(1 << 18);
|
||||
public static ImGuiColorEditFlags HDR = new ImGuiColorEditFlags(1 << 19);
|
||||
public static ImGuiColorEditFlags DisplayRGB = new ImGuiColorEditFlags(1 << 20);
|
||||
public static ImGuiColorEditFlags DisplayHSV = new ImGuiColorEditFlags(1 << 21);
|
||||
public static ImGuiColorEditFlags DisplayHex = new ImGuiColorEditFlags(1 << 22);
|
||||
public static ImGuiColorEditFlags Uint8 = new ImGuiColorEditFlags(1 << 23);
|
||||
public static ImGuiColorEditFlags Float = new ImGuiColorEditFlags(1 << 24);
|
||||
public static ImGuiColorEditFlags PickerHueBar = new ImGuiColorEditFlags(1 << 25);
|
||||
public static ImGuiColorEditFlags PickerHueWheel = new ImGuiColorEditFlags(1 << 26);
|
||||
public static ImGuiColorEditFlags InputRGB = new ImGuiColorEditFlags(1 << 27);
|
||||
public static ImGuiColorEditFlags InputHSV = new ImGuiColorEditFlags(1 << 28);
|
||||
public static ImGuiColorEditFlags OptionsDefault = new ImGuiColorEditFlags(Uint8.getValue() | DisplayRGB.getValue() | InputRGB.getValue() | PickerHueBar.getValue());
|
||||
private static ImGuiColorEditFlags Custom = new ImGuiColorEditFlags(0);
|
||||
int value;
|
||||
|
||||
private ImGuiColorEditFlags(int code) {
|
||||
value = code;
|
||||
}
|
||||
|
||||
public ImGuiColorEditFlags or(ImGuiColorEditFlags otherEnum) {
|
||||
ImGuiColorEditFlags.Custom.value = value | otherEnum.value;
|
||||
return ImGuiColorEditFlags.Custom;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package imgui.enums;
|
||||
|
||||
/**
|
||||
* Flags for ImGui::BeginCombo()
|
||||
*/
|
||||
public class ImGuiComboFlags {
|
||||
public static ImGuiComboFlags None = new ImGuiComboFlags(0);
|
||||
public static ImGuiComboFlags PopupAlignLeft = new ImGuiComboFlags(1 << 0);
|
||||
public static ImGuiComboFlags HeightSmall = new ImGuiComboFlags(1 << 1);
|
||||
public static ImGuiComboFlags HeightRegular = new ImGuiComboFlags(1 << 2);
|
||||
public static ImGuiComboFlags HeightLarge = new ImGuiComboFlags(1 << 3);
|
||||
public static ImGuiComboFlags HeightLargest = new ImGuiComboFlags(1 << 4);
|
||||
public static ImGuiComboFlags NoArrowButton = new ImGuiComboFlags(1 << 5);
|
||||
public static ImGuiComboFlags NoPreview = new ImGuiComboFlags(1 << 6);
|
||||
public static ImGuiComboFlags HeightMask = new ImGuiComboFlags(HeightSmall.getValue() | HeightRegular.getValue() | HeightLarge.getValue() | HeightLargest.getValue());
|
||||
private static ImGuiComboFlags Custom = new ImGuiComboFlags(0);
|
||||
int value;
|
||||
|
||||
private ImGuiComboFlags(int code) {
|
||||
value = code;
|
||||
}
|
||||
|
||||
public ImGuiComboFlags or(ImGuiComboFlags otherEnum) {
|
||||
ImGuiComboFlags.Custom.value = value | otherEnum.value;
|
||||
return ImGuiComboFlags.Custom;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package imgui.enums;
|
||||
|
||||
/**
|
||||
* Enumateration for ImGui::SetWindow***(), SetNextWindow***(), SetNextTreeNode***() 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.
|
||||
*/
|
||||
public class ImGuiCond {
|
||||
public static ImGuiCond Always = new ImGuiCond(1 << 0);
|
||||
public static ImGuiCond Once = new ImGuiCond(1 << 1);
|
||||
public static ImGuiCond FirstUseEver = new ImGuiCond(1 << 2);
|
||||
public static ImGuiCond Appearing = new ImGuiCond(1 << 3);
|
||||
private static ImGuiCond Custom = new ImGuiCond(0);
|
||||
int value;
|
||||
|
||||
private ImGuiCond(int code) {
|
||||
value = code;
|
||||
}
|
||||
|
||||
public ImGuiCond or(ImGuiCond otherEnum) {
|
||||
ImGuiCond.Custom.value = value | otherEnum.value;
|
||||
return ImGuiCond.Custom;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package imgui.enums;
|
||||
|
||||
/**
|
||||
* Configuration flags stored in io.ConfigFlags. Set by user/application.
|
||||
*/
|
||||
public class ImGuiConfigFlags {
|
||||
public static ImGuiConfigFlags None = new ImGuiConfigFlags(0);
|
||||
public static ImGuiConfigFlags NavEnableKeyboard = new ImGuiConfigFlags(1 << 0);
|
||||
public static ImGuiConfigFlags NavEnableGamepad = new ImGuiConfigFlags(1 << 1);
|
||||
public static ImGuiConfigFlags NavEnableSetMousePos = new ImGuiConfigFlags(1 << 2);
|
||||
public static ImGuiConfigFlags NavNoCaptureKeyboard = new ImGuiConfigFlags(1 << 3);
|
||||
public static ImGuiConfigFlags NoMouse = new ImGuiConfigFlags(1 << 4);
|
||||
public static ImGuiConfigFlags NoMouseCursorChange = new ImGuiConfigFlags(1 << 5);
|
||||
public static ImGuiConfigFlags DockingEnable = new ImGuiConfigFlags(1 << 6);
|
||||
public static ImGuiConfigFlags IsSRGB = new ImGuiConfigFlags(1 << 20);
|
||||
public static ImGuiConfigFlags IsTouchScreen = new ImGuiConfigFlags(1 << 21);
|
||||
private static ImGuiConfigFlags Custom = new ImGuiConfigFlags(0);
|
||||
int value;
|
||||
|
||||
private ImGuiConfigFlags(int code) {
|
||||
value = code;
|
||||
}
|
||||
|
||||
public ImGuiConfigFlags or(ImGuiConfigFlags otherEnum) {
|
||||
ImGuiConfigFlags.Custom.value = value | otherEnum.value;
|
||||
return ImGuiConfigFlags.Custom;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package imgui.enums;
|
||||
|
||||
/**
|
||||
* A primary data type
|
||||
*/
|
||||
public enum ImGuiDataType {
|
||||
S8(0),
|
||||
U8(1),
|
||||
S16(2),
|
||||
U16(3),
|
||||
S32(4),
|
||||
U32(5),
|
||||
S64(6),
|
||||
U64(7),
|
||||
Float(8),
|
||||
Double(9),
|
||||
COUNT(10);
|
||||
|
||||
int value;
|
||||
|
||||
ImGuiDataType(int code) {
|
||||
value = code;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package imgui.enums;
|
||||
|
||||
public enum ImGuiDir {
|
||||
None(-1),
|
||||
Left(0),
|
||||
Right(1),
|
||||
Up(2),
|
||||
Down(3),
|
||||
COUNT(4);
|
||||
|
||||
private final int code;
|
||||
|
||||
ImGuiDir(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public int toInt() {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package imgui.enums;
|
||||
|
||||
public class ImGuiDockNodeFlags {
|
||||
public static ImGuiDockNodeFlags KeepAliveOnly = new ImGuiDockNodeFlags(1 << 0);
|
||||
public static ImGuiDockNodeFlags NoDockingInCentralNode = new ImGuiDockNodeFlags(1 << 2);
|
||||
public static ImGuiDockNodeFlags PassthruCentralNode = new ImGuiDockNodeFlags(1 << 3);
|
||||
public static ImGuiDockNodeFlags NoSplit = new ImGuiDockNodeFlags(1 << 4);
|
||||
public static ImGuiDockNodeFlags NoResize = new ImGuiDockNodeFlags(1 << 5);
|
||||
public static ImGuiDockNodeFlags AutoHideTabBar = new ImGuiDockNodeFlags(1 << 6);
|
||||
private static ImGuiDockNodeFlags Custom = new ImGuiDockNodeFlags(0);
|
||||
int value;
|
||||
|
||||
private ImGuiDockNodeFlags(int code) {
|
||||
value = code;
|
||||
}
|
||||
|
||||
public ImGuiDockNodeFlags or(ImGuiDockNodeFlags otherEnum) {
|
||||
ImGuiDockNodeFlags.Custom.value = value | otherEnum.value;
|
||||
return ImGuiDockNodeFlags.Custom;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package imgui.enums;
|
||||
|
||||
/**
|
||||
* Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered()
|
||||
* Note: if you are trying to check whether your mouse should be dispatched to imgui or to your app, you should use the 'io.WantCaptureMouse' boolean for that. Please read the FAQ!
|
||||
* Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls.
|
||||
*/
|
||||
public class ImGuiDragDropFlags {
|
||||
public static ImGuiDragDropFlags None = new ImGuiDragDropFlags(0);
|
||||
// BeginDragDropSource() flags
|
||||
public static ImGuiDragDropFlags SourceNoPreviewTooltip = new ImGuiDragDropFlags(1 << 0);
|
||||
public static ImGuiDragDropFlags SourceNoDisableHover = new ImGuiDragDropFlags(1 << 1);
|
||||
public static ImGuiDragDropFlags SourceNoHoldToOpenOthers = new ImGuiDragDropFlags(1 << 2);
|
||||
public static ImGuiDragDropFlags SourceAllowNullID = new ImGuiDragDropFlags(1 << 3);
|
||||
public static ImGuiDragDropFlags SourceExtern = new ImGuiDragDropFlags(1 << 4);
|
||||
public static ImGuiDragDropFlags SourceAutoExpirePayload = new ImGuiDragDropFlags(1 << 5);
|
||||
// AcceptDragDropPayload() flags
|
||||
public static ImGuiDragDropFlags AcceptBeforeDelivery = new ImGuiDragDropFlags(1 << 10);
|
||||
public static ImGuiDragDropFlags AcceptNoDrawDefaultRect = new ImGuiDragDropFlags(1 << 11);
|
||||
public static ImGuiDragDropFlags AcceptNoPreviewTooltip = new ImGuiDragDropFlags(1 << 12);
|
||||
public static ImGuiDragDropFlags AcceptPeekOnly = new ImGuiDragDropFlags(AcceptBeforeDelivery.getValue() | AcceptNoDrawDefaultRect.getValue());
|
||||
private static ImGuiDragDropFlags Custom = new ImGuiDragDropFlags(0);
|
||||
int value;
|
||||
|
||||
private ImGuiDragDropFlags(int code) {
|
||||
value = code;
|
||||
}
|
||||
|
||||
public ImGuiDragDropFlags or(ImGuiDragDropFlags otherEnum) {
|
||||
ImGuiDragDropFlags.Custom.value = value | otherEnum.value;
|
||||
return ImGuiDragDropFlags.Custom;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package imgui.enums;
|
||||
|
||||
/**
|
||||
* Flags for ImGui::IsWindowFocused()
|
||||
*/
|
||||
public class ImGuiFocusedFlags {
|
||||
public static ImGuiFocusedFlags None = new ImGuiFocusedFlags(0);
|
||||
public static ImGuiFocusedFlags ChildWindows = new ImGuiFocusedFlags(1 << 0);
|
||||
public static ImGuiFocusedFlags RootWindow = new ImGuiFocusedFlags(1 << 1);
|
||||
public static ImGuiFocusedFlags AnyWindow = new ImGuiFocusedFlags(1 << 2);
|
||||
public static ImGuiFocusedFlags RootAndChildWindows = new ImGuiFocusedFlags(RootWindow.getValue() | ChildWindows.getValue());
|
||||
private static ImGuiFocusedFlags Custom = new ImGuiFocusedFlags(0);
|
||||
int value;
|
||||
|
||||
private ImGuiFocusedFlags(int code) {
|
||||
value = code;
|
||||
}
|
||||
|
||||
public ImGuiFocusedFlags or(ImGuiFocusedFlags otherEnum) {
|
||||
ImGuiFocusedFlags.Custom.value = value | otherEnum.value;
|
||||
return ImGuiFocusedFlags.Custom;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package imgui.enums;
|
||||
|
||||
/**
|
||||
* Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered()
|
||||
* Note: if you are trying to check whether your mouse should be dispatched to imgui or to your app, you should use the 'io.WantCaptureMouse' boolean for that. Please read the FAQ!
|
||||
* Note: windows with the ImGuiWindowFlags_NoInputs flag are ignored by IsWindowHovered() calls.
|
||||
*/
|
||||
public class ImGuiHoveredFlags {
|
||||
public static ImGuiHoveredFlags None = new ImGuiHoveredFlags(0);
|
||||
public static ImGuiHoveredFlags ChildWindows = new ImGuiHoveredFlags(1 << 0);
|
||||
public static ImGuiHoveredFlags RootWindow = new ImGuiHoveredFlags(1 << 1);
|
||||
public static ImGuiHoveredFlags AnyWindow = new ImGuiHoveredFlags(1 << 2);
|
||||
public static ImGuiHoveredFlags AllowWhenBlockedByPopup = new ImGuiHoveredFlags(1 << 3);
|
||||
// public static ImGuiHoveredFlags AllowWhenBlockedByModal = new ImGuiHoveredFlags(1 << 4);
|
||||
public static ImGuiHoveredFlags AllowWhenBlockedByActiveItem = new ImGuiHoveredFlags(1 << 5);
|
||||
public static ImGuiHoveredFlags AllowWhenOverlapped = new ImGuiHoveredFlags(1 << 6);
|
||||
public static ImGuiHoveredFlags AllowWhenDisabled = new ImGuiHoveredFlags(1 << 7);
|
||||
public static ImGuiHoveredFlags RectOnly = new ImGuiHoveredFlags(AllowWhenBlockedByPopup.getValue() | AllowWhenBlockedByActiveItem.getValue() | AllowWhenOverlapped.getValue());
|
||||
public static ImGuiHoveredFlags RootAndChildWindows = new ImGuiHoveredFlags(RootWindow.getValue() | ChildWindows.getValue());
|
||||
private static ImGuiHoveredFlags Custom = new ImGuiHoveredFlags(0);
|
||||
int value;
|
||||
|
||||
private ImGuiHoveredFlags(int code) {
|
||||
value = code;
|
||||
}
|
||||
|
||||
public ImGuiHoveredFlags or(ImGuiHoveredFlags otherEnum) {
|
||||
ImGuiHoveredFlags.Custom.value = value | otherEnum.value;
|
||||
return ImGuiHoveredFlags.Custom;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package imgui.enums;
|
||||
|
||||
/**
|
||||
* Flags for ImGui::InputText()
|
||||
*/
|
||||
public class ImGuiInputTextFlags {
|
||||
public static ImGuiInputTextFlags None = new ImGuiInputTextFlags(0);
|
||||
/**
|
||||
* Allow 0123456789.+-*
|
||||
*/
|
||||
public static ImGuiInputTextFlags CharsDecimal = new ImGuiInputTextFlags(1 << 0);
|
||||
/**
|
||||
* Allow 0123456789ABCDEFabcdef
|
||||
*/
|
||||
public static ImGuiInputTextFlags CharsHexadecimal = new ImGuiInputTextFlags(1 << 1);
|
||||
/**
|
||||
* Turn a..z into A..Z
|
||||
*/
|
||||
public static ImGuiInputTextFlags CharsUppercase = new ImGuiInputTextFlags(1 << 2);
|
||||
/**
|
||||
* Filter out spaces, tabs
|
||||
*/
|
||||
public static ImGuiInputTextFlags CharsNoBlank = new ImGuiInputTextFlags(1 << 3);
|
||||
/**
|
||||
* Select entire text when first taking mouse focus
|
||||
*/
|
||||
public static ImGuiInputTextFlags AutoSelectAll = new ImGuiInputTextFlags(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 ImGuiInputTextFlags EnterReturnsTrue = new ImGuiInputTextFlags(1 << 5);
|
||||
/**
|
||||
* Callback on pressing TAB (for completion handling)
|
||||
*/
|
||||
public static ImGuiInputTextFlags CallbackCompletion = new ImGuiInputTextFlags(1 << 6);
|
||||
/**
|
||||
* Callback on pressing Up/Down arrows (for history handling)
|
||||
*/
|
||||
public static ImGuiInputTextFlags CallbackHistory = new ImGuiInputTextFlags(1 << 7);
|
||||
/**
|
||||
* Callback on each iteration. User code may query cursor position, modify text buffer.
|
||||
*/
|
||||
public static ImGuiInputTextFlags CallbackAlways = new ImGuiInputTextFlags(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 ImGuiInputTextFlags CallbackCharFilter = new ImGuiInputTextFlags(1 << 9);
|
||||
/**
|
||||
* Pressing TAB input a '\t' character into the text field
|
||||
*/
|
||||
public static ImGuiInputTextFlags AllowTabInput = new ImGuiInputTextFlags(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 ImGuiInputTextFlags CtrlEnterForNewLine = new ImGuiInputTextFlags(1 << 11);
|
||||
/**
|
||||
* Disable following the cursor horizontally
|
||||
*/
|
||||
public static ImGuiInputTextFlags NoHorizontalScroll = new ImGuiInputTextFlags(1 << 12);
|
||||
/**
|
||||
* Insert mode
|
||||
*/
|
||||
public static ImGuiInputTextFlags AlwaysInsertMode = new ImGuiInputTextFlags(1 << 13);
|
||||
/**
|
||||
* Read-only mode
|
||||
*/
|
||||
public static ImGuiInputTextFlags ReadOnly = new ImGuiInputTextFlags(1 << 14);
|
||||
/**
|
||||
* Password mode, display all characters as '*'
|
||||
*/
|
||||
public static ImGuiInputTextFlags Password = new ImGuiInputTextFlags(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 ImGuiInputTextFlags NoUndoRedo = new ImGuiInputTextFlags(1 << 16);
|
||||
/**
|
||||
* Allow 0123456789.+-*\\/eE (Scientific notation input)
|
||||
*/
|
||||
public static ImGuiInputTextFlags CharsScientific = new ImGuiInputTextFlags(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 ImGuiInputTextFlags CallbackResize = new ImGuiInputTextFlags(1 << 18);
|
||||
private static ImGuiInputTextFlags Custom = new ImGuiInputTextFlags(0);
|
||||
public int data;
|
||||
|
||||
private ImGuiInputTextFlags(int code) {
|
||||
data = code;
|
||||
}
|
||||
|
||||
public ImGuiInputTextFlags or(ImGuiInputTextFlags otherEnum) {
|
||||
ImGuiInputTextFlags.Custom.data = data | otherEnum.data;
|
||||
return ImGuiInputTextFlags.Custom;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package imgui.enums;
|
||||
|
||||
/**
|
||||
* User fill ImGuiIO.KeyMap[] array with indices into the ImGuiIO.KeysDown[512] array
|
||||
*/
|
||||
public enum ImGuiKey {
|
||||
Tab(0),
|
||||
LeftArrow(1),
|
||||
RightArrow(2),
|
||||
UpArrow(3),
|
||||
DownArrow(4),
|
||||
PageUp(5),
|
||||
PageDown(6),
|
||||
Home(7),
|
||||
End(8),
|
||||
Insert(9),
|
||||
Delete(10),
|
||||
Backspace(11),
|
||||
Space(12),
|
||||
Enter(13),
|
||||
Escape(14),
|
||||
A(15),
|
||||
C(16),
|
||||
V(17),
|
||||
X(18),
|
||||
Y(19),
|
||||
Z(20),
|
||||
COUNT(21);
|
||||
|
||||
private final int code;
|
||||
|
||||
ImGuiKey(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package imgui.enums;
|
||||
|
||||
/**
|
||||
* Enumeration for GetMouseCursor()
|
||||
* User code may request binding to display given cursor by calling SetMouseCursor(), which is why we have some cursors that are marked unused here
|
||||
*/
|
||||
public enum ImGuiMouseCursor {
|
||||
None(-1),
|
||||
Arrow(0),
|
||||
TextInput(1),
|
||||
ResizeAll(2),
|
||||
ResizeNS(3),
|
||||
ResizeEW(4),
|
||||
ResizeNESW(5),
|
||||
ResizeNWSE(6),
|
||||
Hand(7),
|
||||
COUNT(8);
|
||||
|
||||
int value;
|
||||
|
||||
ImGuiMouseCursor(int code) {
|
||||
value = code;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package imgui.enums;
|
||||
|
||||
/**
|
||||
* Gamepad/Keyboard directional navigation
|
||||
* 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. Back-end: 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://goo.gl/9LgVZW.
|
||||
**/
|
||||
public enum ImGuiNavInput {
|
||||
Activate(0),
|
||||
Cancel(1),
|
||||
Input(2),
|
||||
Menu(3),
|
||||
DpadLeft(4),
|
||||
DpadRight(5),
|
||||
DpadUp(6),
|
||||
DpadDown(7),
|
||||
LStickLeft(8),
|
||||
LStickRight(9),
|
||||
LStickUp(10),
|
||||
LStickDown(11),
|
||||
FocusPrev(12),
|
||||
FocusNext(13),
|
||||
TweakSlow(14),
|
||||
TweakFast(15);
|
||||
|
||||
private final int code;
|
||||
|
||||
ImGuiNavInput(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public int toInt() {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package imgui.enums;
|
||||
|
||||
/**
|
||||
* Flags for ImGui::Selectable()
|
||||
*/
|
||||
public class ImGuiSelectableFlags {
|
||||
public static ImGuiSelectableFlags None = new ImGuiSelectableFlags(0);
|
||||
public static ImGuiSelectableFlags DontClosePopups = new ImGuiSelectableFlags(1 << 0);
|
||||
public static ImGuiSelectableFlags SpanAllColumns = new ImGuiSelectableFlags(1 << 1);
|
||||
public static ImGuiSelectableFlags AllowDoubleClick = new ImGuiSelectableFlags(1 << 2);
|
||||
public static ImGuiSelectableFlags Disabled = new ImGuiSelectableFlags(1 << 3);
|
||||
private static ImGuiSelectableFlags Custom = new ImGuiSelectableFlags(0);
|
||||
int value;
|
||||
|
||||
private ImGuiSelectableFlags(int code) {
|
||||
value = code;
|
||||
}
|
||||
|
||||
public ImGuiSelectableFlags or(ImGuiSelectableFlags otherEnum) {
|
||||
ImGuiSelectableFlags.Custom.value = value | otherEnum.value;
|
||||
return ImGuiSelectableFlags.Custom;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package imgui.enums;
|
||||
|
||||
public enum ImGuiStyleVar {
|
||||
Alpha(0),
|
||||
WindowPadding(1),
|
||||
WindowRounding(2),
|
||||
WindowBorderSize(3),
|
||||
WindowMinSize(4),
|
||||
WindowTitleAlign(5),
|
||||
ChildRounding(6),
|
||||
ChildBorderSize(7),
|
||||
PopupRounding(8),
|
||||
PopupBorderSize(9),
|
||||
FramePadding(10),
|
||||
FrameRounding(11),
|
||||
ImGuiStyleVar_FrameBorderSize(12),
|
||||
ItemSpacing(13),
|
||||
ItemInnerSpacing(14),
|
||||
IndentSpacing(15),
|
||||
ScrollbarSize(16),
|
||||
ScrollbarRounding(17),
|
||||
GrabMinSize(18),
|
||||
GrabRounding(19),
|
||||
TabRounding(20),
|
||||
ButtonTextAlign(21),
|
||||
SelectableTextAlign(22),
|
||||
COUNT(23);
|
||||
|
||||
int value;
|
||||
|
||||
ImGuiStyleVar(int code) {
|
||||
value = code;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package imgui.enums;
|
||||
|
||||
/**
|
||||
* Flags for ImGui::BeginTabBar()
|
||||
*/
|
||||
public class ImGuiTabBarFlags {
|
||||
public static ImGuiTabBarFlags None = new ImGuiTabBarFlags(0);
|
||||
public static ImGuiTabBarFlags Reorderable = new ImGuiTabBarFlags(1 << 0);
|
||||
public static ImGuiTabBarFlags AutoSelectNewTabs = new ImGuiTabBarFlags(1 << 1);
|
||||
public static ImGuiTabBarFlags TabListPopupButton = new ImGuiTabBarFlags(1 << 2);
|
||||
public static ImGuiTabBarFlags NoCloseWithMiddleMouseButton = new ImGuiTabBarFlags(1 << 3);
|
||||
public static ImGuiTabBarFlags NoTabListScrollingButtons = new ImGuiTabBarFlags(1 << 4);
|
||||
public static ImGuiTabBarFlags NoTooltip = new ImGuiTabBarFlags(1 << 5);
|
||||
public static ImGuiTabBarFlags FittingPolicyResizeDown = new ImGuiTabBarFlags(1 << 6);
|
||||
public static ImGuiTabBarFlags FittingPolicyScroll = new ImGuiTabBarFlags(1 << 7);
|
||||
public static ImGuiTabBarFlags FittingPolicyMask = new ImGuiTabBarFlags(FittingPolicyResizeDown.getValue() | FittingPolicyScroll.getValue());
|
||||
public static ImGuiTabBarFlags FittingPolicyDefault = new ImGuiTabBarFlags(FittingPolicyResizeDown.getValue());
|
||||
private static ImGuiTabBarFlags Custom = new ImGuiTabBarFlags(0);
|
||||
int value;
|
||||
|
||||
private ImGuiTabBarFlags(int code) {
|
||||
value = code;
|
||||
}
|
||||
|
||||
public ImGuiTabBarFlags or(ImGuiTabBarFlags otherEnum) {
|
||||
ImGuiTabBarFlags.Custom.value = value | otherEnum.value;
|
||||
return ImGuiTabBarFlags.Custom;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package imgui.enums;
|
||||
|
||||
/**
|
||||
* Flags for ImGui::BeginTabItem()
|
||||
*/
|
||||
public class ImGuiTabItemFlags {
|
||||
public static ImGuiTabItemFlags None = new ImGuiTabItemFlags(0);
|
||||
public static ImGuiTabItemFlags UnsavedDocument = new ImGuiTabItemFlags(1 << 0);
|
||||
public static ImGuiTabItemFlags SetSelected = new ImGuiTabItemFlags(1 << 1);
|
||||
public static ImGuiTabItemFlags NoCloseWithMiddleMouseButton = new ImGuiTabItemFlags(1 << 2);
|
||||
public static ImGuiTabItemFlags NoPushId = new ImGuiTabItemFlags(1 << 3);
|
||||
private static ImGuiTabItemFlags Custom = new ImGuiTabItemFlags(0);
|
||||
int value;
|
||||
|
||||
private ImGuiTabItemFlags(int code) {
|
||||
value = code;
|
||||
}
|
||||
|
||||
public ImGuiTabItemFlags or(ImGuiTabItemFlags otherEnum) {
|
||||
ImGuiTabItemFlags.Custom.value = value | otherEnum.value;
|
||||
return ImGuiTabItemFlags.Custom;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package imgui.enums;
|
||||
|
||||
/**
|
||||
* Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*()
|
||||
*/
|
||||
public class ImGuiTreeNodeFlags {
|
||||
public static ImGuiTreeNodeFlags None = new ImGuiTreeNodeFlags(0);
|
||||
public static ImGuiTreeNodeFlags Selected = new ImGuiTreeNodeFlags(1 << 0);
|
||||
public static ImGuiTreeNodeFlags Framed = new ImGuiTreeNodeFlags(1 << 1);
|
||||
public static ImGuiTreeNodeFlags AllowItemOverlap = new ImGuiTreeNodeFlags(1 << 2);
|
||||
public static ImGuiTreeNodeFlags NoTreePushOnOpen = new ImGuiTreeNodeFlags(1 << 3);
|
||||
public static ImGuiTreeNodeFlags NoAutoOpenOnLog = new ImGuiTreeNodeFlags(1 << 4);
|
||||
public static ImGuiTreeNodeFlags DefaultOpen = new ImGuiTreeNodeFlags(1 << 5);
|
||||
public static ImGuiTreeNodeFlags OpenOnDoubleClick = new ImGuiTreeNodeFlags(1 << 6);
|
||||
public static ImGuiTreeNodeFlags OpenOnArrow = new ImGuiTreeNodeFlags(1 << 7);
|
||||
public static ImGuiTreeNodeFlags Leaf = new ImGuiTreeNodeFlags(1 << 8);
|
||||
public static ImGuiTreeNodeFlags Bullet = new ImGuiTreeNodeFlags(1 << 9);
|
||||
public static ImGuiTreeNodeFlags FramePadding = new ImGuiTreeNodeFlags(1 << 10);
|
||||
// public static ImGuiTreeNodeFlags SpanAllAvailWidth = new ImGuiTreeNodeFlags(1 << 11);
|
||||
// public static ImGuiTreeNodeFlags NoScrollOnOpen = new ImGuiTreeNodeFlags(1 << 12);
|
||||
public static ImGuiTreeNodeFlags NavLeftJumpsBackHere = new ImGuiTreeNodeFlags(1 << 13);
|
||||
public static ImGuiTreeNodeFlags CollapsingHeader = new ImGuiTreeNodeFlags(Framed.getValue() | NoTreePushOnOpen.getValue() | NoAutoOpenOnLog.getValue());
|
||||
private static ImGuiTreeNodeFlags Custom = new ImGuiTreeNodeFlags(0);
|
||||
int value;
|
||||
|
||||
private ImGuiTreeNodeFlags(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public ImGuiTreeNodeFlags or(ImGuiTreeNodeFlags otherEnum) {
|
||||
ImGuiTreeNodeFlags.Custom.value = value | otherEnum.value;
|
||||
return ImGuiTreeNodeFlags.Custom;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package imgui.enums;
|
||||
|
||||
/**
|
||||
* Flags for ImGui::Begin()
|
||||
*/
|
||||
public class ImGuiWindowFlags {
|
||||
public static ImGuiWindowFlags None = new ImGuiWindowFlags(0);
|
||||
public static ImGuiWindowFlags NoTitleBar = new ImGuiWindowFlags(1 << 0);
|
||||
public static ImGuiWindowFlags NoResize = new ImGuiWindowFlags(1 << 1);
|
||||
public static ImGuiWindowFlags NoMove = new ImGuiWindowFlags(1 << 2);
|
||||
public static ImGuiWindowFlags NoScrollbar = new ImGuiWindowFlags(1 << 3);
|
||||
public static ImGuiWindowFlags NoScrollWithMouse = new ImGuiWindowFlags(1 << 4);
|
||||
public static ImGuiWindowFlags NoCollapse = new ImGuiWindowFlags(1 << 5);
|
||||
public static ImGuiWindowFlags AlwaysAutoResize = new ImGuiWindowFlags(1 << 6);
|
||||
public static ImGuiWindowFlags NoBackground = new ImGuiWindowFlags(1 << 7);
|
||||
public static ImGuiWindowFlags NoSavedSettings = new ImGuiWindowFlags(1 << 8);
|
||||
public static ImGuiWindowFlags NoMouseInputs = new ImGuiWindowFlags(1 << 9);
|
||||
public static ImGuiWindowFlags MenuBar = new ImGuiWindowFlags(1 << 10);
|
||||
public static ImGuiWindowFlags HorizontalScrollbar = new ImGuiWindowFlags(1 << 11);
|
||||
public static ImGuiWindowFlags NoFocusOnAppearing = new ImGuiWindowFlags(1 << 12);
|
||||
public static ImGuiWindowFlags NoBringToFrontOnFocus = new ImGuiWindowFlags(1 << 13);
|
||||
public static ImGuiWindowFlags AlwaysVerticalScrollbar = new ImGuiWindowFlags(1 << 14);
|
||||
public static ImGuiWindowFlags AlwaysHorizontalScrollbar = new ImGuiWindowFlags(1 << 15);
|
||||
public static ImGuiWindowFlags AlwaysUseWindowPadding = new ImGuiWindowFlags(1 << 16);
|
||||
public static ImGuiWindowFlags NoNavInputs = new ImGuiWindowFlags(1 << 18);
|
||||
public static ImGuiWindowFlags NoNavFocus = new ImGuiWindowFlags(1 << 19);
|
||||
public static ImGuiWindowFlags UnsavedDocument = new ImGuiWindowFlags(1 << 20);
|
||||
public static ImGuiWindowFlags NoDocking = new ImGuiWindowFlags(1 << 21);
|
||||
public static ImGuiWindowFlags NoNav = new ImGuiWindowFlags(NoNavInputs.getValue() | NoNavFocus.getValue());
|
||||
public static ImGuiWindowFlags NoDecoration = new ImGuiWindowFlags(NoTitleBar.getValue() | NoResize.getValue() | NoScrollbar.getValue() | NoCollapse.getValue());
|
||||
public static ImGuiWindowFlags NoInputs = new ImGuiWindowFlags(NoMouseInputs.getValue() | NoNavInputs.getValue() | NoNavFocus.getValue());
|
||||
private static ImGuiWindowFlags Custom = new ImGuiWindowFlags(0);
|
||||
int value;
|
||||
|
||||
private ImGuiWindowFlags(int code) {
|
||||
value = code;
|
||||
}
|
||||
|
||||
public ImGuiWindowFlags or(ImGuiWindowFlags otherEnum) {
|
||||
ImGuiWindowFlags.Custom.value = value | otherEnum.value;
|
||||
return ImGuiWindowFlags.Custom;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package imgui.enums;
|
||||
|
||||
public class ImLayout {
|
||||
public static float MATCH_PARENT = -0.1f;
|
||||
public static float WRAP_PARENT = 0.0f;
|
||||
}
|
||||
Reference in new issue
Block a user