Skip to content

Commit 4d00f34

Browse files
committed
Convert enums comments to JavaDoc
1 parent 5a6de1c commit 4d00f34

23 files changed

+918
-223
lines changed

imgui-binding/src/main/java/imgui/enums/ImDrawCornerFlags.java

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,41 @@ private ImDrawCornerFlags() {
55
}
66

77
public static final int None = 0;
8-
public static final int TopLeft = 1; // 0x1
9-
public static final int TopRight = 1 << 1; // 0x2
10-
public static final int BotLeft = 1 << 2; // 0x4
11-
public static final int BotRight = 1 << 3; // 0x8
12-
public static final int Top = TopLeft | TopRight; // 0x3
13-
public static final int Bot = BotLeft | BotRight; // 0xC
14-
public static final int Left = TopLeft | BotLeft; // 0x5
15-
public static final int Right = TopRight | BotRight; // 0xA
16-
public static final int All = 0xF; // In your function calls you may use ~0 (= all bits sets) instead of All, as a convenience
8+
/**
9+
* 0x1
10+
*/
11+
public static final int TopLeft = 1;
12+
/**
13+
* 0x2
14+
*/
15+
public static final int TopRight = 1 << 1;
16+
/**
17+
* 0x4
18+
*/
19+
public static final int BotLeft = 1 << 2;
20+
/**
21+
* 0x8
22+
*/
23+
public static final int BotRight = 1 << 3;
24+
/**
25+
* 0x3
26+
*/
27+
public static final int Top = TopLeft | TopRight;
28+
/**
29+
* 0xC
30+
*/
31+
public static final int Bot = BotLeft | BotRight;
32+
/**
33+
* 0x5
34+
*/
35+
public static final int Left = TopLeft | BotLeft;
36+
37+
/**
38+
* 0xA
39+
*/
40+
public static final int Right = TopRight | BotRight;
41+
/**
42+
* In your function calls you may use ~0 (= all bits sets) instead of All, as a convenience
43+
*/
44+
public static final int All = 0xF;
1745
}

imgui-binding/src/main/java/imgui/enums/ImDrawListFlags.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,17 @@ private ImDrawListFlags() {
55
}
66

77
public static final int None = 0;
8-
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)
9-
public static final int AntiAliasedFill = 1 << 1; // Filled shapes have anti-aliased edges (*2 the number of vertices)
10-
public static final int AllowVtxOffset = 1 << 2; // Can emit 'VtxOffset > 0' to allow large meshes. Set when 'ImGuiBackendFlags_RendererHasVtxOffset' is enabled.
8+
9+
/**
10+
* Lines are anti-aliased (*2 the number of triangles for 1.0f wide line, otherwise *3 the number of triangles)
11+
*/
12+
public static final int AntiAliasedLines = 1;
13+
/**
14+
* Filled shapes have anti-aliased edges (*2 the number of vertices)
15+
*/
16+
public static final int AntiAliasedFill = 1 << 1;
17+
/**
18+
* Can emit 'VtxOffset > 0' to allow large meshes. Set when 'ImGuiBackendFlags_RendererHasVtxOffset' is enabled.
19+
*/
20+
public static final int AllowVtxOffset = 1 << 2;
1121
}

imgui-binding/src/main/java/imgui/enums/ImFontAtlasFlags.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ private ImFontAtlasFlags() {
55
}
66

77
public static final int None = 0;
8-
public static final int NoPowerOfTwoHeight = 1; // Don't round the height to next power of two
9-
public static final int NoMouseCursors = 1 << 1; // Don't build software mouse cursors into the atlas
8+
/**
9+
* Don't round the height to next power of two
10+
*/
11+
public static final int NoPowerOfTwoHeight = 1;
12+
/**
13+
* Don't build software mouse cursors into the atlas
14+
*/
15+
public static final int NoMouseCursors = 1 << 1;
1016
}

imgui-binding/src/main/java/imgui/enums/ImGuiBackendFlags.java

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,20 @@ private ImGuiBackendFlags() {
88
}
99

1010
public static final int None = 0;
11-
public static final int HasGamepad = 1; // Back-end Platform supports gamepad and currently has one connected.
12-
public static final int HasMouseCursors = 1 << 1; // Back-end Platform supports honoring GetMouseCursor() value to change the OS cursor shape.
13-
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).
14-
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.
11+
/**
12+
* Back-end Platform supports gamepad and currently has one connected.
13+
*/
14+
public static final int HasGamepad = 1;
15+
/**
16+
* Back-end Platform supports honoring GetMouseCursor() value to change the OS cursor shape.
17+
*/
18+
public static final int HasMouseCursors = 1 << 1;
19+
/**
20+
* Back-end Platform supports io.WantSetMousePos requests to reposition the OS mouse position (only used if ImGuiConfigFlags_NavEnableSetMousePos is set).
21+
*/
22+
public static final int HasSetMousePos = 1 << 2;
23+
/**
24+
* Back-end Renderer supports ImDrawCmd::VtxOffset. This enables output of large meshes (64K+ vertices) while still using 16-bit indices.
25+
*/
26+
public static final int RendererHasVtxOffset = 1 << 3;
1527
}

imgui-binding/src/main/java/imgui/enums/ImGuiCol.java

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,24 @@ private ImGuiCol() {
99

1010
public static final int Text = 0;
1111
public static final int TextDisabled = 1;
12-
public static final int WindowBg = 2; // Background of normal windows
13-
public static final int ChildBg = 3; // Background of child windows
14-
public static final int PopupBg = 4; // Background of popups, menus, tooltips windows
12+
/**
13+
* Background of normal windows
14+
*/
15+
public static final int WindowBg = 2; //
16+
/**
17+
* Background of child windows
18+
*/
19+
public static final int ChildBg = 3;
20+
/**
21+
* Background of popups, menus, tooltips windows
22+
*/
23+
public static final int PopupBg = 4;
1524
public static final int Border = 5;
1625
public static final int BorderShadow = 6;
17-
public static final int FrameBg = 7; // Background of checkbox, radio button, plot, slider, text input
26+
/**
27+
* Background of checkbox, radio button, plot, slider, text input
28+
*/
29+
public static final int FrameBg = 7;
1830
public static final int FrameBgHovered = 8;
1931
public static final int FrameBgActive = 9;
2032
public static final int TitleBg = 10;
@@ -31,7 +43,10 @@ private ImGuiCol() {
3143
public static final int Button = 21;
3244
public static final int ButtonHovered = 22;
3345
public static final int ButtonActive = 23;
34-
public static final int Header = 24; // Header* colors are used for CollapsingHeader, TreeNode, Selectable, MenuItem
46+
/**
47+
* Header* colors are used for CollapsingHeader, TreeNode, Selectable, MenuItem
48+
*/
49+
public static final int Header = 24;
3550
public static final int HeaderHovered = 25;
3651
public static final int HeaderActive = 26;
3752
public static final int Separator = 27;
@@ -51,10 +66,22 @@ private ImGuiCol() {
5166
public static final int PlotHistogramHovered = 41;
5267
public static final int TextSelectedBg = 42;
5368
public static final int DragDropTarget = 43;
54-
public static final int NavHighlight = 44; // Gamepad/keyboard: current highlighted item
55-
public static final int NavWindowingHighlight = 45; // Highlight window when using CTRL+TAB
56-
public static final int NavWindowingDimBg = 46; // Darken/colorize entire screen behind the CTRL+TAB window list, when active
57-
public static final int ModalWindowDimBg = 47; // Darken/colorize entire screen behind a modal window, when one is active
69+
/**
70+
* Gamepad/keyboard: current highlighted item
71+
*/
72+
public static final int NavHighlight = 44;
73+
/**
74+
* Highlight window when using CTRL+TAB
75+
*/
76+
public static final int NavWindowingHighlight = 45;
77+
/**
78+
* Darken/colorize entire screen behind the CTRL+TAB window list, when active
79+
*/
80+
public static final int NavWindowingDimBg = 46;
81+
/**
82+
* Darken/colorize entire screen behind a modal window, when one is active
83+
*/
84+
public static final int ModalWindowDimBg = 47;
5885
public static final int COUNT = 48;
5986

6087
}

imgui-binding/src/main/java/imgui/enums/ImGuiColorEditFlags.java

Lines changed: 107 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,115 @@ private ImGuiColorEditFlags() {
88
}
99

1010
public static final int None = 0;
11-
public static final int NoAlpha = 1 << 1; // // ColorEdit, ColorPicker, ColorButton: ignore Alpha component (will only read 3 components from the input pointer).
12-
public static final int NoPicker = 1 << 2; // // ColorEdit: disable picker when clicking on colored square.
13-
public static final int NoOptions = 1 << 3; // // ColorEdit: disable toggling options menu when right-clicking on inputs/small preview.
14-
public static final int NoSmallPreview = 1 << 4; // // ColorEdit, ColorPicker: disable colored square preview next to the inputs. (e.g. to show only the inputs)
15-
public static final int NoInputs = 1 << 5; // // ColorEdit, ColorPicker: disable inputs sliders/text widgets (e.g. to show only the small preview colored square).
16-
public static final int NoTooltip = 1 << 6; // // ColorEdit, ColorPicker, ColorButton: disable tooltip when hovering the preview.
17-
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).
18-
public static final int NoSidePreview = 1 << 8; // // ColorPicker: disable bigger color preview on right side of the picker, use small colored square preview instead.
19-
public static final int NoDragDrop = 1 << 9; // // ColorEdit: disable drag and drop target. ColorButton: disable drag and drop source.
11+
/**
12+
* ColorEdit, ColorPicker, ColorButton: ignore Alpha component (will only read 3 components from the input pointer).
13+
*/
14+
public static final int NoAlpha = 1 << 1;
15+
/**
16+
* ColorEdit: disable picker when clicking on colored square.
17+
*/
18+
public static final int NoPicker = 1 << 2;
19+
/**
20+
* ColorEdit: disable toggling options menu when right-clicking on inputs/small preview.
21+
*/
22+
public static final int NoOptions = 1 << 3;
23+
/**
24+
* ColorEdit, ColorPicker: disable colored square preview next to the inputs. (e.g. to show only the inputs)
25+
*/
26+
public static final int NoSmallPreview = 1 << 4;
27+
/**
28+
* ColorEdit, ColorPicker: disable inputs sliders/text widgets (e.g. to show only the small preview colored square).
29+
*/
30+
public static final int NoInputs = 1 << 5;
31+
/**
32+
* ColorEdit, ColorPicker, ColorButton: disable tooltip when hovering the preview.
33+
*/
34+
public static final int NoTooltip = 1 << 6;
35+
/**
36+
* ColorEdit, ColorPicker: disable display of inline text label (the label is still forwarded to the tooltip and picker).
37+
*/
38+
public static final int NoLabel = 1 << 7;
39+
/**
40+
* ColorPicker: disable bigger color preview on right side of the picker, use small colored square preview instead.
41+
*/
42+
public static final int NoSidePreview = 1 << 8;
43+
/**
44+
* ColorEdit: disable drag and drop target. ColorButton: disable drag and drop source.
45+
*/
46+
public static final int NoDragDrop = 1 << 9;
2047

2148
// User Options (right-click on widget to change some of them).
22-
public static final int AlphaBar = 1 << 16; // // ColorEdit, ColorPicker: show vertical alpha bar/gradient in picker.
23-
public static final int AlphaPreview = 1 << 17; // // ColorEdit, ColorPicker, ColorButton: display preview as a transparent color over a checkerboard, instead of opaque.
24-
public static final int AlphaPreviewHalf = 1 << 18; // // ColorEdit, ColorPicker, ColorButton: display half opaque / half checkerboard, instead of opaque.
25-
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).
26-
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.
27-
public static final int DisplayHSV = 1 << 21; // [Display] // "
28-
public static final int DisplayHex = 1 << 22; // [Display] // "
29-
public static final int Uint8 = 1 << 23; // [DataType] // ColorEdit, ColorPicker, ColorButton: _display_ values formatted as 0..255.
30-
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.
31-
public static final int PickerHueBar = 1 << 25; // [Picker] // ColorPicker: bar for Hue, rectangle for Sat/Value.
32-
public static final int PickerHueWheel = 1 << 26; // [Picker] // ColorPicker: wheel for Hue, triangle for Sat/Value.
33-
public static final int InputRGB = 1 << 27; // [Input] // ColorEdit, ColorPicker: input and output data in RGB format.
34-
public static final int InputHSV = 1 << 28; // [Input] // ColorEdit, ColorPicker: input and output data in HSV format.
3549

36-
// Defaults Options. You can set application defaults using SetColorEditOptions(). The intent is that you probably don't want to
37-
// override them in most of your calls. Let the user choose via the option menu and/or call SetColorEditOptions() once during startup.
50+
/**
51+
* ColorEdit, ColorPicker: show vertical alpha bar/gradient in picker.
52+
*/
53+
public static final int AlphaBar = 1 << 16;
54+
/**
55+
* ColorEdit, ColorPicker, ColorButton: display preview as a transparent color over a checkerboard, instead of opaque.
56+
*/
57+
public static final int AlphaPreview = 1 << 17;
58+
/**
59+
* ColorEdit, ColorPicker, ColorButton: display half opaque / half checkerboard, instead of opaque.
60+
*/
61+
public static final int AlphaPreviewHalf = 1 << 18;
62+
/**
63+
* (WIP) ColorEdit: Currently only disable 0.0f..1.0f limits in RGBA edition (note: you probably want to use ImGuiColorEditFlags_Float flag as well).
64+
*/
65+
public static final int HDR = 1 << 19;
66+
/**
67+
* [Display]
68+
* <p>
69+
* ColorEdit: override _display_ type among RGB/HSV/Hex. ColorPicker: select any combination using one or more of RGB/HSV/Hex.
70+
*/
71+
public static final int DisplayRGB = 1 << 20;
72+
/**
73+
* [Display]
74+
*/
75+
public static final int DisplayHSV = 1 << 21;
76+
/**
77+
* [Display]
78+
*/
79+
public static final int DisplayHex = 1 << 22;
80+
/**
81+
* [DataType]
82+
* <p>
83+
* ColorEdit, ColorPicker, ColorButton: _display_ values formatted as 0..255.
84+
*/
85+
public static final int Uint8 = 1 << 23;
86+
/**
87+
* [DataType]
88+
* <p>
89+
* ColorEdit, ColorPicker, ColorButton: _display_ values formatted as 0.0f..1.0f floats instead of 0..255 integers. No round-trip of value via integers.
90+
*/
91+
public static final int Float = 1 << 24;
92+
/**
93+
* [Picker]
94+
* <p>
95+
* ColorPicker: bar for Hue, rectangle for Sat/Value.
96+
*/
97+
public static final int PickerHueBar = 1 << 25;
98+
/**
99+
* [Picker]
100+
* <p>
101+
* ColorPicker: wheel for Hue, triangle for Sat/Value.
102+
*/
103+
public static final int PickerHueWheel = 1 << 26;
104+
/**
105+
* [Input]
106+
* <p>
107+
* ColorEdit, ColorPicker: input and output data in RGB format.
108+
*/
109+
public static final int InputRGB = 1 << 27;
110+
/**
111+
* [Input]
112+
* <p>
113+
* ColorEdit, ColorPicker: input and output data in HSV format.
114+
*/
115+
public static final int InputHSV = 1 << 28;
116+
117+
/**
118+
* Defaults Options. You can set application defaults using SetColorEditOptions(). The intent is that you probably don't want to
119+
* override them in most of your calls. Let the user choose via the option menu and/or call SetColorEditOptions() once during startup.
120+
*/
38121
public static final int OptionsDefault = Uint8 | DisplayRGB | InputRGB | PickerHueBar;
39122
}

imgui-binding/src/main/java/imgui/enums/ImGuiComboFlags.java

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,33 @@ private ImGuiComboFlags() {
88
}
99

1010
public static final int None = 0;
11-
public static final int PopupAlignLeft = 1; // Align the popup toward the left by default
12-
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()
13-
public static final int HeightRegular = 1 << 2; // Max ~8 items visible (default)
14-
public static final int HeightLarge = 1 << 3; // Max ~20 items visible
15-
public static final int HeightLargest = 1 << 4; // As many fitting items as possible
16-
public static final int NoArrowButton = 1 << 5; // Display on the preview box without the square arrow button
17-
public static final int NoPreview = 1 << 6; // Display only a square arrow button
11+
/**
12+
* Align the popup toward the left by default
13+
*/
14+
public static final int PopupAlignLeft = 1;
15+
/**
16+
* Max ~4 items visible. Tip: If you want your combo popup to be a specific size you can use SetNextWindowSizeConstraints() prior to calling BeginCombo()
17+
*/
18+
public static final int HeightSmall = 1 << 1;
19+
/**
20+
* Max ~8 items visible (default)
21+
*/
22+
public static final int HeightRegular = 1 << 2;
23+
/**
24+
* Max ~20 items visible
25+
*/
26+
public static final int HeightLarge = 1 << 3;
27+
/**
28+
* As many fitting items as possible
29+
*/
30+
public static final int HeightLargest = 1 << 4;
31+
/**
32+
* Display on the preview box without the square arrow button
33+
*/
34+
public static final int NoArrowButton = 1 << 5;
35+
/**
36+
* Display only a square arrow button
37+
*/
38+
public static final int NoPreview = 1 << 6;
1839
public static final int HeightMask_ = HeightSmall | HeightRegular | HeightLarge | HeightLargest;
1940
}
Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,28 @@
11
package imgui.enums;
22

33
/**
4-
* Enumateration for ImGui::SetWindow***(), SetNextWindow***(), SetNextItem***() functions
4+
* Enumeration for ImGui::SetWindow***(), SetNextWindow***(), SetNextItem***() functions
55
* Represent a condition.
66
* 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.
77
*/
88
public final class ImGuiCond {
99
private ImGuiCond() {
1010
}
1111

12-
public static final int Always = 1; // Set the variable
13-
public static final int Once = 1 << 1; // Set the variable once per runtime session (only the first call with succeed)
14-
public static final int FirstUseEver = 1 << 2; // Set the variable if the object/window has no persistently saved data (no entry in .ini file)
15-
public static final int Appearing = 1 << 3; // Set the variable if the object/window is appearing after being hidden/inactive (or the first time)
12+
/**
13+
* Set the variable
14+
*/
15+
public static final int Always = 1;
16+
/**
17+
* Set the variable once per runtime session (only the first call with succeed)
18+
*/
19+
public static final int Once = 1 << 1;
20+
/**
21+
* Set the variable if the object/window has no persistently saved data (no entry in .ini file)
22+
*/
23+
public static final int FirstUseEver = 1 << 2;
24+
/**
25+
* Set the variable if the object/window is appearing after being hidden/inactive (or the first time)
26+
*/
27+
public static final int Appearing = 1 << 3;
1628
}

0 commit comments

Comments
 (0)