imgui-bindings 0.1.15 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +385 -381
- data/LICENSE.txt +1 -1
- data/README.md +121 -121
- data/lib/imgui.aarch64.so +0 -0
- data/lib/imgui.arm64.dylib +0 -0
- data/lib/imgui.dll +0 -0
- data/lib/imgui.rb +420 -145
- data/lib/imgui.x86_64.dylib +0 -0
- data/lib/imgui.x86_64.so +0 -0
- data/lib/imgui_impl_glfw.rb +511 -511
- data/lib/imgui_impl_opengl2.rb +212 -212
- data/lib/imgui_impl_opengl3.rb +1 -1
- data/lib/imgui_impl_raylib.rb +2 -1
- data/lib/imgui_impl_sdl2.rb +409 -409
- data/lib/imgui_impl_sdlrenderer.rb +200 -200
- data/lib/imgui_internal.rb +49 -49
- data/lib/imnodes.aarch64.so +0 -0
- data/lib/imnodes.arm64.dylib +0 -0
- data/lib/imnodes.dll +0 -0
- data/lib/imnodes.rb +161 -161
- data/lib/imnodes.x86_64.dylib +0 -0
- data/lib/imnodes.x86_64.so +0 -0
- metadata +3 -6
data/lib/imgui.rb
CHANGED
@@ -20,6 +20,7 @@ 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, :ImGuiDockNodeFlags
|
23
24
|
FFI.typedef :int, :ImGuiDragDropFlags
|
24
25
|
FFI.typedef :int, :ImGuiFocusedFlags
|
25
26
|
FFI.typedef :int, :ImGuiHoveredFlags
|
@@ -51,7 +52,7 @@ FFI.typedef :short, :ImS16
|
|
51
52
|
FFI.typedef :int, :ImS32
|
52
53
|
FFI.typedef :int64, :ImS64
|
53
54
|
FFI.typedef :char, :ImS8
|
54
|
-
FFI.typedef :
|
55
|
+
FFI.typedef :uint64, :ImTextureID
|
55
56
|
FFI.typedef :ushort, :ImU16
|
56
57
|
FFI.typedef :uint, :ImU32
|
57
58
|
FFI.typedef :uint64, :ImU64
|
@@ -77,8 +78,10 @@ FFI.typedef :int32, :ImGuiCond_
|
|
77
78
|
FFI.typedef :int32, :ImGuiConfigFlags_
|
78
79
|
FFI.typedef :int32, :ImGuiDataType_
|
79
80
|
FFI.typedef :int32, :ImGuiDir
|
81
|
+
FFI.typedef :int32, :ImGuiDockNodeFlags_
|
80
82
|
FFI.typedef :int32, :ImGuiDragDropFlags_
|
81
83
|
FFI.typedef :int32, :ImGuiFocusedFlags_
|
84
|
+
FFI.typedef :int32, :ImGuiFreeTypeBuilderFlags
|
82
85
|
FFI.typedef :int32, :ImGuiHoveredFlags_
|
83
86
|
FFI.typedef :int32, :ImGuiInputFlags_
|
84
87
|
FFI.typedef :int32, :ImGuiInputTextFlags_
|
@@ -140,11 +143,14 @@ ImFontAtlasFlags_NoBakedLines = 4 # 1 << 2 # Don't build thick line textur
|
|
140
143
|
|
141
144
|
# ImGuiBackendFlags_
|
142
145
|
# Backend capabilities flags stored in io.BackendFlags. Set by imgui_impl_xxx or custom backend.
|
143
|
-
ImGuiBackendFlags_None = 0
|
144
|
-
ImGuiBackendFlags_HasGamepad = 1
|
145
|
-
ImGuiBackendFlags_HasMouseCursors = 2
|
146
|
-
ImGuiBackendFlags_HasSetMousePos = 4
|
147
|
-
ImGuiBackendFlags_RendererHasVtxOffset = 8
|
146
|
+
ImGuiBackendFlags_None = 0 # 0
|
147
|
+
ImGuiBackendFlags_HasGamepad = 1 # 1 << 0 # Backend Platform supports gamepad and currently has one connected.
|
148
|
+
ImGuiBackendFlags_HasMouseCursors = 2 # 1 << 1 # Backend Platform supports honoring GetMouseCursor() value to change the OS cursor shape.
|
149
|
+
ImGuiBackendFlags_HasSetMousePos = 4 # 1 << 2 # Backend Platform supports io.WantSetMousePos requests to reposition the OS mouse position (only used if io.ConfigNavMoveSetMousePos is set).
|
150
|
+
ImGuiBackendFlags_RendererHasVtxOffset = 8 # 1 << 3 # Backend Renderer supports ImDrawCmd::VtxOffset. This enables output of large meshes (64K+ vertices) while still using 16-bit indices.
|
151
|
+
ImGuiBackendFlags_PlatformHasViewports = 1024 # 1 << 10 # Backend Platform supports multiple viewports.
|
152
|
+
ImGuiBackendFlags_HasMouseHoveredViewport = 2048 # 1 << 11 # Backend Platform supports calling io.AddMouseViewportEvent() with the viewport under the mouse. IF POSSIBLE, ignore viewports with the ImGuiViewportFlags_NoInputs flag (Win32 backend, GLFW 3.30+ backend can do this, SDL backend cannot). If this cannot be done, Dear ImGui needs to use a flawed heuristic to find the viewport under.
|
153
|
+
ImGuiBackendFlags_RendererHasViewports = 4096 # 1 << 12 # Backend Renderer supports multiple viewports.
|
148
154
|
|
149
155
|
# ImGuiButtonFlags_
|
150
156
|
# Flags for InvisibleButton() [extended in imgui_internal.h]
|
@@ -153,6 +159,7 @@ ImGuiButtonFlags_MouseButtonLeft = 1 # 1 << 0 # React on left mouse button (de
|
|
153
159
|
ImGuiButtonFlags_MouseButtonRight = 2 # 1 << 1 # React on right mouse button
|
154
160
|
ImGuiButtonFlags_MouseButtonMiddle = 4 # 1 << 2 # React on center mouse button
|
155
161
|
ImGuiButtonFlags_MouseButtonMask_ = 7 # ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle # [Internal]
|
162
|
+
ImGuiButtonFlags_EnableNav = 8 # 1 << 3 # InvisibleButton(): do not disable navigation/tabbing. Otherwise disabled by default.
|
156
163
|
|
157
164
|
# ImGuiChildFlags_
|
158
165
|
# Flags for ImGui::BeginChild()
|
@@ -173,7 +180,7 @@ ImGuiChildFlags_AutoResizeX = 16 # 1 << 4 # Enable auto-resizing width
|
|
173
180
|
ImGuiChildFlags_AutoResizeY = 32 # 1 << 5 # Enable auto-resizing height. Read "IMPORTANT: Size measurement" details above.
|
174
181
|
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.
|
175
182
|
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
|
183
|
+
ImGuiChildFlags_NavFlattened = 256 # 1 << 8 # [BETA] Share focus scope, allow keyboard/gamepad navigation to cross over parent border to this child or between sibling child windows.
|
177
184
|
|
178
185
|
# ImGuiCol_
|
179
186
|
# Enumeration for PushStyleColor() / PopStyleColor()
|
@@ -217,23 +224,25 @@ ImGuiCol_TabSelectedOverline = 36 # 36 # Tab horizontal overline, when tab
|
|
217
224
|
ImGuiCol_TabDimmed = 37 # 37 # Tab background, when tab-bar is unfocused & tab is unselected
|
218
225
|
ImGuiCol_TabDimmedSelected = 38 # 38 # Tab background, when tab-bar is unfocused & tab is selected
|
219
226
|
ImGuiCol_TabDimmedSelectedOverline = 39 # 39 #..horizontal overline, when tab-bar is unfocused & tab is selected
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
227
|
+
ImGuiCol_DockingPreview = 40 # 40 # Preview overlay color when about to docking something
|
228
|
+
ImGuiCol_DockingEmptyBg = 41 # 41 # Background color for empty node (e.g. CentralNode with no window docked into it)
|
229
|
+
ImGuiCol_PlotLines = 42 # 42
|
230
|
+
ImGuiCol_PlotLinesHovered = 43 # 43
|
231
|
+
ImGuiCol_PlotHistogram = 44 # 44
|
232
|
+
ImGuiCol_PlotHistogramHovered = 45 # 45
|
233
|
+
ImGuiCol_TableHeaderBg = 46 # 46 # Table header background
|
234
|
+
ImGuiCol_TableBorderStrong = 47 # 47 # Table outer and header borders (prefer using Alpha=1.0 here)
|
235
|
+
ImGuiCol_TableBorderLight = 48 # 48 # Table inner borders (prefer using Alpha=1.0 here)
|
236
|
+
ImGuiCol_TableRowBg = 49 # 49 # Table row background (even rows)
|
237
|
+
ImGuiCol_TableRowBgAlt = 50 # 50 # Table row background (odd rows)
|
238
|
+
ImGuiCol_TextLink = 51 # 51 # Hyperlink color
|
239
|
+
ImGuiCol_TextSelectedBg = 52 # 52
|
240
|
+
ImGuiCol_DragDropTarget = 53 # 53 # Rectangle highlighting a drop target
|
241
|
+
ImGuiCol_NavCursor = 54 # 54 # Color of keyboard/gamepad navigation cursor/rectangle, when visible
|
242
|
+
ImGuiCol_NavWindowingHighlight = 55 # 55 # Highlight window when using CTRL+TAB
|
243
|
+
ImGuiCol_NavWindowingDimBg = 56 # 56 # Darken/colorize entire screen behind the CTRL+TAB window list, when active
|
244
|
+
ImGuiCol_ModalWindowDimBg = 57 # 57 # Darken/colorize entire screen behind a modal window, when one is active
|
245
|
+
ImGuiCol_COUNT = 58 # 58
|
237
246
|
|
238
247
|
# ImGuiColorEditFlags_
|
239
248
|
# Flags for ColorEdit3() / ColorEdit4() / ColorPicker3() / ColorPicker4() / ColorButton()
|
@@ -292,16 +301,18 @@ ImGuiCond_Appearing = 8 # 1 << 3 # Set the variable if the object/window is a
|
|
292
301
|
|
293
302
|
# ImGuiConfigFlags_
|
294
303
|
# Configuration flags stored in io.ConfigFlags. Set by user/application.
|
295
|
-
ImGuiConfigFlags_None = 0
|
296
|
-
ImGuiConfigFlags_NavEnableKeyboard = 1
|
297
|
-
ImGuiConfigFlags_NavEnableGamepad = 2
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
304
|
+
ImGuiConfigFlags_None = 0 # 0
|
305
|
+
ImGuiConfigFlags_NavEnableKeyboard = 1 # 1 << 0 # Master keyboard navigation enable flag. Enable full Tabbing + directional arrows + space/enter to activate.
|
306
|
+
ImGuiConfigFlags_NavEnableGamepad = 2 # 1 << 1 # Master gamepad navigation enable flag. Backend also needs to set ImGuiBackendFlags_HasGamepad.
|
307
|
+
ImGuiConfigFlags_NoMouse = 16 # 1 << 4 # Instruct dear imgui to disable mouse inputs and interactions.
|
308
|
+
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.
|
309
|
+
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.
|
310
|
+
ImGuiConfigFlags_DockingEnable = 128 # 1 << 7 # Docking enable flags.
|
311
|
+
ImGuiConfigFlags_ViewportsEnable = 1024 # 1 << 10 # Viewport enable flags (require both ImGuiBackendFlags_PlatformHasViewports + ImGuiBackendFlags_RendererHasViewports set by the respective backends)
|
312
|
+
ImGuiConfigFlags_DpiEnableScaleViewports = 16384 # 1 << 14 # [BETA: Don't use] FIXME-DPI: Reposition and resize imgui windows when the DpiScale of a viewport changed (mostly useful for the main viewport hosting other window). Note that resizing the main window itself is up to your application.
|
313
|
+
ImGuiConfigFlags_DpiEnableScaleFonts = 32768 # 1 << 15 # [BETA: Don't use] FIXME-DPI: Request bitmap-scaled fonts to match DpiScale. This is a very low-quality workaround. The correct way to handle DPI is _currently_ to replace the atlas and/or fonts in the Platform_OnChangedViewport callback, but this is all early work in progress.
|
314
|
+
ImGuiConfigFlags_IsSRGB = 1048576 # 1 << 20 # Application is SRGB-aware.
|
315
|
+
ImGuiConfigFlags_IsTouchScreen = 2097152 # 1 << 21 # Application is using a touch screen instead of a mouse.
|
305
316
|
|
306
317
|
# ImGuiDataType_
|
307
318
|
# A primary data type
|
@@ -327,6 +338,19 @@ ImGuiDir_Up = 2 # 2
|
|
327
338
|
ImGuiDir_Down = 3 # 3
|
328
339
|
ImGuiDir_COUNT = 4 # 4
|
329
340
|
|
341
|
+
# ImGuiDockNodeFlags_
|
342
|
+
# Flags for ImGui::DockSpace(), shared/inherited by child nodes.
|
343
|
+
# (Some flags can be applied to individual nodes directly)
|
344
|
+
# FIXME-DOCK: Also see ImGuiDockNodeFlagsPrivate_ which may involve using the WIP and internal DockBuilder api.
|
345
|
+
ImGuiDockNodeFlags_None = 0 # 0
|
346
|
+
ImGuiDockNodeFlags_KeepAliveOnly = 1 # 1 << 0 # // Don't display the dockspace node but keep it alive. Windows docked into this dockspace node won't be undocked.
|
347
|
+
ImGuiDockNodeFlags_NoDockingOverCentralNode = 4 # 1 << 2 # // Disable docking over the Central Node, which will be always kept empty.
|
348
|
+
ImGuiDockNodeFlags_PassthruCentralNode = 8 # 1 << 3 # // Enable passthru dockspace: 1) DockSpace() will render a ImGuiCol_WindowBg background covering everything excepted the Central Node when empty. Meaning the host window should probably use SetNextWindowBgAlpha(0.0f) prior to Begin() when using this. 2) When Central Node is empty: let inputs pass-through + won't display a DockingEmptyBg background. See demo for details.
|
349
|
+
ImGuiDockNodeFlags_NoDockingSplit = 16 # 1 << 4 # // Disable other windows/nodes from splitting this node.
|
350
|
+
ImGuiDockNodeFlags_NoResize = 32 # 1 << 5 # Saved // Disable resizing node using the splitter/separators. Useful with programmatically setup dockspaces.
|
351
|
+
ImGuiDockNodeFlags_AutoHideTabBar = 64 # 1 << 6 # // Tab bar will automatically hide when there is a single window in the dock node.
|
352
|
+
ImGuiDockNodeFlags_NoUndocking = 128 # 1 << 7 # // Disable undocking this node.
|
353
|
+
|
330
354
|
# ImGuiDragDropFlags_
|
331
355
|
# Flags for ImGui::BeginDragDropSource(), ImGui::AcceptDragDropPayload()
|
332
356
|
ImGuiDragDropFlags_None = 0 # 0
|
@@ -350,8 +374,21 @@ ImGuiFocusedFlags_ChildWindows = 1 # 1 << 0 # Return true if any children
|
|
350
374
|
ImGuiFocusedFlags_RootWindow = 2 # 1 << 1 # Test from root window (top most parent of the current hierarchy)
|
351
375
|
ImGuiFocusedFlags_AnyWindow = 4 # 1 << 2 # Return true if any window is focused. Important: If you are trying to tell how to dispatch your low-level inputs, do NOT use this. Use 'io.WantCaptureMouse' instead! Please read the FAQ!
|
352
376
|
ImGuiFocusedFlags_NoPopupHierarchy = 8 # 1 << 3 # Do not consider popup hierarchy (do not treat popup emitter as parent of popup) (when used with _ChildWindows or _RootWindow)
|
377
|
+
ImGuiFocusedFlags_DockHierarchy = 16 # 1 << 4 # Consider docking hierarchy (treat dockspace host as parent of docked window) (when used with _ChildWindows or _RootWindow)
|
353
378
|
ImGuiFocusedFlags_RootAndChildWindows = 3 # ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows
|
354
379
|
|
380
|
+
# ImGuiFreeTypeBuilderFlags
|
381
|
+
ImGuiFreeTypeBuilderFlags_NoHinting = 1 # 1 << 0
|
382
|
+
ImGuiFreeTypeBuilderFlags_NoAutoHint = 2 # 1 << 1
|
383
|
+
ImGuiFreeTypeBuilderFlags_ForceAutoHint = 4 # 1 << 2
|
384
|
+
ImGuiFreeTypeBuilderFlags_LightHinting = 8 # 1 << 3
|
385
|
+
ImGuiFreeTypeBuilderFlags_MonoHinting = 16 # 1 << 4
|
386
|
+
ImGuiFreeTypeBuilderFlags_Bold = 32 # 1 << 5
|
387
|
+
ImGuiFreeTypeBuilderFlags_Oblique = 64 # 1 << 6
|
388
|
+
ImGuiFreeTypeBuilderFlags_Monochrome = 128 # 1 << 7
|
389
|
+
ImGuiFreeTypeBuilderFlags_LoadColor = 256 # 1 << 8
|
390
|
+
ImGuiFreeTypeBuilderFlags_Bitmap = 512 # 1 << 9
|
391
|
+
|
355
392
|
# ImGuiHoveredFlags_
|
356
393
|
# Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered()
|
357
394
|
# Note: if you are trying to check whether your mouse should be dispatched to Dear ImGui or to your app, you should use 'io.WantCaptureMouse' instead! Please read the FAQ!
|
@@ -361,12 +398,13 @@ ImGuiHoveredFlags_ChildWindows = 1 # 1 << 0 # IsWindowHovered(
|
|
361
398
|
ImGuiHoveredFlags_RootWindow = 2 # 1 << 1 # IsWindowHovered() only: Test from root window (top most parent of the current hierarchy)
|
362
399
|
ImGuiHoveredFlags_AnyWindow = 4 # 1 << 2 # IsWindowHovered() only: Return true if any window is hovered
|
363
400
|
ImGuiHoveredFlags_NoPopupHierarchy = 8 # 1 << 3 # IsWindowHovered() only: Do not consider popup hierarchy (do not treat popup emitter as parent of popup) (when used with _ChildWindows or _RootWindow)
|
401
|
+
ImGuiHoveredFlags_DockHierarchy = 16 # 1 << 4 # IsWindowHovered() only: Consider docking hierarchy (treat dockspace host as parent of docked window) (when used with _ChildWindows or _RootWindow)
|
364
402
|
ImGuiHoveredFlags_AllowWhenBlockedByPopup = 32 # 1 << 5 # Return true even if a popup window is normally blocking access to this item/window
|
365
403
|
ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 128 # 1 << 7 # Return true even if an active item is blocking access to this item/window. Useful for Drag and Drop patterns.
|
366
404
|
ImGuiHoveredFlags_AllowWhenOverlappedByItem = 256 # 1 << 8 # IsItemHovered() only: Return true even if the item uses AllowOverlap mode and is overlapped by another hoverable item.
|
367
405
|
ImGuiHoveredFlags_AllowWhenOverlappedByWindow = 512 # 1 << 9 # IsItemHovered() only: Return true even if the position is obstructed or overlapped by another window.
|
368
406
|
ImGuiHoveredFlags_AllowWhenDisabled = 1024 # 1 << 10 # IsItemHovered() only: Return true even if the item is disabled
|
369
|
-
ImGuiHoveredFlags_NoNavOverride = 2048 # 1 << 11 # IsItemHovered() only: Disable using gamepad
|
407
|
+
ImGuiHoveredFlags_NoNavOverride = 2048 # 1 << 11 # IsItemHovered() only: Disable using keyboard/gamepad navigation state when active, always query mouse
|
370
408
|
ImGuiHoveredFlags_AllowWhenOverlapped = 768 # ImGuiHoveredFlags_AllowWhenOverlappedByItem | ImGuiHoveredFlags_AllowWhenOverlappedByWindow
|
371
409
|
ImGuiHoveredFlags_RectOnly = 928 # ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped
|
372
410
|
ImGuiHoveredFlags_RootAndChildWindows = 3 # ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows
|
@@ -403,7 +441,7 @@ ImGuiInputTextFlags_CharsScientific = 4 # 1 << 2 # Allow 0123456789.+-*
|
|
403
441
|
ImGuiInputTextFlags_CharsUppercase = 8 # 1 << 3 # Turn a..z into A..Z
|
404
442
|
ImGuiInputTextFlags_CharsNoBlank = 16 # 1 << 4 # Filter out spaces, tabs
|
405
443
|
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
|
444
|
+
ImGuiInputTextFlags_EnterReturnsTrue = 64 # 1 << 6 # Return 'true' when Enter is pressed (as opposed to every time the value was modified). Consider using IsItemDeactivatedAfterEdit() instead!
|
407
445
|
ImGuiInputTextFlags_EscapeClearsAll = 128 # 1 << 7 # Escape key clears content if not empty, and deactivate otherwise (contrast to default behavior of Escape to revert)
|
408
446
|
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
447
|
ImGuiInputTextFlags_ReadOnly = 512 # 1 << 9 # Read-only mode
|
@@ -414,12 +452,13 @@ ImGuiInputTextFlags_ParseEmptyRefVal = 8192 # 1 << 13 # InputFloat(), Input
|
|
414
452
|
ImGuiInputTextFlags_DisplayEmptyRefVal = 16384 # 1 << 14 # InputFloat(), InputInt(), InputScalar() etc. only: when value is zero, do not display it. Generally used with ImGuiInputTextFlags_ParseEmptyRefVal.
|
415
453
|
ImGuiInputTextFlags_NoHorizontalScroll = 32768 # 1 << 15 # Disable following the cursor horizontally
|
416
454
|
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
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
455
|
+
ImGuiInputTextFlags_ElideLeft = 131072 # 1 << 17 # When text doesn't fit, elide left side to ensure right side stays visible. Useful for path/filenames. Single-line only!
|
456
|
+
ImGuiInputTextFlags_CallbackCompletion = 262144 # 1 << 18 # Callback on pressing TAB (for completion handling)
|
457
|
+
ImGuiInputTextFlags_CallbackHistory = 524288 # 1 << 19 # Callback on pressing Up/Down arrows (for history handling)
|
458
|
+
ImGuiInputTextFlags_CallbackAlways = 1048576 # 1 << 20 # Callback on each iteration. User code may query cursor position, modify text buffer.
|
459
|
+
ImGuiInputTextFlags_CallbackCharFilter = 2097152 # 1 << 21 # Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard.
|
460
|
+
ImGuiInputTextFlags_CallbackResize = 4194304 # 1 << 22 # 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)
|
461
|
+
ImGuiInputTextFlags_CallbackEdit = 8388608 # 1 << 23 # 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
462
|
|
424
463
|
# ImGuiItemFlags_
|
425
464
|
# Flags for ImGui::PushItemFlag()
|
@@ -430,15 +469,17 @@ ImGuiItemFlags_NoNav = 2 # 1 << 1 # false // Disable any form of
|
|
430
469
|
ImGuiItemFlags_NoNavDefaultFocus = 4 # 1 << 2 # false // Disable item being a candidate for default focus (e.g. used by title bar items).
|
431
470
|
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
471
|
ImGuiItemFlags_AutoClosePopups = 16 # 1 << 4 # true // MenuItem()/Selectable() automatically close their parent popup window.
|
472
|
+
ImGuiItemFlags_AllowDuplicateId = 32 # 1 << 5 # false // Allow submitting an item with the same identifier as an item already submitted this frame without triggering a warning tooltip if io.ConfigDebugHighlightIdConflicts is set.
|
433
473
|
|
434
474
|
# ImGuiKey
|
435
475
|
# A key identifier (ImGuiKey_XXX or ImGuiMod_XXX value): can represent Keyboard, Mouse and Gamepad values.
|
436
|
-
# All our named keys are >= 512. Keys value 0 to 511 are left unused
|
437
|
-
#
|
438
|
-
# Read details about the 1.87
|
476
|
+
# All our named keys are >= 512. Keys value 0 to 511 are left unused and were legacy native/opaque key values (< 1.87).
|
477
|
+
# Support for legacy keys was completely removed in 1.91.5.
|
478
|
+
# Read details about the 1.87+ transition : https://github.com/ocornut/imgui/issues/4921
|
439
479
|
# Note that "Keys" related to physical keys and are not the same concept as input "Characters", the later are submitted via io.AddInputCharacter().
|
440
480
|
# The keyboard key enum values are named after the keys on a standard US keyboard, and on other keyboard types the keys reported may not match the keycaps.
|
441
481
|
ImGuiKey_None = 0 # 0
|
482
|
+
ImGuiKey_NamedKey_BEGIN = 512 # 512 # First valid key value (other than 0)
|
442
483
|
ImGuiKey_Tab = 512 # 512 # == ImGuiKey_NamedKey_BEGIN
|
443
484
|
ImGuiKey_LeftArrow = 513 # 513
|
444
485
|
ImGuiKey_RightArrow = 514 # 514
|
@@ -593,18 +634,14 @@ ImGuiKey_ReservedForModCtrl = 662 # 662
|
|
593
634
|
ImGuiKey_ReservedForModShift = 663 # 663
|
594
635
|
ImGuiKey_ReservedForModAlt = 664 # 664
|
595
636
|
ImGuiKey_ReservedForModSuper = 665 # 665
|
596
|
-
|
637
|
+
ImGuiKey_NamedKey_END = 666 # 666
|
597
638
|
ImGuiMod_None = 0 # 0
|
598
639
|
ImGuiMod_Ctrl = 4096 # 1 << 12 # Ctrl (non-macOS), Cmd (macOS)
|
599
640
|
ImGuiMod_Shift = 8192 # 1 << 13 # Shift
|
600
641
|
ImGuiMod_Alt = 16384 # 1 << 14 # Option/Menu
|
601
642
|
ImGuiMod_Super = 32768 # 1 << 15 # Windows/Super (non-macOS), Ctrl (macOS)
|
602
643
|
ImGuiMod_Mask_ = 61440 # 0xF000 # 4-bits
|
603
|
-
ImGuiKey_NamedKey_BEGIN = 512 # 512
|
604
|
-
ImGuiKey_NamedKey_END = 666 # ImGuiKey_COUNT
|
605
644
|
ImGuiKey_NamedKey_COUNT = 154 # ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN
|
606
|
-
ImGuiKey_KeysData_SIZE = 154 # ImGuiKey_NamedKey_COUNT # Size of KeysData[]: hold legacy 0..512 keycodes + named keys
|
607
|
-
ImGuiKey_KeysData_OFFSET = 512 # ImGuiKey_NamedKey_BEGIN # Accesses to io.KeysData[] must use (key - ImGuiKey_KeysData_OFFSET) index.
|
608
645
|
|
609
646
|
# ImGuiMouseButton_
|
610
647
|
# Identify a mouse button.
|
@@ -700,13 +737,16 @@ ImGuiSelectionRequestType_SetRange = 2 # 2 # Request app to select/unselect [Ran
|
|
700
737
|
# ImGuiSliderFlags_
|
701
738
|
# Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc.
|
702
739
|
# We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
|
703
|
-
# (Those are per-item flags. There
|
740
|
+
# (Those are per-item flags. There is shared behavior flag too: ImGuiIO: io.ConfigDragClickToInputText)
|
704
741
|
ImGuiSliderFlags_None = 0 # 0
|
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.
|
706
742
|
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.
|
707
743
|
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
744
|
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
|
745
|
+
ImGuiSliderFlags_WrapAround = 256 # 1 << 8 # Enable wrapping around from max to min and from min to max. Only supported by DragXXX() functions for now.
|
746
|
+
ImGuiSliderFlags_ClampOnInput = 512 # 1 << 9 # Clamp value to min/max bounds when input manually with CTRL+Click. By default CTRL+Click allows going out of bounds.
|
747
|
+
ImGuiSliderFlags_ClampZeroRange = 1024 # 1 << 10 # Clamp even if min==max==0.0f. Otherwise due to legacy reason DragXXX functions don't clamp with those values. When your clamping limits are dynamic you almost always want to use it.
|
748
|
+
ImGuiSliderFlags_NoSpeedTweaks = 2048 # 1 << 11 # Disable keyboard modifiers altering tweak speed. Useful if you want to alter tweak speed yourself based on your own logic.
|
749
|
+
ImGuiSliderFlags_AlwaysClamp = 1536 # ImGuiSliderFlags_ClampOnInput | ImGuiSliderFlags_ClampZeroRange
|
710
750
|
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.
|
711
751
|
|
712
752
|
# ImGuiSortDirection
|
@@ -757,7 +797,8 @@ ImGuiStyleVar_SelectableTextAlign = 29 # 29 # ImVec2 SelectableTextAl
|
|
757
797
|
ImGuiStyleVar_SeparatorTextBorderSize = 30 # 30 # float SeparatorTextBorderSize
|
758
798
|
ImGuiStyleVar_SeparatorTextAlign = 31 # 31 # ImVec2 SeparatorTextAlign
|
759
799
|
ImGuiStyleVar_SeparatorTextPadding = 32 # 32 # ImVec2 SeparatorTextPadding
|
760
|
-
|
800
|
+
ImGuiStyleVar_DockingSeparatorSize = 33 # 33 # float DockingSeparatorSize
|
801
|
+
ImGuiStyleVar_COUNT = 34 # 34
|
761
802
|
|
762
803
|
# ImGuiTabBarFlags_
|
763
804
|
# Flags for ImGui::BeginTabBar()
|
@@ -922,10 +963,21 @@ ImGuiTreeNodeFlags_CollapsingHeader = 26 # ImGuiTreeNodeFlags_Framed | Im
|
|
922
963
|
|
923
964
|
# ImGuiViewportFlags_
|
924
965
|
# Flags stored in ImGuiViewport::Flags, giving indications to the platform backends.
|
925
|
-
ImGuiViewportFlags_None = 0
|
926
|
-
ImGuiViewportFlags_IsPlatformWindow = 1
|
927
|
-
ImGuiViewportFlags_IsPlatformMonitor = 2
|
928
|
-
ImGuiViewportFlags_OwnedByApp = 4
|
966
|
+
ImGuiViewportFlags_None = 0 # 0
|
967
|
+
ImGuiViewportFlags_IsPlatformWindow = 1 # 1 << 0 # Represent a Platform Window
|
968
|
+
ImGuiViewportFlags_IsPlatformMonitor = 2 # 1 << 1 # Represent a Platform Monitor (unused yet)
|
969
|
+
ImGuiViewportFlags_OwnedByApp = 4 # 1 << 2 # Platform Window: Is created/managed by the user application? (rather than our backend)
|
970
|
+
ImGuiViewportFlags_NoDecoration = 8 # 1 << 3 # Platform Window: Disable platform decorations: title bar, borders, etc. (generally set all windows, but if ImGuiConfigFlags_ViewportsDecoration is set we only set this on popups/tooltips)
|
971
|
+
ImGuiViewportFlags_NoTaskBarIcon = 16 # 1 << 4 # Platform Window: Disable platform task bar icon (generally set on popups/tooltips, or all windows if ImGuiConfigFlags_ViewportsNoTaskBarIcon is set)
|
972
|
+
ImGuiViewportFlags_NoFocusOnAppearing = 32 # 1 << 5 # Platform Window: Don't take focus when created.
|
973
|
+
ImGuiViewportFlags_NoFocusOnClick = 64 # 1 << 6 # Platform Window: Don't take focus when clicked on.
|
974
|
+
ImGuiViewportFlags_NoInputs = 128 # 1 << 7 # Platform Window: Make mouse pass through so we can drag this window while peaking behind it.
|
975
|
+
ImGuiViewportFlags_NoRendererClear = 256 # 1 << 8 # Platform Window: Renderer doesn't need to clear the framebuffer ahead (because we will fill it entirely).
|
976
|
+
ImGuiViewportFlags_NoAutoMerge = 512 # 1 << 9 # Platform Window: Avoid merging this window into another host window. This can only be set via ImGuiWindowClass viewport flags override (because we need to now ahead if we are going to create a viewport in the first place!).
|
977
|
+
ImGuiViewportFlags_TopMost = 1024 # 1 << 10 # Platform Window: Display on top (for tooltips only).
|
978
|
+
ImGuiViewportFlags_CanHostOtherWindows = 2048 # 1 << 11 # Viewport can host multiple imgui windows (secondary viewports are associated to a single window). // FIXME: In practice there's still probably code making the assumption that this is always and only on the MainViewport. Will fix once we add support for "no main viewport".
|
979
|
+
ImGuiViewportFlags_IsMinimized = 4096 # 1 << 12 # Platform Window: Window is minimized, can skip render. When minimized we tend to avoid using the viewport pos/size for clipping window or testing if they are contained in the viewport.
|
980
|
+
ImGuiViewportFlags_IsFocused = 8192 # 1 << 13 # Platform Window: Window is focused (last call to Platform_GetWindowFocus() returned true)
|
929
981
|
|
930
982
|
# ImGuiWindowFlags_
|
931
983
|
# Flags for ImGui::Begin()
|
@@ -947,9 +999,10 @@ ImGuiWindowFlags_NoFocusOnAppearing = 4096 # 1 << 12 # Disable taking fo
|
|
947
999
|
ImGuiWindowFlags_NoBringToFrontOnFocus = 8192 # 1 << 13 # Disable bringing window to front when taking focus (e.g. clicking on it or programmatically giving it focus)
|
948
1000
|
ImGuiWindowFlags_AlwaysVerticalScrollbar = 16384 # 1 << 14 # Always show vertical scrollbar (even if ContentSize.y < Size.y)
|
949
1001
|
ImGuiWindowFlags_AlwaysHorizontalScrollbar = 32768 # 1<< 15 # Always show horizontal scrollbar (even if ContentSize.x < Size.x)
|
950
|
-
ImGuiWindowFlags_NoNavInputs = 65536 # 1 << 16 # No gamepad
|
951
|
-
ImGuiWindowFlags_NoNavFocus = 131072 # 1 << 17 # No focusing toward this window with gamepad
|
1002
|
+
ImGuiWindowFlags_NoNavInputs = 65536 # 1 << 16 # No keyboard/gamepad navigation within the window
|
1003
|
+
ImGuiWindowFlags_NoNavFocus = 131072 # 1 << 17 # No focusing toward this window with keyboard/gamepad navigation (e.g. skipped by CTRL+TAB)
|
952
1004
|
ImGuiWindowFlags_UnsavedDocument = 262144 # 1 << 18 # Display a dot next to the title. When used in a tab/docking context, tab is selected when clicking the X + closure is not assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar.
|
1005
|
+
ImGuiWindowFlags_NoDocking = 524288 # 1 << 19 # Disable docking of this window
|
953
1006
|
ImGuiWindowFlags_NoNav = 196608 # ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus
|
954
1007
|
ImGuiWindowFlags_NoDecoration = 43 # ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse
|
955
1008
|
ImGuiWindowFlags_NoInputs = 197120 # ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus
|
@@ -958,6 +1011,7 @@ ImGuiWindowFlags_Tooltip = 33554432 # 1 << 25 # Don't use! For in
|
|
958
1011
|
ImGuiWindowFlags_Popup = 67108864 # 1 << 26 # Don't use! For internal use by BeginPopup()
|
959
1012
|
ImGuiWindowFlags_Modal = 134217728 # 1 << 27 # Don't use! For internal use by BeginPopupModal()
|
960
1013
|
ImGuiWindowFlags_ChildMenu = 268435456 # 1 << 28 # Don't use! For internal use by BeginMenu()
|
1014
|
+
ImGuiWindowFlags_DockNodeHost = 536870912 # 1 << 29 # Don't use! For internal use by Begin()/NewFrame()
|
961
1015
|
|
962
1016
|
|
963
1017
|
class ImVec2 < FFI::Struct
|
@@ -1040,12 +1094,14 @@ end
|
|
1040
1094
|
class ImDrawCmd < FFI::Struct
|
1041
1095
|
layout(
|
1042
1096
|
:ClipRect, ImVec4.by_value,
|
1043
|
-
:TextureId, :
|
1097
|
+
:TextureId, :uint64,
|
1044
1098
|
:VtxOffset, :uint,
|
1045
1099
|
:IdxOffset, :uint,
|
1046
1100
|
:ElemCount, :uint,
|
1047
1101
|
:UserCallback, :pointer,
|
1048
|
-
:UserCallbackData, :pointer
|
1102
|
+
:UserCallbackData, :pointer,
|
1103
|
+
:UserCallbackDataSize, :int,
|
1104
|
+
:UserCallbackDataOffset, :int
|
1049
1105
|
)
|
1050
1106
|
|
1051
1107
|
def GetTexID()
|
@@ -1066,7 +1122,7 @@ end
|
|
1066
1122
|
class ImDrawCmdHeader < FFI::Struct
|
1067
1123
|
layout(
|
1068
1124
|
:ClipRect, ImVec4.by_value,
|
1069
|
-
:TextureId, :
|
1125
|
+
:TextureId, :uint64,
|
1070
1126
|
:VtxOffset, :uint
|
1071
1127
|
)
|
1072
1128
|
end
|
@@ -1078,7 +1134,7 @@ end
|
|
1078
1134
|
# access the current window draw list and draw custom primitives.
|
1079
1135
|
# You can interleave normal ImGui:: calls and adding primitives to the current draw list.
|
1080
1136
|
# In single viewport mode, top-left is == GetMainViewport()->Pos (generally 0,0), bottom-right is == GetMainViewport()->Pos+Size (generally io.DisplaySize).
|
1081
|
-
# You are totally free to apply whatever transformation matrix
|
1137
|
+
# You are totally free to apply whatever transformation matrix you want to the data (depending on the use of the transformation you may want to apply it to ClipRect as well!)
|
1082
1138
|
# Important: Primitives are always added to the list and not culled (culling is done at higher-level by ImGui:: functions), if you use this API a lot consider coarse culling your drawn objects.
|
1083
1139
|
class ImDrawList < FFI::Struct
|
1084
1140
|
layout(
|
@@ -1095,6 +1151,7 @@ class ImDrawList < FFI::Struct
|
|
1095
1151
|
:_Splitter, ImDrawListSplitter.by_value,
|
1096
1152
|
:_ClipRectStack, ImVector.by_value,
|
1097
1153
|
:_TextureIdStack, ImVector.by_value,
|
1154
|
+
:_CallbacksDataBuf, ImVector.by_value,
|
1098
1155
|
:_FringeScale, :float,
|
1099
1156
|
:_OwnerName, :pointer
|
1100
1157
|
)
|
@@ -1107,8 +1164,8 @@ class ImDrawList < FFI::Struct
|
|
1107
1164
|
ImGui::ImDrawList_AddBezierQuadratic(self, p1, p2, p3, col, thickness, num_segments)
|
1108
1165
|
end
|
1109
1166
|
|
1110
|
-
def AddCallback(callback,
|
1111
|
-
ImGui::ImDrawList_AddCallback(self, callback,
|
1167
|
+
def AddCallback(callback, userdata, userdata_size = 0)
|
1168
|
+
ImGui::ImDrawList_AddCallback(self, callback, userdata, userdata_size)
|
1112
1169
|
end
|
1113
1170
|
|
1114
1171
|
def AddCircle(center, radius, col, num_segments = 0, thickness = 1.0)
|
@@ -1405,7 +1462,7 @@ end
|
|
1405
1462
|
class ImFontAtlas < FFI::Struct
|
1406
1463
|
layout(
|
1407
1464
|
:Flags, :int,
|
1408
|
-
:TexID, :
|
1465
|
+
:TexID, :uint64,
|
1409
1466
|
:TexDesiredWidth, :int,
|
1410
1467
|
:TexGlyphPadding, :int,
|
1411
1468
|
:Locked, :bool,
|
@@ -1565,47 +1622,6 @@ class ImGuiKeyData < FFI::Struct
|
|
1565
1622
|
)
|
1566
1623
|
end
|
1567
1624
|
|
1568
|
-
# - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows.
|
1569
|
-
# - With multi-viewport enabled, we extend this concept to have multiple active viewports.
|
1570
|
-
# - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode.
|
1571
|
-
# - About Main Area vs Work Area:
|
1572
|
-
# - Main Area = entire viewport.
|
1573
|
-
# - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor).
|
1574
|
-
# - Windows are generally trying to stay within the Work Area of their host viewport.
|
1575
|
-
class ImGuiViewport < FFI::Struct
|
1576
|
-
layout(
|
1577
|
-
:ID, :uint,
|
1578
|
-
:Flags, :int,
|
1579
|
-
:Pos, ImVec2.by_value,
|
1580
|
-
:Size, ImVec2.by_value,
|
1581
|
-
:WorkPos, ImVec2.by_value,
|
1582
|
-
:WorkSize, ImVec2.by_value,
|
1583
|
-
:PlatformHandle, :pointer,
|
1584
|
-
:PlatformHandleRaw, :pointer
|
1585
|
-
)
|
1586
|
-
|
1587
|
-
def GetCenter()
|
1588
|
-
pOut = ImVec2.new
|
1589
|
-
ImGui::ImGuiViewport_GetCenter(pOut, self)
|
1590
|
-
return pOut
|
1591
|
-
end
|
1592
|
-
|
1593
|
-
def GetWorkCenter()
|
1594
|
-
pOut = ImVec2.new
|
1595
|
-
ImGui::ImGuiViewport_GetWorkCenter(pOut, self)
|
1596
|
-
return pOut
|
1597
|
-
end
|
1598
|
-
|
1599
|
-
def self.create()
|
1600
|
-
return ImGuiViewport.new(ImGui::ImGuiViewport_ImGuiViewport())
|
1601
|
-
end
|
1602
|
-
|
1603
|
-
def destroy()
|
1604
|
-
ImGui::ImGuiViewport_destroy(self)
|
1605
|
-
end
|
1606
|
-
|
1607
|
-
end
|
1608
|
-
|
1609
1625
|
# Helper: Key->Value storage
|
1610
1626
|
# Typically you don't have to worry about this since a storage is held within each Window.
|
1611
1627
|
# We use it to e.g. store collapse state for a tree (Int 0/1)
|
@@ -1681,6 +1697,58 @@ class ImGuiStorage < FFI::Struct
|
|
1681
1697
|
|
1682
1698
|
end
|
1683
1699
|
|
1700
|
+
class ImDrawData < FFI::Struct
|
1701
|
+
end
|
1702
|
+
# - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows.
|
1703
|
+
# - With multi-viewport enabled, we extend this concept to have multiple active viewports.
|
1704
|
+
# - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode.
|
1705
|
+
# - About Main Area vs Work Area:
|
1706
|
+
# - Main Area = entire viewport.
|
1707
|
+
# - Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor).
|
1708
|
+
# - Windows are generally trying to stay within the Work Area of their host viewport.
|
1709
|
+
class ImGuiViewport < FFI::Struct
|
1710
|
+
layout(
|
1711
|
+
:ID, :uint,
|
1712
|
+
:Flags, :int,
|
1713
|
+
:Pos, ImVec2.by_value,
|
1714
|
+
:Size, ImVec2.by_value,
|
1715
|
+
:WorkPos, ImVec2.by_value,
|
1716
|
+
:WorkSize, ImVec2.by_value,
|
1717
|
+
:DpiScale, :float,
|
1718
|
+
:ParentViewportId, :uint,
|
1719
|
+
:DrawData, ImDrawData.ptr,
|
1720
|
+
:RendererUserData, :pointer,
|
1721
|
+
:PlatformUserData, :pointer,
|
1722
|
+
:PlatformHandle, :pointer,
|
1723
|
+
:PlatformHandleRaw, :pointer,
|
1724
|
+
:PlatformWindowCreated, :bool,
|
1725
|
+
:PlatformRequestMove, :bool,
|
1726
|
+
:PlatformRequestResize, :bool,
|
1727
|
+
:PlatformRequestClose, :bool
|
1728
|
+
)
|
1729
|
+
|
1730
|
+
def GetCenter()
|
1731
|
+
pOut = ImVec2.new
|
1732
|
+
ImGui::ImGuiViewport_GetCenter(pOut, self)
|
1733
|
+
return pOut
|
1734
|
+
end
|
1735
|
+
|
1736
|
+
def GetWorkCenter()
|
1737
|
+
pOut = ImVec2.new
|
1738
|
+
ImGui::ImGuiViewport_GetWorkCenter(pOut, self)
|
1739
|
+
return pOut
|
1740
|
+
end
|
1741
|
+
|
1742
|
+
def self.create()
|
1743
|
+
return ImGuiViewport.new(ImGui::ImGuiViewport_ImGuiViewport())
|
1744
|
+
end
|
1745
|
+
|
1746
|
+
def destroy()
|
1747
|
+
ImGui::ImGuiViewport_destroy(self)
|
1748
|
+
end
|
1749
|
+
|
1750
|
+
end
|
1751
|
+
|
1684
1752
|
# Helper: ImColor() implicitly converts colors to either ImU32 (packed 4x1 byte) or ImVec4 (4x1 float)
|
1685
1753
|
# Prefer using IM_COL32() macros if you want a guaranteed compile-time ImU32 for usage with ImDrawList API.
|
1686
1754
|
# **Avoid storing ImColor! Store either u32 of ImVec4. This is not a full-featured color class. MAY OBSOLETE.
|
@@ -1746,9 +1814,9 @@ class ImFont < FFI::Struct
|
|
1746
1814
|
:ContainerAtlas, ImFontAtlas.ptr,
|
1747
1815
|
:ConfigData, :pointer,
|
1748
1816
|
:ConfigDataCount, :short,
|
1749
|
-
:FallbackChar, :ushort,
|
1750
|
-
:EllipsisChar, :ushort,
|
1751
1817
|
:EllipsisCharCount, :short,
|
1818
|
+
:EllipsisChar, :ushort,
|
1819
|
+
:FallbackChar, :ushort,
|
1752
1820
|
:EllipsisWidth, :float,
|
1753
1821
|
:EllipsisCharStep, :float,
|
1754
1822
|
:DirtyLookupTables, :bool,
|
@@ -1838,11 +1906,12 @@ end
|
|
1838
1906
|
# See ImFontAtlas::AddCustomRectXXX functions.
|
1839
1907
|
class ImFontAtlasCustomRect < FFI::Struct
|
1840
1908
|
layout(
|
1841
|
-
:Width, :ushort,
|
1842
|
-
:Height, :ushort,
|
1843
1909
|
:X, :ushort,
|
1844
1910
|
:Y, :ushort,
|
1911
|
+
:Width, :ushort,
|
1912
|
+
:Height, :ushort,
|
1845
1913
|
:GlyphID, :uint,
|
1914
|
+
:GlyphColored, :uint,
|
1846
1915
|
:GlyphAdvanceX, :float,
|
1847
1916
|
:GlyphOffset, ImVec2.by_value,
|
1848
1917
|
:Font, ImFont.ptr
|
@@ -1975,22 +2044,43 @@ class ImGuiIO < FFI::Struct
|
|
1975
2044
|
:FontAllowUserScaling, :bool,
|
1976
2045
|
:FontDefault, ImFont.ptr,
|
1977
2046
|
:DisplayFramebufferScale, ImVec2.by_value,
|
2047
|
+
:ConfigNavSwapGamepadButtons, :bool,
|
2048
|
+
:ConfigNavMoveSetMousePos, :bool,
|
2049
|
+
:ConfigNavCaptureKeyboard, :bool,
|
2050
|
+
:ConfigNavEscapeClearFocusItem, :bool,
|
2051
|
+
:ConfigNavEscapeClearFocusWindow, :bool,
|
2052
|
+
:ConfigNavCursorVisibleAuto, :bool,
|
2053
|
+
:ConfigNavCursorVisibleAlways, :bool,
|
2054
|
+
:ConfigDockingNoSplit, :bool,
|
2055
|
+
:ConfigDockingWithShift, :bool,
|
2056
|
+
:ConfigDockingAlwaysTabBar, :bool,
|
2057
|
+
:ConfigDockingTransparentPayload, :bool,
|
2058
|
+
:ConfigViewportsNoAutoMerge, :bool,
|
2059
|
+
:ConfigViewportsNoTaskBarIcon, :bool,
|
2060
|
+
:ConfigViewportsNoDecoration, :bool,
|
2061
|
+
:ConfigViewportsNoDefaultParent, :bool,
|
1978
2062
|
:MouseDrawCursor, :bool,
|
1979
2063
|
:ConfigMacOSXBehaviors, :bool,
|
1980
|
-
:ConfigNavSwapGamepadButtons, :bool,
|
1981
2064
|
:ConfigInputTrickleEventQueue, :bool,
|
1982
2065
|
:ConfigInputTextCursorBlink, :bool,
|
1983
2066
|
:ConfigInputTextEnterKeepActive, :bool,
|
1984
2067
|
:ConfigDragClickToInputText, :bool,
|
1985
2068
|
:ConfigWindowsResizeFromEdges, :bool,
|
1986
2069
|
:ConfigWindowsMoveFromTitleBarOnly, :bool,
|
2070
|
+
:ConfigWindowsCopyContentsWithCtrlC, :bool,
|
2071
|
+
:ConfigScrollbarScrollByPage, :bool,
|
1987
2072
|
:ConfigMemoryCompactTimer, :float,
|
1988
2073
|
:MouseDoubleClickTime, :float,
|
1989
2074
|
:MouseDoubleClickMaxDist, :float,
|
1990
2075
|
:MouseDragThreshold, :float,
|
1991
2076
|
:KeyRepeatDelay, :float,
|
1992
2077
|
:KeyRepeatRate, :float,
|
2078
|
+
:ConfigErrorRecovery, :bool,
|
2079
|
+
:ConfigErrorRecoveryEnableAssert, :bool,
|
2080
|
+
:ConfigErrorRecoveryEnableDebugLog, :bool,
|
2081
|
+
:ConfigErrorRecoveryEnableTooltip, :bool,
|
1993
2082
|
:ConfigDebugIsDebuggerPresent, :bool,
|
2083
|
+
:ConfigDebugHighlightIdConflicts, :bool,
|
1994
2084
|
:ConfigDebugBeginReturnValueOnce, :bool,
|
1995
2085
|
:ConfigDebugBeginReturnValueLoop, :bool,
|
1996
2086
|
:ConfigDebugIgnoreFocusLoss, :bool,
|
@@ -2019,6 +2109,7 @@ class ImGuiIO < FFI::Struct
|
|
2019
2109
|
:MouseWheel, :float,
|
2020
2110
|
:MouseWheelH, :float,
|
2021
2111
|
:MouseSource, :int,
|
2112
|
+
:MouseHoveredViewport, :uint,
|
2022
2113
|
:KeyCtrl, :bool,
|
2023
2114
|
:KeyShift, :bool,
|
2024
2115
|
:KeyAlt, :bool,
|
@@ -2040,12 +2131,11 @@ class ImGuiIO < FFI::Struct
|
|
2040
2131
|
:MouseCtrlLeftAsRightClick, :bool,
|
2041
2132
|
:MouseDownDuration, [:float, 5],
|
2042
2133
|
:MouseDownDurationPrev, [:float, 5],
|
2134
|
+
:MouseDragMaxDistanceAbs, [ImVec2.by_value, 5],
|
2043
2135
|
:MouseDragMaxDistanceSqr, [:float, 5],
|
2044
2136
|
:PenPressure, :float,
|
2045
2137
|
:AppFocusLost, :bool,
|
2046
2138
|
:AppAcceptingEvents, :bool,
|
2047
|
-
:BackendUsingLegacyKeyArrays, :char,
|
2048
|
-
:BackendUsingLegacyNavInputArray, :bool,
|
2049
2139
|
:InputQueueSurrogate, :ushort,
|
2050
2140
|
:InputQueueCharacters, ImVector.by_value
|
2051
2141
|
)
|
@@ -2086,6 +2176,10 @@ class ImGuiIO < FFI::Struct
|
|
2086
2176
|
ImGui::ImGuiIO_AddMouseSourceEvent(self, source)
|
2087
2177
|
end
|
2088
2178
|
|
2179
|
+
def AddMouseViewportEvent(id)
|
2180
|
+
ImGui::ImGuiIO_AddMouseViewportEvent(self, id)
|
2181
|
+
end
|
2182
|
+
|
2089
2183
|
def AddMouseWheelEvent(wheel_x, wheel_y)
|
2090
2184
|
ImGui::ImGuiIO_AddMouseWheelEvent(self, wheel_x, wheel_y)
|
2091
2185
|
end
|
@@ -2315,6 +2409,28 @@ class ImGuiPlatformImeData < FFI::Struct
|
|
2315
2409
|
|
2316
2410
|
end
|
2317
2411
|
|
2412
|
+
# (Optional) This is required when enabling multi-viewport. Represent the bounds of each connected monitor/display and their DPI.
|
2413
|
+
# We use this information for multiple DPI support + clamping the position of popups and tooltips so they don't straddle multiple monitors.
|
2414
|
+
class ImGuiPlatformMonitor < FFI::Struct
|
2415
|
+
layout(
|
2416
|
+
:MainPos, ImVec2.by_value,
|
2417
|
+
:MainSize, ImVec2.by_value,
|
2418
|
+
:WorkPos, ImVec2.by_value,
|
2419
|
+
:WorkSize, ImVec2.by_value,
|
2420
|
+
:DpiScale, :float,
|
2421
|
+
:PlatformHandle, :pointer
|
2422
|
+
)
|
2423
|
+
|
2424
|
+
def self.create()
|
2425
|
+
return ImGuiPlatformMonitor.new(ImGui::ImGuiPlatformMonitor_ImGuiPlatformMonitor())
|
2426
|
+
end
|
2427
|
+
|
2428
|
+
def destroy()
|
2429
|
+
ImGui::ImGuiPlatformMonitor_destroy(self)
|
2430
|
+
end
|
2431
|
+
|
2432
|
+
end
|
2433
|
+
|
2318
2434
|
# Optional helper to store multi-selection state + apply multi-selection requests.
|
2319
2435
|
# - Used by our demos and provided as a convenience to easily implement basic multi-selection.
|
2320
2436
|
# - Iterate selection with 'void* it = NULL; ImGuiID id; while (selection.GetNextSelectedItem(&it, &id)) { ... }'
|
@@ -2466,13 +2582,14 @@ class ImGuiStyle < FFI::Struct
|
|
2466
2582
|
:SeparatorTextPadding, ImVec2.by_value,
|
2467
2583
|
:DisplayWindowPadding, ImVec2.by_value,
|
2468
2584
|
:DisplaySafeAreaPadding, ImVec2.by_value,
|
2585
|
+
:DockingSeparatorSize, :float,
|
2469
2586
|
:MouseCursorScale, :float,
|
2470
2587
|
:AntiAliasedLines, :bool,
|
2471
2588
|
:AntiAliasedLinesUseTex, :bool,
|
2472
2589
|
:AntiAliasedFill, :bool,
|
2473
2590
|
:CurveTessellationTol, :float,
|
2474
2591
|
:CircleTessellationMaxError, :float,
|
2475
|
-
:Colors, [ImVec4.by_value,
|
2592
|
+
:Colors, [ImVec4.by_value, 58],
|
2476
2593
|
:HoverStationaryDelay, :float,
|
2477
2594
|
:HoverDelayShort, :float,
|
2478
2595
|
:HoverDelayNormal, :float,
|
@@ -2549,8 +2666,8 @@ class ImGuiTextBuffer < FFI::Struct
|
|
2549
2666
|
ImGui::ImGuiTextBuffer_append(self, str, str_end)
|
2550
2667
|
end
|
2551
2668
|
|
2552
|
-
def appendf(fmt, *varargs)
|
2553
|
-
ImGui::ImGuiTextBuffer_appendf(
|
2669
|
+
def appendf(buffer, fmt, *varargs)
|
2670
|
+
ImGui::ImGuiTextBuffer_appendf(buffer, fmt, *varargs)
|
2554
2671
|
end
|
2555
2672
|
|
2556
2673
|
def begin()
|
@@ -2653,6 +2770,36 @@ class ImGuiTextRange < FFI::Struct
|
|
2653
2770
|
|
2654
2771
|
end
|
2655
2772
|
|
2773
|
+
# [ALPHA] Rarely used / very advanced uses only. Use with SetNextWindowClass() and DockSpace() functions.
|
2774
|
+
# Important: the content of this class is still highly WIP and likely to change and be refactored
|
2775
|
+
# before we stabilize Docking features. Please be mindful if using this.
|
2776
|
+
# Provide hints:
|
2777
|
+
# - To the platform backend via altered viewport flags (enable/disable OS decoration, OS task bar icons, etc.)
|
2778
|
+
# - To the platform backend for OS level parent/child relationships of viewport.
|
2779
|
+
# - To the docking system for various options and filtering.
|
2780
|
+
class ImGuiWindowClass < FFI::Struct
|
2781
|
+
layout(
|
2782
|
+
:ClassId, :uint,
|
2783
|
+
:ParentViewportId, :uint,
|
2784
|
+
:FocusRouteParentWindowId, :uint,
|
2785
|
+
:ViewportFlagsOverrideSet, :int,
|
2786
|
+
:ViewportFlagsOverrideClear, :int,
|
2787
|
+
:TabItemFlagsOverrideSet, :int,
|
2788
|
+
:DockNodeFlagsOverrideSet, :int,
|
2789
|
+
:DockingAlwaysTabBar, :bool,
|
2790
|
+
:DockingAllowUnclassed, :bool
|
2791
|
+
)
|
2792
|
+
|
2793
|
+
def self.create()
|
2794
|
+
return ImGuiWindowClass.new(ImGui::ImGuiWindowClass_ImGuiWindowClass())
|
2795
|
+
end
|
2796
|
+
|
2797
|
+
def destroy()
|
2798
|
+
ImGui::ImGuiWindowClass_destroy(self)
|
2799
|
+
end
|
2800
|
+
|
2801
|
+
end
|
2802
|
+
|
2656
2803
|
# [Internal] Key+Value for ImGuiStorage
|
2657
2804
|
class ImGuiStoragePair < FFI::Struct
|
2658
2805
|
layout(
|
@@ -2722,12 +2869,12 @@ module ImGui
|
|
2722
2869
|
end
|
2723
2870
|
|
2724
2871
|
def self.import_symbols(output_error = false)
|
2725
|
-
callback :ImDrawCallback, [ImDrawList, ImDrawCmd], :void
|
2726
|
-
callback :ImGuiInputTextCallback, [ImGuiInputTextCallbackData], :int
|
2727
|
-
callback :ImGuiSizeCallback, [ImGuiSizeCallbackData], :void
|
2872
|
+
callback :ImDrawCallback, [ImDrawList, ImDrawCmd], :void
|
2873
|
+
callback :ImGuiInputTextCallback, [ImGuiInputTextCallbackData], :int
|
2874
|
+
callback :ImGuiSizeCallback, [ImGuiSizeCallbackData], :void
|
2728
2875
|
|
2729
2876
|
entries = [
|
2730
|
-
[:ImDrawCmd_GetTexID, [:pointer], :
|
2877
|
+
[:ImDrawCmd_GetTexID, [:pointer], :uint64],
|
2731
2878
|
[:ImDrawCmd_ImDrawCmd, [], :pointer],
|
2732
2879
|
[:ImDrawCmd_destroy, [:pointer], :void],
|
2733
2880
|
[:ImDrawData_AddDrawList, [:pointer, :pointer], :void],
|
@@ -2745,7 +2892,7 @@ module ImGui
|
|
2745
2892
|
[:ImDrawListSplitter_destroy, [:pointer], :void],
|
2746
2893
|
[:ImDrawList_AddBezierCubic, [:pointer, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, :uint, :float, :int], :void],
|
2747
2894
|
[:ImDrawList_AddBezierQuadratic, [:pointer, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, :uint, :float, :int], :void],
|
2748
|
-
[:ImDrawList_AddCallback, [:pointer, :ImDrawCallback, :pointer], :void],
|
2895
|
+
[:ImDrawList_AddCallback, [:pointer, :ImDrawCallback, :pointer, :size_t], :void],
|
2749
2896
|
[:ImDrawList_AddCircle, [:pointer, ImVec2.by_value, :float, :uint, :int, :float], :void],
|
2750
2897
|
[:ImDrawList_AddCircleFilled, [:pointer, ImVec2.by_value, :float, :uint, :int], :void],
|
2751
2898
|
[:ImDrawList_AddConcavePolyFilled, [:pointer, :pointer, :int, :uint], :void],
|
@@ -2753,9 +2900,9 @@ module ImGui
|
|
2753
2900
|
[:ImDrawList_AddDrawCmd, [:pointer], :void],
|
2754
2901
|
[:ImDrawList_AddEllipse, [:pointer, ImVec2.by_value, ImVec2.by_value, :uint, :float, :int, :float], :void],
|
2755
2902
|
[:ImDrawList_AddEllipseFilled, [:pointer, ImVec2.by_value, ImVec2.by_value, :uint, :float, :int], :void],
|
2756
|
-
[:ImDrawList_AddImage, [:pointer, :
|
2757
|
-
[:ImDrawList_AddImageQuad, [:pointer, :
|
2758
|
-
[:ImDrawList_AddImageRounded, [:pointer, :
|
2903
|
+
[:ImDrawList_AddImage, [:pointer, :uint64, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, :uint], :void],
|
2904
|
+
[:ImDrawList_AddImageQuad, [:pointer, :uint64, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, :uint], :void],
|
2905
|
+
[:ImDrawList_AddImageRounded, [:pointer, :uint64, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, :uint, :float, :int], :void],
|
2759
2906
|
[:ImDrawList_AddLine, [:pointer, ImVec2.by_value, ImVec2.by_value, :uint, :float], :void],
|
2760
2907
|
[:ImDrawList_AddNgon, [:pointer, ImVec2.by_value, :float, :uint, :int, :float], :void],
|
2761
2908
|
[:ImDrawList_AddNgonFilled, [:pointer, ImVec2.by_value, :float, :uint, :int], :void],
|
@@ -2800,7 +2947,7 @@ module ImGui
|
|
2800
2947
|
[:ImDrawList_PrimWriteVtx, [:pointer, ImVec2.by_value, ImVec2.by_value, :uint], :void],
|
2801
2948
|
[:ImDrawList_PushClipRect, [:pointer, ImVec2.by_value, ImVec2.by_value, :bool], :void],
|
2802
2949
|
[:ImDrawList_PushClipRectFullScreen, [:pointer], :void],
|
2803
|
-
[:ImDrawList_PushTextureID, [:pointer, :
|
2950
|
+
[:ImDrawList_PushTextureID, [:pointer, :uint64], :void],
|
2804
2951
|
[:ImDrawList__CalcCircleAutoSegmentCount, [:pointer, :float], :int],
|
2805
2952
|
[:ImDrawList__ClearFreeMemory, [:pointer], :void],
|
2806
2953
|
[:ImDrawList__OnChangedClipRect, [:pointer], :void],
|
@@ -2810,7 +2957,7 @@ module ImGui
|
|
2810
2957
|
[:ImDrawList__PathArcToN, [:pointer, ImVec2.by_value, :float, :float, :float, :int], :void],
|
2811
2958
|
[:ImDrawList__PopUnusedDrawCmd, [:pointer], :void],
|
2812
2959
|
[:ImDrawList__ResetForNewFrame, [:pointer], :void],
|
2813
|
-
[:ImDrawList__SetTextureID, [:pointer, :
|
2960
|
+
[:ImDrawList__SetTextureID, [:pointer, :uint64], :void],
|
2814
2961
|
[:ImDrawList__TryMergeDrawCmds, [:pointer], :void],
|
2815
2962
|
[:ImDrawList_destroy, [:pointer], :void],
|
2816
2963
|
[:ImFontAtlasCustomRect_ImFontAtlasCustomRect, [], :pointer],
|
@@ -2845,7 +2992,7 @@ module ImGui
|
|
2845
2992
|
[:ImFontAtlas_GetTexDataAsRGBA32, [:pointer, :pointer, :pointer, :pointer, :pointer], :void],
|
2846
2993
|
[:ImFontAtlas_ImFontAtlas, [], :pointer],
|
2847
2994
|
[:ImFontAtlas_IsBuilt, [:pointer], :bool],
|
2848
|
-
[:ImFontAtlas_SetTexID, [:pointer, :
|
2995
|
+
[:ImFontAtlas_SetTexID, [:pointer, :uint64], :void],
|
2849
2996
|
[:ImFontAtlas_destroy, [:pointer], :void],
|
2850
2997
|
[:ImFontConfig_ImFontConfig, [], :pointer],
|
2851
2998
|
[:ImFontConfig_destroy, [:pointer], :void],
|
@@ -2876,6 +3023,8 @@ module ImGui
|
|
2876
3023
|
[:ImFont_RenderText, [:pointer, :pointer, :float, ImVec2.by_value, :uint, ImVec4.by_value, :pointer, :pointer, :float, :bool], :void],
|
2877
3024
|
[:ImFont_SetGlyphVisible, [:pointer, :ushort, :bool], :void],
|
2878
3025
|
[:ImFont_destroy, [:pointer], :void],
|
3026
|
+
[:ImGuiFreeType_GetBuilderForFreeType, [], :pointer],
|
3027
|
+
[:ImGuiFreeType_SetAllocatorFunctions, [:pointer, :pointer, :pointer], :void],
|
2879
3028
|
[:ImGuiIO_AddFocusEvent, [:pointer, :bool], :void],
|
2880
3029
|
[:ImGuiIO_AddInputCharacter, [:pointer, :uint], :void],
|
2881
3030
|
[:ImGuiIO_AddInputCharacterUTF16, [:pointer, :ushort], :void],
|
@@ -2885,6 +3034,7 @@ module ImGui
|
|
2885
3034
|
[:ImGuiIO_AddMouseButtonEvent, [:pointer, :int, :bool], :void],
|
2886
3035
|
[:ImGuiIO_AddMousePosEvent, [:pointer, :float, :float], :void],
|
2887
3036
|
[:ImGuiIO_AddMouseSourceEvent, [:pointer, :int], :void],
|
3037
|
+
[:ImGuiIO_AddMouseViewportEvent, [:pointer, :uint], :void],
|
2888
3038
|
[:ImGuiIO_AddMouseWheelEvent, [:pointer, :float, :float], :void],
|
2889
3039
|
[:ImGuiIO_ClearEventsQueue, [:pointer], :void],
|
2890
3040
|
[:ImGuiIO_ClearInputKeys, [:pointer], :void],
|
@@ -2920,6 +3070,8 @@ module ImGui
|
|
2920
3070
|
[:ImGuiPlatformIO_destroy, [:pointer], :void],
|
2921
3071
|
[:ImGuiPlatformImeData_ImGuiPlatformImeData, [], :pointer],
|
2922
3072
|
[:ImGuiPlatformImeData_destroy, [:pointer], :void],
|
3073
|
+
[:ImGuiPlatformMonitor_ImGuiPlatformMonitor, [], :pointer],
|
3074
|
+
[:ImGuiPlatformMonitor_destroy, [:pointer], :void],
|
2923
3075
|
[:ImGuiSelectionBasicStorage_ApplyRequests, [:pointer, :pointer], :void],
|
2924
3076
|
[:ImGuiSelectionBasicStorage_Clear, [:pointer], :void],
|
2925
3077
|
[:ImGuiSelectionBasicStorage_Contains, [:pointer, :uint], :bool],
|
@@ -2985,6 +3137,8 @@ module ImGui
|
|
2985
3137
|
[:ImGuiViewport_GetWorkCenter, [:pointer, :pointer], :void],
|
2986
3138
|
[:ImGuiViewport_ImGuiViewport, [], :pointer],
|
2987
3139
|
[:ImGuiViewport_destroy, [:pointer], :void],
|
3140
|
+
[:ImGuiWindowClass_ImGuiWindowClass, [], :pointer],
|
3141
|
+
[:ImGuiWindowClass_destroy, [:pointer], :void],
|
2988
3142
|
[:igAcceptDragDropPayload, [:pointer, :int], :pointer],
|
2989
3143
|
[:igAlignTextToFramePadding, [], :void],
|
2990
3144
|
[:igArrowButton, [:pointer, :int], :bool],
|
@@ -3042,6 +3196,9 @@ module ImGui
|
|
3042
3196
|
[:igDebugStartItemPicker, [], :void],
|
3043
3197
|
[:igDebugTextEncoding, [:pointer], :void],
|
3044
3198
|
[:igDestroyContext, [:pointer], :void],
|
3199
|
+
[:igDestroyPlatformWindows, [], :void],
|
3200
|
+
[:igDockSpace, [:uint, ImVec2.by_value, :int, :pointer], :uint],
|
3201
|
+
[:igDockSpaceOverViewport, [:uint, :pointer, :int, :pointer], :uint],
|
3045
3202
|
[:igDragFloat, [:pointer, :pointer, :float, :float, :float, :pointer, :int], :bool],
|
3046
3203
|
[:igDragFloat2, [:pointer, :pointer, :float, :float, :float, :pointer, :int], :bool],
|
3047
3204
|
[:igDragFloat3, [:pointer, :pointer, :float, :float, :float, :pointer, :int], :bool],
|
@@ -3073,8 +3230,10 @@ module ImGui
|
|
3073
3230
|
[:igEndTabItem, [], :void],
|
3074
3231
|
[:igEndTable, [], :void],
|
3075
3232
|
[:igEndTooltip, [], :void],
|
3233
|
+
[:igFindViewportByID, [:uint], :pointer],
|
3234
|
+
[:igFindViewportByPlatformHandle, [:pointer], :pointer],
|
3076
3235
|
[:igGetAllocatorFunctions, [:pointer, :pointer, :pointer], :void],
|
3077
|
-
[:igGetBackgroundDrawList, [], :pointer],
|
3236
|
+
[:igGetBackgroundDrawList, [:pointer], :pointer],
|
3078
3237
|
[:igGetClipboardText, [], :pointer],
|
3079
3238
|
[:igGetColorU32_Col, [:int, :float], :uint],
|
3080
3239
|
[:igGetColorU32_Vec4, [ImVec4.by_value], :uint],
|
@@ -3096,7 +3255,7 @@ module ImGui
|
|
3096
3255
|
[:igGetFont, [], :pointer],
|
3097
3256
|
[:igGetFontSize, [], :float],
|
3098
3257
|
[:igGetFontTexUvWhitePixel, [:pointer], :void],
|
3099
|
-
[:igGetForegroundDrawList, [], :pointer],
|
3258
|
+
[:igGetForegroundDrawList, [:pointer], :pointer],
|
3100
3259
|
[:igGetFrameCount, [], :int],
|
3101
3260
|
[:igGetFrameHeight, [], :float],
|
3102
3261
|
[:igGetFrameHeightWithSpacing, [], :float],
|
@@ -3131,13 +3290,16 @@ module ImGui
|
|
3131
3290
|
[:igGetTime, [], :double],
|
3132
3291
|
[:igGetTreeNodeToLabelSpacing, [], :float],
|
3133
3292
|
[:igGetVersion, [], :pointer],
|
3293
|
+
[:igGetWindowDockID, [], :uint],
|
3294
|
+
[:igGetWindowDpiScale, [], :float],
|
3134
3295
|
[:igGetWindowDrawList, [], :pointer],
|
3135
3296
|
[:igGetWindowHeight, [], :float],
|
3136
3297
|
[:igGetWindowPos, [:pointer], :void],
|
3137
3298
|
[:igGetWindowSize, [:pointer], :void],
|
3299
|
+
[:igGetWindowViewport, [], :pointer],
|
3138
3300
|
[:igGetWindowWidth, [], :float],
|
3139
|
-
[:igImage, [:
|
3140
|
-
[:igImageButton, [:pointer, :
|
3301
|
+
[:igImage, [:uint64, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec4.by_value, ImVec4.by_value], :void],
|
3302
|
+
[:igImageButton, [:pointer, :uint64, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec4.by_value, ImVec4.by_value], :bool],
|
3141
3303
|
[:igIndent, [:float], :void],
|
3142
3304
|
[:igInputDouble, [:pointer, :pointer, :double, :double, :pointer, :int], :bool],
|
3143
3305
|
[:igInputFloat, [:pointer, :pointer, :float, :float, :pointer, :int], :bool],
|
@@ -3185,6 +3347,7 @@ module ImGui
|
|
3185
3347
|
[:igIsRectVisible_Vec2, [ImVec2.by_value, ImVec2.by_value], :bool],
|
3186
3348
|
[:igIsWindowAppearing, [], :bool],
|
3187
3349
|
[:igIsWindowCollapsed, [], :bool],
|
3350
|
+
[:igIsWindowDocked, [], :bool],
|
3188
3351
|
[:igIsWindowFocused, [:int], :bool],
|
3189
3352
|
[:igIsWindowHovered, [:int], :bool],
|
3190
3353
|
[:igLabelText, [:pointer, :pointer, :varargs], :void],
|
@@ -3239,6 +3402,7 @@ module ImGui
|
|
3239
3402
|
[:igRadioButton_Bool, [:pointer, :bool], :bool],
|
3240
3403
|
[:igRadioButton_IntPtr, [:pointer, :pointer, :int], :bool],
|
3241
3404
|
[:igRender, [], :void],
|
3405
|
+
[:igRenderPlatformWindowsDefault, [:pointer, :pointer], :void],
|
3242
3406
|
[:igResetMouseDragDelta, [:int], :void],
|
3243
3407
|
[:igSameLine, [:float, :float], :void],
|
3244
3408
|
[:igSaveIniSettingsToDisk, [:pointer], :void],
|
@@ -3263,6 +3427,7 @@ module ImGui
|
|
3263
3427
|
[:igSetItemTooltip, [:pointer, :varargs], :void],
|
3264
3428
|
[:igSetKeyboardFocusHere, [:int], :void],
|
3265
3429
|
[:igSetMouseCursor, [:int], :void],
|
3430
|
+
[:igSetNavCursorVisible, [:bool], :void],
|
3266
3431
|
[:igSetNextFrameWantCaptureKeyboard, [:bool], :void],
|
3267
3432
|
[:igSetNextFrameWantCaptureMouse, [:bool], :void],
|
3268
3433
|
[:igSetNextItemAllowOverlap, [], :void],
|
@@ -3272,13 +3437,16 @@ module ImGui
|
|
3272
3437
|
[:igSetNextItemStorageID, [:uint], :void],
|
3273
3438
|
[:igSetNextItemWidth, [:float], :void],
|
3274
3439
|
[:igSetNextWindowBgAlpha, [:float], :void],
|
3440
|
+
[:igSetNextWindowClass, [:pointer], :void],
|
3275
3441
|
[:igSetNextWindowCollapsed, [:bool, :int], :void],
|
3276
3442
|
[:igSetNextWindowContentSize, [ImVec2.by_value], :void],
|
3443
|
+
[:igSetNextWindowDockID, [:uint, :int], :void],
|
3277
3444
|
[:igSetNextWindowFocus, [], :void],
|
3278
3445
|
[:igSetNextWindowPos, [ImVec2.by_value, :int, ImVec2.by_value], :void],
|
3279
3446
|
[:igSetNextWindowScroll, [ImVec2.by_value], :void],
|
3280
3447
|
[:igSetNextWindowSize, [ImVec2.by_value, :int], :void],
|
3281
3448
|
[:igSetNextWindowSizeConstraints, [ImVec2.by_value, ImVec2.by_value, :ImGuiSizeCallback, :pointer], :void],
|
3449
|
+
[:igSetNextWindowViewport, [:uint], :void],
|
3282
3450
|
[:igSetScrollFromPosX, [:float, :float], :void],
|
3283
3451
|
[:igSetScrollFromPosY, [:float, :float], :void],
|
3284
3452
|
[:igSetScrollHereX, [:float], :void],
|
@@ -3358,6 +3526,7 @@ module ImGui
|
|
3358
3526
|
[:igTreePush_Str, [:pointer], :void],
|
3359
3527
|
[:igTreePush_Ptr, [:pointer], :void],
|
3360
3528
|
[:igUnindent, [:float], :void],
|
3529
|
+
[:igUpdatePlatformWindows, [], :void],
|
3361
3530
|
[:igVSliderFloat, [:pointer, ImVec2.by_value, :pointer, :float, :float, :pointer, :int], :bool],
|
3362
3531
|
[:igVSliderInt, [:pointer, ImVec2.by_value, :pointer, :int, :int, :pointer, :int], :bool],
|
3363
3532
|
[:igVSliderScalar, [:pointer, ImVec2.by_value, :int, :pointer, :pointer, :pointer, :pointer, :int], :bool],
|
@@ -3445,7 +3614,7 @@ module ImGui
|
|
3445
3614
|
# - Disable all user interactions and dim items visuals (applying style.DisabledAlpha over current colors)
|
3446
3615
|
# - 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
3616
|
# - Tooltips windows by exception are opted out of disabling.
|
3448
|
-
# - BeginDisabled(false) essentially does nothing
|
3617
|
+
# - BeginDisabled(false)/EndDisabled() essentially does nothing but is provided to facilitate use of boolean expressions (as a micro-optimization: if you have tens of thousands of BeginDisabled(false)/EndDisabled() pairs, you might want to reformulate your code to avoid making those calls)
|
3449
3618
|
def self.BeginDisabled(disabled = true)
|
3450
3619
|
igBeginDisabled(disabled)
|
3451
3620
|
end
|
@@ -3487,6 +3656,7 @@ module ImGui
|
|
3487
3656
|
#
|
3488
3657
|
# Widgets: List Boxes
|
3489
3658
|
# - This is essentially a thin wrapper to using BeginChild/EndChild with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label.
|
3659
|
+
# - If you don't need a label you can probably simply use BeginChild() with the ImGuiChildFlags_FrameStyle flag for the same result.
|
3490
3660
|
# - You can submit contents and manage your selection state however you want it, by creating e.g. Selectable() or any other items.
|
3491
3661
|
# - The simplified/old ListBox() api are helpers over BeginListBox()/EndListBox() which are kept available for convenience purpose. This is analoguous to how Combos are created.
|
3492
3662
|
# - Choose frame width: size.x > 0.0f: custom / size.x < 0.0f or -FLT_MIN: right-align / size.x = 0.0f (default): use current ItemWidth
|
@@ -3840,6 +4010,37 @@ module ImGui
|
|
3840
4010
|
igDestroyContext(ctx)
|
3841
4011
|
end
|
3842
4012
|
|
4013
|
+
# ret: void
|
4014
|
+
def self.DestroyPlatformWindows() # call DestroyWindow platform functions for all viewports. call from backend Shutdown() if you need to close platform windows before imgui shutdown. otherwise will be called by DestroyContext().
|
4015
|
+
igDestroyPlatformWindows()
|
4016
|
+
end
|
4017
|
+
|
4018
|
+
# arg: dockspace_id(ImGuiID), size(ImVec2), flags(ImGuiDockNodeFlags), window_class(const ImGuiWindowClass*)
|
4019
|
+
# ret: uint
|
4020
|
+
#
|
4021
|
+
# Docking
|
4022
|
+
# [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable.
|
4023
|
+
# Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking!
|
4024
|
+
# - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking.
|
4025
|
+
# - Drag from window menu button (upper-left button) to undock an entire node (all windows).
|
4026
|
+
# - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to enable docking.
|
4027
|
+
# About dockspaces:
|
4028
|
+
# - Use DockSpaceOverViewport() to create a window covering the screen or a specific viewport + a dockspace inside it.
|
4029
|
+
# This is often used with ImGuiDockNodeFlags_PassthruCentralNode to make it transparent.
|
4030
|
+
# - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details.
|
4031
|
+
# - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame!
|
4032
|
+
# - Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked.
|
4033
|
+
# e.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly.
|
4034
|
+
def self.DockSpace(dockspace_id, size = ImVec2.create(0,0), flags = 0, window_class = nil) # Implied size = ImVec2(0, 0), flags = 0, window_class = NULL
|
4035
|
+
igDockSpace(dockspace_id, size, flags, window_class)
|
4036
|
+
end
|
4037
|
+
|
4038
|
+
# arg: dockspace_id(ImGuiID), viewport(const ImGuiViewport*), flags(ImGuiDockNodeFlags), window_class(const ImGuiWindowClass*)
|
4039
|
+
# ret: uint
|
4040
|
+
def self.DockSpaceOverViewport(dockspace_id = 0, viewport = nil, flags = 0, window_class = nil) # Implied dockspace_id = 0, viewport = NULL, flags = 0, window_class = NULL
|
4041
|
+
igDockSpaceOverViewport(dockspace_id, viewport, flags, window_class)
|
4042
|
+
end
|
4043
|
+
|
3843
4044
|
# arg: label(const char*), v(float*), v_speed(float), v_min(float), v_max(float), format(const char*), flags(ImGuiSliderFlags)
|
3844
4045
|
# ret: bool
|
3845
4046
|
#
|
@@ -3849,7 +4050,7 @@ module ImGui
|
|
3849
4050
|
# the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x
|
3850
4051
|
# - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
|
3851
4052
|
# - Format string may also be set to NULL or use the default format ("%f" or "%d").
|
3852
|
-
# - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For gamepad
|
4053
|
+
# - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
|
3853
4054
|
# - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used.
|
3854
4055
|
# - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
|
3855
4056
|
# - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
|
@@ -4021,17 +4222,30 @@ module ImGui
|
|
4021
4222
|
igEndTooltip()
|
4022
4223
|
end
|
4023
4224
|
|
4225
|
+
# arg: id(ImGuiID)
|
4226
|
+
# ret: pointer
|
4227
|
+
def self.FindViewportByID(id) # this is a helper for backends.
|
4228
|
+
igFindViewportByID(id)
|
4229
|
+
end
|
4230
|
+
|
4231
|
+
# arg: platform_handle(void*)
|
4232
|
+
# ret: pointer
|
4233
|
+
def self.FindViewportByPlatformHandle(platform_handle) # this is a helper for backends. the type platform_handle is decided by the backend (e.g. HWND, MyWindow*, GLFWwindow* etc.)
|
4234
|
+
igFindViewportByPlatformHandle(platform_handle)
|
4235
|
+
end
|
4236
|
+
|
4024
4237
|
# arg: p_alloc_func(ImGuiMemAllocFunc*), p_free_func(ImGuiMemFreeFunc*), p_user_data(void**)
|
4025
4238
|
# ret: void
|
4026
4239
|
def self.GetAllocatorFunctions(p_alloc_func, p_free_func, p_user_data)
|
4027
4240
|
igGetAllocatorFunctions(p_alloc_func, p_free_func, p_user_data)
|
4028
4241
|
end
|
4029
4242
|
|
4243
|
+
# arg: viewport(ImGuiViewport*)
|
4030
4244
|
# ret: pointer
|
4031
4245
|
#
|
4032
4246
|
# Background/Foreground Draw Lists
|
4033
|
-
def self.GetBackgroundDrawList() # Implied viewport = NULL
|
4034
|
-
igGetBackgroundDrawList()
|
4247
|
+
def self.GetBackgroundDrawList(viewport = nil) # Implied viewport = NULL
|
4248
|
+
igGetBackgroundDrawList(viewport)
|
4035
4249
|
end
|
4036
4250
|
|
4037
4251
|
# ret: pointer
|
@@ -4171,9 +4385,10 @@ module ImGui
|
|
4171
4385
|
return pOut
|
4172
4386
|
end
|
4173
4387
|
|
4388
|
+
# arg: viewport(ImGuiViewport*)
|
4174
4389
|
# ret: pointer
|
4175
|
-
def self.GetForegroundDrawList() # Implied viewport = NULL
|
4176
|
-
igGetForegroundDrawList()
|
4390
|
+
def self.GetForegroundDrawList(viewport = nil) # Implied viewport = NULL
|
4391
|
+
igGetForegroundDrawList(viewport)
|
4177
4392
|
end
|
4178
4393
|
|
4179
4394
|
# ret: int
|
@@ -4379,6 +4594,16 @@ module ImGui
|
|
4379
4594
|
igGetVersion()
|
4380
4595
|
end
|
4381
4596
|
|
4597
|
+
# ret: uint
|
4598
|
+
def self.GetWindowDockID()
|
4599
|
+
igGetWindowDockID()
|
4600
|
+
end
|
4601
|
+
|
4602
|
+
# ret: float
|
4603
|
+
def self.GetWindowDpiScale() # get DPI scale currently associated to the current window's viewport.
|
4604
|
+
igGetWindowDpiScale()
|
4605
|
+
end
|
4606
|
+
|
4382
4607
|
# ret: pointer
|
4383
4608
|
def self.GetWindowDrawList() # get draw list associated to the current window, to append your own drawing primitives
|
4384
4609
|
igGetWindowDrawList()
|
@@ -4403,6 +4628,11 @@ module ImGui
|
|
4403
4628
|
return pOut
|
4404
4629
|
end
|
4405
4630
|
|
4631
|
+
# ret: pointer
|
4632
|
+
def self.GetWindowViewport() # get viewport currently associated to the current window.
|
4633
|
+
igGetWindowViewport()
|
4634
|
+
end
|
4635
|
+
|
4406
4636
|
# ret: float
|
4407
4637
|
def self.GetWindowWidth() # get current window width (IT IS UNLIKELY YOU EVER NEED TO USE THIS). Shortcut for GetWindowSize().x.
|
4408
4638
|
igGetWindowWidth()
|
@@ -4415,6 +4645,7 @@ module ImGui
|
|
4415
4645
|
# - Read about ImTextureID here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples
|
4416
4646
|
# - 'uv0' and 'uv1' are texture coordinates. Read about them from the same link above.
|
4417
4647
|
# - Note that Image() may add +2.0f to provided size if a border is visible, ImageButton() adds style.FramePadding*2.0f to provided size.
|
4648
|
+
# - ImageButton() draws a background based on regular Button() color + optionally an inner background if specified.
|
4418
4649
|
def self.Image(user_texture_id, image_size, uv0 = ImVec2.create(0,0), uv1 = ImVec2.create(1,1), tint_col = ImVec4.create(1,1,1,1), border_col = ImVec4.create(0,0,0,0)) # Implied uv0 = ImVec2(0, 0), uv1 = ImVec2(1, 1), tint_col = ImVec4(1, 1, 1, 1), border_col = ImVec4(0, 0, 0, 0)
|
4419
4650
|
igImage(user_texture_id, image_size, uv0, uv1, tint_col, border_col)
|
4420
4651
|
end
|
@@ -4617,9 +4848,8 @@ module ImGui
|
|
4617
4848
|
#
|
4618
4849
|
# Inputs Utilities: Keyboard/Mouse/Gamepad
|
4619
4850
|
# - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...).
|
4620
|
-
# - before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends.
|
4621
|
-
#
|
4622
|
-
# - with IMGUI_DISABLE_OBSOLETE_KEYIO (this is the way forward): any use of ImGuiKey will assert with key < 512. GetKeyIndex() is pass-through and therefore deprecated (gone if IMGUI_DISABLE_OBSOLETE_KEYIO is defined).
|
4851
|
+
# - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921)
|
4852
|
+
# - (legacy: any use of ImGuiKey will assert when key < 512 to detect passing legacy native/user indices)
|
4623
4853
|
def self.IsKeyDown(key) # is key being held.
|
4624
4854
|
igIsKeyDown(key)
|
4625
4855
|
end
|
@@ -4651,7 +4881,7 @@ module ImGui
|
|
4651
4881
|
# arg: button(ImGuiMouseButton)
|
4652
4882
|
# ret: bool
|
4653
4883
|
#
|
4654
|
-
# Inputs Utilities: Mouse
|
4884
|
+
# Inputs Utilities: Mouse
|
4655
4885
|
# - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
|
4656
4886
|
# - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
|
4657
4887
|
# - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
|
@@ -4719,6 +4949,11 @@ module ImGui
|
|
4719
4949
|
igIsWindowCollapsed()
|
4720
4950
|
end
|
4721
4951
|
|
4952
|
+
# ret: bool
|
4953
|
+
def self.IsWindowDocked() # is current window docked into another window?
|
4954
|
+
igIsWindowDocked()
|
4955
|
+
end
|
4956
|
+
|
4722
4957
|
# arg: flags(ImGuiFocusedFlags)
|
4723
4958
|
# ret: bool
|
4724
4959
|
def self.IsWindowFocused(flags = 0) # is current window focused? or its root/child, depending on flags. see flags for options.
|
@@ -5046,6 +5281,12 @@ module ImGui
|
|
5046
5281
|
igRender()
|
5047
5282
|
end
|
5048
5283
|
|
5284
|
+
# arg: platform_render_arg(void*), renderer_render_arg(void*)
|
5285
|
+
# ret: void
|
5286
|
+
def self.RenderPlatformWindowsDefault(platform_render_arg = nil, renderer_render_arg = nil) # Implied platform_render_arg = NULL, renderer_render_arg = NULL
|
5287
|
+
igRenderPlatformWindowsDefault(platform_render_arg, renderer_render_arg)
|
5288
|
+
end
|
5289
|
+
|
5049
5290
|
# arg: button(ImGuiMouseButton)
|
5050
5291
|
# ret: void
|
5051
5292
|
def self.ResetMouseDragDelta(button = 0) # Implied button = 0
|
@@ -5169,8 +5410,7 @@ module ImGui
|
|
5169
5410
|
# ret: void
|
5170
5411
|
#
|
5171
5412
|
# Focus, Activation
|
5172
|
-
|
5173
|
-
def self.SetItemDefaultFocus() # make last item the default focused item of a window.
|
5413
|
+
def self.SetItemDefaultFocus() # make last item the default focused item of of a newly appearing window.
|
5174
5414
|
igSetItemDefaultFocus()
|
5175
5415
|
end
|
5176
5416
|
|
@@ -5205,6 +5445,14 @@ module ImGui
|
|
5205
5445
|
igSetMouseCursor(cursor_type)
|
5206
5446
|
end
|
5207
5447
|
|
5448
|
+
# arg: visible(bool)
|
5449
|
+
# ret: void
|
5450
|
+
#
|
5451
|
+
# Keyboard/Gamepad Navigation
|
5452
|
+
def self.SetNavCursorVisible(visible) # alter visibility of keyboard/gamepad cursor. by default: show when using an arrow key, hide when clicking with mouse.
|
5453
|
+
igSetNavCursorVisible(visible)
|
5454
|
+
end
|
5455
|
+
|
5208
5456
|
# arg: want_capture_keyboard(bool)
|
5209
5457
|
# ret: void
|
5210
5458
|
def self.SetNextFrameWantCaptureKeyboard(want_capture_keyboard) # Override io.WantCaptureKeyboard flag next frame (said flag is left for your application to handle, typically when true it instructs your app to ignore inputs). e.g. force capture keyboard when your widget is being hovered. This is equivalent to setting "io.WantCaptureKeyboard = want_capture_keyboard"; after the next NewFrame() call.
|
@@ -5260,6 +5508,12 @@ module ImGui
|
|
5260
5508
|
igSetNextWindowBgAlpha(alpha)
|
5261
5509
|
end
|
5262
5510
|
|
5511
|
+
# arg: window_class(const ImGuiWindowClass*)
|
5512
|
+
# ret: void
|
5513
|
+
def self.SetNextWindowClass(window_class) # set next window class (control docking compatibility + provide hints to platform backend via custom viewport flags and platform parent/child relationship)
|
5514
|
+
igSetNextWindowClass(window_class)
|
5515
|
+
end
|
5516
|
+
|
5263
5517
|
# arg: collapsed(bool), cond(ImGuiCond)
|
5264
5518
|
# ret: void
|
5265
5519
|
def self.SetNextWindowCollapsed(collapsed, cond = 0) # set next window collapsed state. call before Begin()
|
@@ -5272,6 +5526,12 @@ module ImGui
|
|
5272
5526
|
igSetNextWindowContentSize(size)
|
5273
5527
|
end
|
5274
5528
|
|
5529
|
+
# arg: dock_id(ImGuiID), cond(ImGuiCond)
|
5530
|
+
# ret: void
|
5531
|
+
def self.SetNextWindowDockID(dock_id, cond = 0) # set next window dock id
|
5532
|
+
igSetNextWindowDockID(dock_id, cond)
|
5533
|
+
end
|
5534
|
+
|
5275
5535
|
# ret: void
|
5276
5536
|
def self.SetNextWindowFocus() # set next window to be focused / top-most. call before Begin()
|
5277
5537
|
igSetNextWindowFocus()
|
@@ -5304,6 +5564,12 @@ module ImGui
|
|
5304
5564
|
igSetNextWindowSizeConstraints(size_min, size_max, custom_callback, custom_callback_data)
|
5305
5565
|
end
|
5306
5566
|
|
5567
|
+
# arg: viewport_id(ImGuiID)
|
5568
|
+
# ret: void
|
5569
|
+
def self.SetNextWindowViewport(viewport_id) # set next window viewport
|
5570
|
+
igSetNextWindowViewport(viewport_id)
|
5571
|
+
end
|
5572
|
+
|
5307
5573
|
# arg: local_x(float), center_x_ratio(float)
|
5308
5574
|
# ret: void
|
5309
5575
|
def self.SetScrollFromPosX(local_x, center_x_ratio = 0.5) # adjust scrolling amount to make given position visible. Generally GetCursorStartPos() + offset to compute a valid position.
|
@@ -5811,6 +6077,15 @@ module ImGui
|
|
5811
6077
|
igUnindent(indent_w)
|
5812
6078
|
end
|
5813
6079
|
|
6080
|
+
# ret: void
|
6081
|
+
#
|
6082
|
+
# (Optional) Platform/OS interface for multi-viewport support
|
6083
|
+
# Read comments around the ImGuiPlatformIO structure for more details.
|
6084
|
+
# Note: You may use GetWindowViewport() to get the current viewport of the current window.
|
6085
|
+
def self.UpdatePlatformWindows() # call in main loop. will call CreateWindow/ResizeWindow/etc. platform functions for each secondary viewport, and DestroyWindow for each inactive viewport.
|
6086
|
+
igUpdatePlatformWindows()
|
6087
|
+
end
|
6088
|
+
|
5814
6089
|
# arg: label(const char*), size(ImVec2), v(float*), v_min(float), v_max(float), format(const char*), flags(ImGuiSliderFlags)
|
5815
6090
|
# ret: bool
|
5816
6091
|
def self.VSliderFloat(label, size, v, v_min, v_max, format = "%.3f", flags = 0) # Implied format = "%.3f", flags = 0
|