imgui-bindings 0.1.13-x86_64-darwin → 0.1.15-x86_64-darwin

Sign up to get free protection for your applications and to get access to all the features.
data/lib/imgui.rb CHANGED
@@ -26,13 +26,16 @@ FFI.typedef :int, :ImGuiHoveredFlags
26
26
  FFI.typedef :uint, :ImGuiID
27
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
40
  FFI.typedef :int, :ImGuiStyleVar
38
41
  FFI.typedef :int, :ImGuiTabBarFlags
@@ -61,6 +64,46 @@ FFI.typedef :int, :ImGuiKey
61
64
  FFI.typedef :int, :ImGuiMouseSource
62
65
  FFI.typedef :uchar, :ImGuiSortDirection
63
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_
106
+
64
107
  # ImDrawFlags_
65
108
  # Flags for ImDrawList functions
66
109
  # (Legacy: bit 0 must always correspond to ImDrawFlags_Closed to be backward compatible with old API using a bool. Bits 1..3 must be unused)
@@ -109,11 +152,11 @@ ImGuiButtonFlags_None = 0 # 0
109
152
  ImGuiButtonFlags_MouseButtonLeft = 1 # 1 << 0 # React on left mouse button (default)
110
153
  ImGuiButtonFlags_MouseButtonRight = 2 # 1 << 1 # React on right mouse button
111
154
  ImGuiButtonFlags_MouseButtonMiddle = 4 # 1 << 2 # React on center mouse button
112
- ImGuiButtonFlags_MouseButtonMask_ = 7 # ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle
155
+ ImGuiButtonFlags_MouseButtonMask_ = 7 # ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle # [Internal]
113
156
 
114
157
  # ImGuiChildFlags_
115
158
  # Flags for ImGui::BeginChild()
116
- # (Legacy: bit 0 must always correspond to ImGuiChildFlags_Border to be backward compatible with old API using 'bool border = false'.
159
+ # (Legacy: bit 0 must always correspond to ImGuiChildFlags_Borders to be backward compatible with old API using 'bool border = false'.
117
160
  # About using AutoResizeX/AutoResizeY flags:
118
161
  # - May be combined with SetNextWindowSizeConstraints() to set a min/max size for each axis (see "Demo->Child->Auto-resize with Constraints").
119
162
  # - Size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing.
@@ -122,7 +165,7 @@ ImGuiButtonFlags_MouseButtonMask_ = 7 # ImGuiButtonFlags_MouseButtonLeft | ImGu
122
165
  # - You may also use ImGuiChildFlags_AlwaysAutoResize to force an update even when child window is not in view.
123
166
  # HOWEVER PLEASE UNDERSTAND THAT DOING SO WILL PREVENT BeginChild() FROM EVER RETURNING FALSE, disabling benefits of coarse clipping.
124
167
  ImGuiChildFlags_None = 0 # 0
125
- ImGuiChildFlags_Border = 1 # 1 << 0 # Show an outer border and enable WindowPadding. (IMPORTANT: this is always == 1 == true for legacy reason)
168
+ ImGuiChildFlags_Borders = 1 # 1 << 0 # Show an outer border and enable WindowPadding. (IMPORTANT: this is always == 1 == true for legacy reason)
126
169
  ImGuiChildFlags_AlwaysUseWindowPadding = 2 # 1 << 1 # Pad with style.WindowPadding even if no border are drawn (no padding by default for non-bordered child windows because it makes more sense)
127
170
  ImGuiChildFlags_ResizeX = 4 # 1 << 2 # Allow resize from right border (layout direction). Enable .ini saving (unless ImGuiWindowFlags_NoSavedSettings passed to window flags)
128
171
  ImGuiChildFlags_ResizeY = 8 # 1 << 3 # Allow resize from bottom border (layout direction). "
@@ -130,7 +173,7 @@ 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.
133
- ImGuiChildFlags_NavFlattened = 256 # 1 << 8
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.
134
177
 
135
178
  # ImGuiCol_
136
179
  # Enumeration for PushStyleColor() / PopStyleColor()
@@ -167,13 +210,13 @@ ImGuiCol_SeparatorActive = 29 # 29
167
210
  ImGuiCol_ResizeGrip = 30 # 30 # Resize grip in lower-right and lower-left corners of windows.
168
211
  ImGuiCol_ResizeGripHovered = 31 # 31
169
212
  ImGuiCol_ResizeGripActive = 32 # 32
170
- ImGuiCol_TabHovered = 33 # 33
171
- ImGuiCol_Tab = 34 # 34 # TabItem in a TabBar
172
- ImGuiCol_TabSelected = 35 # 35
173
- ImGuiCol_TabSelectedOverline = 36 # 36
174
- ImGuiCol_TabDimmed = 37 # 37
175
- ImGuiCol_TabDimmedSelected = 38 # 38
176
- ImGuiCol_TabDimmedSelectedOverline = 39 # 39
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
177
220
  ImGuiCol_PlotLines = 40 # 40
178
221
  ImGuiCol_PlotLinesHovered = 41 # 41
179
222
  ImGuiCol_PlotHistogram = 42 # 42
@@ -183,7 +226,7 @@ ImGuiCol_TableBorderStrong = 45 # 45 # Table outer and header borders (p
183
226
  ImGuiCol_TableBorderLight = 46 # 46 # Table inner borders (prefer using Alpha=1.0 here)
184
227
  ImGuiCol_TableRowBg = 47 # 47 # Table row background (even rows)
185
228
  ImGuiCol_TableRowBgAlt = 48 # 48 # Table row background (odd rows)
186
- ImGuiCol_TextLink = 49 # 49
229
+ ImGuiCol_TextLink = 49 # 49 # Hyperlink color
187
230
  ImGuiCol_TextSelectedBg = 50 # 50
188
231
  ImGuiCol_DragDropTarget = 51 # 51 # Rectangle highlighting a drop target
189
232
  ImGuiCol_NavHighlight = 52 # 52 # Gamepad/keyboard: current highlighted item
@@ -254,9 +297,9 @@ ImGuiConfigFlags_NavEnableKeyboard = 1 # 1 << 0 # Master keyboard navigation
254
297
  ImGuiConfigFlags_NavEnableGamepad = 2 # 1 << 1 # Master gamepad navigation enable flag. Backend also needs to set ImGuiBackendFlags_HasGamepad.
255
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.
256
299
  ImGuiConfigFlags_NavNoCaptureKeyboard = 8 # 1 << 3 # Instruct navigation to not set the io.WantCaptureKeyboard flag when io.NavActive is set.
257
- 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.
258
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.
259
- ImGuiConfigFlags_NoKeyboard = 64 # 1 << 6
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.
260
303
  ImGuiConfigFlags_IsSRGB = 1048576 # 1 << 20 # Application is SRGB-aware.
261
304
  ImGuiConfigFlags_IsTouchScreen = 2097152 # 1 << 21 # Application is using a touch screen instead of a mouse.
262
305
 
@@ -272,9 +315,11 @@ ImGuiDataType_S64 = 6 # 6 # long long / __int64
272
315
  ImGuiDataType_U64 = 7 # 7 # unsigned long long / unsigned __int64
273
316
  ImGuiDataType_Float = 8 # 8 # float
274
317
  ImGuiDataType_Double = 9 # 9 # double
275
- ImGuiDataType_COUNT = 10 # 10
318
+ ImGuiDataType_Bool = 10 # 10 # bool (provided for user convenience, not supported by scalar widgets)
319
+ ImGuiDataType_COUNT = 11 # 11
276
320
 
277
321
  # ImGuiDir
322
+ # A cardinal direction
278
323
  ImGuiDir_None = -1 # -1
279
324
  ImGuiDir_Left = 0 # 0
280
325
  ImGuiDir_Right = 1 # 1
@@ -290,9 +335,9 @@ ImGuiDragDropFlags_SourceNoDisableHover = 2 # 1 << 1 # By default, when dr
290
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.
291
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.
292
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.
293
- ImGuiDragDropFlags_PayloadAutoExpire = 32 # 1 << 5
294
- ImGuiDragDropFlags_PayloadNoCrossContext = 64 # 1 << 6
295
- ImGuiDragDropFlags_PayloadNoCrossProcess = 128 # 1 << 7
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.
296
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.
297
342
  ImGuiDragDropFlags_AcceptNoDrawDefaultRect = 2048 # 1 << 11 # Do not draw the default highlight rectangle when hovering over target.
298
343
  ImGuiDragDropFlags_AcceptNoPreviewTooltip = 4096 # 1 << 12 # Request hiding the BeginDragDropSource tooltip from the BeginDragDropTarget site.
@@ -333,17 +378,20 @@ ImGuiHoveredFlags_DelayNormal = 65536 # 1 << 16 # IsItemHovered()
333
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)
334
379
 
335
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)
336
384
  ImGuiInputFlags_None = 0 # 0
337
- ImGuiInputFlags_Repeat = 1 # 1 << 0
338
- ImGuiInputFlags_RouteActive = 1024 # 1 << 10
339
- ImGuiInputFlags_RouteFocused = 2048 # 1 << 11
340
- ImGuiInputFlags_RouteGlobal = 4096 # 1 << 12
341
- ImGuiInputFlags_RouteAlways = 8192 # 1 << 13
342
- ImGuiInputFlags_RouteOverFocused = 16384 # 1 << 14
343
- ImGuiInputFlags_RouteOverActive = 32768 # 1 << 15
344
- ImGuiInputFlags_RouteUnlessBgFocused = 65536 # 1 << 16
345
- ImGuiInputFlags_RouteFromRootWindow = 131072 # 1 << 17
346
- ImGuiInputFlags_Tooltip = 262144 # 1 << 18
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)
347
395
 
348
396
  # ImGuiInputTextFlags_
349
397
  # Flags for ImGui::InputText()
@@ -357,13 +405,13 @@ ImGuiInputTextFlags_CharsNoBlank = 16 # 1 << 4 # Filter out spaces, t
357
405
  ImGuiInputTextFlags_AllowTabInput = 32 # 1 << 5 # Pressing TAB input a '\t' character into the text field
358
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.
359
407
  ImGuiInputTextFlags_EscapeClearsAll = 128 # 1 << 7 # Escape key clears content if not empty, and deactivate otherwise (contrast to default behavior of Escape to revert)
360
- ImGuiInputTextFlags_CtrlEnterForNewLine = 256 # 1 << 8 # In multi-line mode, unfocus with Enter, add new line with Ctrl+Enter (default is opposite: unfocus with Ctrl+Enter, add line with Enter).
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).
361
409
  ImGuiInputTextFlags_ReadOnly = 512 # 1 << 9 # Read-only mode
362
- ImGuiInputTextFlags_Password = 1024 # 1 << 10 # Password mode, display all characters as '*'
410
+ ImGuiInputTextFlags_Password = 1024 # 1 << 10 # Password mode, display all characters as '*', disable copy
363
411
  ImGuiInputTextFlags_AlwaysOverwrite = 2048 # 1 << 11 # Overwrite mode
364
412
  ImGuiInputTextFlags_AutoSelectAll = 4096 # 1 << 12 # Select entire text when first taking mouse focus
365
- ImGuiInputTextFlags_ParseEmptyRefVal = 8192 # 1 << 13
366
- ImGuiInputTextFlags_DisplayEmptyRefVal = 16384 # 1 << 14
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.
367
415
  ImGuiInputTextFlags_NoHorizontalScroll = 32768 # 1 << 15 # Disable following the cursor horizontally
368
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().
369
417
  ImGuiInputTextFlags_CallbackCompletion = 131072 # 1 << 17 # Callback on pressing TAB (for completion handling)
@@ -373,6 +421,16 @@ ImGuiInputTextFlags_CallbackCharFilter = 1048576 # 1 << 20 # Callback on charact
373
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)
374
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)
375
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.
433
+
376
434
  # ImGuiKey
377
435
  # A key identifier (ImGuiKey_XXX or ImGuiMod_XXX value): can represent Keyboard, Mouse and Gamepad values.
378
436
  # All our named keys are >= 512. Keys value 0 to 511 are left unused as legacy native/opaque key values (< 1.87).
@@ -537,11 +595,11 @@ ImGuiKey_ReservedForModAlt = 664 # 664
537
595
  ImGuiKey_ReservedForModSuper = 665 # 665
538
596
  ImGuiKey_COUNT = 666 # 666
539
597
  ImGuiMod_None = 0 # 0
540
- ImGuiMod_Ctrl = 4096 # 1 << 12 # Ctrl
598
+ ImGuiMod_Ctrl = 4096 # 1 << 12 # Ctrl (non-macOS), Cmd (macOS)
541
599
  ImGuiMod_Shift = 8192 # 1 << 13 # Shift
542
600
  ImGuiMod_Alt = 16384 # 1 << 14 # Option/Menu
543
- ImGuiMod_Super = 32768 # 1 << 15 # Cmd/Super/Windows
544
- ImGuiMod_Mask_ = 61440 # 0xF000 # 5-bits
601
+ ImGuiMod_Super = 32768 # 1 << 15 # Windows/Super (non-macOS), Ctrl (macOS)
602
+ ImGuiMod_Mask_ = 61440 # 0xF000 # 4-bits
545
603
  ImGuiKey_NamedKey_BEGIN = 512 # 512
546
604
  ImGuiKey_NamedKey_END = 666 # ImGuiKey_COUNT
547
605
  ImGuiKey_NamedKey_COUNT = 154 # ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN
@@ -581,6 +639,26 @@ ImGuiMouseSource_TouchScreen = 1 # 1 # Input is coming from a touch screen (no h
581
639
  ImGuiMouseSource_Pen = 2 # 2 # Input is coming from a pressure/magnetic pen (often used in conjunction with high-sampling rates).
582
640
  ImGuiMouseSource_COUNT = 3 # 3
583
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
+
584
662
  # ImGuiPopupFlags_
585
663
  # Flags for OpenPopup*(), BeginPopupContext*(), IsPopupOpen() functions.
586
664
  # - To be backward compatible with older API which took an 'int mouse_button = 1' argument instead of 'ImGuiPopupFlags flags',
@@ -605,12 +683,19 @@ ImGuiPopupFlags_AnyPopup = 3072 # ImGuiPopupFlags_AnyPopupId | ImG
605
683
 
606
684
  # ImGuiSelectableFlags_
607
685
  # Flags for ImGui::Selectable()
608
- ImGuiSelectableFlags_None = 0 # 0
609
- ImGuiSelectableFlags_DontClosePopups = 1 # 1 << 0 # Clicking this doesn't close parent popup window
610
- ImGuiSelectableFlags_SpanAllColumns = 2 # 1 << 1 # Frame will span all columns of its container table (text will still fit in current column)
611
- ImGuiSelectableFlags_AllowDoubleClick = 4 # 1 << 2 # Generate press events on double clicks too
612
- ImGuiSelectableFlags_Disabled = 8 # 1 << 3 # Cannot be selected, display grayed out text
613
- 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.
614
699
 
615
700
  # ImGuiSliderFlags_
616
701
  # Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc.
@@ -619,15 +704,16 @@ ImGuiSelectableFlags_AllowOverlap = 16 # 1 << 4 # (WIP) Hit testing to allow
619
704
  ImGuiSliderFlags_None = 0 # 0
620
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.
621
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.
622
- 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)
623
- ImGuiSliderFlags_NoInput = 128 # 1 << 7 # Disable CTRL+Click or Enter key allowing to input text directly into the widget
624
- ImGuiSliderFlags_WrapAround = 256 # 1 << 8
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.
625
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.
626
711
 
627
712
  # ImGuiSortDirection
713
+ # A sorting direction
628
714
  ImGuiSortDirection_None = 0 # 0
629
- ImGuiSortDirection_Ascending = 1 # 1
630
- ImGuiSortDirection_Descending = 2 # 2
715
+ ImGuiSortDirection_Ascending = 1 # 1 # Ascending = 0->9, A->Z etc.
716
+ ImGuiSortDirection_Descending = 2 # 2 # Descending = 9->0, Z->A etc.
631
717
 
632
718
  # ImGuiStyleVar_
633
719
  # Enumeration for PushStyleVar() / PopStyleVar() to temporarily modify the ImGuiStyle structure.
@@ -663,14 +749,15 @@ ImGuiStyleVar_GrabRounding = 21 # 21 # float GrabRounding
663
749
  ImGuiStyleVar_TabRounding = 22 # 22 # float TabRounding
664
750
  ImGuiStyleVar_TabBorderSize = 23 # 23 # float TabBorderSize
665
751
  ImGuiStyleVar_TabBarBorderSize = 24 # 24 # float TabBarBorderSize
666
- ImGuiStyleVar_TableAngledHeadersAngle = 25 # 25 # float TableAngledHeadersAngle
667
- ImGuiStyleVar_TableAngledHeadersTextAlign = 26 # 26
668
- ImGuiStyleVar_ButtonTextAlign = 27 # 27 # ImVec2 ButtonTextAlign
669
- ImGuiStyleVar_SelectableTextAlign = 28 # 28 # ImVec2 SelectableTextAlign
670
- ImGuiStyleVar_SeparatorTextBorderSize = 29 # 29 # float SeparatorTextBorderSize
671
- ImGuiStyleVar_SeparatorTextAlign = 30 # 30 # ImVec2 SeparatorTextAlign
672
- ImGuiStyleVar_SeparatorTextPadding = 31 # 31 # ImVec2 SeparatorTextPadding
673
- ImGuiStyleVar_COUNT = 32 # 32
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
674
761
 
675
762
  # ImGuiTabBarFlags_
676
763
  # Flags for ImGui::BeginTabBar()
@@ -681,7 +768,7 @@ ImGuiTabBarFlags_TabListPopupButton = 4 # 1 << 2 # Disable buttons to
681
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.
682
769
  ImGuiTabBarFlags_NoTabListScrollingButtons = 16 # 1 << 4 # Disable scrolling buttons (apply when fitting policy is ImGuiTabBarFlags_FittingPolicyScroll)
683
770
  ImGuiTabBarFlags_NoTooltip = 32 # 1 << 5 # Disable tooltips when hovering a tab
684
- ImGuiTabBarFlags_DrawSelectedOverline = 64 # 1 << 6
771
+ ImGuiTabBarFlags_DrawSelectedOverline = 64 # 1 << 6 # Draw selected overline markers over selected tab
685
772
  ImGuiTabBarFlags_FittingPolicyResizeDown = 128 # 1 << 7 # Resize tabs when they don't fit
686
773
  ImGuiTabBarFlags_FittingPolicyScroll = 256 # 1 << 8 # Add scroll buttons when tabs don't fit
687
774
  ImGuiTabBarFlags_FittingPolicyMask_ = 384 # ImGuiTabBarFlags_FittingPolicyResizeDown | ImGuiTabBarFlags_FittingPolicyScroll
@@ -730,7 +817,7 @@ ImGuiTableColumnFlags_NoClip = 256 # 1 << 8 # Disable clipping f
730
817
  ImGuiTableColumnFlags_NoSort = 512 # 1 << 9 # Disable ability to sort on this field (even if ImGuiTableFlags_Sortable is set on the table).
731
818
  ImGuiTableColumnFlags_NoSortAscending = 1024 # 1 << 10 # Disable ability to sort in the ascending direction.
732
819
  ImGuiTableColumnFlags_NoSortDescending = 2048 # 1 << 11 # Disable ability to sort in the descending direction.
733
- ImGuiTableColumnFlags_NoHeaderLabel = 4096 # 1 << 12 # TableHeadersRow() will not submit horizontal label for this column. Convenient for some small columns. Name will still appear in context menu or in angled headers.
820
+ ImGuiTableColumnFlags_NoHeaderLabel = 4096 # 1 << 12 # TableHeadersRow() will submit an empty label for this column. Convenient for some small columns. Name will still appear in context menu or in angled headers. You may append into this cell by calling TableSetColumnIndex() right after the TableHeadersRow() call.
734
821
  ImGuiTableColumnFlags_NoHeaderWidth = 8192 # 1 << 13 # Disable header text width contribution to automatic column width.
735
822
  ImGuiTableColumnFlags_PreferSortAscending = 16384 # 1 << 14 # Make the initial sort direction Ascending when first sorting on this column (default).
736
823
  ImGuiTableColumnFlags_PreferSortDescending = 32768 # 1 << 15 # Make the initial sort direction Descending when first sorting on this column.
@@ -821,14 +908,14 @@ ImGuiTreeNodeFlags_AllowOverlap = 4 # 1 << 2 # Hit testing to allow
821
908
  ImGuiTreeNodeFlags_NoTreePushOnOpen = 8 # 1 << 3 # Don't do a TreePush() when open (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack
822
909
  ImGuiTreeNodeFlags_NoAutoOpenOnLog = 16 # 1 << 4 # Don't automatically and temporarily open node when Logging is active (by default logging will automatically open tree nodes)
823
910
  ImGuiTreeNodeFlags_DefaultOpen = 32 # 1 << 5 # Default node to be open
824
- ImGuiTreeNodeFlags_OpenOnDoubleClick = 64 # 1 << 6 # Need double-click to open node
825
- 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.
911
+ ImGuiTreeNodeFlags_OpenOnDoubleClick = 64 # 1 << 6 # Open on double-click instead of simple click (default for multi-select unless any _OpenOnXXX behavior is set explicitly). Both behaviors may be combined.
912
+ ImGuiTreeNodeFlags_OpenOnArrow = 128 # 1 << 7 # Open when clicking on the arrow part (default for multi-select unless any _OpenOnXXX behavior is set explicitly). Both behaviors may be combined.
826
913
  ImGuiTreeNodeFlags_Leaf = 256 # 1 << 8 # No collapsing, no arrow (use as a convenience for leaf nodes).
827
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!
828
- 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().
829
- 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.
830
- ImGuiTreeNodeFlags_SpanFullWidth = 4096 # 1 << 12 # Extend hit box to the left-most and right-most edges (bypass the indented area).
831
- ImGuiTreeNodeFlags_SpanTextWidth = 8192 # 1 << 13
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.
832
919
  ImGuiTreeNodeFlags_SpanAllColumns = 16384 # 1 << 14 # Frame will span all columns of its container table (text will still fit in current column)
833
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)
834
921
  ImGuiTreeNodeFlags_CollapsingHeader = 26 # ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog
@@ -838,7 +925,7 @@ ImGuiTreeNodeFlags_CollapsingHeader = 26 # ImGuiTreeNodeFlags_Framed | Im
838
925
  ImGuiViewportFlags_None = 0 # 0
839
926
  ImGuiViewportFlags_IsPlatformWindow = 1 # 1 << 0 # Represent a Platform Window
840
927
  ImGuiViewportFlags_IsPlatformMonitor = 2 # 1 << 1 # Represent a Platform Monitor (unused yet)
841
- ImGuiViewportFlags_OwnedByApp = 4 # 1 << 2 # Platform Window: is created/managed by the application (rather than a dear imgui backend)
928
+ ImGuiViewportFlags_OwnedByApp = 4 # 1 << 2 # Platform Window: Is created/managed by the user application? (rather than our backend)
842
929
 
843
930
  # ImGuiWindowFlags_
844
931
  # Flags for ImGui::Begin()
@@ -1284,6 +1371,10 @@ class ImDrawList < FFI::Struct
1284
1371
  ImGui::ImDrawList__ResetForNewFrame(self)
1285
1372
  end
1286
1373
 
1374
+ def _SetTextureID(texture_id)
1375
+ ImGui::ImDrawList__SetTextureID(self, texture_id)
1376
+ end
1377
+
1287
1378
  def _TryMergeDrawCmds()
1288
1379
  ImGui::ImDrawList__TryMergeDrawCmds(self)
1289
1380
  end
@@ -1475,7 +1566,7 @@ class ImGuiKeyData < FFI::Struct
1475
1566
  end
1476
1567
 
1477
1568
  # - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows.
1478
- # - In 'docking' branch with multi-viewport enabled, we extend this concept to have multiple active viewports.
1569
+ # - With multi-viewport enabled, we extend this concept to have multiple active viewports.
1479
1570
  # - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode.
1480
1571
  # - About Main Area vs Work Area:
1481
1572
  # - Main Area = entire viewport.
@@ -1515,6 +1606,81 @@ class ImGuiViewport < FFI::Struct
1515
1606
 
1516
1607
  end
1517
1608
 
1609
+ # Helper: Key->Value storage
1610
+ # Typically you don't have to worry about this since a storage is held within each Window.
1611
+ # We use it to e.g. store collapse state for a tree (Int 0/1)
1612
+ # This is optimized for efficient lookup (dichotomy into a contiguous buffer) and rare insertion (typically tied to user interactions aka max once a frame)
1613
+ # You can use it as custom user storage for temporary values. Declare your own storage if, for example:
1614
+ # - 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).
1615
+ # - You want to store custom debug data easily without adding or editing structures in your code (probably not efficient, but convenient)
1616
+ # Types are NOT stored, so it is up to you to make sure your Key don't collide with different types.
1617
+ class ImGuiStorage < FFI::Struct
1618
+ layout(
1619
+ :Data, ImVector.by_value
1620
+ )
1621
+
1622
+ def BuildSortByKey()
1623
+ ImGui::ImGuiStorage_BuildSortByKey(self)
1624
+ end
1625
+
1626
+ def Clear()
1627
+ ImGui::ImGuiStorage_Clear(self)
1628
+ end
1629
+
1630
+ def GetBool(key, default_val = false)
1631
+ ImGui::ImGuiStorage_GetBool(self, key, default_val)
1632
+ end
1633
+
1634
+ def GetBoolRef(key, default_val = false)
1635
+ ImGui::ImGuiStorage_GetBoolRef(self, key, default_val)
1636
+ end
1637
+
1638
+ def GetFloat(key, default_val = 0.0)
1639
+ ImGui::ImGuiStorage_GetFloat(self, key, default_val)
1640
+ end
1641
+
1642
+ def GetFloatRef(key, default_val = 0.0)
1643
+ ImGui::ImGuiStorage_GetFloatRef(self, key, default_val)
1644
+ end
1645
+
1646
+ def GetInt(key, default_val = 0)
1647
+ ImGui::ImGuiStorage_GetInt(self, key, default_val)
1648
+ end
1649
+
1650
+ def GetIntRef(key, default_val = 0)
1651
+ ImGui::ImGuiStorage_GetIntRef(self, key, default_val)
1652
+ end
1653
+
1654
+ def GetVoidPtr(key)
1655
+ ImGui::ImGuiStorage_GetVoidPtr(self, key)
1656
+ end
1657
+
1658
+ def GetVoidPtrRef(key, default_val = nil)
1659
+ ImGui::ImGuiStorage_GetVoidPtrRef(self, key, default_val)
1660
+ end
1661
+
1662
+ def SetAllInt(val)
1663
+ ImGui::ImGuiStorage_SetAllInt(self, val)
1664
+ end
1665
+
1666
+ def SetBool(key, val)
1667
+ ImGui::ImGuiStorage_SetBool(self, key, val)
1668
+ end
1669
+
1670
+ def SetFloat(key, val)
1671
+ ImGui::ImGuiStorage_SetFloat(self, key, val)
1672
+ end
1673
+
1674
+ def SetInt(key, val)
1675
+ ImGui::ImGuiStorage_SetInt(self, key, val)
1676
+ end
1677
+
1678
+ def SetVoidPtr(key, val)
1679
+ ImGui::ImGuiStorage_SetVoidPtr(self, key, val)
1680
+ end
1681
+
1682
+ end
1683
+
1518
1684
  # Helper: ImColor() implicitly converts colors to either ImU32 (packed 4x1 byte) or ImVec4 (4x1 float)
1519
1685
  # Prefer using IM_COL32() macros if you want a guaranteed compile-time ImU32 for usage with ImDrawList API.
1520
1686
  # **Avoid storing ImColor! Store either u32 of ImVec4. This is not a full-featured color class. MAY OBSOLETE.
@@ -1811,6 +1977,7 @@ class ImGuiIO < FFI::Struct
1811
1977
  :DisplayFramebufferScale, ImVec2.by_value,
1812
1978
  :MouseDrawCursor, :bool,
1813
1979
  :ConfigMacOSXBehaviors, :bool,
1980
+ :ConfigNavSwapGamepadButtons, :bool,
1814
1981
  :ConfigInputTrickleEventQueue, :bool,
1815
1982
  :ConfigInputTextCursorBlink, :bool,
1816
1983
  :ConfigInputTextEnterKeepActive, :bool,
@@ -1833,13 +2000,6 @@ class ImGuiIO < FFI::Struct
1833
2000
  :BackendPlatformUserData, :pointer,
1834
2001
  :BackendRendererUserData, :pointer,
1835
2002
  :BackendLanguageUserData, :pointer,
1836
- :GetClipboardTextFn, :pointer,
1837
- :SetClipboardTextFn, :pointer,
1838
- :ClipboardUserData, :pointer,
1839
- :PlatformOpenInShellFn, :pointer,
1840
- :PlatformOpenInShellUserData, :pointer,
1841
- :PlatformSetImeDataFn, :pointer,
1842
- :PlatformLocaleDecimalPoint, :ushort,
1843
2003
  :WantCaptureMouse, :bool,
1844
2004
  :WantCaptureKeyboard, :bool,
1845
2005
  :WantTextInput, :bool,
@@ -2044,6 +2204,7 @@ class ImGuiListClipper < FFI::Struct
2044
2204
  :ItemsCount, :int,
2045
2205
  :ItemsHeight, :float,
2046
2206
  :StartPosY, :float,
2207
+ :StartSeekOffsetY, :double,
2047
2208
  :TempData, :pointer
2048
2209
  )
2049
2210
 
@@ -2067,6 +2228,10 @@ class ImGuiListClipper < FFI::Struct
2067
2228
  ImGui::ImGuiListClipper_IncludeItemsByIndex(self, item_begin, item_end)
2068
2229
  end
2069
2230
 
2231
+ def SeekCursorForItem(item_index)
2232
+ ImGui::ImGuiListClipper_SeekCursorForItem(self, item_index)
2233
+ end
2234
+
2070
2235
  def Step()
2071
2236
  ImGui::ImGuiListClipper_Step(self)
2072
2237
  end
@@ -2077,6 +2242,22 @@ class ImGuiListClipper < FFI::Struct
2077
2242
 
2078
2243
  end
2079
2244
 
2245
+ # Main IO structure returned by BeginMultiSelect()/EndMultiSelect().
2246
+ # This mainly contains a list of selection requests.
2247
+ # - Use 'Demo->Tools->Debug Log->Selection' to see requests as they happen.
2248
+ # - Some fields are only useful if your list is dynamic and allows deletion (getting post-deletion focus/state right is shown in the demo)
2249
+ # - Below: who reads/writes each fields? 'r'=read, 'w'=write, 'ms'=multi-select code, 'app'=application/user code.
2250
+ class ImGuiMultiSelectIO < FFI::Struct
2251
+ layout(
2252
+ :Requests, ImVector.by_value,
2253
+ :RangeSrcItem, :int64,
2254
+ :NavIdItem, :int64,
2255
+ :NavIdSelected, :bool,
2256
+ :RangeSrcReset, :bool,
2257
+ :ItemsCount, :int
2258
+ )
2259
+ end
2260
+
2080
2261
  # Data payload for Drag and Drop operations: AcceptDragDropPayload(), GetDragDropPayload()
2081
2262
  class ImGuiPayload < FFI::Struct
2082
2263
  layout(
@@ -2116,7 +2297,7 @@ class ImGuiPayload < FFI::Struct
2116
2297
 
2117
2298
  end
2118
2299
 
2119
- # (Optional) Support for IME (Input Method Editor) via the io.SetPlatformImeDataFn() function.
2300
+ # (Optional) Support for IME (Input Method Editor) via the platform_io.Platform_SetImeDataFn() function.
2120
2301
  class ImGuiPlatformImeData < FFI::Struct
2121
2302
  layout(
2122
2303
  :WantVisible, :bool,
@@ -2134,90 +2315,112 @@ class ImGuiPlatformImeData < FFI::Struct
2134
2315
 
2135
2316
  end
2136
2317
 
2137
- # Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin().
2138
- # NB: For basic min/max size constraint on each axis you don't need to use the callback! The SetNextWindowSizeConstraints() parameters are enough.
2139
- class ImGuiSizeCallbackData < FFI::Struct
2318
+ # Optional helper to store multi-selection state + apply multi-selection requests.
2319
+ # - Used by our demos and provided as a convenience to easily implement basic multi-selection.
2320
+ # - Iterate selection with 'void* it = NULL; ImGuiID id; while (selection.GetNextSelectedItem(&it, &id)) { ... }'
2321
+ # Or you can check 'if (Contains(id)) { ... }' for each possible object if their number is not too high to iterate.
2322
+ # - USING THIS IS NOT MANDATORY. This is only a helper and not a required API.
2323
+ # To store a multi-selection, in your application you could:
2324
+ # - Use this helper as a convenience. We use our simple key->value ImGuiStorage as a std::set<ImGuiID> replacement.
2325
+ # - Use your own external storage: e.g. std::set<MyObjectId>, std::vector<MyObjectId>, interval trees, intrusively stored selection etc.
2326
+ # In ImGuiSelectionBasicStorage we:
2327
+ # - always use indices in the multi-selection API (passed to SetNextItemSelectionUserData(), retrieved in ImGuiMultiSelectIO)
2328
+ # - use the AdapterIndexToStorageId() indirection layer to abstract how persistent selection data is derived from an index.
2329
+ # - use decently optimized logic to allow queries and insertion of very large selection sets.
2330
+ # - do not preserve selection order.
2331
+ # Many combinations are possible depending on how you prefer to store your items and how you prefer to store your selection.
2332
+ # Large applications are likely to eventually want to get rid of this indirection layer and do their own thing.
2333
+ # See https://github.com/ocornut/imgui/wiki/Multi-Select for details and pseudo-code using this helper.
2334
+ class ImGuiSelectionBasicStorage < FFI::Struct
2140
2335
  layout(
2336
+ :Size, :int,
2337
+ :PreserveOrder, :bool,
2141
2338
  :UserData, :pointer,
2142
- :Pos, ImVec2.by_value,
2143
- :CurrentSize, ImVec2.by_value,
2144
- :DesiredSize, ImVec2.by_value
2145
- )
2146
- end
2147
-
2148
- # Helper: Key->Value storage
2149
- # Typically you don't have to worry about this since a storage is held within each Window.
2150
- # We use it to e.g. store collapse state for a tree (Int 0/1)
2151
- # This is optimized for efficient lookup (dichotomy into a contiguous buffer) and rare insertion (typically tied to user interactions aka max once a frame)
2152
- # You can use it as custom user storage for temporary values. Declare your own storage if, for example:
2153
- # - 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).
2154
- # - You want to store custom debug data easily without adding or editing structures in your code (probably not efficient, but convenient)
2155
- # Types are NOT stored, so it is up to you to make sure your Key don't collide with different types.
2156
- class ImGuiStorage < FFI::Struct
2157
- layout(
2158
- :Data, ImVector.by_value
2339
+ :AdapterIndexToStorageId, :pointer,
2340
+ :_SelectionOrder, :int,
2341
+ :_Storage, ImGuiStorage.by_value
2159
2342
  )
2160
2343
 
2161
- def BuildSortByKey()
2162
- ImGui::ImGuiStorage_BuildSortByKey(self)
2344
+ def ApplyRequests(ms_io)
2345
+ ImGui::ImGuiSelectionBasicStorage_ApplyRequests(self, ms_io)
2163
2346
  end
2164
2347
 
2165
2348
  def Clear()
2166
- ImGui::ImGuiStorage_Clear(self)
2349
+ ImGui::ImGuiSelectionBasicStorage_Clear(self)
2167
2350
  end
2168
2351
 
2169
- def GetBool(key, default_val = false)
2170
- ImGui::ImGuiStorage_GetBool(self, key, default_val)
2352
+ def Contains(id)
2353
+ ImGui::ImGuiSelectionBasicStorage_Contains(self, id)
2171
2354
  end
2172
2355
 
2173
- def GetBoolRef(key, default_val = false)
2174
- ImGui::ImGuiStorage_GetBoolRef(self, key, default_val)
2356
+ def GetNextSelectedItem(opaque_it, out_id)
2357
+ ImGui::ImGuiSelectionBasicStorage_GetNextSelectedItem(self, opaque_it, out_id)
2175
2358
  end
2176
2359
 
2177
- def GetFloat(key, default_val = 0.0)
2178
- ImGui::ImGuiStorage_GetFloat(self, key, default_val)
2360
+ def GetStorageIdFromIndex(idx)
2361
+ ImGui::ImGuiSelectionBasicStorage_GetStorageIdFromIndex(self, idx)
2179
2362
  end
2180
2363
 
2181
- def GetFloatRef(key, default_val = 0.0)
2182
- ImGui::ImGuiStorage_GetFloatRef(self, key, default_val)
2364
+ def self.create()
2365
+ return ImGuiSelectionBasicStorage.new(ImGui::ImGuiSelectionBasicStorage_ImGuiSelectionBasicStorage())
2183
2366
  end
2184
2367
 
2185
- def GetInt(key, default_val = 0)
2186
- ImGui::ImGuiStorage_GetInt(self, key, default_val)
2368
+ def SetItemSelected(id, selected)
2369
+ ImGui::ImGuiSelectionBasicStorage_SetItemSelected(self, id, selected)
2187
2370
  end
2188
2371
 
2189
- def GetIntRef(key, default_val = 0)
2190
- ImGui::ImGuiStorage_GetIntRef(self, key, default_val)
2372
+ def Swap(r)
2373
+ ImGui::ImGuiSelectionBasicStorage_Swap(self, r)
2191
2374
  end
2192
2375
 
2193
- def GetVoidPtr(key)
2194
- ImGui::ImGuiStorage_GetVoidPtr(self, key)
2376
+ def destroy()
2377
+ ImGui::ImGuiSelectionBasicStorage_destroy(self)
2195
2378
  end
2196
2379
 
2197
- def GetVoidPtrRef(key, default_val = nil)
2198
- ImGui::ImGuiStorage_GetVoidPtrRef(self, key, default_val)
2199
- end
2380
+ end
2200
2381
 
2201
- def SetAllInt(val)
2202
- ImGui::ImGuiStorage_SetAllInt(self, val)
2203
- end
2382
+ # Optional helper to apply multi-selection requests to existing randomly accessible storage.
2383
+ # Convenient if you want to quickly wire multi-select API on e.g. an array of bool or items storing their own selection state.
2384
+ class ImGuiSelectionExternalStorage < FFI::Struct
2385
+ layout(
2386
+ :UserData, :pointer,
2387
+ :AdapterSetItemSelected, :pointer
2388
+ )
2204
2389
 
2205
- def SetBool(key, val)
2206
- ImGui::ImGuiStorage_SetBool(self, key, val)
2390
+ def ApplyRequests(ms_io)
2391
+ ImGui::ImGuiSelectionExternalStorage_ApplyRequests(self, ms_io)
2207
2392
  end
2208
2393
 
2209
- def SetFloat(key, val)
2210
- ImGui::ImGuiStorage_SetFloat(self, key, val)
2394
+ def self.create()
2395
+ return ImGuiSelectionExternalStorage.new(ImGui::ImGuiSelectionExternalStorage_ImGuiSelectionExternalStorage())
2211
2396
  end
2212
2397
 
2213
- def SetInt(key, val)
2214
- ImGui::ImGuiStorage_SetInt(self, key, val)
2398
+ def destroy()
2399
+ ImGui::ImGuiSelectionExternalStorage_destroy(self)
2215
2400
  end
2216
2401
 
2217
- def SetVoidPtr(key, val)
2218
- ImGui::ImGuiStorage_SetVoidPtr(self, key, val)
2219
- end
2402
+ end
2403
+
2404
+ # Selection request item
2405
+ class ImGuiSelectionRequest < FFI::Struct
2406
+ layout(
2407
+ :Type, :ImGuiSelectionRequestType,
2408
+ :Selected, :bool,
2409
+ :RangeDirection, :char,
2410
+ :RangeFirstItem, :int64,
2411
+ :RangeLastItem, :int64
2412
+ )
2413
+ end
2220
2414
 
2415
+ # Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin().
2416
+ # NB: For basic min/max size constraint on each axis you don't need to use the callback! The SetNextWindowSizeConstraints() parameters are enough.
2417
+ class ImGuiSizeCallbackData < FFI::Struct
2418
+ layout(
2419
+ :UserData, :pointer,
2420
+ :Pos, ImVec2.by_value,
2421
+ :CurrentSize, ImVec2.by_value,
2422
+ :DesiredSize, ImVec2.by_value
2423
+ )
2221
2424
  end
2222
2425
 
2223
2426
  class ImGuiStyle < FFI::Struct
@@ -2252,6 +2455,7 @@ class ImGuiStyle < FFI::Struct
2252
2455
  :TabBorderSize, :float,
2253
2456
  :TabMinWidthForCloseButton, :float,
2254
2457
  :TabBarBorderSize, :float,
2458
+ :TabBarOverlineSize, :float,
2255
2459
  :TableAngledHeadersAngle, :float,
2256
2460
  :TableAngledHeadersTextAlign, ImVec2.by_value,
2257
2461
  :ColorButtonPosition, :int,
@@ -2449,6 +2653,7 @@ class ImGuiTextRange < FFI::Struct
2449
2653
 
2450
2654
  end
2451
2655
 
2656
+ # [Internal] Key+Value for ImGuiStorage
2452
2657
  class ImGuiStoragePair < FFI::Struct
2453
2658
  layout(
2454
2659
  :key, :uint,
@@ -2605,6 +2810,7 @@ module ImGui
2605
2810
  [:ImDrawList__PathArcToN, [:pointer, ImVec2.by_value, :float, :float, :float, :int], :void],
2606
2811
  [:ImDrawList__PopUnusedDrawCmd, [:pointer], :void],
2607
2812
  [:ImDrawList__ResetForNewFrame, [:pointer], :void],
2813
+ [:ImDrawList__SetTextureID, [:pointer, :pointer], :void],
2608
2814
  [:ImDrawList__TryMergeDrawCmds, [:pointer], :void],
2609
2815
  [:ImDrawList_destroy, [:pointer], :void],
2610
2816
  [:ImFontAtlasCustomRect_ImFontAtlasCustomRect, [], :pointer],
@@ -2699,6 +2905,7 @@ module ImGui
2699
2905
  [:ImGuiListClipper_ImGuiListClipper, [], :pointer],
2700
2906
  [:ImGuiListClipper_IncludeItemByIndex, [:pointer, :int], :void],
2701
2907
  [:ImGuiListClipper_IncludeItemsByIndex, [:pointer, :int, :int], :void],
2908
+ [:ImGuiListClipper_SeekCursorForItem, [:pointer, :int], :void],
2702
2909
  [:ImGuiListClipper_Step, [:pointer], :bool],
2703
2910
  [:ImGuiListClipper_destroy, [:pointer], :void],
2704
2911
  [:ImGuiOnceUponAFrame_ImGuiOnceUponAFrame, [], :pointer],
@@ -2709,8 +2916,22 @@ module ImGui
2709
2916
  [:ImGuiPayload_IsDelivery, [:pointer], :bool],
2710
2917
  [:ImGuiPayload_IsPreview, [:pointer], :bool],
2711
2918
  [:ImGuiPayload_destroy, [:pointer], :void],
2919
+ [:ImGuiPlatformIO_ImGuiPlatformIO, [], :pointer],
2920
+ [:ImGuiPlatformIO_destroy, [:pointer], :void],
2712
2921
  [:ImGuiPlatformImeData_ImGuiPlatformImeData, [], :pointer],
2713
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],
2714
2935
  [:ImGuiStoragePair_ImGuiStoragePair_Int, [:uint, :int], :pointer],
2715
2936
  [:ImGuiStoragePair_ImGuiStoragePair_Float, [:uint, :float], :pointer],
2716
2937
  [:ImGuiStoragePair_ImGuiStoragePair_Ptr, [:uint, :pointer], :pointer],
@@ -2780,6 +3001,7 @@ module ImGui
2780
3001
  [:igBeginMainMenuBar, [], :bool],
2781
3002
  [:igBeginMenu, [:pointer, :bool], :bool],
2782
3003
  [:igBeginMenuBar, [], :bool],
3004
+ [:igBeginMultiSelect, [:int, :int, :int], :pointer],
2783
3005
  [:igBeginPopup, [:pointer, :int], :bool],
2784
3006
  [:igBeginPopupContextItem, [:pointer, :int], :bool],
2785
3007
  [:igBeginPopupContextVoid, [:pointer, :int], :bool],
@@ -2845,6 +3067,7 @@ module ImGui
2845
3067
  [:igEndMainMenuBar, [], :void],
2846
3068
  [:igEndMenu, [], :void],
2847
3069
  [:igEndMenuBar, [], :void],
3070
+ [:igEndMultiSelect, [], :pointer],
2848
3071
  [:igEndPopup, [], :void],
2849
3072
  [:igEndTabBar, [], :void],
2850
3073
  [:igEndTabItem, [], :void],
@@ -2861,7 +3084,6 @@ module ImGui
2861
3084
  [:igGetColumnWidth, [:int], :float],
2862
3085
  [:igGetColumnsCount, [], :int],
2863
3086
  [:igGetContentRegionAvail, [:pointer], :void],
2864
- [:igGetContentRegionMax, [:pointer], :void],
2865
3087
  [:igGetCurrentContext, [], :pointer],
2866
3088
  [:igGetCursorPos, [:pointer], :void],
2867
3089
  [:igGetCursorPosX, [], :float],
@@ -2881,6 +3103,7 @@ module ImGui
2881
3103
  [:igGetID_Str, [:pointer], :uint],
2882
3104
  [:igGetID_StrStr, [:pointer, :pointer], :uint],
2883
3105
  [:igGetID_Ptr, [:pointer], :uint],
3106
+ [:igGetID_Int, [:int], :uint],
2884
3107
  [:igGetIO, [], :pointer],
2885
3108
  [:igGetItemID, [], :uint],
2886
3109
  [:igGetItemRectMax, [:pointer], :void],
@@ -2894,6 +3117,7 @@ module ImGui
2894
3117
  [:igGetMouseDragDelta, [:pointer, :int, :float], :void],
2895
3118
  [:igGetMousePos, [:pointer], :void],
2896
3119
  [:igGetMousePosOnOpeningCurrentPopup, [:pointer], :void],
3120
+ [:igGetPlatformIO, [], :pointer],
2897
3121
  [:igGetScrollMaxX, [], :float],
2898
3122
  [:igGetScrollMaxY, [], :float],
2899
3123
  [:igGetScrollX, [], :float],
@@ -2907,8 +3131,6 @@ module ImGui
2907
3131
  [:igGetTime, [], :double],
2908
3132
  [:igGetTreeNodeToLabelSpacing, [], :float],
2909
3133
  [:igGetVersion, [], :pointer],
2910
- [:igGetWindowContentRegionMax, [:pointer], :void],
2911
- [:igGetWindowContentRegionMin, [:pointer], :void],
2912
3134
  [:igGetWindowDrawList, [], :pointer],
2913
3135
  [:igGetWindowHeight, [], :float],
2914
3136
  [:igGetWindowPos, [:pointer], :void],
@@ -2945,6 +3167,7 @@ module ImGui
2945
3167
  [:igIsItemFocused, [], :bool],
2946
3168
  [:igIsItemHovered, [:int], :bool],
2947
3169
  [:igIsItemToggledOpen, [], :bool],
3170
+ [:igIsItemToggledSelection, [], :bool],
2948
3171
  [:igIsItemVisible, [], :bool],
2949
3172
  [:igIsKeyChordPressed, [:int], :bool],
2950
3173
  [:igIsKeyDown, [:int], :bool],
@@ -2989,29 +3212,29 @@ module ImGui
2989
3212
  [:igPlotHistogram_FnFloatPtr, [:pointer, :pointer, :pointer, :int, :int, :pointer, :float, :float, ImVec2.by_value], :void],
2990
3213
  [:igPlotLines_FloatPtr, [:pointer, :pointer, :int, :int, :pointer, :float, :float, ImVec2.by_value, :int], :void],
2991
3214
  [:igPlotLines_FnFloatPtr, [:pointer, :pointer, :pointer, :int, :int, :pointer, :float, :float, ImVec2.by_value], :void],
2992
- [:igPopButtonRepeat, [], :void],
2993
3215
  [:igPopClipRect, [], :void],
2994
3216
  [:igPopFont, [], :void],
2995
3217
  [:igPopID, [], :void],
3218
+ [:igPopItemFlag, [], :void],
2996
3219
  [:igPopItemWidth, [], :void],
2997
3220
  [:igPopStyleColor, [:int], :void],
2998
3221
  [:igPopStyleVar, [:int], :void],
2999
- [:igPopTabStop, [], :void],
3000
3222
  [:igPopTextWrapPos, [], :void],
3001
3223
  [:igProgressBar, [:float, ImVec2.by_value, :pointer], :void],
3002
- [:igPushButtonRepeat, [:bool], :void],
3003
3224
  [:igPushClipRect, [ImVec2.by_value, ImVec2.by_value, :bool], :void],
3004
3225
  [:igPushFont, [:pointer], :void],
3005
3226
  [:igPushID_Str, [:pointer], :void],
3006
3227
  [:igPushID_StrStr, [:pointer, :pointer], :void],
3007
3228
  [:igPushID_Ptr, [:pointer], :void],
3008
3229
  [:igPushID_Int, [:int], :void],
3230
+ [:igPushItemFlag, [:int, :bool], :void],
3009
3231
  [:igPushItemWidth, [:float], :void],
3010
3232
  [:igPushStyleColor_U32, [:int, :uint], :void],
3011
3233
  [:igPushStyleColor_Vec4, [:int, ImVec4.by_value], :void],
3012
3234
  [:igPushStyleVar_Float, [:int, :float], :void],
3013
3235
  [:igPushStyleVar_Vec2, [:int, ImVec2.by_value], :void],
3014
- [:igPushTabStop, [:bool], :void],
3236
+ [:igPushStyleVarX, [:int, :float], :void],
3237
+ [:igPushStyleVarY, [:int, :float], :void],
3015
3238
  [:igPushTextWrapPos, [:float], :void],
3016
3239
  [:igRadioButton_Bool, [:pointer, :bool], :bool],
3017
3240
  [:igRadioButton_IntPtr, [:pointer, :pointer, :int], :bool],
@@ -3036,6 +3259,7 @@ module ImGui
3036
3259
  [:igSetCursorScreenPos, [ImVec2.by_value], :void],
3037
3260
  [:igSetDragDropPayload, [:pointer, :pointer, :size_t, :int], :bool],
3038
3261
  [:igSetItemDefaultFocus, [], :void],
3262
+ [:igSetItemKeyOwner, [:int], :void],
3039
3263
  [:igSetItemTooltip, [:pointer, :varargs], :void],
3040
3264
  [:igSetKeyboardFocusHere, [:int], :void],
3041
3265
  [:igSetMouseCursor, [:int], :void],
@@ -3043,7 +3267,9 @@ module ImGui
3043
3267
  [:igSetNextFrameWantCaptureMouse, [:bool], :void],
3044
3268
  [:igSetNextItemAllowOverlap, [], :void],
3045
3269
  [:igSetNextItemOpen, [:bool, :int], :void],
3270
+ [:igSetNextItemSelectionUserData, [:int64], :void],
3046
3271
  [:igSetNextItemShortcut, [:int, :int], :void],
3272
+ [:igSetNextItemStorageID, [:uint], :void],
3047
3273
  [:igSetNextItemWidth, [:float], :void],
3048
3274
  [:igSetNextWindowBgAlpha, [:float], :void],
3049
3275
  [:igSetNextWindowCollapsed, [:bool, :int], :void],
@@ -3218,6 +3444,7 @@ module ImGui
3218
3444
  # Disabling [BETA API]
3219
3445
  # - Disable all user interactions and dim items visuals (applying style.DisabledAlpha over current colors)
3220
3446
  # - 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)
3447
+ # - Tooltips windows by exception are opted out of disabling.
3221
3448
  # - 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.
3222
3449
  def self.BeginDisabled(disabled = true)
3223
3450
  igBeginDisabled(disabled)
@@ -3290,6 +3517,20 @@ module ImGui
3290
3517
  igBeginMenuBar()
3291
3518
  end
3292
3519
 
3520
+ # arg: flags(ImGuiMultiSelectFlags), selection_size(int), items_count(int)
3521
+ # ret: pointer
3522
+ #
3523
+ # Multi-selection system for Selectable(), Checkbox(), TreeNode() functions [BETA]
3524
+ # - 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.
3525
+ # - ImGuiSelectionUserData is often used to store your item index within the current view (but may store something else).
3526
+ # - Read comments near ImGuiMultiSelectIO for instructions/details and see 'Demo->Widgets->Selection State & Multi-Select' for demo.
3527
+ # - TreeNode() is technically supported but... using this correctly is more complicated. You need some sort of linear/random access to your tree,
3528
+ # which is suited to advanced trees setups already implementing filters and clipper. We will work simplifying the current demo.
3529
+ # - '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.
3530
+ def self.BeginMultiSelect(flags, selection_size = -1, items_count = -1) # Implied selection_size = -1, items_count = -1
3531
+ igBeginMultiSelect(flags, selection_size, items_count)
3532
+ end
3533
+
3293
3534
  # arg: str_id(const char*), flags(ImGuiWindowFlags)
3294
3535
  # ret: bool
3295
3536
  #
@@ -3384,7 +3625,8 @@ module ImGui
3384
3625
  #
3385
3626
  # Tooltips
3386
3627
  # - Tooltips are windows following the mouse. They do not take focus away.
3387
- # - A tooltip window can contain items of any types. SetTooltip() is a shortcut for the 'if (BeginTooltip()) { Text(...); EndTooltip(); }' idiom.
3628
+ # - A tooltip window can contain items of any types.
3629
+ # - SetTooltip() is more or less a shortcut for the 'if (BeginTooltip()) { Text(...); EndTooltip(); }' idiom (with a subtlety that it discard any previously submitted tooltip)
3388
3630
  def self.BeginTooltip() # begin/append a tooltip window.
3389
3631
  igBeginTooltip()
3390
3632
  end
@@ -3522,13 +3764,13 @@ module ImGui
3522
3764
  igColorPicker4(label, col, flags, ref_col)
3523
3765
  end
3524
3766
 
3525
- # arg: count(int), id(const char*), border(bool)
3767
+ # arg: count(int), id(const char*), borders(bool)
3526
3768
  # ret: void
3527
3769
  #
3528
3770
  # Legacy Columns API (prefer using Tables!)
3529
3771
  # - You can also use SameLine(pos_x) to mimic simplified columns.
3530
- def self.Columns(count = 1, id = nil, border = true) # Implied count = 1, id = NULL, border = true
3531
- igColumns(count, id, border)
3772
+ def self.Columns(count = 1, id = nil, borders = true) # Implied count = 1, id = NULL, borders = true
3773
+ igColumns(count, id, borders)
3532
3774
  end
3533
3775
 
3534
3776
  # arg: label(const char*), current_item(int*), items(const char* const[]), items_count(int), popup_max_height_in_items(int)
@@ -3574,7 +3816,7 @@ module ImGui
3574
3816
 
3575
3817
  # arg: fmt(const char*), ...(...)
3576
3818
  # ret: void
3577
- def self.DebugLog(fmt, *varargs)
3819
+ def self.DebugLog(fmt, *varargs) # Call via IMGUI_DEBUG_LOG() for maximum stripping in caller code!
3578
3820
  igDebugLog(fmt, *varargs)
3579
3821
  end
3580
3822
 
@@ -3749,6 +3991,11 @@ module ImGui
3749
3991
  igEndMenuBar()
3750
3992
  end
3751
3993
 
3994
+ # ret: pointer
3995
+ def self.EndMultiSelect()
3996
+ igEndMultiSelect()
3997
+ end
3998
+
3752
3999
  # ret: void
3753
4000
  def self.EndPopup() # only call EndPopup() if BeginPopupXXX() returns true!
3754
4001
  igEndPopup()
@@ -3783,7 +4030,7 @@ module ImGui
3783
4030
  # ret: pointer
3784
4031
  #
3785
4032
  # Background/Foreground Draw Lists
3786
- def self.GetBackgroundDrawList() # this draw list will be the first rendered one. Useful to quickly draw shapes/text behind dear imgui contents.
4033
+ def self.GetBackgroundDrawList() # Implied viewport = NULL
3787
4034
  igGetBackgroundDrawList()
3788
4035
  end
3789
4036
 
@@ -3836,30 +4083,19 @@ module ImGui
3836
4083
  end
3837
4084
 
3838
4085
  # ret: void
3839
- #
3840
- # Content region
3841
- # - Retrieve available space from a given point. GetContentRegionAvail() is frequently useful.
3842
- # - 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)
3843
- def self.GetContentRegionAvail() # == GetContentRegionMax() - GetCursorPos()
4086
+ def self.GetContentRegionAvail() # available space from current position. THIS IS YOUR BEST FRIEND.
3844
4087
  pOut = ImVec2.new
3845
4088
  igGetContentRegionAvail(pOut)
3846
4089
  return pOut
3847
4090
  end
3848
4091
 
3849
- # ret: void
3850
- def self.GetContentRegionMax() # current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates
3851
- pOut = ImVec2.new
3852
- igGetContentRegionMax(pOut)
3853
- return pOut
3854
- end
3855
-
3856
4092
  # ret: pointer
3857
4093
  def self.GetCurrentContext()
3858
4094
  igGetCurrentContext()
3859
4095
  end
3860
4096
 
3861
4097
  # ret: void
3862
- def self.GetCursorPos() # [window-local] cursor position in window coordinates (relative to window position)
4098
+ def self.GetCursorPos() # [window-local] cursor position in window-local coordinates. This is not your best friend.
3863
4099
  pOut = ImVec2.new
3864
4100
  igGetCursorPos(pOut)
3865
4101
  return pOut
@@ -3881,18 +4117,20 @@ module ImGui
3881
4117
  # - By "cursor" we mean the current output position.
3882
4118
  # - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down.
3883
4119
  # - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget.
4120
+ # - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail().
3884
4121
  # - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API:
3885
4122
  # - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward.
3886
- # - Window-local coordinates: SameLine(), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), GetContentRegionMax(), GetWindowContentRegion*(), PushTextWrapPos()
3887
- # - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates.
3888
- def self.GetCursorScreenPos() # cursor position in absolute coordinates (prefer using this, also more useful to work with ImDrawList API).
4123
+ # - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos()
4124
+ # - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM.
4125
+ # - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it.
4126
+ 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).
3889
4127
  pOut = ImVec2.new
3890
4128
  igGetCursorScreenPos(pOut)
3891
4129
  return pOut
3892
4130
  end
3893
4131
 
3894
4132
  # ret: void
3895
- def self.GetCursorStartPos() # [window-local] initial cursor position, in window coordinates
4133
+ def self.GetCursorStartPos() # [window-local] initial cursor position, in window-local coordinates. Call GetCursorScreenPos() after Begin() to get the absolute coordinates version.
3896
4134
  pOut = ImVec2.new
3897
4135
  igGetCursorStartPos(pOut)
3898
4136
  return pOut
@@ -3927,14 +4165,14 @@ module ImGui
3927
4165
  end
3928
4166
 
3929
4167
  # ret: void
3930
- def self.GetFontTexUvWhitePixel() # get UV coordinate for a while pixel, useful to draw custom shapes via the ImDrawList API
4168
+ def self.GetFontTexUvWhitePixel() # get UV coordinate for a white pixel, useful to draw custom shapes via the ImDrawList API
3931
4169
  pOut = ImVec2.new
3932
4170
  igGetFontTexUvWhitePixel(pOut)
3933
4171
  return pOut
3934
4172
  end
3935
4173
 
3936
4174
  # ret: pointer
3937
- def self.GetForegroundDrawList() # this draw list will be the last rendered one. Useful to quickly draw shapes/text over dear imgui contents.
4175
+ def self.GetForegroundDrawList() # Implied viewport = NULL
3938
4176
  igGetForegroundDrawList()
3939
4177
  end
3940
4178
 
@@ -3971,10 +4209,16 @@ module ImGui
3971
4209
  igGetID_Ptr(ptr_id)
3972
4210
  end
3973
4211
 
4212
+ # arg: int_id(int)
4213
+ # ret: uint
4214
+ def self.GetID_Int(int_id)
4215
+ igGetID_Int(int_id)
4216
+ end
4217
+
3974
4218
  # ret: pointer
3975
4219
  #
3976
4220
  # Main
3977
- def self.GetIO() # access the IO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags)
4221
+ def self.GetIO() # access the ImGuiIO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags)
3978
4222
  igGetIO()
3979
4223
  end
3980
4224
 
@@ -4039,7 +4283,7 @@ module ImGui
4039
4283
 
4040
4284
  # arg: button(ImGuiMouseButton), lock_threshold(float)
4041
4285
  # ret: void
4042
- 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)
4286
+ 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)
4043
4287
  pOut = ImVec2.new
4044
4288
  igGetMouseDragDelta(pOut, button, lock_threshold)
4045
4289
  return pOut
@@ -4059,6 +4303,11 @@ module ImGui
4059
4303
  return pOut
4060
4304
  end
4061
4305
 
4306
+ # ret: pointer
4307
+ def self.GetPlatformIO() # access the ImGuiPlatformIO structure (mostly hooks/functions to connect to platform/renderer and OS Clipboard, IME etc.)
4308
+ igGetPlatformIO()
4309
+ end
4310
+
4062
4311
  # ret: float
4063
4312
  def self.GetScrollMaxX() # get maximum scrolling amount ~~ ContentSize.x - WindowSize.x - DecorationsSize.x
4064
4313
  igGetScrollMaxX()
@@ -4130,46 +4379,32 @@ module ImGui
4130
4379
  igGetVersion()
4131
4380
  end
4132
4381
 
4133
- # ret: void
4134
- 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
4135
- pOut = ImVec2.new
4136
- igGetWindowContentRegionMax(pOut)
4137
- return pOut
4138
- end
4139
-
4140
- # ret: void
4141
- def self.GetWindowContentRegionMin() # content boundaries min for the full window (roughly (0,0)-Scroll), in window coordinates
4142
- pOut = ImVec2.new
4143
- igGetWindowContentRegionMin(pOut)
4144
- return pOut
4145
- end
4146
-
4147
4382
  # ret: pointer
4148
4383
  def self.GetWindowDrawList() # get draw list associated to the current window, to append your own drawing primitives
4149
4384
  igGetWindowDrawList()
4150
4385
  end
4151
4386
 
4152
4387
  # ret: float
4153
- def self.GetWindowHeight() # get current window height (shortcut for GetWindowSize().y)
4388
+ def self.GetWindowHeight() # get current window height (IT IS UNLIKELY YOU EVER NEED TO USE THIS). Shortcut for GetWindowSize().y.
4154
4389
  igGetWindowHeight()
4155
4390
  end
4156
4391
 
4157
4392
  # ret: void
4158
- 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())
4393
+ 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)
4159
4394
  pOut = ImVec2.new
4160
4395
  igGetWindowPos(pOut)
4161
4396
  return pOut
4162
4397
  end
4163
4398
 
4164
4399
  # ret: void
4165
- def self.GetWindowSize() # get current window size (note: it is unlikely you need to use this. Consider using GetCursorScreenPos() and e.g. GetContentRegionAvail() instead)
4400
+ def self.GetWindowSize() # get current window size (IT IS UNLIKELY YOU EVER NEED TO USE THIS. Consider always using GetCursorScreenPos() and GetContentRegionAvail() instead)
4166
4401
  pOut = ImVec2.new
4167
4402
  igGetWindowSize(pOut)
4168
4403
  return pOut
4169
4404
  end
4170
4405
 
4171
4406
  # ret: float
4172
- def self.GetWindowWidth() # get current window width (shortcut for GetWindowSize().x)
4407
+ def self.GetWindowWidth() # get current window width (IT IS UNLIKELY YOU EVER NEED TO USE THIS). Shortcut for GetWindowSize().x.
4173
4408
  igGetWindowWidth()
4174
4409
  end
4175
4410
 
@@ -4361,6 +4596,11 @@ module ImGui
4361
4596
  igIsItemToggledOpen()
4362
4597
  end
4363
4598
 
4599
+ # ret: bool
4600
+ 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.
4601
+ igIsItemToggledSelection()
4602
+ end
4603
+
4364
4604
  # ret: bool
4365
4605
  def self.IsItemVisible() # is the last item visible? (items may be out of sight because of clipping/scrolling)
4366
4606
  igIsItemVisible()
@@ -4421,7 +4661,7 @@ module ImGui
4421
4661
 
4422
4662
  # arg: button(ImGuiMouseButton), lock_threshold(float)
4423
4663
  # ret: bool
4424
- def self.IsMouseDragging(button, lock_threshold = -1.0) # is mouse dragging? (if lock_threshold < -1.0f, uses io.MouseDraggingThreshold)
4664
+ def self.IsMouseDragging(button, lock_threshold = -1.0) # is mouse dragging? (uses io.MouseDraggingThreshold if lock_threshold < 0.0f)
4425
4665
  igIsMouseDragging(button, lock_threshold)
4426
4666
  end
4427
4667
 
@@ -4644,11 +4884,6 @@ module ImGui
4644
4884
  igPlotLines_FnFloatPtr(label, values_getter, data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size)
4645
4885
  end
4646
4886
 
4647
- # ret: void
4648
- def self.PopButtonRepeat()
4649
- igPopButtonRepeat()
4650
- end
4651
-
4652
4887
  # ret: void
4653
4888
  def self.PopClipRect()
4654
4889
  igPopClipRect()
@@ -4664,6 +4899,11 @@ module ImGui
4664
4899
  igPopID()
4665
4900
  end
4666
4901
 
4902
+ # ret: void
4903
+ def self.PopItemFlag()
4904
+ igPopItemFlag()
4905
+ end
4906
+
4667
4907
  # ret: void
4668
4908
  def self.PopItemWidth()
4669
4909
  igPopItemWidth()
@@ -4681,11 +4921,6 @@ module ImGui
4681
4921
  igPopStyleVar(count)
4682
4922
  end
4683
4923
 
4684
- # ret: void
4685
- def self.PopTabStop()
4686
- igPopTabStop()
4687
- end
4688
-
4689
4924
  # ret: void
4690
4925
  def self.PopTextWrapPos()
4691
4926
  igPopTextWrapPos()
@@ -4697,12 +4932,6 @@ module ImGui
4697
4932
  igProgressBar(fraction, size_arg, overlay)
4698
4933
  end
4699
4934
 
4700
- # arg: repeat(bool)
4701
- # ret: void
4702
- 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.
4703
- igPushButtonRepeat(repeat)
4704
- end
4705
-
4706
4935
  # arg: clip_rect_min(ImVec2), clip_rect_max(ImVec2), intersect_with_current_clip_rect(bool)
4707
4936
  # ret: void
4708
4937
  #
@@ -4744,6 +4973,12 @@ module ImGui
4744
4973
  igPushID_Int(int_id)
4745
4974
  end
4746
4975
 
4976
+ # arg: option(ImGuiItemFlags), enabled(bool)
4977
+ # ret: void
4978
+ def self.PushItemFlag(option, enabled) # modify specified shared item flag, e.g. PushItemFlag(ImGuiItemFlags_NoTabStop, true)
4979
+ igPushItemFlag(option, enabled)
4980
+ end
4981
+
4747
4982
  # arg: item_width(float)
4748
4983
  # ret: void
4749
4984
  #
@@ -4776,10 +5011,16 @@ module ImGui
4776
5011
  igPushStyleVar_Vec2(idx, val)
4777
5012
  end
4778
5013
 
4779
- # arg: tab_stop(bool)
5014
+ # arg: idx(ImGuiStyleVar), val_x(float)
5015
+ # ret: void
5016
+ def self.PushStyleVarX(idx, val_x) # modify X component of a style ImVec2 variable. "
5017
+ igPushStyleVarX(idx, val_x)
5018
+ end
5019
+
5020
+ # arg: idx(ImGuiStyleVar), val_y(float)
4780
5021
  # ret: void
4781
- 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
4782
- igPushTabStop(tab_stop)
5022
+ def self.PushStyleVarY(idx, val_y) # modify Y component of a style ImVec2 variable. "
5023
+ igPushStyleVarY(idx, val_y)
4783
5024
  end
4784
5025
 
4785
5026
  # arg: wrap_local_pos_x(float)
@@ -4915,7 +5156,7 @@ module ImGui
4915
5156
 
4916
5157
  # arg: pos(ImVec2)
4917
5158
  # ret: void
4918
- def self.SetCursorScreenPos(pos) # cursor position in absolute coordinates
5159
+ def self.SetCursorScreenPos(pos) # cursor position, absolute coordinates. THIS IS YOUR BEST FRIEND.
4919
5160
  igSetCursorScreenPos(pos)
4920
5161
  end
4921
5162
 
@@ -4933,9 +5174,22 @@ module ImGui
4933
5174
  igSetItemDefaultFocus()
4934
5175
  end
4935
5176
 
5177
+ # arg: key(ImGuiKey)
5178
+ # ret: void
5179
+ #
5180
+ # Inputs Utilities: Key/Input Ownership [BETA]
5181
+ # - One common use case would be to allow your items to disable standard inputs behaviors such
5182
+ # as Tab or Alt key handling, Mouse Wheel scrolling, etc.
5183
+ # e.g. Button(...); SetItemKeyOwner(ImGuiKey_MouseWheelY); to make hovering/activating a button disable wheel for scrolling.
5184
+ # - Reminder ImGuiKey enum include access to mouse buttons and gamepad, so key ownership can apply to them.
5185
+ # - Many related features are still in imgui_internal.h. For instance, most IsKeyXXX()/IsMouseXXX() functions have an owner-id-aware version.
5186
+ 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());'.
5187
+ igSetItemKeyOwner(key)
5188
+ end
5189
+
4936
5190
  # arg: fmt(const char*), ...(...)
4937
5191
  # ret: void
4938
- def self.SetItemTooltip(fmt, *varargs) # set a text-only tooltip if preceeding item was hovered. override any previous call to SetTooltip().
5192
+ def self.SetItemTooltip(fmt, *varargs) # set a text-only tooltip if preceding item was hovered. override any previous call to SetTooltip().
4939
5193
  igSetItemTooltip(fmt, *varargs)
4940
5194
  end
4941
5195
 
@@ -4976,12 +5230,24 @@ module ImGui
4976
5230
  igSetNextItemOpen(is_open, cond)
4977
5231
  end
4978
5232
 
5233
+ # arg: selection_user_data(ImGuiSelectionUserData)
5234
+ # ret: void
5235
+ def self.SetNextItemSelectionUserData(selection_user_data)
5236
+ igSetNextItemSelectionUserData(selection_user_data)
5237
+ end
5238
+
4979
5239
  # arg: key_chord(ImGuiKeyChord), flags(ImGuiInputFlags)
4980
5240
  # ret: void
4981
5241
  def self.SetNextItemShortcut(key_chord, flags = 0)
4982
5242
  igSetNextItemShortcut(key_chord, flags)
4983
5243
  end
4984
5244
 
5245
+ # arg: storage_id(ImGuiID)
5246
+ # ret: void
5247
+ def self.SetNextItemStorageID(storage_id) # set id to use for open/close storage (default to same as item id).
5248
+ igSetNextItemStorageID(storage_id)
5249
+ end
5250
+
4985
5251
  # arg: item_width(float)
4986
5252
  # ret: void
4987
5253
  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)
@@ -5147,6 +5413,22 @@ module ImGui
5147
5413
 
5148
5414
  # arg: key_chord(ImGuiKeyChord), flags(ImGuiInputFlags)
5149
5415
  # ret: bool
5416
+ #
5417
+ # Inputs Utilities: Shortcut Testing & Routing [BETA]
5418
+ # - ImGuiKeyChord = a ImGuiKey + optional ImGuiMod_Alt/ImGuiMod_Ctrl/ImGuiMod_Shift/ImGuiMod_Super.
5419
+ # ImGuiKey_C // Accepted by functions taking ImGuiKey or ImGuiKeyChord arguments)
5420
+ # ImGuiMod_Ctrl | ImGuiKey_C // Accepted by functions taking ImGuiKeyChord arguments)
5421
+ # only ImGuiMod_XXX values are legal to combine with an ImGuiKey. You CANNOT combine two ImGuiKey values.
5422
+ # - The general idea is that several callers may register interest in a shortcut, and only one owner gets it.
5423
+ # Parent -> call Shortcut(Ctrl+S) // When Parent is focused, Parent gets the shortcut.
5424
+ # Child1 -> call Shortcut(Ctrl+S) // When Child1 is focused, Child1 gets the shortcut (Child1 overrides Parent shortcuts)
5425
+ # Child2 -> no call // When Child2 is focused, Parent gets the shortcut.
5426
+ # The whole system is order independent, so if Child1 makes its calls before Parent, results will be identical.
5427
+ # This is an important property as it facilitate working with foreign code or larger codebase.
5428
+ # - To understand the difference:
5429
+ # - IsKeyChordPressed() compares mods and call IsKeyPressed() -> function has no side-effect.
5430
+ # - 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.
5431
+ # - Visualize registered routes in 'Metrics/Debugger->Inputs'.
5150
5432
  def self.Shortcut(key_chord, flags = 0)
5151
5433
  igShortcut(key_chord, flags)
5152
5434
  end
@@ -5344,7 +5626,7 @@ module ImGui
5344
5626
  end
5345
5627
 
5346
5628
  # ret: int
5347
- def self.TableGetHoveredColumn()
5629
+ 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.
5348
5630
  igTableGetHoveredColumn()
5349
5631
  end
5350
5632
 
@@ -5446,13 +5728,13 @@ module ImGui
5446
5728
 
5447
5729
  # arg: label(const char*)
5448
5730
  # ret: bool
5449
- def self.TextLink(label)
5731
+ def self.TextLink(label) # hyperlink text button, return true when clicked
5450
5732
  igTextLink(label)
5451
5733
  end
5452
5734
 
5453
5735
  # arg: label(const char*), url(const char*)
5454
5736
  # ret: void
5455
- def self.TextLinkOpenURL(label, url = nil)
5737
+ def self.TextLinkOpenURL(label, url = nil) # Implied url = NULL
5456
5738
  igTextLinkOpenURL(label, url)
5457
5739
  end
5458
5740
 
@@ -5577,10 +5859,10 @@ module ImGui
5577
5859
  # Child Windows
5578
5860
  # - Use child windows to begin into a self-contained independent scrolling/clipping regions within a host window. Child windows can embed their own child.
5579
5861
  # - Before 1.90 (November 2023), the "ImGuiChildFlags child_flags = 0" parameter was "bool border = false".
5580
- # This API is backward compatible with old code, as we guarantee that ImGuiChildFlags_Border == true.
5862
+ # This API is backward compatible with old code, as we guarantee that ImGuiChildFlags_Borders == true.
5581
5863
  # Consider updating your old code:
5582
5864
  # BeginChild("Name", size, false) -> Begin("Name", size, 0); or Begin("Name", size, ImGuiChildFlags_None);
5583
- # BeginChild("Name", size, true) -> Begin("Name", size, ImGuiChildFlags_Border);
5865
+ # BeginChild("Name", size, true) -> Begin("Name", size, ImGuiChildFlags_Borders);
5584
5866
  # - Manual sizing (each axis can use a different setting e.g. ImVec2(0.0f, 400.0f)):
5585
5867
  # == 0.0f: use remaining parent window size for this axis.
5586
5868
  # > 0.0f: use specified size for this axis.
@@ -5658,6 +5940,9 @@ module ImGui
5658
5940
  # arg: 0:ptr_id(const void*)
5659
5941
  # ret: uint
5660
5942
  return igGetID_Ptr(arg[0]) if arg.length == 1 && (arg[0].kind_of?(FFI::Pointer))
5943
+ # arg: 0:int_id(int)
5944
+ # ret: uint
5945
+ return igGetID_Int(arg[0]) if arg.length == 1 && (arg[0].kind_of?(Integer))
5661
5946
  $stderr.puts("[Warning] GetID : No matching functions found (#{arg})")
5662
5947
  end
5663
5948
 
@@ -5771,7 +6056,7 @@ module ImGui
5771
6056
  $stderr.puts("[Warning] PushStyleColor : No matching functions found (#{arg})")
5772
6057
  end
5773
6058
 
5774
- def self.PushStyleVar(*arg) # modify a style float variable. always use this if you modify the style after NewFrame().
6059
+ def self.PushStyleVar(*arg) # modify a style float variable. always use this if you modify the style after NewFrame()!
5775
6060
  # arg: 0:idx(ImGuiStyleVar), 1:val(float)
5776
6061
  # ret: void
5777
6062
  return igPushStyleVar_Float(arg[0], arg[1]) if arg.length == 2 && (arg[0].kind_of?(Integer) && arg[1].kind_of?(Float))