imgui-bindings 0.1.12-arm64-darwin → 0.1.14-arm64-darwin

Sign up to get free protection for your applications and to get access to all the features.
data/lib/imgui.rb CHANGED
@@ -20,21 +20,23 @@ FFI.typedef :int, :ImGuiComboFlags
20
20
  FFI.typedef :int, :ImGuiCond
21
21
  FFI.typedef :int, :ImGuiConfigFlags
22
22
  FFI.typedef :int, :ImGuiDataType
23
- FFI.typedef :int, :ImGuiDir
24
23
  FFI.typedef :int, :ImGuiDragDropFlags
25
24
  FFI.typedef :int, :ImGuiFocusedFlags
26
25
  FFI.typedef :int, :ImGuiHoveredFlags
27
26
  FFI.typedef :uint, :ImGuiID
27
+ FFI.typedef :int, :ImGuiInputFlags
28
28
  FFI.typedef :int, :ImGuiInputTextFlags
29
+ FFI.typedef :int, :ImGuiItemFlags
29
30
  FFI.typedef :int, :ImGuiKeyChord
30
31
  FFI.typedef :pointer, :ImGuiMemAllocFunc
31
32
  FFI.typedef :pointer, :ImGuiMemFreeFunc
32
33
  FFI.typedef :int, :ImGuiMouseButton
33
34
  FFI.typedef :int, :ImGuiMouseCursor
35
+ FFI.typedef :int, :ImGuiMultiSelectFlags
34
36
  FFI.typedef :int, :ImGuiPopupFlags
35
37
  FFI.typedef :int, :ImGuiSelectableFlags
38
+ FFI.typedef :int64, :ImGuiSelectionUserData
36
39
  FFI.typedef :int, :ImGuiSliderFlags
37
- FFI.typedef :int, :ImGuiSortDirection
38
40
  FFI.typedef :int, :ImGuiStyleVar
39
41
  FFI.typedef :int, :ImGuiTabBarFlags
40
42
  FFI.typedef :int, :ImGuiTabItemFlags
@@ -57,8 +59,50 @@ FFI.typedef :uchar, :ImU8
57
59
  FFI.typedef :ushort, :ImWchar
58
60
  FFI.typedef :ushort, :ImWchar16
59
61
  FFI.typedef :uint, :ImWchar32
62
+ FFI.typedef :int, :ImGuiDir
60
63
  FFI.typedef :int, :ImGuiKey
61
64
  FFI.typedef :int, :ImGuiMouseSource
65
+ FFI.typedef :uchar, :ImGuiSortDirection
66
+
67
+ FFI.typedef :int32, :ImDrawFlags_
68
+ FFI.typedef :int32, :ImDrawListFlags_
69
+ FFI.typedef :int32, :ImFontAtlasFlags_
70
+ FFI.typedef :int32, :ImGuiBackendFlags_
71
+ FFI.typedef :int32, :ImGuiButtonFlags_
72
+ FFI.typedef :int32, :ImGuiChildFlags_
73
+ FFI.typedef :int32, :ImGuiCol_
74
+ FFI.typedef :int32, :ImGuiColorEditFlags_
75
+ FFI.typedef :int32, :ImGuiComboFlags_
76
+ FFI.typedef :int32, :ImGuiCond_
77
+ FFI.typedef :int32, :ImGuiConfigFlags_
78
+ FFI.typedef :int32, :ImGuiDataType_
79
+ FFI.typedef :int32, :ImGuiDir
80
+ FFI.typedef :int32, :ImGuiDragDropFlags_
81
+ FFI.typedef :int32, :ImGuiFocusedFlags_
82
+ FFI.typedef :int32, :ImGuiHoveredFlags_
83
+ FFI.typedef :int32, :ImGuiInputFlags_
84
+ FFI.typedef :int32, :ImGuiInputTextFlags_
85
+ FFI.typedef :int32, :ImGuiItemFlags_
86
+ FFI.typedef :int32, :ImGuiKey
87
+ FFI.typedef :int32, :ImGuiMouseButton_
88
+ FFI.typedef :int32, :ImGuiMouseCursor_
89
+ FFI.typedef :int32, :ImGuiMouseSource
90
+ FFI.typedef :int32, :ImGuiMultiSelectFlags_
91
+ FFI.typedef :int32, :ImGuiPopupFlags_
92
+ FFI.typedef :int32, :ImGuiSelectableFlags_
93
+ FFI.typedef :int32, :ImGuiSelectionRequestType
94
+ FFI.typedef :int32, :ImGuiSliderFlags_
95
+ FFI.typedef :int32, :ImGuiSortDirection
96
+ FFI.typedef :int32, :ImGuiStyleVar_
97
+ FFI.typedef :int32, :ImGuiTabBarFlags_
98
+ FFI.typedef :int32, :ImGuiTabItemFlags_
99
+ FFI.typedef :int32, :ImGuiTableBgTarget_
100
+ FFI.typedef :int32, :ImGuiTableColumnFlags_
101
+ FFI.typedef :int32, :ImGuiTableFlags_
102
+ FFI.typedef :int32, :ImGuiTableRowFlags_
103
+ FFI.typedef :int32, :ImGuiTreeNodeFlags_
104
+ FFI.typedef :int32, :ImGuiViewportFlags_
105
+ FFI.typedef :int32, :ImGuiWindowFlags_
62
106
 
63
107
  # ImDrawFlags_
64
108
  # Flags for ImDrawList functions
@@ -104,12 +148,11 @@ ImGuiBackendFlags_RendererHasVtxOffset = 8 # 1 << 3 # Backend Renderer supports
104
148
 
105
149
  # ImGuiButtonFlags_
106
150
  # Flags for InvisibleButton() [extended in imgui_internal.h]
107
- ImGuiButtonFlags_None = 0 # 0
108
- ImGuiButtonFlags_MouseButtonLeft = 1 # 1 << 0 # React on left mouse button (default)
109
- ImGuiButtonFlags_MouseButtonRight = 2 # 1 << 1 # React on right mouse button
110
- ImGuiButtonFlags_MouseButtonMiddle = 4 # 1 << 2 # React on center mouse button
111
- ImGuiButtonFlags_MouseButtonMask_ = 7 # ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle
112
- ImGuiButtonFlags_MouseButtonDefault_ = 1 # ImGuiButtonFlags_MouseButtonLeft
151
+ ImGuiButtonFlags_None = 0 # 0
152
+ ImGuiButtonFlags_MouseButtonLeft = 1 # 1 << 0 # React on left mouse button (default)
153
+ ImGuiButtonFlags_MouseButtonRight = 2 # 1 << 1 # React on right mouse button
154
+ ImGuiButtonFlags_MouseButtonMiddle = 4 # 1 << 2 # React on center mouse button
155
+ ImGuiButtonFlags_MouseButtonMask_ = 7 # ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle # [Internal]
113
156
 
114
157
  # ImGuiChildFlags_
115
158
  # Flags for ImGui::BeginChild()
@@ -130,63 +173,67 @@ ImGuiChildFlags_AutoResizeX = 16 # 1 << 4 # Enable auto-resizing width
130
173
  ImGuiChildFlags_AutoResizeY = 32 # 1 << 5 # Enable auto-resizing height. Read "IMPORTANT: Size measurement" details above.
131
174
  ImGuiChildFlags_AlwaysAutoResize = 64 # 1 << 6 # Combined with AutoResizeX/AutoResizeY. Always measure size even when child is hidden, always return true, always disable clipping optimization! NOT RECOMMENDED.
132
175
  ImGuiChildFlags_FrameStyle = 128 # 1 << 7 # Style the child window like a framed item: use FrameBg, FrameRounding, FrameBorderSize, FramePadding instead of ChildBg, ChildRounding, ChildBorderSize, WindowPadding.
176
+ ImGuiChildFlags_NavFlattened = 256 # 1 << 8 # [BETA] Share focus scope, allow gamepad/keyboard navigation to cross over parent border to this child or between sibling child windows.
133
177
 
134
178
  # ImGuiCol_
135
179
  # Enumeration for PushStyleColor() / PopStyleColor()
136
- ImGuiCol_Text = 0 # 0
137
- ImGuiCol_TextDisabled = 1 # 1
138
- ImGuiCol_WindowBg = 2 # 2 # Background of normal windows
139
- ImGuiCol_ChildBg = 3 # 3 # Background of child windows
140
- ImGuiCol_PopupBg = 4 # 4 # Background of popups, menus, tooltips windows
141
- ImGuiCol_Border = 5 # 5
142
- ImGuiCol_BorderShadow = 6 # 6
143
- ImGuiCol_FrameBg = 7 # 7 # Background of checkbox, radio button, plot, slider, text input
144
- ImGuiCol_FrameBgHovered = 8 # 8
145
- ImGuiCol_FrameBgActive = 9 # 9
146
- ImGuiCol_TitleBg = 10 # 10 # Title bar
147
- ImGuiCol_TitleBgActive = 11 # 11 # Title bar when focused
148
- ImGuiCol_TitleBgCollapsed = 12 # 12 # Title bar when collapsed
149
- ImGuiCol_MenuBarBg = 13 # 13
150
- ImGuiCol_ScrollbarBg = 14 # 14
151
- ImGuiCol_ScrollbarGrab = 15 # 15
152
- ImGuiCol_ScrollbarGrabHovered = 16 # 16
153
- ImGuiCol_ScrollbarGrabActive = 17 # 17
154
- ImGuiCol_CheckMark = 18 # 18 # Checkbox tick and RadioButton circle
155
- ImGuiCol_SliderGrab = 19 # 19
156
- ImGuiCol_SliderGrabActive = 20 # 20
157
- ImGuiCol_Button = 21 # 21
158
- ImGuiCol_ButtonHovered = 22 # 22
159
- ImGuiCol_ButtonActive = 23 # 23
160
- ImGuiCol_Header = 24 # 24 # Header* colors are used for CollapsingHeader, TreeNode, Selectable, MenuItem
161
- ImGuiCol_HeaderHovered = 25 # 25
162
- ImGuiCol_HeaderActive = 26 # 26
163
- ImGuiCol_Separator = 27 # 27
164
- ImGuiCol_SeparatorHovered = 28 # 28
165
- ImGuiCol_SeparatorActive = 29 # 29
166
- ImGuiCol_ResizeGrip = 30 # 30 # Resize grip in lower-right and lower-left corners of windows.
167
- ImGuiCol_ResizeGripHovered = 31 # 31
168
- ImGuiCol_ResizeGripActive = 32 # 32
169
- ImGuiCol_Tab = 33 # 33 # TabItem in a TabBar
170
- ImGuiCol_TabHovered = 34 # 34
171
- ImGuiCol_TabActive = 35 # 35
172
- ImGuiCol_TabUnfocused = 36 # 36
173
- ImGuiCol_TabUnfocusedActive = 37 # 37
174
- ImGuiCol_PlotLines = 38 # 38
175
- ImGuiCol_PlotLinesHovered = 39 # 39
176
- ImGuiCol_PlotHistogram = 40 # 40
177
- ImGuiCol_PlotHistogramHovered = 41 # 41
178
- ImGuiCol_TableHeaderBg = 42 # 42 # Table header background
179
- ImGuiCol_TableBorderStrong = 43 # 43 # Table outer and header borders (prefer using Alpha=1.0 here)
180
- ImGuiCol_TableBorderLight = 44 # 44 # Table inner borders (prefer using Alpha=1.0 here)
181
- ImGuiCol_TableRowBg = 45 # 45 # Table row background (even rows)
182
- ImGuiCol_TableRowBgAlt = 46 # 46 # Table row background (odd rows)
183
- ImGuiCol_TextSelectedBg = 47 # 47
184
- ImGuiCol_DragDropTarget = 48 # 48 # Rectangle highlighting a drop target
185
- ImGuiCol_NavHighlight = 49 # 49 # Gamepad/keyboard: current highlighted item
186
- ImGuiCol_NavWindowingHighlight = 50 # 50 # Highlight window when using CTRL+TAB
187
- ImGuiCol_NavWindowingDimBg = 51 # 51 # Darken/colorize entire screen behind the CTRL+TAB window list, when active
188
- ImGuiCol_ModalWindowDimBg = 52 # 52 # Darken/colorize entire screen behind a modal window, when one is active
189
- ImGuiCol_COUNT = 53 # 53
180
+ ImGuiCol_Text = 0 # 0
181
+ ImGuiCol_TextDisabled = 1 # 1
182
+ ImGuiCol_WindowBg = 2 # 2 # Background of normal windows
183
+ ImGuiCol_ChildBg = 3 # 3 # Background of child windows
184
+ ImGuiCol_PopupBg = 4 # 4 # Background of popups, menus, tooltips windows
185
+ ImGuiCol_Border = 5 # 5
186
+ ImGuiCol_BorderShadow = 6 # 6
187
+ ImGuiCol_FrameBg = 7 # 7 # Background of checkbox, radio button, plot, slider, text input
188
+ ImGuiCol_FrameBgHovered = 8 # 8
189
+ ImGuiCol_FrameBgActive = 9 # 9
190
+ ImGuiCol_TitleBg = 10 # 10 # Title bar
191
+ ImGuiCol_TitleBgActive = 11 # 11 # Title bar when focused
192
+ ImGuiCol_TitleBgCollapsed = 12 # 12 # Title bar when collapsed
193
+ ImGuiCol_MenuBarBg = 13 # 13
194
+ ImGuiCol_ScrollbarBg = 14 # 14
195
+ ImGuiCol_ScrollbarGrab = 15 # 15
196
+ ImGuiCol_ScrollbarGrabHovered = 16 # 16
197
+ ImGuiCol_ScrollbarGrabActive = 17 # 17
198
+ ImGuiCol_CheckMark = 18 # 18 # Checkbox tick and RadioButton circle
199
+ ImGuiCol_SliderGrab = 19 # 19
200
+ ImGuiCol_SliderGrabActive = 20 # 20
201
+ ImGuiCol_Button = 21 # 21
202
+ ImGuiCol_ButtonHovered = 22 # 22
203
+ ImGuiCol_ButtonActive = 23 # 23
204
+ ImGuiCol_Header = 24 # 24 # Header* colors are used for CollapsingHeader, TreeNode, Selectable, MenuItem
205
+ ImGuiCol_HeaderHovered = 25 # 25
206
+ ImGuiCol_HeaderActive = 26 # 26
207
+ ImGuiCol_Separator = 27 # 27
208
+ ImGuiCol_SeparatorHovered = 28 # 28
209
+ ImGuiCol_SeparatorActive = 29 # 29
210
+ ImGuiCol_ResizeGrip = 30 # 30 # Resize grip in lower-right and lower-left corners of windows.
211
+ ImGuiCol_ResizeGripHovered = 31 # 31
212
+ ImGuiCol_ResizeGripActive = 32 # 32
213
+ ImGuiCol_TabHovered = 33 # 33 # Tab background, when hovered
214
+ ImGuiCol_Tab = 34 # 34 # Tab background, when tab-bar is focused & tab is unselected
215
+ ImGuiCol_TabSelected = 35 # 35 # Tab background, when tab-bar is focused & tab is selected
216
+ ImGuiCol_TabSelectedOverline = 36 # 36 # Tab horizontal overline, when tab-bar is focused & tab is selected
217
+ ImGuiCol_TabDimmed = 37 # 37 # Tab background, when tab-bar is unfocused & tab is unselected
218
+ ImGuiCol_TabDimmedSelected = 38 # 38 # Tab background, when tab-bar is unfocused & tab is selected
219
+ ImGuiCol_TabDimmedSelectedOverline = 39 # 39 #..horizontal overline, when tab-bar is unfocused & tab is selected
220
+ ImGuiCol_PlotLines = 40 # 40
221
+ ImGuiCol_PlotLinesHovered = 41 # 41
222
+ ImGuiCol_PlotHistogram = 42 # 42
223
+ ImGuiCol_PlotHistogramHovered = 43 # 43
224
+ ImGuiCol_TableHeaderBg = 44 # 44 # Table header background
225
+ ImGuiCol_TableBorderStrong = 45 # 45 # Table outer and header borders (prefer using Alpha=1.0 here)
226
+ ImGuiCol_TableBorderLight = 46 # 46 # Table inner borders (prefer using Alpha=1.0 here)
227
+ ImGuiCol_TableRowBg = 47 # 47 # Table row background (even rows)
228
+ ImGuiCol_TableRowBgAlt = 48 # 48 # Table row background (odd rows)
229
+ ImGuiCol_TextLink = 49 # 49 # Hyperlink color
230
+ ImGuiCol_TextSelectedBg = 50 # 50
231
+ ImGuiCol_DragDropTarget = 51 # 51 # Rectangle highlighting a drop target
232
+ ImGuiCol_NavHighlight = 52 # 52 # Gamepad/keyboard: current highlighted item
233
+ ImGuiCol_NavWindowingHighlight = 53 # 53 # Highlight window when using CTRL+TAB
234
+ ImGuiCol_NavWindowingDimBg = 54 # 54 # Darken/colorize entire screen behind the CTRL+TAB window list, when active
235
+ ImGuiCol_ModalWindowDimBg = 55 # 55 # Darken/colorize entire screen behind a modal window, when one is active
236
+ ImGuiCol_COUNT = 56 # 56
190
237
 
191
238
  # ImGuiColorEditFlags_
192
239
  # Flags for ColorEdit3() / ColorEdit4() / ColorPicker3() / ColorPicker4() / ColorButton()
@@ -250,8 +297,9 @@ ImGuiConfigFlags_NavEnableKeyboard = 1 # 1 << 0 # Master keyboard navigation
250
297
  ImGuiConfigFlags_NavEnableGamepad = 2 # 1 << 1 # Master gamepad navigation enable flag. Backend also needs to set ImGuiBackendFlags_HasGamepad.
251
298
  ImGuiConfigFlags_NavEnableSetMousePos = 4 # 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 backend, otherwise ImGui will react as if the mouse is jumping around back and forth.
252
299
  ImGuiConfigFlags_NavNoCaptureKeyboard = 8 # 1 << 3 # Instruct navigation to not set the io.WantCaptureKeyboard flag when io.NavActive is set.
253
- ImGuiConfigFlags_NoMouse = 16 # 1 << 4 # Instruct imgui to clear mouse position/buttons in NewFrame(). This allows ignoring the mouse information set by the backend.
300
+ ImGuiConfigFlags_NoMouse = 16 # 1 << 4 # Instruct dear imgui to disable mouse inputs and interactions.
254
301
  ImGuiConfigFlags_NoMouseCursorChange = 32 # 1 << 5 # Instruct backend to not alter mouse cursor shape and visibility. Use if the backend 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.
302
+ ImGuiConfigFlags_NoKeyboard = 64 # 1 << 6 # Instruct dear imgui to disable keyboard inputs and interactions. This is done by ignoring keyboard events and clearing existing states.
255
303
  ImGuiConfigFlags_IsSRGB = 1048576 # 1 << 20 # Application is SRGB-aware.
256
304
  ImGuiConfigFlags_IsTouchScreen = 2097152 # 1 << 21 # Application is using a touch screen instead of a mouse.
257
305
 
@@ -267,9 +315,10 @@ ImGuiDataType_S64 = 6 # 6 # long long / __int64
267
315
  ImGuiDataType_U64 = 7 # 7 # unsigned long long / unsigned __int64
268
316
  ImGuiDataType_Float = 8 # 8 # float
269
317
  ImGuiDataType_Double = 9 # 9 # double
270
- ImGuiDataType_COUNT = 10 # 10
318
+ ImGuiDataType_Bool = 10 # 10 # bool (provided for user convenience, not supported by scalar widgets)
319
+ ImGuiDataType_COUNT = 11 # 11
271
320
 
272
- # ImGuiDir_
321
+ # ImGuiDir
273
322
  # A cardinal direction
274
323
  ImGuiDir_None = -1 # -1
275
324
  ImGuiDir_Left = 0 # 0
@@ -286,7 +335,9 @@ ImGuiDragDropFlags_SourceNoDisableHover = 2 # 1 << 1 # By default, when dr
286
335
  ImGuiDragDropFlags_SourceNoHoldToOpenOthers = 4 # 1 << 2 # Disable the behavior that allows to open tree nodes and collapsing header by holding over them while dragging a source item.
287
336
  ImGuiDragDropFlags_SourceAllowNullID = 8 # 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.
288
337
  ImGuiDragDropFlags_SourceExtern = 16 # 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.
289
- ImGuiDragDropFlags_SourceAutoExpirePayload = 32 # 1 << 5 # Automatically expire the payload if the source cease to be submitted (otherwise payloads are persisting while being dragged)
338
+ ImGuiDragDropFlags_PayloadAutoExpire = 32 # 1 << 5 # Automatically expire the payload if the source cease to be submitted (otherwise payloads are persisting while being dragged)
339
+ ImGuiDragDropFlags_PayloadNoCrossContext = 64 # 1 << 6 # Hint to specify that the payload may not be copied outside current dear imgui context.
340
+ ImGuiDragDropFlags_PayloadNoCrossProcess = 128 # 1 << 7 # Hint to specify that the payload may not be copied outside current process.
290
341
  ImGuiDragDropFlags_AcceptBeforeDelivery = 1024 # 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.
291
342
  ImGuiDragDropFlags_AcceptNoDrawDefaultRect = 2048 # 1 << 11 # Do not draw the default highlight rectangle when hovering over target.
292
343
  ImGuiDragDropFlags_AcceptNoPreviewTooltip = 4096 # 1 << 12 # Request hiding the BeginDragDropSource tooltip from the BeginDragDropTarget site.
@@ -326,31 +377,59 @@ ImGuiHoveredFlags_DelayShort = 32768 # 1 << 15 # IsItemHovered()
326
377
  ImGuiHoveredFlags_DelayNormal = 65536 # 1 << 16 # IsItemHovered() only: Return true after style.HoverDelayNormal elapsed (~0.40 sec) (shared between items) + requires mouse to be stationary for style.HoverStationaryDelay (once per item).
327
378
  ImGuiHoveredFlags_NoSharedDelay = 131072 # 1 << 17 # IsItemHovered() only: Disable shared delay system where moving from one item to the next keeps the previous timer for a short time (standard for tooltips with long delays)
328
379
 
380
+ # ImGuiInputFlags_
381
+ # Flags for Shortcut(), SetNextItemShortcut(),
382
+ # (and for upcoming extended versions of IsKeyPressed(), IsMouseClicked(), Shortcut(), SetKeyOwner(), SetItemKeyOwner() that are still in imgui_internal.h)
383
+ # Don't mistake with ImGuiInputTextFlags! (which is for ImGui::InputText() function)
384
+ ImGuiInputFlags_None = 0 # 0
385
+ ImGuiInputFlags_Repeat = 1 # 1 << 0 # Enable repeat. Return true on successive repeats. Default for legacy IsKeyPressed(). NOT Default for legacy IsMouseClicked(). MUST BE == 1.
386
+ ImGuiInputFlags_RouteActive = 1024 # 1 << 10 # Route to active item only.
387
+ ImGuiInputFlags_RouteFocused = 2048 # 1 << 11 # Route to windows in the focus stack (DEFAULT). Deep-most focused window takes inputs. Active item takes inputs over deep-most focused window.
388
+ ImGuiInputFlags_RouteGlobal = 4096 # 1 << 12 # Global route (unless a focused window or active item registered the route).
389
+ ImGuiInputFlags_RouteAlways = 8192 # 1 << 13 # Do not register route, poll keys directly.
390
+ ImGuiInputFlags_RouteOverFocused = 16384 # 1 << 14 # Option: global route: higher priority than focused route (unless active item in focused route).
391
+ ImGuiInputFlags_RouteOverActive = 32768 # 1 << 15 # Option: global route: higher priority than active item. Unlikely you need to use that: will interfere with every active items, e.g. CTRL+A registered by InputText will be overridden by this. May not be fully honored as user/internal code is likely to always assume they can access keys when active.
392
+ ImGuiInputFlags_RouteUnlessBgFocused = 65536 # 1 << 16 # Option: global route: will not be applied if underlying background/void is focused (== no Dear ImGui windows are focused). Useful for overlay applications.
393
+ ImGuiInputFlags_RouteFromRootWindow = 131072 # 1 << 17 # Option: route evaluated from the point of view of root window rather than current window.
394
+ ImGuiInputFlags_Tooltip = 262144 # 1 << 18 # Automatically display a tooltip when hovering item [BETA] Unsure of right api (opt-in/opt-out)
395
+
329
396
  # ImGuiInputTextFlags_
330
397
  # Flags for ImGui::InputText()
331
398
  # (Those are per-item flags. There are shared flags in ImGuiIO: io.ConfigInputTextCursorBlink and io.ConfigInputTextEnterKeepActive)
332
- ImGuiInputTextFlags_None = 0 # 0
333
- ImGuiInputTextFlags_CharsDecimal = 1 # 1 << 0 # Allow 0123456789.+-*/
334
- ImGuiInputTextFlags_CharsHexadecimal = 2 # 1 << 1 # Allow 0123456789ABCDEFabcdef
335
- ImGuiInputTextFlags_CharsUppercase = 4 # 1 << 2 # Turn a..z into A..Z
336
- ImGuiInputTextFlags_CharsNoBlank = 8 # 1 << 3 # Filter out spaces, tabs
337
- ImGuiInputTextFlags_AutoSelectAll = 16 # 1 << 4 # Select entire text when first taking mouse focus
338
- ImGuiInputTextFlags_EnterReturnsTrue = 32 # 1 << 5 # Return 'true' when Enter is pressed (as opposed to every time the value was modified). Consider looking at the IsItemDeactivatedAfterEdit() function.
339
- ImGuiInputTextFlags_CallbackCompletion = 64 # 1 << 6 # Callback on pressing TAB (for completion handling)
340
- ImGuiInputTextFlags_CallbackHistory = 128 # 1 << 7 # Callback on pressing Up/Down arrows (for history handling)
341
- ImGuiInputTextFlags_CallbackAlways = 256 # 1 << 8 # Callback on each iteration. User code may query cursor position, modify text buffer.
342
- ImGuiInputTextFlags_CallbackCharFilter = 512 # 1 << 9 # Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard.
343
- ImGuiInputTextFlags_AllowTabInput = 1024 # 1 << 10 # Pressing TAB input a '\t' character into the text field
344
- ImGuiInputTextFlags_CtrlEnterForNewLine = 2048 # 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).
345
- ImGuiInputTextFlags_NoHorizontalScroll = 4096 # 1 << 12 # Disable following the cursor horizontally
346
- ImGuiInputTextFlags_AlwaysOverwrite = 8192 # 1 << 13 # Overwrite mode
347
- ImGuiInputTextFlags_ReadOnly = 16384 # 1 << 14 # Read-only mode
348
- ImGuiInputTextFlags_Password = 32768 # 1 << 15 # Password mode, display all characters as '*'
349
- ImGuiInputTextFlags_NoUndoRedo = 65536 # 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().
350
- ImGuiInputTextFlags_CharsScientific = 131072 # 1 << 17 # Allow 0123456789.+-*/eE (Scientific notation input)
351
- ImGuiInputTextFlags_CallbackResize = 262144 # 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)
352
- ImGuiInputTextFlags_CallbackEdit = 524288 # 1 << 19 # Callback on any edit (note that InputText() already returns true on edit, the callback is useful mainly to manipulate the underlying buffer while focus is active)
353
- ImGuiInputTextFlags_EscapeClearsAll = 1048576 # 1 << 20 # Escape key clears content if not empty, and deactivate otherwise (contrast to default behavior of Escape to revert)
399
+ ImGuiInputTextFlags_None = 0 # 0
400
+ ImGuiInputTextFlags_CharsDecimal = 1 # 1 << 0 # Allow 0123456789.+-*/
401
+ ImGuiInputTextFlags_CharsHexadecimal = 2 # 1 << 1 # Allow 0123456789ABCDEFabcdef
402
+ ImGuiInputTextFlags_CharsScientific = 4 # 1 << 2 # Allow 0123456789.+-*/eE (Scientific notation input)
403
+ ImGuiInputTextFlags_CharsUppercase = 8 # 1 << 3 # Turn a..z into A..Z
404
+ ImGuiInputTextFlags_CharsNoBlank = 16 # 1 << 4 # Filter out spaces, tabs
405
+ ImGuiInputTextFlags_AllowTabInput = 32 # 1 << 5 # Pressing TAB input a '\t' character into the text field
406
+ ImGuiInputTextFlags_EnterReturnsTrue = 64 # 1 << 6 # Return 'true' when Enter is pressed (as opposed to every time the value was modified). Consider looking at the IsItemDeactivatedAfterEdit() function.
407
+ ImGuiInputTextFlags_EscapeClearsAll = 128 # 1 << 7 # Escape key clears content if not empty, and deactivate otherwise (contrast to default behavior of Escape to revert)
408
+ ImGuiInputTextFlags_CtrlEnterForNewLine = 256 # 1 << 8 # In multi-line mode, validate with Enter, add new line with Ctrl+Enter (default is opposite: validate with Ctrl+Enter, add line with Enter).
409
+ ImGuiInputTextFlags_ReadOnly = 512 # 1 << 9 # Read-only mode
410
+ ImGuiInputTextFlags_Password = 1024 # 1 << 10 # Password mode, display all characters as '*', disable copy
411
+ ImGuiInputTextFlags_AlwaysOverwrite = 2048 # 1 << 11 # Overwrite mode
412
+ ImGuiInputTextFlags_AutoSelectAll = 4096 # 1 << 12 # Select entire text when first taking mouse focus
413
+ ImGuiInputTextFlags_ParseEmptyRefVal = 8192 # 1 << 13 # InputFloat(), InputInt(), InputScalar() etc. only: parse empty string as zero value.
414
+ ImGuiInputTextFlags_DisplayEmptyRefVal = 16384 # 1 << 14 # InputFloat(), InputInt(), InputScalar() etc. only: when value is zero, do not display it. Generally used with ImGuiInputTextFlags_ParseEmptyRefVal.
415
+ ImGuiInputTextFlags_NoHorizontalScroll = 32768 # 1 << 15 # Disable following the cursor horizontally
416
+ ImGuiInputTextFlags_NoUndoRedo = 65536 # 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().
417
+ ImGuiInputTextFlags_CallbackCompletion = 131072 # 1 << 17 # Callback on pressing TAB (for completion handling)
418
+ ImGuiInputTextFlags_CallbackHistory = 262144 # 1 << 18 # Callback on pressing Up/Down arrows (for history handling)
419
+ ImGuiInputTextFlags_CallbackAlways = 524288 # 1 << 19 # Callback on each iteration. User code may query cursor position, modify text buffer.
420
+ ImGuiInputTextFlags_CallbackCharFilter = 1048576 # 1 << 20 # Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard.
421
+ ImGuiInputTextFlags_CallbackResize = 2097152 # 1 << 21 # 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)
422
+ ImGuiInputTextFlags_CallbackEdit = 4194304 # 1 << 22 # Callback on any edit (note that InputText() already returns true on edit, the callback is useful mainly to manipulate the underlying buffer while focus is active)
423
+
424
+ # ImGuiItemFlags_
425
+ # Flags for ImGui::PushItemFlag()
426
+ # (Those are shared by all items)
427
+ ImGuiItemFlags_None = 0 # 0 # (Default)
428
+ ImGuiItemFlags_NoTabStop = 1 # 1 << 0 # false // Disable keyboard tabbing. This is a "lighter" version of ImGuiItemFlags_NoNav.
429
+ ImGuiItemFlags_NoNav = 2 # 1 << 1 # false // Disable any form of focusing (keyboard/gamepad directional navigation and SetKeyboardFocusHere() calls).
430
+ ImGuiItemFlags_NoNavDefaultFocus = 4 # 1 << 2 # false // Disable item being a candidate for default focus (e.g. used by title bar items).
431
+ ImGuiItemFlags_ButtonRepeat = 8 # 1 << 3 # false // Any button-like behavior will have repeat mode enabled (based on io.KeyRepeatDelay and io.KeyRepeatRate values). Note that you can also call IsItemActive() after any button to tell if it is being held.
432
+ ImGuiItemFlags_AutoClosePopups = 16 # 1 << 4 # true // MenuItem()/Selectable() automatically close their parent popup window.
354
433
 
355
434
  # ImGuiKey
356
435
  # A key identifier (ImGuiKey_XXX or ImGuiMod_XXX value): can represent Keyboard, Mouse and Gamepad values.
@@ -516,12 +595,11 @@ ImGuiKey_ReservedForModAlt = 664 # 664
516
595
  ImGuiKey_ReservedForModSuper = 665 # 665
517
596
  ImGuiKey_COUNT = 666 # 666
518
597
  ImGuiMod_None = 0 # 0
519
- ImGuiMod_Ctrl = 4096 # 1 << 12 # Ctrl
598
+ ImGuiMod_Ctrl = 4096 # 1 << 12 # Ctrl (non-macOS), Cmd (macOS)
520
599
  ImGuiMod_Shift = 8192 # 1 << 13 # Shift
521
600
  ImGuiMod_Alt = 16384 # 1 << 14 # Option/Menu
522
- ImGuiMod_Super = 32768 # 1 << 15 # Cmd/Super/Windows
523
- ImGuiMod_Shortcut = 2048 # 1 << 11 # Alias for Ctrl (non-macOS) _or_ Super (macOS).
524
- ImGuiMod_Mask_ = 63488 # 0xF800 # 5-bits
601
+ ImGuiMod_Super = 32768 # 1 << 15 # Windows/Super (non-macOS), Ctrl (macOS)
602
+ ImGuiMod_Mask_ = 61440 # 0xF000 # 4-bits
525
603
  ImGuiKey_NamedKey_BEGIN = 512 # 512
526
604
  ImGuiKey_NamedKey_END = 666 # ImGuiKey_COUNT
527
605
  ImGuiKey_NamedKey_COUNT = 154 # ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN
@@ -561,6 +639,26 @@ ImGuiMouseSource_TouchScreen = 1 # 1 # Input is coming from a touch screen (no h
561
639
  ImGuiMouseSource_Pen = 2 # 2 # Input is coming from a pressure/magnetic pen (often used in conjunction with high-sampling rates).
562
640
  ImGuiMouseSource_COUNT = 3 # 3
563
641
 
642
+ # ImGuiMultiSelectFlags_
643
+ # Flags for BeginMultiSelect()
644
+ ImGuiMultiSelectFlags_None = 0 # 0
645
+ ImGuiMultiSelectFlags_SingleSelect = 1 # 1 << 0 # Disable selecting more than one item. This is available to allow single-selection code to share same code/logic if desired. It essentially disables the main purpose of BeginMultiSelect() tho!
646
+ ImGuiMultiSelectFlags_NoSelectAll = 2 # 1 << 1 # Disable CTRL+A shortcut to select all.
647
+ ImGuiMultiSelectFlags_NoRangeSelect = 4 # 1 << 2 # Disable Shift+selection mouse/keyboard support (useful for unordered 2D selection). With BoxSelect is also ensure contiguous SetRange requests are not combined into one. This allows not handling interpolation in SetRange requests.
648
+ ImGuiMultiSelectFlags_NoAutoSelect = 8 # 1 << 3 # Disable selecting items when navigating (useful for e.g. supporting range-select in a list of checkboxes).
649
+ ImGuiMultiSelectFlags_NoAutoClear = 16 # 1 << 4 # Disable clearing selection when navigating or selecting another one (generally used with ImGuiMultiSelectFlags_NoAutoSelect. useful for e.g. supporting range-select in a list of checkboxes).
650
+ ImGuiMultiSelectFlags_NoAutoClearOnReselect = 32 # 1 << 5 # Disable clearing selection when clicking/selecting an already selected item.
651
+ ImGuiMultiSelectFlags_BoxSelect1d = 64 # 1 << 6 # Enable box-selection with same width and same x pos items (e.g. full row Selectable()). Box-selection works better with little bit of spacing between items hit-box in order to be able to aim at empty space.
652
+ ImGuiMultiSelectFlags_BoxSelect2d = 128 # 1 << 7 # Enable box-selection with varying width or varying x pos items support (e.g. different width labels, or 2D layout/grid). This is slower: alters clipping logic so that e.g. horizontal movements will update selection of normally clipped items.
653
+ ImGuiMultiSelectFlags_BoxSelectNoScroll = 256 # 1 << 8 # Disable scrolling when box-selecting near edges of scope.
654
+ ImGuiMultiSelectFlags_ClearOnEscape = 512 # 1 << 9 # Clear selection when pressing Escape while scope is focused.
655
+ ImGuiMultiSelectFlags_ClearOnClickVoid = 1024 # 1 << 10 # Clear selection when clicking on empty location within scope.
656
+ ImGuiMultiSelectFlags_ScopeWindow = 2048 # 1 << 11 # Scope for _BoxSelect and _ClearOnClickVoid is whole window (Default). Use if BeginMultiSelect() covers a whole window or used a single time in same window.
657
+ ImGuiMultiSelectFlags_ScopeRect = 4096 # 1 << 12 # Scope for _BoxSelect and _ClearOnClickVoid is rectangle encompassing BeginMultiSelect()/EndMultiSelect(). Use if BeginMultiSelect() is called multiple times in same window.
658
+ ImGuiMultiSelectFlags_SelectOnClick = 8192 # 1 << 13 # Apply selection on mouse down when clicking on unselected item. (Default)
659
+ ImGuiMultiSelectFlags_SelectOnClickRelease = 16384 # 1 << 14 # Apply selection on mouse release when clicking an unselected item. Allow dragging an unselected item without altering selection.
660
+ ImGuiMultiSelectFlags_NavWrapX = 65536 # 1 << 16 # [Temporary] Enable navigation wrapping on X axis. Provided as a convenience because we don't have a design for the general Nav API for this yet. When the more general feature be public we may obsolete this flag in favor of new one.
661
+
564
662
  # ImGuiPopupFlags_
565
663
  # Flags for OpenPopup*(), BeginPopupContext*(), IsPopupOpen() functions.
566
664
  # - To be backward compatible with older API which took an 'int mouse_button = 1' argument instead of 'ImGuiPopupFlags flags',
@@ -585,12 +683,19 @@ ImGuiPopupFlags_AnyPopup = 3072 # ImGuiPopupFlags_AnyPopupId | ImG
585
683
 
586
684
  # ImGuiSelectableFlags_
587
685
  # Flags for ImGui::Selectable()
588
- ImGuiSelectableFlags_None = 0 # 0
589
- ImGuiSelectableFlags_DontClosePopups = 1 # 1 << 0 # Clicking this doesn't close parent popup window
590
- ImGuiSelectableFlags_SpanAllColumns = 2 # 1 << 1 # Frame will span all columns of its container table (text will still fit in current column)
591
- ImGuiSelectableFlags_AllowDoubleClick = 4 # 1 << 2 # Generate press events on double clicks too
592
- ImGuiSelectableFlags_Disabled = 8 # 1 << 3 # Cannot be selected, display grayed out text
593
- ImGuiSelectableFlags_AllowOverlap = 16 # 1 << 4 # (WIP) Hit testing to allow subsequent widgets to overlap this one
686
+ ImGuiSelectableFlags_None = 0 # 0
687
+ ImGuiSelectableFlags_NoAutoClosePopups = 1 # 1 << 0 # Clicking this doesn't close parent popup window (overrides ImGuiItemFlags_AutoClosePopups)
688
+ ImGuiSelectableFlags_SpanAllColumns = 2 # 1 << 1 # Frame will span all columns of its container table (text will still fit in current column)
689
+ ImGuiSelectableFlags_AllowDoubleClick = 4 # 1 << 2 # Generate press events on double clicks too
690
+ ImGuiSelectableFlags_Disabled = 8 # 1 << 3 # Cannot be selected, display grayed out text
691
+ ImGuiSelectableFlags_AllowOverlap = 16 # 1 << 4 # (WIP) Hit testing to allow subsequent widgets to overlap this one
692
+ ImGuiSelectableFlags_Highlight = 32 # 1 << 5 # Make the item be displayed as if it is hovered
693
+
694
+ # ImGuiSelectionRequestType
695
+ # Selection request type
696
+ ImGuiSelectionRequestType_None = 0 # 0
697
+ ImGuiSelectionRequestType_SetAll = 1 # 1 # Request app to clear selection (if Selected==false) or select all items (if Selected==true). We cannot set RangeFirstItem/RangeLastItem as its contents is entirely up to user (not necessarily an index)
698
+ ImGuiSelectionRequestType_SetRange = 2 # 2 # Request app to select/unselect [RangeFirstItem..RangeLastItem] items (inclusive) based on value of Selected. Only EndMultiSelect() request this, app code can read after BeginMultiSelect() and it will always be false.
594
699
 
595
700
  # ImGuiSliderFlags_
596
701
  # Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc.
@@ -599,11 +704,12 @@ ImGuiSelectableFlags_AllowOverlap = 16 # 1 << 4 # (WIP) Hit testing to allow
599
704
  ImGuiSliderFlags_None = 0 # 0
600
705
  ImGuiSliderFlags_AlwaysClamp = 16 # 1 << 4 # Clamp value to min/max bounds when input manually with CTRL+Click. By default CTRL+Click allows going out of bounds.
601
706
  ImGuiSliderFlags_Logarithmic = 32 # 1 << 5 # Make the widget logarithmic (linear otherwise). Consider using ImGuiSliderFlags_NoRoundToFormat with this if using a format-string with small amount of digits.
602
- ImGuiSliderFlags_NoRoundToFormat = 64 # 1 << 6 # Disable rounding underlying value to match precision of the display format string (e.g. %.3f values are rounded to those 3 digits)
603
- ImGuiSliderFlags_NoInput = 128 # 1 << 7 # Disable CTRL+Click or Enter key allowing to input text directly into the widget
707
+ ImGuiSliderFlags_NoRoundToFormat = 64 # 1 << 6 # Disable rounding underlying value to match precision of the display format string (e.g. %.3f values are rounded to those 3 digits).
708
+ ImGuiSliderFlags_NoInput = 128 # 1 << 7 # Disable CTRL+Click or Enter key allowing to input text directly into the widget.
709
+ ImGuiSliderFlags_WrapAround = 256 # 1 << 8 # Enable wrapping around from max to min and from min to max (only supported by DragXXX() functions for now.
604
710
  ImGuiSliderFlags_InvalidMask_ = 1879048207 # 0x7000000F # [Internal] We treat using those bits as being potentially a 'float power' argument from the previous API that has got miscast to this enum, and will trigger an assert if needed.
605
711
 
606
- # ImGuiSortDirection_
712
+ # ImGuiSortDirection
607
713
  # A sorting direction
608
714
  ImGuiSortDirection_None = 0 # 0
609
715
  ImGuiSortDirection_Ascending = 1 # 1 # Ascending = 0->9, A->Z etc.
@@ -618,38 +724,40 @@ ImGuiSortDirection_Descending = 2 # 2 # Descending = 9->0, Z->A etc.
618
724
  # - In Visual Studio w/ Visual Assist installed: ALT+G ("VAssistX.GoToImplementation") can also follow symbols inside comments.
619
725
  # - In VS Code, CLion, etc.: CTRL+click can follow symbols inside comments.
620
726
  # - When changing this enum, you need to update the associated internal table GStyleVarInfo[] accordingly. This is where we link enum values to members offset/type.
621
- ImGuiStyleVar_Alpha = 0 # 0 # float Alpha
622
- ImGuiStyleVar_DisabledAlpha = 1 # 1 # float DisabledAlpha
623
- ImGuiStyleVar_WindowPadding = 2 # 2 # ImVec2 WindowPadding
624
- ImGuiStyleVar_WindowRounding = 3 # 3 # float WindowRounding
625
- ImGuiStyleVar_WindowBorderSize = 4 # 4 # float WindowBorderSize
626
- ImGuiStyleVar_WindowMinSize = 5 # 5 # ImVec2 WindowMinSize
627
- ImGuiStyleVar_WindowTitleAlign = 6 # 6 # ImVec2 WindowTitleAlign
628
- ImGuiStyleVar_ChildRounding = 7 # 7 # float ChildRounding
629
- ImGuiStyleVar_ChildBorderSize = 8 # 8 # float ChildBorderSize
630
- ImGuiStyleVar_PopupRounding = 9 # 9 # float PopupRounding
631
- ImGuiStyleVar_PopupBorderSize = 10 # 10 # float PopupBorderSize
632
- ImGuiStyleVar_FramePadding = 11 # 11 # ImVec2 FramePadding
633
- ImGuiStyleVar_FrameRounding = 12 # 12 # float FrameRounding
634
- ImGuiStyleVar_FrameBorderSize = 13 # 13 # float FrameBorderSize
635
- ImGuiStyleVar_ItemSpacing = 14 # 14 # ImVec2 ItemSpacing
636
- ImGuiStyleVar_ItemInnerSpacing = 15 # 15 # ImVec2 ItemInnerSpacing
637
- ImGuiStyleVar_IndentSpacing = 16 # 16 # float IndentSpacing
638
- ImGuiStyleVar_CellPadding = 17 # 17 # ImVec2 CellPadding
639
- ImGuiStyleVar_ScrollbarSize = 18 # 18 # float ScrollbarSize
640
- ImGuiStyleVar_ScrollbarRounding = 19 # 19 # float ScrollbarRounding
641
- ImGuiStyleVar_GrabMinSize = 20 # 20 # float GrabMinSize
642
- ImGuiStyleVar_GrabRounding = 21 # 21 # float GrabRounding
643
- ImGuiStyleVar_TabRounding = 22 # 22 # float TabRounding
644
- ImGuiStyleVar_TabBorderSize = 23 # 23 # float TabBorderSize
645
- ImGuiStyleVar_TabBarBorderSize = 24 # 24 # float TabBarBorderSize
646
- ImGuiStyleVar_TableAngledHeadersAngle = 25 # 25 # float TableAngledHeadersAngle
647
- ImGuiStyleVar_ButtonTextAlign = 26 # 26 # ImVec2 ButtonTextAlign
648
- ImGuiStyleVar_SelectableTextAlign = 27 # 27 # ImVec2 SelectableTextAlign
649
- ImGuiStyleVar_SeparatorTextBorderSize = 28 # 28 # float SeparatorTextBorderSize
650
- ImGuiStyleVar_SeparatorTextAlign = 29 # 29 # ImVec2 SeparatorTextAlign
651
- ImGuiStyleVar_SeparatorTextPadding = 30 # 30 # ImVec2 SeparatorTextPadding
652
- ImGuiStyleVar_COUNT = 31 # 31
727
+ ImGuiStyleVar_Alpha = 0 # 0 # float Alpha
728
+ ImGuiStyleVar_DisabledAlpha = 1 # 1 # float DisabledAlpha
729
+ ImGuiStyleVar_WindowPadding = 2 # 2 # ImVec2 WindowPadding
730
+ ImGuiStyleVar_WindowRounding = 3 # 3 # float WindowRounding
731
+ ImGuiStyleVar_WindowBorderSize = 4 # 4 # float WindowBorderSize
732
+ ImGuiStyleVar_WindowMinSize = 5 # 5 # ImVec2 WindowMinSize
733
+ ImGuiStyleVar_WindowTitleAlign = 6 # 6 # ImVec2 WindowTitleAlign
734
+ ImGuiStyleVar_ChildRounding = 7 # 7 # float ChildRounding
735
+ ImGuiStyleVar_ChildBorderSize = 8 # 8 # float ChildBorderSize
736
+ ImGuiStyleVar_PopupRounding = 9 # 9 # float PopupRounding
737
+ ImGuiStyleVar_PopupBorderSize = 10 # 10 # float PopupBorderSize
738
+ ImGuiStyleVar_FramePadding = 11 # 11 # ImVec2 FramePadding
739
+ ImGuiStyleVar_FrameRounding = 12 # 12 # float FrameRounding
740
+ ImGuiStyleVar_FrameBorderSize = 13 # 13 # float FrameBorderSize
741
+ ImGuiStyleVar_ItemSpacing = 14 # 14 # ImVec2 ItemSpacing
742
+ ImGuiStyleVar_ItemInnerSpacing = 15 # 15 # ImVec2 ItemInnerSpacing
743
+ ImGuiStyleVar_IndentSpacing = 16 # 16 # float IndentSpacing
744
+ ImGuiStyleVar_CellPadding = 17 # 17 # ImVec2 CellPadding
745
+ ImGuiStyleVar_ScrollbarSize = 18 # 18 # float ScrollbarSize
746
+ ImGuiStyleVar_ScrollbarRounding = 19 # 19 # float ScrollbarRounding
747
+ ImGuiStyleVar_GrabMinSize = 20 # 20 # float GrabMinSize
748
+ ImGuiStyleVar_GrabRounding = 21 # 21 # float GrabRounding
749
+ ImGuiStyleVar_TabRounding = 22 # 22 # float TabRounding
750
+ ImGuiStyleVar_TabBorderSize = 23 # 23 # float TabBorderSize
751
+ ImGuiStyleVar_TabBarBorderSize = 24 # 24 # float TabBarBorderSize
752
+ ImGuiStyleVar_TabBarOverlineSize = 25 # 25 # float TabBarOverlineSize
753
+ ImGuiStyleVar_TableAngledHeadersAngle = 26 # 26 # float TableAngledHeadersAngle
754
+ ImGuiStyleVar_TableAngledHeadersTextAlign = 27 # 27 # ImVec2 TableAngledHeadersTextAlign
755
+ ImGuiStyleVar_ButtonTextAlign = 28 # 28 # ImVec2 ButtonTextAlign
756
+ ImGuiStyleVar_SelectableTextAlign = 29 # 29 # ImVec2 SelectableTextAlign
757
+ ImGuiStyleVar_SeparatorTextBorderSize = 30 # 30 # float SeparatorTextBorderSize
758
+ ImGuiStyleVar_SeparatorTextAlign = 31 # 31 # ImVec2 SeparatorTextAlign
759
+ ImGuiStyleVar_SeparatorTextPadding = 32 # 32 # ImVec2 SeparatorTextPadding
760
+ ImGuiStyleVar_COUNT = 33 # 33
653
761
 
654
762
  # ImGuiTabBarFlags_
655
763
  # Flags for ImGui::BeginTabBar()
@@ -660,10 +768,11 @@ ImGuiTabBarFlags_TabListPopupButton = 4 # 1 << 2 # Disable buttons to
660
768
  ImGuiTabBarFlags_NoCloseWithMiddleMouseButton = 8 # 1 << 3 # Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You may handle this behavior manually on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false.
661
769
  ImGuiTabBarFlags_NoTabListScrollingButtons = 16 # 1 << 4 # Disable scrolling buttons (apply when fitting policy is ImGuiTabBarFlags_FittingPolicyScroll)
662
770
  ImGuiTabBarFlags_NoTooltip = 32 # 1 << 5 # Disable tooltips when hovering a tab
663
- ImGuiTabBarFlags_FittingPolicyResizeDown = 64 # 1 << 6 # Resize tabs when they don't fit
664
- ImGuiTabBarFlags_FittingPolicyScroll = 128 # 1 << 7 # Add scroll buttons when tabs don't fit
665
- ImGuiTabBarFlags_FittingPolicyMask_ = 192 # ImGuiTabBarFlags_FittingPolicyResizeDown | ImGuiTabBarFlags_FittingPolicyScroll
666
- ImGuiTabBarFlags_FittingPolicyDefault_ = 64 # ImGuiTabBarFlags_FittingPolicyResizeDown
771
+ ImGuiTabBarFlags_DrawSelectedOverline = 64 # 1 << 6 # Draw selected overline markers over selected tab
772
+ ImGuiTabBarFlags_FittingPolicyResizeDown = 128 # 1 << 7 # Resize tabs when they don't fit
773
+ ImGuiTabBarFlags_FittingPolicyScroll = 256 # 1 << 8 # Add scroll buttons when tabs don't fit
774
+ ImGuiTabBarFlags_FittingPolicyMask_ = 384 # ImGuiTabBarFlags_FittingPolicyResizeDown | ImGuiTabBarFlags_FittingPolicyScroll
775
+ ImGuiTabBarFlags_FittingPolicyDefault_ = 128 # ImGuiTabBarFlags_FittingPolicyResizeDown
667
776
 
668
777
  # ImGuiTabItemFlags_
669
778
  # Flags for ImGui::BeginTabItem()
@@ -803,11 +912,12 @@ ImGuiTreeNodeFlags_OpenOnDoubleClick = 64 # 1 << 6 # Need double-click to
803
912
  ImGuiTreeNodeFlags_OpenOnArrow = 128 # 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.
804
913
  ImGuiTreeNodeFlags_Leaf = 256 # 1 << 8 # No collapsing, no arrow (use as a convenience for leaf nodes).
805
914
  ImGuiTreeNodeFlags_Bullet = 512 # 1 << 9 # Display a bullet instead of arrow. IMPORTANT: node can still be marked open/close if you don't set the _Leaf flag!
806
- ImGuiTreeNodeFlags_FramePadding = 1024 # 1 << 10 # Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding().
807
- ImGuiTreeNodeFlags_SpanAvailWidth = 2048 # 1 << 11 # 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.
808
- ImGuiTreeNodeFlags_SpanFullWidth = 4096 # 1 << 12 # Extend hit box to the left-most and right-most edges (bypass the indented area).
809
- ImGuiTreeNodeFlags_SpanAllColumns = 8192 # 1 << 13 # Frame will span all columns of its container table (text will still fit in current column)
810
- ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 16384 # 1 << 14 # (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop)
915
+ ImGuiTreeNodeFlags_FramePadding = 1024 # 1 << 10 # Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding() before the node.
916
+ ImGuiTreeNodeFlags_SpanAvailWidth = 2048 # 1 << 11 # 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 without using AllowOverlap mode.
917
+ ImGuiTreeNodeFlags_SpanFullWidth = 4096 # 1 << 12 # Extend hit box to the left-most and right-most edges (cover the indent area).
918
+ ImGuiTreeNodeFlags_SpanTextWidth = 8192 # 1 << 13 # Narrow hit box + narrow hovering highlight, will only cover the label text.
919
+ ImGuiTreeNodeFlags_SpanAllColumns = 16384 # 1 << 14 # Frame will span all columns of its container table (text will still fit in current column)
920
+ ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 32768 # 1 << 15 # (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop)
811
921
  ImGuiTreeNodeFlags_CollapsingHeader = 26 # ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog
812
922
 
813
923
  # ImGuiViewportFlags_
@@ -815,7 +925,7 @@ ImGuiTreeNodeFlags_CollapsingHeader = 26 # ImGuiTreeNodeFlags_Framed | Im
815
925
  ImGuiViewportFlags_None = 0 # 0
816
926
  ImGuiViewportFlags_IsPlatformWindow = 1 # 1 << 0 # Represent a Platform Window
817
927
  ImGuiViewportFlags_IsPlatformMonitor = 2 # 1 << 1 # Represent a Platform Monitor (unused yet)
818
- ImGuiViewportFlags_OwnedByApp = 4 # 1 << 2 # Platform Window: Was created/managed by the user application? (rather than our backend)
928
+ ImGuiViewportFlags_OwnedByApp = 4 # 1 << 2 # Platform Window: is created/managed by the application (rather than a dear imgui backend)
819
929
 
820
930
  # ImGuiWindowFlags_
821
931
  # Flags for ImGui::Begin()
@@ -843,7 +953,6 @@ ImGuiWindowFlags_UnsavedDocument = 262144 # 1 << 18 # Display a dot nex
843
953
  ImGuiWindowFlags_NoNav = 196608 # ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus
844
954
  ImGuiWindowFlags_NoDecoration = 43 # ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse
845
955
  ImGuiWindowFlags_NoInputs = 197120 # ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus
846
- ImGuiWindowFlags_NavFlattened = 8388608 # 1 << 23 # [BETA] On child window: share focus scope, allow gamepad/keyboard navigation to cross over parent border to this child or between sibling child windows.
847
956
  ImGuiWindowFlags_ChildWindow = 16777216 # 1 << 24 # Don't use! For internal use by BeginChild()
848
957
  ImGuiWindowFlags_Tooltip = 33554432 # 1 << 25 # Don't use! For internal use by BeginTooltip()
849
958
  ImGuiWindowFlags_Popup = 67108864 # 1 << 26 # Don't use! For internal use by BeginPopup()
@@ -979,15 +1088,15 @@ class ImDrawList < FFI::Struct
979
1088
  :Flags, :int,
980
1089
  :_VtxCurrentIdx, :uint,
981
1090
  :_Data, :pointer,
982
- :_OwnerName, :pointer,
983
1091
  :_VtxWritePtr, ImDrawVert.ptr,
984
1092
  :_IdxWritePtr, :pointer,
985
- :_ClipRectStack, ImVector.by_value,
986
- :_TextureIdStack, ImVector.by_value,
987
1093
  :_Path, ImVector.by_value,
988
1094
  :_CmdHeader, ImDrawCmdHeader.by_value,
989
1095
  :_Splitter, ImDrawListSplitter.by_value,
990
- :_FringeScale, :float
1096
+ :_ClipRectStack, ImVector.by_value,
1097
+ :_TextureIdStack, ImVector.by_value,
1098
+ :_FringeScale, :float,
1099
+ :_OwnerName, :pointer
991
1100
  )
992
1101
 
993
1102
  def AddBezierCubic(p1, p2, p3, p4, col, thickness, num_segments = 0)
@@ -1453,7 +1562,7 @@ class ImGuiKeyData < FFI::Struct
1453
1562
  end
1454
1563
 
1455
1564
  # - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows.
1456
- # - With multi-viewport enabled, we extend this concept to have multiple active viewports.
1565
+ # - In 'docking' branch with multi-viewport enabled, we extend this concept to have multiple active viewports.
1457
1566
  # - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode.
1458
1567
  # - About Main Area vs Work Area:
1459
1568
  # - Main Area = entire viewport.
@@ -1467,6 +1576,7 @@ class ImGuiViewport < FFI::Struct
1467
1576
  :Size, ImVec2.by_value,
1468
1577
  :WorkPos, ImVec2.by_value,
1469
1578
  :WorkSize, ImVec2.by_value,
1579
+ :PlatformHandle, :pointer,
1470
1580
  :PlatformHandleRaw, :pointer
1471
1581
  )
1472
1582
 
@@ -1492,6 +1602,81 @@ class ImGuiViewport < FFI::Struct
1492
1602
 
1493
1603
  end
1494
1604
 
1605
+ # Helper: Key->Value storage
1606
+ # Typically you don't have to worry about this since a storage is held within each Window.
1607
+ # We use it to e.g. store collapse state for a tree (Int 0/1)
1608
+ # This is optimized for efficient lookup (dichotomy into a contiguous buffer) and rare insertion (typically tied to user interactions aka max once a frame)
1609
+ # You can use it as custom user storage for temporary values. Declare your own storage if, for example:
1610
+ # - You want to manipulate the open/close state of a particular sub-tree in your interface (tree node uses Int 0/1 to store their state).
1611
+ # - You want to store custom debug data easily without adding or editing structures in your code (probably not efficient, but convenient)
1612
+ # Types are NOT stored, so it is up to you to make sure your Key don't collide with different types.
1613
+ class ImGuiStorage < FFI::Struct
1614
+ layout(
1615
+ :Data, ImVector.by_value
1616
+ )
1617
+
1618
+ def BuildSortByKey()
1619
+ ImGui::ImGuiStorage_BuildSortByKey(self)
1620
+ end
1621
+
1622
+ def Clear()
1623
+ ImGui::ImGuiStorage_Clear(self)
1624
+ end
1625
+
1626
+ def GetBool(key, default_val = false)
1627
+ ImGui::ImGuiStorage_GetBool(self, key, default_val)
1628
+ end
1629
+
1630
+ def GetBoolRef(key, default_val = false)
1631
+ ImGui::ImGuiStorage_GetBoolRef(self, key, default_val)
1632
+ end
1633
+
1634
+ def GetFloat(key, default_val = 0.0)
1635
+ ImGui::ImGuiStorage_GetFloat(self, key, default_val)
1636
+ end
1637
+
1638
+ def GetFloatRef(key, default_val = 0.0)
1639
+ ImGui::ImGuiStorage_GetFloatRef(self, key, default_val)
1640
+ end
1641
+
1642
+ def GetInt(key, default_val = 0)
1643
+ ImGui::ImGuiStorage_GetInt(self, key, default_val)
1644
+ end
1645
+
1646
+ def GetIntRef(key, default_val = 0)
1647
+ ImGui::ImGuiStorage_GetIntRef(self, key, default_val)
1648
+ end
1649
+
1650
+ def GetVoidPtr(key)
1651
+ ImGui::ImGuiStorage_GetVoidPtr(self, key)
1652
+ end
1653
+
1654
+ def GetVoidPtrRef(key, default_val = nil)
1655
+ ImGui::ImGuiStorage_GetVoidPtrRef(self, key, default_val)
1656
+ end
1657
+
1658
+ def SetAllInt(val)
1659
+ ImGui::ImGuiStorage_SetAllInt(self, val)
1660
+ end
1661
+
1662
+ def SetBool(key, val)
1663
+ ImGui::ImGuiStorage_SetBool(self, key, val)
1664
+ end
1665
+
1666
+ def SetFloat(key, val)
1667
+ ImGui::ImGuiStorage_SetFloat(self, key, val)
1668
+ end
1669
+
1670
+ def SetInt(key, val)
1671
+ ImGui::ImGuiStorage_SetInt(self, key, val)
1672
+ end
1673
+
1674
+ def SetVoidPtr(key, val)
1675
+ ImGui::ImGuiStorage_SetVoidPtr(self, key, val)
1676
+ end
1677
+
1678
+ end
1679
+
1495
1680
  # Helper: ImColor() implicitly converts colors to either ImU32 (packed 4x1 byte) or ImVec4 (4x1 float)
1496
1681
  # Prefer using IM_COL32() macros if you want a guaranteed compile-time ImU32 for usage with ImDrawList API.
1497
1682
  # **Avoid storing ImColor! Store either u32 of ImVec4. This is not a full-featured color class. MAY OBSOLETE.
@@ -1788,6 +1973,7 @@ class ImGuiIO < FFI::Struct
1788
1973
  :DisplayFramebufferScale, ImVec2.by_value,
1789
1974
  :MouseDrawCursor, :bool,
1790
1975
  :ConfigMacOSXBehaviors, :bool,
1976
+ :ConfigNavSwapGamepadButtons, :bool,
1791
1977
  :ConfigInputTrickleEventQueue, :bool,
1792
1978
  :ConfigInputTextCursorBlink, :bool,
1793
1979
  :ConfigInputTextEnterKeepActive, :bool,
@@ -1813,7 +1999,9 @@ class ImGuiIO < FFI::Struct
1813
1999
  :GetClipboardTextFn, :pointer,
1814
2000
  :SetClipboardTextFn, :pointer,
1815
2001
  :ClipboardUserData, :pointer,
1816
- :SetPlatformImeDataFn, :pointer,
2002
+ :PlatformOpenInShellFn, :pointer,
2003
+ :PlatformOpenInShellUserData, :pointer,
2004
+ :PlatformSetImeDataFn, :pointer,
1817
2005
  :PlatformLocaleDecimalPoint, :ushort,
1818
2006
  :WantCaptureMouse, :bool,
1819
2007
  :WantCaptureKeyboard, :bool,
@@ -1852,6 +2040,7 @@ class ImGuiIO < FFI::Struct
1852
2040
  :MouseDownOwned, [:bool, 5],
1853
2041
  :MouseDownOwnedUnlessPopupClose, [:bool, 5],
1854
2042
  :MouseWheelRequestAxisSwap, :bool,
2043
+ :MouseCtrlLeftAsRightClick, :bool,
1855
2044
  :MouseDownDuration, [:float, 5],
1856
2045
  :MouseDownDurationPrev, [:float, 5],
1857
2046
  :MouseDragMaxDistanceSqr, [:float, 5],
@@ -1912,6 +2101,10 @@ class ImGuiIO < FFI::Struct
1912
2101
  ImGui::ImGuiIO_ClearInputKeys(self)
1913
2102
  end
1914
2103
 
2104
+ def ClearInputMouse()
2105
+ ImGui::ImGuiIO_ClearInputMouse(self)
2106
+ end
2107
+
1915
2108
  def self.create()
1916
2109
  return ImGuiIO.new(ImGui::ImGuiIO_ImGuiIO())
1917
2110
  end
@@ -2014,6 +2207,7 @@ class ImGuiListClipper < FFI::Struct
2014
2207
  :ItemsCount, :int,
2015
2208
  :ItemsHeight, :float,
2016
2209
  :StartPosY, :float,
2210
+ :StartSeekOffsetY, :double,
2017
2211
  :TempData, :pointer
2018
2212
  )
2019
2213
 
@@ -2037,6 +2231,10 @@ class ImGuiListClipper < FFI::Struct
2037
2231
  ImGui::ImGuiListClipper_IncludeItemsByIndex(self, item_begin, item_end)
2038
2232
  end
2039
2233
 
2234
+ def SeekCursorForItem(item_index)
2235
+ ImGui::ImGuiListClipper_SeekCursorForItem(self, item_index)
2236
+ end
2237
+
2040
2238
  def Step()
2041
2239
  ImGui::ImGuiListClipper_Step(self)
2042
2240
  end
@@ -2047,6 +2245,22 @@ class ImGuiListClipper < FFI::Struct
2047
2245
 
2048
2246
  end
2049
2247
 
2248
+ # Main IO structure returned by BeginMultiSelect()/EndMultiSelect().
2249
+ # This mainly contains a list of selection requests.
2250
+ # - Use 'Demo->Tools->Debug Log->Selection' to see requests as they happen.
2251
+ # - Some fields are only useful if your list is dynamic and allows deletion (getting post-deletion focus/state right is shown in the demo)
2252
+ # - Below: who reads/writes each fields? 'r'=read, 'w'=write, 'ms'=multi-select code, 'app'=application/user code.
2253
+ class ImGuiMultiSelectIO < FFI::Struct
2254
+ layout(
2255
+ :Requests, ImVector.by_value,
2256
+ :RangeSrcItem, :int64,
2257
+ :NavIdItem, :int64,
2258
+ :NavIdSelected, :bool,
2259
+ :RangeSrcReset, :bool,
2260
+ :ItemsCount, :int
2261
+ )
2262
+ end
2263
+
2050
2264
  # Data payload for Drag and Drop operations: AcceptDragDropPayload(), GetDragDropPayload()
2051
2265
  class ImGuiPayload < FFI::Struct
2052
2266
  layout(
@@ -2086,7 +2300,7 @@ class ImGuiPayload < FFI::Struct
2086
2300
 
2087
2301
  end
2088
2302
 
2089
- # (Optional) Support for IME (Input Method Editor) via the io.SetPlatformImeDataFn() function.
2303
+ # (Optional) Support for IME (Input Method Editor) via the io.PlatformSetImeDataFn() function.
2090
2304
  class ImGuiPlatformImeData < FFI::Struct
2091
2305
  layout(
2092
2306
  :WantVisible, :bool,
@@ -2104,90 +2318,112 @@ class ImGuiPlatformImeData < FFI::Struct
2104
2318
 
2105
2319
  end
2106
2320
 
2107
- # Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin().
2108
- # NB: For basic min/max size constraint on each axis you don't need to use the callback! The SetNextWindowSizeConstraints() parameters are enough.
2109
- class ImGuiSizeCallbackData < FFI::Struct
2321
+ # Optional helper to store multi-selection state + apply multi-selection requests.
2322
+ # - Used by our demos and provided as a convenience to easily implement basic multi-selection.
2323
+ # - Iterate selection with 'void* it = NULL; ImGuiID id; while (selection.GetNextSelectedItem(&it, &id)) { ... }'
2324
+ # Or you can check 'if (Contains(id)) { ... }' for each possible object if their number is not too high to iterate.
2325
+ # - USING THIS IS NOT MANDATORY. This is only a helper and not a required API.
2326
+ # To store a multi-selection, in your application you could:
2327
+ # - Use this helper as a convenience. We use our simple key->value ImGuiStorage as a std::set<ImGuiID> replacement.
2328
+ # - Use your own external storage: e.g. std::set<MyObjectId>, std::vector<MyObjectId>, interval trees, intrusively stored selection etc.
2329
+ # In ImGuiSelectionBasicStorage we:
2330
+ # - always use indices in the multi-selection API (passed to SetNextItemSelectionUserData(), retrieved in ImGuiMultiSelectIO)
2331
+ # - use the AdapterIndexToStorageId() indirection layer to abstract how persistent selection data is derived from an index.
2332
+ # - use decently optimized logic to allow queries and insertion of very large selection sets.
2333
+ # - do not preserve selection order.
2334
+ # Many combinations are possible depending on how you prefer to store your items and how you prefer to store your selection.
2335
+ # Large applications are likely to eventually want to get rid of this indirection layer and do their own thing.
2336
+ # See https://github.com/ocornut/imgui/wiki/Multi-Select for details and pseudo-code using this helper.
2337
+ class ImGuiSelectionBasicStorage < FFI::Struct
2110
2338
  layout(
2339
+ :Size, :int,
2340
+ :PreserveOrder, :bool,
2111
2341
  :UserData, :pointer,
2112
- :Pos, ImVec2.by_value,
2113
- :CurrentSize, ImVec2.by_value,
2114
- :DesiredSize, ImVec2.by_value
2342
+ :AdapterIndexToStorageId, :pointer,
2343
+ :_SelectionOrder, :int,
2344
+ :_Storage, ImGuiStorage.by_value
2115
2345
  )
2116
- end
2117
2346
 
2118
- # Helper: Key->Value storage
2119
- # Typically you don't have to worry about this since a storage is held within each Window.
2120
- # We use it to e.g. store collapse state for a tree (Int 0/1)
2121
- # This is optimized for efficient lookup (dichotomy into a contiguous buffer) and rare insertion (typically tied to user interactions aka max once a frame)
2122
- # You can use it as custom user storage for temporary values. Declare your own storage if, for example:
2123
- # - You want to manipulate the open/close state of a particular sub-tree in your interface (tree node uses Int 0/1 to store their state).
2124
- # - You want to store custom debug data easily without adding or editing structures in your code (probably not efficient, but convenient)
2125
- # Types are NOT stored, so it is up to you to make sure your Key don't collide with different types.
2126
- class ImGuiStorage < FFI::Struct
2127
- layout(
2128
- :Data, ImVector.by_value
2129
- )
2130
-
2131
- def BuildSortByKey()
2132
- ImGui::ImGuiStorage_BuildSortByKey(self)
2347
+ def ApplyRequests(ms_io)
2348
+ ImGui::ImGuiSelectionBasicStorage_ApplyRequests(self, ms_io)
2133
2349
  end
2134
2350
 
2135
2351
  def Clear()
2136
- ImGui::ImGuiStorage_Clear(self)
2352
+ ImGui::ImGuiSelectionBasicStorage_Clear(self)
2137
2353
  end
2138
2354
 
2139
- def GetBool(key, default_val = false)
2140
- ImGui::ImGuiStorage_GetBool(self, key, default_val)
2355
+ def Contains(id)
2356
+ ImGui::ImGuiSelectionBasicStorage_Contains(self, id)
2141
2357
  end
2142
2358
 
2143
- def GetBoolRef(key, default_val = false)
2144
- ImGui::ImGuiStorage_GetBoolRef(self, key, default_val)
2359
+ def GetNextSelectedItem(opaque_it, out_id)
2360
+ ImGui::ImGuiSelectionBasicStorage_GetNextSelectedItem(self, opaque_it, out_id)
2145
2361
  end
2146
2362
 
2147
- def GetFloat(key, default_val = 0.0)
2148
- ImGui::ImGuiStorage_GetFloat(self, key, default_val)
2363
+ def GetStorageIdFromIndex(idx)
2364
+ ImGui::ImGuiSelectionBasicStorage_GetStorageIdFromIndex(self, idx)
2149
2365
  end
2150
2366
 
2151
- def GetFloatRef(key, default_val = 0.0)
2152
- ImGui::ImGuiStorage_GetFloatRef(self, key, default_val)
2367
+ def self.create()
2368
+ return ImGuiSelectionBasicStorage.new(ImGui::ImGuiSelectionBasicStorage_ImGuiSelectionBasicStorage())
2153
2369
  end
2154
2370
 
2155
- def GetInt(key, default_val = 0)
2156
- ImGui::ImGuiStorage_GetInt(self, key, default_val)
2371
+ def SetItemSelected(id, selected)
2372
+ ImGui::ImGuiSelectionBasicStorage_SetItemSelected(self, id, selected)
2157
2373
  end
2158
2374
 
2159
- def GetIntRef(key, default_val = 0)
2160
- ImGui::ImGuiStorage_GetIntRef(self, key, default_val)
2375
+ def Swap(r)
2376
+ ImGui::ImGuiSelectionBasicStorage_Swap(self, r)
2161
2377
  end
2162
2378
 
2163
- def GetVoidPtr(key)
2164
- ImGui::ImGuiStorage_GetVoidPtr(self, key)
2379
+ def destroy()
2380
+ ImGui::ImGuiSelectionBasicStorage_destroy(self)
2165
2381
  end
2166
2382
 
2167
- def GetVoidPtrRef(key, default_val = nil)
2168
- ImGui::ImGuiStorage_GetVoidPtrRef(self, key, default_val)
2169
- end
2383
+ end
2170
2384
 
2171
- def SetAllInt(val)
2172
- ImGui::ImGuiStorage_SetAllInt(self, val)
2173
- end
2385
+ # Optional helper to apply multi-selection requests to existing randomly accessible storage.
2386
+ # Convenient if you want to quickly wire multi-select API on e.g. an array of bool or items storing their own selection state.
2387
+ class ImGuiSelectionExternalStorage < FFI::Struct
2388
+ layout(
2389
+ :UserData, :pointer,
2390
+ :AdapterSetItemSelected, :pointer
2391
+ )
2174
2392
 
2175
- def SetBool(key, val)
2176
- ImGui::ImGuiStorage_SetBool(self, key, val)
2393
+ def ApplyRequests(ms_io)
2394
+ ImGui::ImGuiSelectionExternalStorage_ApplyRequests(self, ms_io)
2177
2395
  end
2178
2396
 
2179
- def SetFloat(key, val)
2180
- ImGui::ImGuiStorage_SetFloat(self, key, val)
2397
+ def self.create()
2398
+ return ImGuiSelectionExternalStorage.new(ImGui::ImGuiSelectionExternalStorage_ImGuiSelectionExternalStorage())
2181
2399
  end
2182
2400
 
2183
- def SetInt(key, val)
2184
- ImGui::ImGuiStorage_SetInt(self, key, val)
2401
+ def destroy()
2402
+ ImGui::ImGuiSelectionExternalStorage_destroy(self)
2185
2403
  end
2186
2404
 
2187
- def SetVoidPtr(key, val)
2188
- ImGui::ImGuiStorage_SetVoidPtr(self, key, val)
2189
- end
2405
+ end
2406
+
2407
+ # Selection request item
2408
+ class ImGuiSelectionRequest < FFI::Struct
2409
+ layout(
2410
+ :Type, :ImGuiSelectionRequestType,
2411
+ :Selected, :bool,
2412
+ :RangeDirection, :char,
2413
+ :RangeFirstItem, :int64,
2414
+ :RangeLastItem, :int64
2415
+ )
2416
+ end
2190
2417
 
2418
+ # Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin().
2419
+ # NB: For basic min/max size constraint on each axis you don't need to use the callback! The SetNextWindowSizeConstraints() parameters are enough.
2420
+ class ImGuiSizeCallbackData < FFI::Struct
2421
+ layout(
2422
+ :UserData, :pointer,
2423
+ :Pos, ImVec2.by_value,
2424
+ :CurrentSize, ImVec2.by_value,
2425
+ :DesiredSize, ImVec2.by_value
2426
+ )
2191
2427
  end
2192
2428
 
2193
2429
  class ImGuiStyle < FFI::Struct
@@ -2222,7 +2458,9 @@ class ImGuiStyle < FFI::Struct
2222
2458
  :TabBorderSize, :float,
2223
2459
  :TabMinWidthForCloseButton, :float,
2224
2460
  :TabBarBorderSize, :float,
2461
+ :TabBarOverlineSize, :float,
2225
2462
  :TableAngledHeadersAngle, :float,
2463
+ :TableAngledHeadersTextAlign, ImVec2.by_value,
2226
2464
  :ColorButtonPosition, :int,
2227
2465
  :ButtonTextAlign, ImVec2.by_value,
2228
2466
  :SelectableTextAlign, ImVec2.by_value,
@@ -2237,7 +2475,7 @@ class ImGuiStyle < FFI::Struct
2237
2475
  :AntiAliasedFill, :bool,
2238
2476
  :CurveTessellationTol, :float,
2239
2477
  :CircleTessellationMaxError, :float,
2240
- :Colors, [ImVec4.by_value, 53],
2478
+ :Colors, [ImVec4.by_value, 56],
2241
2479
  :HoverStationaryDelay, :float,
2242
2480
  :HoverDelayShort, :float,
2243
2481
  :HoverDelayNormal, :float,
@@ -2265,7 +2503,7 @@ class ImGuiTableColumnSortSpecs < FFI::Struct
2265
2503
  :ColumnUserID, :uint,
2266
2504
  :ColumnIndex, :short,
2267
2505
  :SortOrder, :short,
2268
- :SortDirection, :int
2506
+ :SortDirection, :uchar
2269
2507
  )
2270
2508
 
2271
2509
  def self.create()
@@ -2418,6 +2656,7 @@ class ImGuiTextRange < FFI::Struct
2418
2656
 
2419
2657
  end
2420
2658
 
2659
+ # [Internal] Key+Value for ImGuiStorage
2421
2660
  class ImGuiStoragePair < FFI::Struct
2422
2661
  layout(
2423
2662
  :key, :uint,
@@ -2651,6 +2890,7 @@ module ImGui
2651
2890
  [:ImGuiIO_AddMouseWheelEvent, [:pointer, :float, :float], :void],
2652
2891
  [:ImGuiIO_ClearEventsQueue, [:pointer], :void],
2653
2892
  [:ImGuiIO_ClearInputKeys, [:pointer], :void],
2893
+ [:ImGuiIO_ClearInputMouse, [:pointer], :void],
2654
2894
  [:ImGuiIO_ImGuiIO, [], :pointer],
2655
2895
  [:ImGuiIO_SetAppAcceptingEvents, [:pointer, :bool], :void],
2656
2896
  [:ImGuiIO_SetKeyEventNativeData, [:pointer, :int, :int, :int, :int], :void],
@@ -2667,6 +2907,7 @@ module ImGui
2667
2907
  [:ImGuiListClipper_ImGuiListClipper, [], :pointer],
2668
2908
  [:ImGuiListClipper_IncludeItemByIndex, [:pointer, :int], :void],
2669
2909
  [:ImGuiListClipper_IncludeItemsByIndex, [:pointer, :int, :int], :void],
2910
+ [:ImGuiListClipper_SeekCursorForItem, [:pointer, :int], :void],
2670
2911
  [:ImGuiListClipper_Step, [:pointer], :bool],
2671
2912
  [:ImGuiListClipper_destroy, [:pointer], :void],
2672
2913
  [:ImGuiOnceUponAFrame_ImGuiOnceUponAFrame, [], :pointer],
@@ -2679,6 +2920,18 @@ module ImGui
2679
2920
  [:ImGuiPayload_destroy, [:pointer], :void],
2680
2921
  [:ImGuiPlatformImeData_ImGuiPlatformImeData, [], :pointer],
2681
2922
  [:ImGuiPlatformImeData_destroy, [:pointer], :void],
2923
+ [:ImGuiSelectionBasicStorage_ApplyRequests, [:pointer, :pointer], :void],
2924
+ [:ImGuiSelectionBasicStorage_Clear, [:pointer], :void],
2925
+ [:ImGuiSelectionBasicStorage_Contains, [:pointer, :uint], :bool],
2926
+ [:ImGuiSelectionBasicStorage_GetNextSelectedItem, [:pointer, :pointer, :pointer], :bool],
2927
+ [:ImGuiSelectionBasicStorage_GetStorageIdFromIndex, [:pointer, :int], :uint],
2928
+ [:ImGuiSelectionBasicStorage_ImGuiSelectionBasicStorage, [], :pointer],
2929
+ [:ImGuiSelectionBasicStorage_SetItemSelected, [:pointer, :uint, :bool], :void],
2930
+ [:ImGuiSelectionBasicStorage_Swap, [:pointer, :pointer], :void],
2931
+ [:ImGuiSelectionBasicStorage_destroy, [:pointer], :void],
2932
+ [:ImGuiSelectionExternalStorage_ApplyRequests, [:pointer, :pointer], :void],
2933
+ [:ImGuiSelectionExternalStorage_ImGuiSelectionExternalStorage, [], :pointer],
2934
+ [:ImGuiSelectionExternalStorage_destroy, [:pointer], :void],
2682
2935
  [:ImGuiStoragePair_ImGuiStoragePair_Int, [:uint, :int], :pointer],
2683
2936
  [:ImGuiStoragePair_ImGuiStoragePair_Float, [:uint, :float], :pointer],
2684
2937
  [:ImGuiStoragePair_ImGuiStoragePair_Ptr, [:uint, :pointer], :pointer],
@@ -2748,6 +3001,7 @@ module ImGui
2748
3001
  [:igBeginMainMenuBar, [], :bool],
2749
3002
  [:igBeginMenu, [:pointer, :bool], :bool],
2750
3003
  [:igBeginMenuBar, [], :bool],
3004
+ [:igBeginMultiSelect, [:int, :int, :int], :pointer],
2751
3005
  [:igBeginPopup, [:pointer, :int], :bool],
2752
3006
  [:igBeginPopupContextItem, [:pointer, :int], :bool],
2753
3007
  [:igBeginPopupContextVoid, [:pointer, :int], :bool],
@@ -2784,6 +3038,7 @@ module ImGui
2784
3038
  [:igCreateContext, [:pointer], :pointer],
2785
3039
  [:igDebugCheckVersionAndDataLayout, [:pointer, :size_t, :size_t, :size_t, :size_t, :size_t, :size_t], :bool],
2786
3040
  [:igDebugFlashStyleColor, [:int], :void],
3041
+ [:igDebugLog, [:pointer, :varargs], :void],
2787
3042
  [:igDebugStartItemPicker, [], :void],
2788
3043
  [:igDebugTextEncoding, [:pointer], :void],
2789
3044
  [:igDestroyContext, [:pointer], :void],
@@ -2812,6 +3067,7 @@ module ImGui
2812
3067
  [:igEndMainMenuBar, [], :void],
2813
3068
  [:igEndMenu, [], :void],
2814
3069
  [:igEndMenuBar, [], :void],
3070
+ [:igEndMultiSelect, [], :pointer],
2815
3071
  [:igEndPopup, [], :void],
2816
3072
  [:igEndTabBar, [], :void],
2817
3073
  [:igEndTabItem, [], :void],
@@ -2828,7 +3084,6 @@ module ImGui
2828
3084
  [:igGetColumnWidth, [:int], :float],
2829
3085
  [:igGetColumnsCount, [], :int],
2830
3086
  [:igGetContentRegionAvail, [:pointer], :void],
2831
- [:igGetContentRegionMax, [:pointer], :void],
2832
3087
  [:igGetCurrentContext, [], :pointer],
2833
3088
  [:igGetCursorPos, [:pointer], :void],
2834
3089
  [:igGetCursorPosX, [], :float],
@@ -2848,6 +3103,7 @@ module ImGui
2848
3103
  [:igGetID_Str, [:pointer], :uint],
2849
3104
  [:igGetID_StrStr, [:pointer, :pointer], :uint],
2850
3105
  [:igGetID_Ptr, [:pointer], :uint],
3106
+ [:igGetID_Int, [:int], :uint],
2851
3107
  [:igGetIO, [], :pointer],
2852
3108
  [:igGetItemID, [], :uint],
2853
3109
  [:igGetItemRectMax, [:pointer], :void],
@@ -2874,8 +3130,6 @@ module ImGui
2874
3130
  [:igGetTime, [], :double],
2875
3131
  [:igGetTreeNodeToLabelSpacing, [], :float],
2876
3132
  [:igGetVersion, [], :pointer],
2877
- [:igGetWindowContentRegionMax, [:pointer], :void],
2878
- [:igGetWindowContentRegionMin, [:pointer], :void],
2879
3133
  [:igGetWindowDrawList, [], :pointer],
2880
3134
  [:igGetWindowHeight, [], :float],
2881
3135
  [:igGetWindowPos, [:pointer], :void],
@@ -2912,6 +3166,7 @@ module ImGui
2912
3166
  [:igIsItemFocused, [], :bool],
2913
3167
  [:igIsItemHovered, [:int], :bool],
2914
3168
  [:igIsItemToggledOpen, [], :bool],
3169
+ [:igIsItemToggledSelection, [], :bool],
2915
3170
  [:igIsItemVisible, [], :bool],
2916
3171
  [:igIsKeyChordPressed, [:int], :bool],
2917
3172
  [:igIsKeyDown, [:int], :bool],
@@ -2956,29 +3211,27 @@ module ImGui
2956
3211
  [:igPlotHistogram_FnFloatPtr, [:pointer, :pointer, :pointer, :int, :int, :pointer, :float, :float, ImVec2.by_value], :void],
2957
3212
  [:igPlotLines_FloatPtr, [:pointer, :pointer, :int, :int, :pointer, :float, :float, ImVec2.by_value, :int], :void],
2958
3213
  [:igPlotLines_FnFloatPtr, [:pointer, :pointer, :pointer, :int, :int, :pointer, :float, :float, ImVec2.by_value], :void],
2959
- [:igPopButtonRepeat, [], :void],
2960
3214
  [:igPopClipRect, [], :void],
2961
3215
  [:igPopFont, [], :void],
2962
3216
  [:igPopID, [], :void],
3217
+ [:igPopItemFlag, [], :void],
2963
3218
  [:igPopItemWidth, [], :void],
2964
3219
  [:igPopStyleColor, [:int], :void],
2965
3220
  [:igPopStyleVar, [:int], :void],
2966
- [:igPopTabStop, [], :void],
2967
3221
  [:igPopTextWrapPos, [], :void],
2968
3222
  [:igProgressBar, [:float, ImVec2.by_value, :pointer], :void],
2969
- [:igPushButtonRepeat, [:bool], :void],
2970
3223
  [:igPushClipRect, [ImVec2.by_value, ImVec2.by_value, :bool], :void],
2971
3224
  [:igPushFont, [:pointer], :void],
2972
3225
  [:igPushID_Str, [:pointer], :void],
2973
3226
  [:igPushID_StrStr, [:pointer, :pointer], :void],
2974
3227
  [:igPushID_Ptr, [:pointer], :void],
2975
3228
  [:igPushID_Int, [:int], :void],
3229
+ [:igPushItemFlag, [:int, :bool], :void],
2976
3230
  [:igPushItemWidth, [:float], :void],
2977
3231
  [:igPushStyleColor_U32, [:int, :uint], :void],
2978
3232
  [:igPushStyleColor_Vec4, [:int, ImVec4.by_value], :void],
2979
3233
  [:igPushStyleVar_Float, [:int, :float], :void],
2980
3234
  [:igPushStyleVar_Vec2, [:int, ImVec2.by_value], :void],
2981
- [:igPushTabStop, [:bool], :void],
2982
3235
  [:igPushTextWrapPos, [:float], :void],
2983
3236
  [:igRadioButton_Bool, [:pointer, :bool], :bool],
2984
3237
  [:igRadioButton_IntPtr, [:pointer, :pointer, :int], :bool],
@@ -3003,6 +3256,7 @@ module ImGui
3003
3256
  [:igSetCursorScreenPos, [ImVec2.by_value], :void],
3004
3257
  [:igSetDragDropPayload, [:pointer, :pointer, :size_t, :int], :bool],
3005
3258
  [:igSetItemDefaultFocus, [], :void],
3259
+ [:igSetItemKeyOwner, [:int], :void],
3006
3260
  [:igSetItemTooltip, [:pointer, :varargs], :void],
3007
3261
  [:igSetKeyboardFocusHere, [:int], :void],
3008
3262
  [:igSetMouseCursor, [:int], :void],
@@ -3010,6 +3264,9 @@ module ImGui
3010
3264
  [:igSetNextFrameWantCaptureMouse, [:bool], :void],
3011
3265
  [:igSetNextItemAllowOverlap, [], :void],
3012
3266
  [:igSetNextItemOpen, [:bool, :int], :void],
3267
+ [:igSetNextItemSelectionUserData, [:int64], :void],
3268
+ [:igSetNextItemShortcut, [:int, :int], :void],
3269
+ [:igSetNextItemStorageID, [:uint], :void],
3013
3270
  [:igSetNextItemWidth, [:float], :void],
3014
3271
  [:igSetNextWindowBgAlpha, [:float], :void],
3015
3272
  [:igSetNextWindowCollapsed, [:bool, :int], :void],
@@ -3037,6 +3294,7 @@ module ImGui
3037
3294
  [:igSetWindowPos_Str, [:pointer, ImVec2.by_value, :int], :void],
3038
3295
  [:igSetWindowSize_Vec2, [ImVec2.by_value, :int], :void],
3039
3296
  [:igSetWindowSize_Str, [:pointer, ImVec2.by_value, :int], :void],
3297
+ [:igShortcut, [:int, :int], :bool],
3040
3298
  [:igShowAboutWindow, [:pointer], :void],
3041
3299
  [:igShowDebugLogWindow, [:pointer], :void],
3042
3300
  [:igShowDemoWindow, [:pointer], :void],
@@ -3068,6 +3326,7 @@ module ImGui
3068
3326
  [:igTableGetColumnFlags, [:int], :int],
3069
3327
  [:igTableGetColumnIndex, [], :int],
3070
3328
  [:igTableGetColumnName, [:int], :pointer],
3329
+ [:igTableGetHoveredColumn, [], :int],
3071
3330
  [:igTableGetRowIndex, [], :int],
3072
3331
  [:igTableGetSortSpecs, [], :pointer],
3073
3332
  [:igTableHeader, [:pointer], :void],
@@ -3082,6 +3341,8 @@ module ImGui
3082
3341
  [:igText, [:pointer, :varargs], :void],
3083
3342
  [:igTextColored, [ImVec4.by_value, :pointer, :varargs], :void],
3084
3343
  [:igTextDisabled, [:pointer, :varargs], :void],
3344
+ [:igTextLink, [:pointer], :bool],
3345
+ [:igTextLinkOpenURL, [:pointer, :pointer], :void],
3085
3346
  [:igTextUnformatted, [:pointer, :pointer], :void],
3086
3347
  [:igTextWrapped, [:pointer, :varargs], :void],
3087
3348
  [:igTreeNode_Str, [:pointer], :bool],
@@ -3180,6 +3441,7 @@ module ImGui
3180
3441
  # Disabling [BETA API]
3181
3442
  # - Disable all user interactions and dim items visuals (applying style.DisabledAlpha over current colors)
3182
3443
  # - Those can be nested but it cannot be used to enable an already disabled section (a single BeginDisabled(true) in the stack is enough to keep everything disabled)
3444
+ # - Tooltips windows by exception are opted out of disabling.
3183
3445
  # - 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.
3184
3446
  def self.BeginDisabled(disabled = true)
3185
3447
  igBeginDisabled(disabled)
@@ -3252,6 +3514,20 @@ module ImGui
3252
3514
  igBeginMenuBar()
3253
3515
  end
3254
3516
 
3517
+ # arg: flags(ImGuiMultiSelectFlags), selection_size(int), items_count(int)
3518
+ # ret: pointer
3519
+ #
3520
+ # Multi-selection system for Selectable(), Checkbox(), TreeNode() functions [BETA]
3521
+ # - This enables standard multi-selection/range-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc.) in a way that also allow a clipper to be used.
3522
+ # - ImGuiSelectionUserData is often used to store your item index within the current view (but may store something else).
3523
+ # - Read comments near ImGuiMultiSelectIO for instructions/details and see 'Demo->Widgets->Selection State & Multi-Select' for demo.
3524
+ # - TreeNode() is technically supported but... using this correctly is more complicated. You need some sort of linear/random access to your tree,
3525
+ # which is suited to advanced trees setups already implementing filters and clipper. We will work simplifying the current demo.
3526
+ # - 'selection_size' and 'items_count' parameters are optional and used by a few features. If they are costly for you to compute, you may avoid them.
3527
+ def self.BeginMultiSelect(flags, selection_size = -1, items_count = -1) # Implied selection_size = -1, items_count = -1
3528
+ igBeginMultiSelect(flags, selection_size, items_count)
3529
+ end
3530
+
3255
3531
  # arg: str_id(const char*), flags(ImGuiWindowFlags)
3256
3532
  # ret: bool
3257
3533
  #
@@ -3314,7 +3590,7 @@ module ImGui
3314
3590
  igBeginTabItem(label, p_open, flags)
3315
3591
  end
3316
3592
 
3317
- # arg: str_id(const char*), column(int), flags(ImGuiTableFlags), outer_size(ImVec2), inner_width(float)
3593
+ # arg: str_id(const char*), columns(int), flags(ImGuiTableFlags), outer_size(ImVec2), inner_width(float)
3318
3594
  # ret: bool
3319
3595
  #
3320
3596
  # Tables
@@ -3338,15 +3614,16 @@ module ImGui
3338
3614
  # - TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK: TableNextColumn() automatically gets to next row!
3339
3615
  # - TableNextRow() -> Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear!
3340
3616
  # - 5. Call EndTable()
3341
- def self.BeginTable(str_id, column, flags = 0, outer_size = ImVec2.create(0.0,0.0), inner_width = 0.0) # Implied outer_size = ImVec2(0.0f, 0.0f), inner_width = 0.0f
3342
- igBeginTable(str_id, column, flags, outer_size, inner_width)
3617
+ def self.BeginTable(str_id, columns, flags = 0, outer_size = ImVec2.create(0.0,0.0), inner_width = 0.0) # Implied outer_size = ImVec2(0.0f, 0.0f), inner_width = 0.0f
3618
+ igBeginTable(str_id, columns, flags, outer_size, inner_width)
3343
3619
  end
3344
3620
 
3345
3621
  # ret: bool
3346
3622
  #
3347
3623
  # Tooltips
3348
3624
  # - Tooltips are windows following the mouse. They do not take focus away.
3349
- # - A tooltip window can contain items of any types. SetTooltip() is a shortcut for the 'if (BeginTooltip()) { Text(...); EndTooltip(); }' idiom.
3625
+ # - A tooltip window can contain items of any types.
3626
+ # - SetTooltip() is more or less a shortcut for the 'if (BeginTooltip()) { Text(...); EndTooltip(); }' idiom (with a subtlety that it discard any previously submitted tooltip)
3350
3627
  def self.BeginTooltip() # begin/append a tooltip window.
3351
3628
  igBeginTooltip()
3352
3629
  end
@@ -3534,6 +3811,12 @@ module ImGui
3534
3811
  igDebugFlashStyleColor(idx)
3535
3812
  end
3536
3813
 
3814
+ # arg: fmt(const char*), ...(...)
3815
+ # ret: void
3816
+ def self.DebugLog(fmt, *varargs) # Call via IMGUI_DEBUG_LOG() for maximum stripping in caller code!
3817
+ igDebugLog(fmt, *varargs)
3818
+ end
3819
+
3537
3820
  # ret: void
3538
3821
  def self.DebugStartItemPicker()
3539
3822
  igDebugStartItemPicker()
@@ -3705,6 +3988,11 @@ module ImGui
3705
3988
  igEndMenuBar()
3706
3989
  end
3707
3990
 
3991
+ # ret: pointer
3992
+ def self.EndMultiSelect()
3993
+ igEndMultiSelect()
3994
+ end
3995
+
3708
3996
  # ret: void
3709
3997
  def self.EndPopup() # only call EndPopup() if BeginPopupXXX() returns true!
3710
3998
  igEndPopup()
@@ -3739,7 +4027,7 @@ module ImGui
3739
4027
  # ret: pointer
3740
4028
  #
3741
4029
  # Background/Foreground Draw Lists
3742
- def self.GetBackgroundDrawList() # get background draw list for the viewport associated to the current window. this draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.
4030
+ def self.GetBackgroundDrawList() # this draw list will be the first rendered one. Useful to quickly draw shapes/text behind dear imgui contents.
3743
4031
  igGetBackgroundDrawList()
3744
4032
  end
3745
4033
 
@@ -3792,30 +4080,19 @@ module ImGui
3792
4080
  end
3793
4081
 
3794
4082
  # ret: void
3795
- #
3796
- # Content region
3797
- # - Retrieve available space from a given point. GetContentRegionAvail() is frequently useful.
3798
- # - Those functions are bound to be redesigned (they are confusing, incomplete and the Min/Max return values are in local window coordinates which increases confusion)
3799
- def self.GetContentRegionAvail() # == GetContentRegionMax() - GetCursorPos()
4083
+ def self.GetContentRegionAvail() # available space from current position. THIS IS YOUR BEST FRIEND.
3800
4084
  pOut = ImVec2.new
3801
4085
  igGetContentRegionAvail(pOut)
3802
4086
  return pOut
3803
4087
  end
3804
4088
 
3805
- # ret: void
3806
- def self.GetContentRegionMax() # current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates
3807
- pOut = ImVec2.new
3808
- igGetContentRegionMax(pOut)
3809
- return pOut
3810
- end
3811
-
3812
4089
  # ret: pointer
3813
4090
  def self.GetCurrentContext()
3814
4091
  igGetCurrentContext()
3815
4092
  end
3816
4093
 
3817
4094
  # ret: void
3818
- def self.GetCursorPos() # [window-local] cursor position in window coordinates (relative to window position)
4095
+ def self.GetCursorPos() # [window-local] cursor position in window-local coordinates. This is not your best friend.
3819
4096
  pOut = ImVec2.new
3820
4097
  igGetCursorPos(pOut)
3821
4098
  return pOut
@@ -3837,18 +4114,20 @@ module ImGui
3837
4114
  # - By "cursor" we mean the current output position.
3838
4115
  # - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down.
3839
4116
  # - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget.
4117
+ # - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail().
3840
4118
  # - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API:
3841
4119
  # - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward.
3842
- # - Window-local coordinates: SameLine(), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), GetContentRegionMax(), GetWindowContentRegion*(), PushTextWrapPos()
3843
- # - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates.
3844
- def self.GetCursorScreenPos() # cursor position in absolute coordinates (prefer using this, also more useful to work with ImDrawList API).
4120
+ # - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos()
4121
+ # - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM.
4122
+ # - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it.
4123
+ def self.GetCursorScreenPos() # cursor position, absolute coordinates. THIS IS YOUR BEST FRIEND (prefer using this rather than GetCursorPos(), also more useful to work with ImDrawList API).
3845
4124
  pOut = ImVec2.new
3846
4125
  igGetCursorScreenPos(pOut)
3847
4126
  return pOut
3848
4127
  end
3849
4128
 
3850
4129
  # ret: void
3851
- def self.GetCursorStartPos() # [window-local] initial cursor position, in window coordinates
4130
+ def self.GetCursorStartPos() # [window-local] initial cursor position, in window-local coordinates. Call GetCursorScreenPos() after Begin() to get the absolute coordinates version.
3852
4131
  pOut = ImVec2.new
3853
4132
  igGetCursorStartPos(pOut)
3854
4133
  return pOut
@@ -3890,7 +4169,7 @@ module ImGui
3890
4169
  end
3891
4170
 
3892
4171
  # ret: pointer
3893
- def self.GetForegroundDrawList() # get foreground draw list for the viewport associated to the current window. this draw list will be the last rendered one. Useful to quickly draw shapes/text over dear imgui contents.
4172
+ def self.GetForegroundDrawList() # this draw list will be the last rendered one. Useful to quickly draw shapes/text over dear imgui contents.
3894
4173
  igGetForegroundDrawList()
3895
4174
  end
3896
4175
 
@@ -3927,6 +4206,12 @@ module ImGui
3927
4206
  igGetID_Ptr(ptr_id)
3928
4207
  end
3929
4208
 
4209
+ # arg: int_id(int)
4210
+ # ret: uint
4211
+ def self.GetID_Int(int_id)
4212
+ igGetID_Int(int_id)
4213
+ end
4214
+
3930
4215
  # ret: pointer
3931
4216
  #
3932
4217
  # Main
@@ -3995,7 +4280,7 @@ module ImGui
3995
4280
 
3996
4281
  # arg: button(ImGuiMouseButton), lock_threshold(float)
3997
4282
  # ret: void
3998
- def self.GetMouseDragDelta(button = 0, lock_threshold = -1.0) # return the delta from the initial clicking position while the mouse button is pressed or was just released. This is locked and return 0.0f until the mouse moves past a distance threshold at least once (if lock_threshold < -1.0f, uses io.MouseDraggingThreshold)
4283
+ def self.GetMouseDragDelta(button = 0, lock_threshold = -1.0) # return the delta from the initial clicking position while the mouse button is pressed or was just released. This is locked and return 0.0f until the mouse moves past a distance threshold at least once (uses io.MouseDraggingThreshold if lock_threshold < 0.0f)
3999
4284
  pOut = ImVec2.new
4000
4285
  igGetMouseDragDelta(pOut, button, lock_threshold)
4001
4286
  return pOut
@@ -4086,46 +4371,32 @@ module ImGui
4086
4371
  igGetVersion()
4087
4372
  end
4088
4373
 
4089
- # ret: void
4090
- def self.GetWindowContentRegionMax() # content boundaries max for the full window (roughly (0,0)+Size-Scroll) where Size can be overridden with SetNextWindowContentSize(), in window coordinates
4091
- pOut = ImVec2.new
4092
- igGetWindowContentRegionMax(pOut)
4093
- return pOut
4094
- end
4095
-
4096
- # ret: void
4097
- def self.GetWindowContentRegionMin() # content boundaries min for the full window (roughly (0,0)-Scroll), in window coordinates
4098
- pOut = ImVec2.new
4099
- igGetWindowContentRegionMin(pOut)
4100
- return pOut
4101
- end
4102
-
4103
4374
  # ret: pointer
4104
4375
  def self.GetWindowDrawList() # get draw list associated to the current window, to append your own drawing primitives
4105
4376
  igGetWindowDrawList()
4106
4377
  end
4107
4378
 
4108
4379
  # ret: float
4109
- def self.GetWindowHeight() # get current window height (shortcut for GetWindowSize().y)
4380
+ def self.GetWindowHeight() # get current window height (IT IS UNLIKELY YOU EVER NEED TO USE THIS). Shortcut for GetWindowSize().y.
4110
4381
  igGetWindowHeight()
4111
4382
  end
4112
4383
 
4113
4384
  # ret: void
4114
- def self.GetWindowPos() # get current window position in screen space (note: it is unlikely you need to use this. Consider using current layout pos instead, GetCursorScreenPos())
4385
+ def self.GetWindowPos() # get current window position in screen space (IT IS UNLIKELY YOU EVER NEED TO USE THIS. Consider always using GetCursorScreenPos() and GetContentRegionAvail() instead)
4115
4386
  pOut = ImVec2.new
4116
4387
  igGetWindowPos(pOut)
4117
4388
  return pOut
4118
4389
  end
4119
4390
 
4120
4391
  # ret: void
4121
- def self.GetWindowSize() # get current window size (note: it is unlikely you need to use this. Consider using GetCursorScreenPos() and e.g. GetContentRegionAvail() instead)
4392
+ def self.GetWindowSize() # get current window size (IT IS UNLIKELY YOU EVER NEED TO USE THIS. Consider always using GetCursorScreenPos() and GetContentRegionAvail() instead)
4122
4393
  pOut = ImVec2.new
4123
4394
  igGetWindowSize(pOut)
4124
4395
  return pOut
4125
4396
  end
4126
4397
 
4127
4398
  # ret: float
4128
- def self.GetWindowWidth() # get current window width (shortcut for GetWindowSize().x)
4399
+ def self.GetWindowWidth() # get current window width (IT IS UNLIKELY YOU EVER NEED TO USE THIS). Shortcut for GetWindowSize().x.
4129
4400
  igGetWindowWidth()
4130
4401
  end
4131
4402
 
@@ -4317,6 +4588,11 @@ module ImGui
4317
4588
  igIsItemToggledOpen()
4318
4589
  end
4319
4590
 
4591
+ # ret: bool
4592
+ def self.IsItemToggledSelection() # Was the last item selection state toggled? Useful if you need the per-item information _before_ reaching EndMultiSelect(). We only returns toggle _event_ in order to handle clipping correctly.
4593
+ igIsItemToggledSelection()
4594
+ end
4595
+
4320
4596
  # ret: bool
4321
4597
  def self.IsItemVisible() # is the last item visible? (items may be out of sight because of clipping/scrolling)
4322
4598
  igIsItemVisible()
@@ -4377,7 +4653,7 @@ module ImGui
4377
4653
 
4378
4654
  # arg: button(ImGuiMouseButton), lock_threshold(float)
4379
4655
  # ret: bool
4380
- def self.IsMouseDragging(button, lock_threshold = -1.0) # is mouse dragging? (if lock_threshold < -1.0f, uses io.MouseDraggingThreshold)
4656
+ def self.IsMouseDragging(button, lock_threshold = -1.0) # is mouse dragging? (uses io.MouseDraggingThreshold if lock_threshold < 0.0f)
4381
4657
  igIsMouseDragging(button, lock_threshold)
4382
4658
  end
4383
4659
 
@@ -4600,11 +4876,6 @@ module ImGui
4600
4876
  igPlotLines_FnFloatPtr(label, values_getter, data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size)
4601
4877
  end
4602
4878
 
4603
- # ret: void
4604
- def self.PopButtonRepeat()
4605
- igPopButtonRepeat()
4606
- end
4607
-
4608
4879
  # ret: void
4609
4880
  def self.PopClipRect()
4610
4881
  igPopClipRect()
@@ -4620,6 +4891,11 @@ module ImGui
4620
4891
  igPopID()
4621
4892
  end
4622
4893
 
4894
+ # ret: void
4895
+ def self.PopItemFlag()
4896
+ igPopItemFlag()
4897
+ end
4898
+
4623
4899
  # ret: void
4624
4900
  def self.PopItemWidth()
4625
4901
  igPopItemWidth()
@@ -4637,11 +4913,6 @@ module ImGui
4637
4913
  igPopStyleVar(count)
4638
4914
  end
4639
4915
 
4640
- # ret: void
4641
- def self.PopTabStop()
4642
- igPopTabStop()
4643
- end
4644
-
4645
4916
  # ret: void
4646
4917
  def self.PopTextWrapPos()
4647
4918
  igPopTextWrapPos()
@@ -4653,12 +4924,6 @@ module ImGui
4653
4924
  igProgressBar(fraction, size_arg, overlay)
4654
4925
  end
4655
4926
 
4656
- # arg: repeat(bool)
4657
- # ret: void
4658
- def self.PushButtonRepeat(repeat) # in 'repeat' mode, Button*() functions return repeated true in a typematic manner (using io.KeyRepeatDelay/io.KeyRepeatRate setting). Note that you can call IsItemActive() after any Button() to tell if the button is held in the current frame.
4659
- igPushButtonRepeat(repeat)
4660
- end
4661
-
4662
4927
  # arg: clip_rect_min(ImVec2), clip_rect_max(ImVec2), intersect_with_current_clip_rect(bool)
4663
4928
  # ret: void
4664
4929
  #
@@ -4700,6 +4965,12 @@ module ImGui
4700
4965
  igPushID_Int(int_id)
4701
4966
  end
4702
4967
 
4968
+ # arg: option(ImGuiItemFlags), enabled(bool)
4969
+ # ret: void
4970
+ def self.PushItemFlag(option, enabled) # modify specified shared item flag, e.g. PushItemFlag(ImGuiItemFlags_NoTabStop, true)
4971
+ igPushItemFlag(option, enabled)
4972
+ end
4973
+
4703
4974
  # arg: item_width(float)
4704
4975
  # ret: void
4705
4976
  #
@@ -4732,12 +5003,6 @@ module ImGui
4732
5003
  igPushStyleVar_Vec2(idx, val)
4733
5004
  end
4734
5005
 
4735
- # arg: tab_stop(bool)
4736
- # ret: void
4737
- def self.PushTabStop(tab_stop) # == tab stop enable. Allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets
4738
- igPushTabStop(tab_stop)
4739
- end
4740
-
4741
5006
  # arg: wrap_local_pos_x(float)
4742
5007
  # ret: void
4743
5008
  def self.PushTextWrapPos(wrap_local_pos_x = 0.0) # push word-wrapping position for Text*() commands. < 0.0f: no wrapping; 0.0f: wrap to end of window (or column); > 0.0f: wrap at 'wrap_pos_x' position in window local space
@@ -4871,7 +5136,7 @@ module ImGui
4871
5136
 
4872
5137
  # arg: pos(ImVec2)
4873
5138
  # ret: void
4874
- def self.SetCursorScreenPos(pos) # cursor position in absolute coordinates
5139
+ def self.SetCursorScreenPos(pos) # cursor position, absolute coordinates. THIS IS YOUR BEST FRIEND.
4875
5140
  igSetCursorScreenPos(pos)
4876
5141
  end
4877
5142
 
@@ -4889,9 +5154,22 @@ module ImGui
4889
5154
  igSetItemDefaultFocus()
4890
5155
  end
4891
5156
 
5157
+ # arg: key(ImGuiKey)
5158
+ # ret: void
5159
+ #
5160
+ # Inputs Utilities: Key/Input Ownership [BETA]
5161
+ # - One common use case would be to allow your items to disable standard inputs behaviors such
5162
+ # as Tab or Alt key handling, Mouse Wheel scrolling, etc.
5163
+ # e.g. Button(...); SetItemKeyOwner(ImGuiKey_MouseWheelY); to make hovering/activating a button disable wheel for scrolling.
5164
+ # - Reminder ImGuiKey enum include access to mouse buttons and gamepad, so key ownership can apply to them.
5165
+ # - Many related features are still in imgui_internal.h. For instance, most IsKeyXXX()/IsMouseXXX() functions have an owner-id-aware version.
5166
+ def self.SetItemKeyOwner(key) # Set key owner to last item ID if it is hovered or active. Equivalent to 'if (IsItemHovered() || IsItemActive()) { SetKeyOwner(key, GetItemID());'.
5167
+ igSetItemKeyOwner(key)
5168
+ end
5169
+
4892
5170
  # arg: fmt(const char*), ...(...)
4893
5171
  # ret: void
4894
- def self.SetItemTooltip(fmt, *varargs) # set a text-only tooltip if preceeding item was hovered. override any previous call to SetTooltip().
5172
+ def self.SetItemTooltip(fmt, *varargs) # set a text-only tooltip if preceding item was hovered. override any previous call to SetTooltip().
4895
5173
  igSetItemTooltip(fmt, *varargs)
4896
5174
  end
4897
5175
 
@@ -4932,6 +5210,24 @@ module ImGui
4932
5210
  igSetNextItemOpen(is_open, cond)
4933
5211
  end
4934
5212
 
5213
+ # arg: selection_user_data(ImGuiSelectionUserData)
5214
+ # ret: void
5215
+ def self.SetNextItemSelectionUserData(selection_user_data)
5216
+ igSetNextItemSelectionUserData(selection_user_data)
5217
+ end
5218
+
5219
+ # arg: key_chord(ImGuiKeyChord), flags(ImGuiInputFlags)
5220
+ # ret: void
5221
+ def self.SetNextItemShortcut(key_chord, flags = 0)
5222
+ igSetNextItemShortcut(key_chord, flags)
5223
+ end
5224
+
5225
+ # arg: storage_id(ImGuiID)
5226
+ # ret: void
5227
+ def self.SetNextItemStorageID(storage_id) # set id to use for open/close storage (default to same as item id).
5228
+ igSetNextItemStorageID(storage_id)
5229
+ end
5230
+
4935
5231
  # arg: item_width(float)
4936
5232
  # ret: void
4937
5233
  def self.SetNextItemWidth(item_width) # set width of the _next_ common large "item+label" widget. >0.0f: width in pixels, <0.0f align xx pixels to the right of window (so -FLT_MIN always align width to the right side)
@@ -5095,6 +5391,28 @@ module ImGui
5095
5391
  igSetWindowSize_Str(name, size, cond)
5096
5392
  end
5097
5393
 
5394
+ # arg: key_chord(ImGuiKeyChord), flags(ImGuiInputFlags)
5395
+ # ret: bool
5396
+ #
5397
+ # Inputs Utilities: Shortcut Testing & Routing [BETA]
5398
+ # - ImGuiKeyChord = a ImGuiKey + optional ImGuiMod_Alt/ImGuiMod_Ctrl/ImGuiMod_Shift/ImGuiMod_Super.
5399
+ # ImGuiKey_C // Accepted by functions taking ImGuiKey or ImGuiKeyChord arguments)
5400
+ # ImGuiMod_Ctrl | ImGuiKey_C // Accepted by functions taking ImGuiKeyChord arguments)
5401
+ # only ImGuiMod_XXX values are legal to combine with an ImGuiKey. You CANNOT combine two ImGuiKey values.
5402
+ # - The general idea is that several callers may register interest in a shortcut, and only one owner gets it.
5403
+ # Parent -> call Shortcut(Ctrl+S) // When Parent is focused, Parent gets the shortcut.
5404
+ # Child1 -> call Shortcut(Ctrl+S) // When Child1 is focused, Child1 gets the shortcut (Child1 overrides Parent shortcuts)
5405
+ # Child2 -> no call // When Child2 is focused, Parent gets the shortcut.
5406
+ # The whole system is order independent, so if Child1 makes its calls before Parent, results will be identical.
5407
+ # This is an important property as it facilitate working with foreign code or larger codebase.
5408
+ # - To understand the difference:
5409
+ # - IsKeyChordPressed() compares mods and call IsKeyPressed() -> function has no side-effect.
5410
+ # - Shortcut() submits a route, routes are resolved, if it currently can be routed it calls IsKeyChordPressed() -> function has (desirable) side-effects as it can prevents another call from getting the route.
5411
+ # - Visualize registered routes in 'Metrics/Debugger->Inputs'.
5412
+ def self.Shortcut(key_chord, flags = 0)
5413
+ igShortcut(key_chord, flags)
5414
+ end
5415
+
5098
5416
  # arg: p_open(bool*)
5099
5417
  # ret: void
5100
5418
  def self.ShowAboutWindow(p_open = nil) # create About window. display Dear ImGui version, credits and build/system information.
@@ -5287,6 +5605,11 @@ module ImGui
5287
5605
  igTableGetColumnName(column_n)
5288
5606
  end
5289
5607
 
5608
+ # ret: int
5609
+ def self.TableGetHoveredColumn() # return hovered column. return -1 when table is not hovered. return columns_count if the unused space at the right of visible columns is hovered. Can also use (TableGetColumnFlags() & ImGuiTableColumnFlags_IsHovered) instead.
5610
+ igTableGetHoveredColumn()
5611
+ end
5612
+
5290
5613
  # ret: int
5291
5614
  def self.TableGetRowIndex() # return current row index.
5292
5615
  igTableGetRowIndex()
@@ -5383,6 +5706,18 @@ module ImGui
5383
5706
  igTextDisabled(fmt, *varargs)
5384
5707
  end
5385
5708
 
5709
+ # arg: label(const char*)
5710
+ # ret: bool
5711
+ def self.TextLink(label) # hyperlink text button, return true when clicked
5712
+ igTextLink(label)
5713
+ end
5714
+
5715
+ # arg: label(const char*), url(const char*)
5716
+ # ret: void
5717
+ def self.TextLinkOpenURL(label, url = nil) # Implied url = NULL
5718
+ igTextLinkOpenURL(label, url)
5719
+ end
5720
+
5386
5721
  # arg: text(const char*), text_end(const char*)
5387
5722
  # ret: void
5388
5723
  #
@@ -5585,6 +5920,9 @@ module ImGui
5585
5920
  # arg: 0:ptr_id(const void*)
5586
5921
  # ret: uint
5587
5922
  return igGetID_Ptr(arg[0]) if arg.length == 1 && (arg[0].kind_of?(FFI::Pointer))
5923
+ # arg: 0:int_id(int)
5924
+ # ret: uint
5925
+ return igGetID_Int(arg[0]) if arg.length == 1 && (arg[0].kind_of?(Integer))
5588
5926
  $stderr.puts("[Warning] GetID : No matching functions found (#{arg})")
5589
5927
  end
5590
5928