imgui-bindings 0.1.8 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
data/lib/imgui.rb CHANGED
@@ -13,6 +13,7 @@ FFI.typedef :pointer, :ImDrawListSharedData
13
13
  FFI.typedef :int, :ImFontAtlasFlags
14
14
  FFI.typedef :int, :ImGuiBackendFlags
15
15
  FFI.typedef :int, :ImGuiButtonFlags
16
+ FFI.typedef :int, :ImGuiChildFlags
16
17
  FFI.typedef :int, :ImGuiCol
17
18
  FFI.typedef :int, :ImGuiColorEditFlags
18
19
  FFI.typedef :int, :ImGuiComboFlags
@@ -110,6 +111,26 @@ ImGuiButtonFlags_MouseButtonMiddle = 4 # 1 << 2 # React on center mouse button
110
111
  ImGuiButtonFlags_MouseButtonMask_ = 7 # ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle
111
112
  ImGuiButtonFlags_MouseButtonDefault_ = 1 # ImGuiButtonFlags_MouseButtonLeft
112
113
 
114
+ # ImGuiChildFlags_
115
+ # Flags for ImGui::BeginChild()
116
+ # (Legacy: bot 0 must always correspond to ImGuiChildFlags_Border to be backward compatible with old API using 'bool border = false'.
117
+ # About using AutoResizeX/AutoResizeY flags:
118
+ # - May be combined with SetNextWindowSizeConstraints() to set a min/max size for each axis (see "Demo->Child->Auto-resize with Constraints").
119
+ # - Size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing.
120
+ # - This allows BeginChild() to return false when not within boundaries (e.g. when scrolling), which is more optimal. BUT it won't update its auto-size while clipped.
121
+ # While not perfect, it is a better default behavior as the always-on performance gain is more valuable than the occasional "resizing after becoming visible again" glitch.
122
+ # - You may also use ImGuiChildFlags_AlwaysAutoResize to force an update even when child window is not in view.
123
+ # HOWEVER PLEASE UNDERSTAND THAT DOING SO WILL PREVENT BeginChild() FROM EVER RETURNING FALSE, disabling benefits of coarse clipping.
124
+ 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)
126
+ 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
+ ImGuiChildFlags_ResizeX = 4 # 1 << 2 # Allow resize from right border (layout direction). Enable .ini saving (unless ImGuiWindowFlags_NoSavedSettings passed to window flags)
128
+ ImGuiChildFlags_ResizeY = 8 # 1 << 3 # Allow resize from bottom border (layout direction). "
129
+ ImGuiChildFlags_AutoResizeX = 16 # 1 << 4 # Enable auto-resizing width. Read "IMPORTANT: Size measurement" details above.
130
+ ImGuiChildFlags_AutoResizeY = 32 # 1 << 5 # Enable auto-resizing height. Read "IMPORTANT: Size measurement" details above.
131
+ 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
+ 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
+
113
134
  # ImGuiCol_
114
135
  # Enumeration for PushStyleColor() / PopStyleColor()
115
136
  ImGuiCol_Text = 0 # 0
@@ -122,15 +143,15 @@ ImGuiCol_BorderShadow = 6 # 6
122
143
  ImGuiCol_FrameBg = 7 # 7 # Background of checkbox, radio button, plot, slider, text input
123
144
  ImGuiCol_FrameBgHovered = 8 # 8
124
145
  ImGuiCol_FrameBgActive = 9 # 9
125
- ImGuiCol_TitleBg = 10 # 10
126
- ImGuiCol_TitleBgActive = 11 # 11
127
- ImGuiCol_TitleBgCollapsed = 12 # 12
146
+ ImGuiCol_TitleBg = 10 # 10 # Title bar
147
+ ImGuiCol_TitleBgActive = 11 # 11 # Title bar when focused
148
+ ImGuiCol_TitleBgCollapsed = 12 # 12 # Title bar when collapsed
128
149
  ImGuiCol_MenuBarBg = 13 # 13
129
150
  ImGuiCol_ScrollbarBg = 14 # 14
130
151
  ImGuiCol_ScrollbarGrab = 15 # 15
131
152
  ImGuiCol_ScrollbarGrabHovered = 16 # 16
132
153
  ImGuiCol_ScrollbarGrabActive = 17 # 17
133
- ImGuiCol_CheckMark = 18 # 18
154
+ ImGuiCol_CheckMark = 18 # 18 # Checkbox tick and RadioButton circle
134
155
  ImGuiCol_SliderGrab = 19 # 19
135
156
  ImGuiCol_SliderGrabActive = 20 # 20
136
157
  ImGuiCol_Button = 21 # 21
@@ -201,18 +222,19 @@ ImGuiColorEditFlags_InputMask_ = 402653184 # ImGuiColorEditFlags_InputRGB |
201
222
 
202
223
  # ImGuiComboFlags_
203
224
  # Flags for ImGui::BeginCombo()
204
- ImGuiComboFlags_None = 0 # 0
205
- ImGuiComboFlags_PopupAlignLeft = 1 # 1 << 0 # Align the popup toward the left by default
206
- ImGuiComboFlags_HeightSmall = 2 # 1 << 1 # Max ~4 items visible. Tip: If you want your combo popup to be a specific size you can use SetNextWindowSizeConstraints() prior to calling BeginCombo()
207
- ImGuiComboFlags_HeightRegular = 4 # 1 << 2 # Max ~8 items visible (default)
208
- ImGuiComboFlags_HeightLarge = 8 # 1 << 3 # Max ~20 items visible
209
- ImGuiComboFlags_HeightLargest = 16 # 1 << 4 # As many fitting items as possible
210
- ImGuiComboFlags_NoArrowButton = 32 # 1 << 5 # Display on the preview box without the square arrow button
211
- ImGuiComboFlags_NoPreview = 64 # 1 << 6 # Display only a square arrow button
212
- ImGuiComboFlags_HeightMask_ = 30 # ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest
225
+ ImGuiComboFlags_None = 0 # 0
226
+ ImGuiComboFlags_PopupAlignLeft = 1 # 1 << 0 # Align the popup toward the left by default
227
+ ImGuiComboFlags_HeightSmall = 2 # 1 << 1 # Max ~4 items visible. Tip: If you want your combo popup to be a specific size you can use SetNextWindowSizeConstraints() prior to calling BeginCombo()
228
+ ImGuiComboFlags_HeightRegular = 4 # 1 << 2 # Max ~8 items visible (default)
229
+ ImGuiComboFlags_HeightLarge = 8 # 1 << 3 # Max ~20 items visible
230
+ ImGuiComboFlags_HeightLargest = 16 # 1 << 4 # As many fitting items as possible
231
+ ImGuiComboFlags_NoArrowButton = 32 # 1 << 5 # Display on the preview box without the square arrow button
232
+ ImGuiComboFlags_NoPreview = 64 # 1 << 6 # Display only a square arrow button
233
+ ImGuiComboFlags_WidthFitPreview = 128 # 1 << 7 # Width dynamically calculated from preview contents
234
+ ImGuiComboFlags_HeightMask_ = 30 # ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest
213
235
 
214
236
  # ImGuiCond_
215
- # Enumeration for ImGui::SetWindow***(), SetNextWindow***(), SetNextItem***() functions
237
+ # Enumeration for ImGui::SetNextWindow***(), SetWindow***(), SetNextItem***() functions
216
238
  # Represent a condition.
217
239
  # Important: Treat as a regular enum! Do NOT combine multiple values using binary operators! All the functions above treat 0 as a shortcut to ImGuiCond_Always.
218
240
  ImGuiCond_None = 0 # 0 # No condition (always set the variable), same as _Always
@@ -336,6 +358,7 @@ ImGuiInputTextFlags_EscapeClearsAll = 1048576 # 1 << 20 # Escape key clears con
336
358
  # Since >= 1.89 we increased typing (went from int to enum), some legacy code may need a cast to ImGuiKey.
337
359
  # Read details about the 1.87 and 1.89 transition : https://github.com/ocornut/imgui/issues/4921
338
360
  # Note that "Keys" related to physical keys and are not the same concept as input "Characters", the later are submitted via io.AddInputCharacter().
361
+ # 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.
339
362
  ImGuiKey_None = 0 # 0
340
363
  ImGuiKey_Tab = 512 # 512 # == ImGuiKey_NamedKey_BEGIN
341
364
  ImGuiKey_LeftArrow = 513 # 513
@@ -409,75 +432,89 @@ ImGuiKey_F9 = 580 # 580
409
432
  ImGuiKey_F10 = 581 # 581
410
433
  ImGuiKey_F11 = 582 # 582
411
434
  ImGuiKey_F12 = 583 # 583
412
- ImGuiKey_Apostrophe = 584 # 584 # '
413
- ImGuiKey_Comma = 585 # 585 # ,
414
- ImGuiKey_Minus = 586 # 586 # -
415
- ImGuiKey_Period = 587 # 587 # .
416
- ImGuiKey_Slash = 588 # 588 # /
417
- ImGuiKey_Semicolon = 589 # 589 # ;
418
- ImGuiKey_Equal = 590 # 590 # =
419
- ImGuiKey_LeftBracket = 591 # 591 # [
420
- ImGuiKey_Backslash = 592 # 592 # \ (this text inhibit multiline comment caused by backslash)
421
- ImGuiKey_RightBracket = 593 # 593 # ]
422
- ImGuiKey_GraveAccent = 594 # 594 # `
423
- ImGuiKey_CapsLock = 595 # 595
424
- ImGuiKey_ScrollLock = 596 # 596
425
- ImGuiKey_NumLock = 597 # 597
426
- ImGuiKey_PrintScreen = 598 # 598
427
- ImGuiKey_Pause = 599 # 599
428
- ImGuiKey_Keypad0 = 600 # 600
429
- ImGuiKey_Keypad1 = 601 # 601
430
- ImGuiKey_Keypad2 = 602 # 602
431
- ImGuiKey_Keypad3 = 603 # 603
432
- ImGuiKey_Keypad4 = 604 # 604
433
- ImGuiKey_Keypad5 = 605 # 605
434
- ImGuiKey_Keypad6 = 606 # 606
435
- ImGuiKey_Keypad7 = 607 # 607
436
- ImGuiKey_Keypad8 = 608 # 608
437
- ImGuiKey_Keypad9 = 609 # 609
438
- ImGuiKey_KeypadDecimal = 610 # 610
439
- ImGuiKey_KeypadDivide = 611 # 611
440
- ImGuiKey_KeypadMultiply = 612 # 612
441
- ImGuiKey_KeypadSubtract = 613 # 613
442
- ImGuiKey_KeypadAdd = 614 # 614
443
- ImGuiKey_KeypadEnter = 615 # 615
444
- ImGuiKey_KeypadEqual = 616 # 616
445
- ImGuiKey_GamepadStart = 617 # 617 # Menu (Xbox) + (Switch) Start/Options (PS)
446
- ImGuiKey_GamepadBack = 618 # 618 # View (Xbox) - (Switch) Share (PS)
447
- ImGuiKey_GamepadFaceLeft = 619 # 619 # X (Xbox) Y (Switch) Square (PS) // Tap: Toggle Menu. Hold: Windowing mode (Focus/Move/Resize windows)
448
- ImGuiKey_GamepadFaceRight = 620 # 620 # B (Xbox) A (Switch) Circle (PS) // Cancel / Close / Exit
449
- ImGuiKey_GamepadFaceUp = 621 # 621 # Y (Xbox) X (Switch) Triangle (PS) // Text Input / On-screen Keyboard
450
- ImGuiKey_GamepadFaceDown = 622 # 622 # A (Xbox) B (Switch) Cross (PS) // Activate / Open / Toggle / Tweak
451
- ImGuiKey_GamepadDpadLeft = 623 # 623 # D-pad Left // Move / Tweak / Resize Window (in Windowing mode)
452
- ImGuiKey_GamepadDpadRight = 624 # 624 # D-pad Right // Move / Tweak / Resize Window (in Windowing mode)
453
- ImGuiKey_GamepadDpadUp = 625 # 625 # D-pad Up // Move / Tweak / Resize Window (in Windowing mode)
454
- ImGuiKey_GamepadDpadDown = 626 # 626 # D-pad Down // Move / Tweak / Resize Window (in Windowing mode)
455
- ImGuiKey_GamepadL1 = 627 # 627 # L Bumper (Xbox) L (Switch) L1 (PS) // Tweak Slower / Focus Previous (in Windowing mode)
456
- ImGuiKey_GamepadR1 = 628 # 628 # R Bumper (Xbox) R (Switch) R1 (PS) // Tweak Faster / Focus Next (in Windowing mode)
457
- ImGuiKey_GamepadL2 = 629 # 629 # L Trig. (Xbox) ZL (Switch) L2 (PS) [Analog]
458
- ImGuiKey_GamepadR2 = 630 # 630 # R Trig. (Xbox) ZR (Switch) R2 (PS) [Analog]
459
- ImGuiKey_GamepadL3 = 631 # 631 # L Stick (Xbox) L3 (Switch) L3 (PS)
460
- ImGuiKey_GamepadR3 = 632 # 632 # R Stick (Xbox) R3 (Switch) R3 (PS)
461
- ImGuiKey_GamepadLStickLeft = 633 # 633 # [Analog] // Move Window (in Windowing mode)
462
- ImGuiKey_GamepadLStickRight = 634 # 634 # [Analog] // Move Window (in Windowing mode)
463
- ImGuiKey_GamepadLStickUp = 635 # 635 # [Analog] // Move Window (in Windowing mode)
464
- ImGuiKey_GamepadLStickDown = 636 # 636 # [Analog] // Move Window (in Windowing mode)
465
- ImGuiKey_GamepadRStickLeft = 637 # 637 # [Analog]
466
- ImGuiKey_GamepadRStickRight = 638 # 638 # [Analog]
467
- ImGuiKey_GamepadRStickUp = 639 # 639 # [Analog]
468
- ImGuiKey_GamepadRStickDown = 640 # 640 # [Analog]
469
- ImGuiKey_MouseLeft = 641 # 641
470
- ImGuiKey_MouseRight = 642 # 642
471
- ImGuiKey_MouseMiddle = 643 # 643
472
- ImGuiKey_MouseX1 = 644 # 644
473
- ImGuiKey_MouseX2 = 645 # 645
474
- ImGuiKey_MouseWheelX = 646 # 646
475
- ImGuiKey_MouseWheelY = 647 # 647
476
- ImGuiKey_ReservedForModCtrl = 648 # 648
477
- ImGuiKey_ReservedForModShift = 649 # 649
478
- ImGuiKey_ReservedForModAlt = 650 # 650
479
- ImGuiKey_ReservedForModSuper = 651 # 651
480
- ImGuiKey_COUNT = 652 # 652
435
+ ImGuiKey_F13 = 584 # 584
436
+ ImGuiKey_F14 = 585 # 585
437
+ ImGuiKey_F15 = 586 # 586
438
+ ImGuiKey_F16 = 587 # 587
439
+ ImGuiKey_F17 = 588 # 588
440
+ ImGuiKey_F18 = 589 # 589
441
+ ImGuiKey_F19 = 590 # 590
442
+ ImGuiKey_F20 = 591 # 591
443
+ ImGuiKey_F21 = 592 # 592
444
+ ImGuiKey_F22 = 593 # 593
445
+ ImGuiKey_F23 = 594 # 594
446
+ ImGuiKey_F24 = 595 # 595
447
+ ImGuiKey_Apostrophe = 596 # 596 # '
448
+ ImGuiKey_Comma = 597 # 597 # ,
449
+ ImGuiKey_Minus = 598 # 598 # -
450
+ ImGuiKey_Period = 599 # 599 # .
451
+ ImGuiKey_Slash = 600 # 600 # /
452
+ ImGuiKey_Semicolon = 601 # 601 # ;
453
+ ImGuiKey_Equal = 602 # 602 # =
454
+ ImGuiKey_LeftBracket = 603 # 603 # [
455
+ ImGuiKey_Backslash = 604 # 604 # \ (this text inhibit multiline comment caused by backslash)
456
+ ImGuiKey_RightBracket = 605 # 605 # ]
457
+ ImGuiKey_GraveAccent = 606 # 606 # `
458
+ ImGuiKey_CapsLock = 607 # 607
459
+ ImGuiKey_ScrollLock = 608 # 608
460
+ ImGuiKey_NumLock = 609 # 609
461
+ ImGuiKey_PrintScreen = 610 # 610
462
+ ImGuiKey_Pause = 611 # 611
463
+ ImGuiKey_Keypad0 = 612 # 612
464
+ ImGuiKey_Keypad1 = 613 # 613
465
+ ImGuiKey_Keypad2 = 614 # 614
466
+ ImGuiKey_Keypad3 = 615 # 615
467
+ ImGuiKey_Keypad4 = 616 # 616
468
+ ImGuiKey_Keypad5 = 617 # 617
469
+ ImGuiKey_Keypad6 = 618 # 618
470
+ ImGuiKey_Keypad7 = 619 # 619
471
+ ImGuiKey_Keypad8 = 620 # 620
472
+ ImGuiKey_Keypad9 = 621 # 621
473
+ ImGuiKey_KeypadDecimal = 622 # 622
474
+ ImGuiKey_KeypadDivide = 623 # 623
475
+ ImGuiKey_KeypadMultiply = 624 # 624
476
+ ImGuiKey_KeypadSubtract = 625 # 625
477
+ ImGuiKey_KeypadAdd = 626 # 626
478
+ ImGuiKey_KeypadEnter = 627 # 627
479
+ ImGuiKey_KeypadEqual = 628 # 628
480
+ ImGuiKey_AppBack = 629 # 629 # Available on some keyboard/mouses. Often referred as "Browser Back"
481
+ ImGuiKey_AppForward = 630 # 630
482
+ ImGuiKey_GamepadStart = 631 # 631 # Menu (Xbox) + (Switch) Start/Options (PS)
483
+ ImGuiKey_GamepadBack = 632 # 632 # View (Xbox) - (Switch) Share (PS)
484
+ ImGuiKey_GamepadFaceLeft = 633 # 633 # X (Xbox) Y (Switch) Square (PS) // Tap: Toggle Menu. Hold: Windowing mode (Focus/Move/Resize windows)
485
+ ImGuiKey_GamepadFaceRight = 634 # 634 # B (Xbox) A (Switch) Circle (PS) // Cancel / Close / Exit
486
+ ImGuiKey_GamepadFaceUp = 635 # 635 # Y (Xbox) X (Switch) Triangle (PS) // Text Input / On-screen Keyboard
487
+ ImGuiKey_GamepadFaceDown = 636 # 636 # A (Xbox) B (Switch) Cross (PS) // Activate / Open / Toggle / Tweak
488
+ ImGuiKey_GamepadDpadLeft = 637 # 637 # D-pad Left // Move / Tweak / Resize Window (in Windowing mode)
489
+ ImGuiKey_GamepadDpadRight = 638 # 638 # D-pad Right // Move / Tweak / Resize Window (in Windowing mode)
490
+ ImGuiKey_GamepadDpadUp = 639 # 639 # D-pad Up // Move / Tweak / Resize Window (in Windowing mode)
491
+ ImGuiKey_GamepadDpadDown = 640 # 640 # D-pad Down // Move / Tweak / Resize Window (in Windowing mode)
492
+ ImGuiKey_GamepadL1 = 641 # 641 # L Bumper (Xbox) L (Switch) L1 (PS) // Tweak Slower / Focus Previous (in Windowing mode)
493
+ ImGuiKey_GamepadR1 = 642 # 642 # R Bumper (Xbox) R (Switch) R1 (PS) // Tweak Faster / Focus Next (in Windowing mode)
494
+ ImGuiKey_GamepadL2 = 643 # 643 # L Trig. (Xbox) ZL (Switch) L2 (PS) [Analog]
495
+ ImGuiKey_GamepadR2 = 644 # 644 # R Trig. (Xbox) ZR (Switch) R2 (PS) [Analog]
496
+ ImGuiKey_GamepadL3 = 645 # 645 # L Stick (Xbox) L3 (Switch) L3 (PS)
497
+ ImGuiKey_GamepadR3 = 646 # 646 # R Stick (Xbox) R3 (Switch) R3 (PS)
498
+ ImGuiKey_GamepadLStickLeft = 647 # 647 # [Analog] // Move Window (in Windowing mode)
499
+ ImGuiKey_GamepadLStickRight = 648 # 648 # [Analog] // Move Window (in Windowing mode)
500
+ ImGuiKey_GamepadLStickUp = 649 # 649 # [Analog] // Move Window (in Windowing mode)
501
+ ImGuiKey_GamepadLStickDown = 650 # 650 # [Analog] // Move Window (in Windowing mode)
502
+ ImGuiKey_GamepadRStickLeft = 651 # 651 # [Analog]
503
+ ImGuiKey_GamepadRStickRight = 652 # 652 # [Analog]
504
+ ImGuiKey_GamepadRStickUp = 653 # 653 # [Analog]
505
+ ImGuiKey_GamepadRStickDown = 654 # 654 # [Analog]
506
+ ImGuiKey_MouseLeft = 655 # 655
507
+ ImGuiKey_MouseRight = 656 # 656
508
+ ImGuiKey_MouseMiddle = 657 # 657
509
+ ImGuiKey_MouseX1 = 658 # 658
510
+ ImGuiKey_MouseX2 = 659 # 659
511
+ ImGuiKey_MouseWheelX = 660 # 660
512
+ ImGuiKey_MouseWheelY = 661 # 661
513
+ ImGuiKey_ReservedForModCtrl = 662 # 662
514
+ ImGuiKey_ReservedForModShift = 663 # 663
515
+ ImGuiKey_ReservedForModAlt = 664 # 664
516
+ ImGuiKey_ReservedForModSuper = 665 # 665
517
+ ImGuiKey_COUNT = 666 # 666
481
518
  ImGuiMod_None = 0 # 0
482
519
  ImGuiMod_Ctrl = 4096 # 1 << 12 # Ctrl
483
520
  ImGuiMod_Shift = 8192 # 1 << 13 # Shift
@@ -486,10 +523,10 @@ ImGuiMod_Super = 32768 # 1 << 15 # Cmd/Super/Windows
486
523
  ImGuiMod_Shortcut = 2048 # 1 << 11 # Alias for Ctrl (non-macOS) _or_ Super (macOS).
487
524
  ImGuiMod_Mask_ = 63488 # 0xF800 # 5-bits
488
525
  ImGuiKey_NamedKey_BEGIN = 512 # 512
489
- ImGuiKey_NamedKey_END = 652 # ImGuiKey_COUNT
490
- ImGuiKey_NamedKey_COUNT = 140 # ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN
491
- ImGuiKey_KeysData_SIZE = 652 # ImGuiKey_COUNT # Size of KeysData[]: hold legacy 0..512 keycodes + named keys
492
- ImGuiKey_KeysData_OFFSET = 0 # 0 # Accesses to io.KeysData[] must use (key - ImGuiKey_KeysData_OFFSET) index.
526
+ ImGuiKey_NamedKey_END = 666 # ImGuiKey_COUNT
527
+ ImGuiKey_NamedKey_COUNT = 154 # ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN
528
+ ImGuiKey_KeysData_SIZE = 154 # ImGuiKey_NamedKey_COUNT # Size of KeysData[]: hold legacy 0..512 keycodes + named keys
529
+ ImGuiKey_KeysData_OFFSET = 512 # ImGuiKey_NamedKey_BEGIN # Accesses to io.KeysData[] must use (key - ImGuiKey_KeysData_OFFSET) index.
493
530
 
494
531
  # ImGuiMouseButton_
495
532
  # Identify a mouse button.
@@ -524,28 +561,6 @@ ImGuiMouseSource_TouchScreen = 1 # 1 # Input is coming from a touch screen (no h
524
561
  ImGuiMouseSource_Pen = 2 # 2 # Input is coming from a pressure/magnetic pen (often used in conjunction with high-sampling rates).
525
562
  ImGuiMouseSource_COUNT = 3 # 3
526
563
 
527
- # ImGuiNavInput
528
- # OBSOLETED in 1.88 (from July 2022): ImGuiNavInput and io.NavInputs[].
529
- # Official backends between 1.60 and 1.86: will keep working and feed gamepad inputs as long as IMGUI_DISABLE_OBSOLETE_KEYIO is not set.
530
- # Custom backends: feed gamepad inputs via io.AddKeyEvent() and ImGuiKey_GamepadXXX enums.
531
- ImGuiNavInput_Activate = 0 # 0
532
- ImGuiNavInput_Cancel = 1 # 1
533
- ImGuiNavInput_Input = 2 # 2
534
- ImGuiNavInput_Menu = 3 # 3
535
- ImGuiNavInput_DpadLeft = 4 # 4
536
- ImGuiNavInput_DpadRight = 5 # 5
537
- ImGuiNavInput_DpadUp = 6 # 6
538
- ImGuiNavInput_DpadDown = 7 # 7
539
- ImGuiNavInput_LStickLeft = 8 # 8
540
- ImGuiNavInput_LStickRight = 9 # 9
541
- ImGuiNavInput_LStickUp = 10 # 10
542
- ImGuiNavInput_LStickDown = 11 # 11
543
- ImGuiNavInput_FocusPrev = 12 # 12
544
- ImGuiNavInput_FocusNext = 13 # 13
545
- ImGuiNavInput_TweakSlow = 14 # 14
546
- ImGuiNavInput_TweakFast = 15 # 15
547
- ImGuiNavInput_COUNT = 16 # 16
548
-
549
564
  # ImGuiPopupFlags_
550
565
  # Flags for OpenPopup*(), BeginPopupContext*(), IsPopupOpen() functions.
551
566
  # - To be backward compatible with older API which took an 'int mouse_button = 1' argument, we need to treat
@@ -571,7 +586,7 @@ ImGuiPopupFlags_AnyPopup = 384 # ImGuiPopupFlags_AnyPopupId | ImGu
571
586
  # Flags for ImGui::Selectable()
572
587
  ImGuiSelectableFlags_None = 0 # 0
573
588
  ImGuiSelectableFlags_DontClosePopups = 1 # 1 << 0 # Clicking this doesn't close parent popup window
574
- ImGuiSelectableFlags_SpanAllColumns = 2 # 1 << 1 # Selectable frame can span all columns (text will still fit in current column)
589
+ ImGuiSelectableFlags_SpanAllColumns = 2 # 1 << 1 # Frame will span all columns of its container table (text will still fit in current column)
575
590
  ImGuiSelectableFlags_AllowDoubleClick = 4 # 1 << 2 # Generate press events on double clicks too
576
591
  ImGuiSelectableFlags_Disabled = 8 # 1 << 3 # Cannot be selected, display grayed out text
577
592
  ImGuiSelectableFlags_AllowOverlap = 16 # 1 << 4 # (WIP) Hit testing to allow subsequent widgets to overlap this one
@@ -624,12 +639,13 @@ ImGuiStyleVar_ScrollbarRounding = 19 # 19 # float ScrollbarRounding
624
639
  ImGuiStyleVar_GrabMinSize = 20 # 20 # float GrabMinSize
625
640
  ImGuiStyleVar_GrabRounding = 21 # 21 # float GrabRounding
626
641
  ImGuiStyleVar_TabRounding = 22 # 22 # float TabRounding
627
- ImGuiStyleVar_ButtonTextAlign = 23 # 23 # ImVec2 ButtonTextAlign
628
- ImGuiStyleVar_SelectableTextAlign = 24 # 24 # ImVec2 SelectableTextAlign
629
- ImGuiStyleVar_SeparatorTextBorderSize = 25 # 25 # float SeparatorTextBorderSize
630
- ImGuiStyleVar_SeparatorTextAlign = 26 # 26 # ImVec2 SeparatorTextAlign
631
- ImGuiStyleVar_SeparatorTextPadding = 27 # 27 # ImVec2 SeparatorTextPadding
632
- ImGuiStyleVar_COUNT = 28 # 28
642
+ ImGuiStyleVar_TabBarBorderSize = 23 # 23 # float TabBarBorderSize
643
+ ImGuiStyleVar_ButtonTextAlign = 24 # 24 # ImVec2 ButtonTextAlign
644
+ ImGuiStyleVar_SelectableTextAlign = 25 # 25 # ImVec2 SelectableTextAlign
645
+ ImGuiStyleVar_SeparatorTextBorderSize = 26 # 26 # float SeparatorTextBorderSize
646
+ ImGuiStyleVar_SeparatorTextAlign = 27 # 27 # ImVec2 SeparatorTextAlign
647
+ ImGuiStyleVar_SeparatorTextPadding = 28 # 28 # ImVec2 SeparatorTextPadding
648
+ ImGuiStyleVar_COUNT = 29 # 29
633
649
 
634
650
  # ImGuiTabBarFlags_
635
651
  # Flags for ImGui::BeginTabBar()
@@ -637,7 +653,7 @@ ImGuiTabBarFlags_None = 0 # 0
637
653
  ImGuiTabBarFlags_Reorderable = 1 # 1 << 0 # Allow manually dragging tabs to re-order them + New tabs are appended at the end of list
638
654
  ImGuiTabBarFlags_AutoSelectNewTabs = 2 # 1 << 1 # Automatically select new tabs when they appear
639
655
  ImGuiTabBarFlags_TabListPopupButton = 4 # 1 << 2 # Disable buttons to open the tab list popup
640
- ImGuiTabBarFlags_NoCloseWithMiddleMouseButton = 8 # 1 << 3 # Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false.
656
+ 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.
641
657
  ImGuiTabBarFlags_NoTabListScrollingButtons = 16 # 1 << 4 # Disable scrolling buttons (apply when fitting policy is ImGuiTabBarFlags_FittingPolicyScroll)
642
658
  ImGuiTabBarFlags_NoTooltip = 32 # 1 << 5 # Disable tooltips when hovering a tab
643
659
  ImGuiTabBarFlags_FittingPolicyResizeDown = 64 # 1 << 6 # Resize tabs when they don't fit
@@ -648,14 +664,15 @@ ImGuiTabBarFlags_FittingPolicyDefault_ = 64 # ImGuiTabBarFlags_FittingPoli
648
664
  # ImGuiTabItemFlags_
649
665
  # Flags for ImGui::BeginTabItem()
650
666
  ImGuiTabItemFlags_None = 0 # 0
651
- ImGuiTabItemFlags_UnsavedDocument = 1 # 1 << 0 # Display a dot next to the title + 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.
667
+ ImGuiTabItemFlags_UnsavedDocument = 1 # 1 << 0 # Display a dot next to the title + set ImGuiTabItemFlags_NoAssumedClosure.
652
668
  ImGuiTabItemFlags_SetSelected = 2 # 1 << 1 # Trigger flag to programmatically make the tab selected when calling BeginTabItem()
653
- ImGuiTabItemFlags_NoCloseWithMiddleMouseButton = 4 # 1 << 2 # Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false.
654
- ImGuiTabItemFlags_NoPushId = 8 # 1 << 3 # Don't call PushID(tab->ID)/PopID() on BeginTabItem()/EndTabItem()
669
+ ImGuiTabItemFlags_NoCloseWithMiddleMouseButton = 4 # 1 << 2 # 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.
670
+ ImGuiTabItemFlags_NoPushId = 8 # 1 << 3 # Don't call PushID()/PopID() on BeginTabItem()/EndTabItem()
655
671
  ImGuiTabItemFlags_NoTooltip = 16 # 1 << 4 # Disable tooltip for the given tab
656
672
  ImGuiTabItemFlags_NoReorder = 32 # 1 << 5 # Disable reordering this tab or having another tab cross over this tab
657
673
  ImGuiTabItemFlags_Leading = 64 # 1 << 6 # Enforce the tab position to the left of the tab bar (after the tab list popup button)
658
674
  ImGuiTabItemFlags_Trailing = 128 # 1 << 7 # Enforce the tab position to the right of the tab bar (before the scrolling buttons)
675
+ ImGuiTabItemFlags_NoAssumedClosure = 256 # 1 << 8 # Tab is selected when trying to close + closure is not immediately 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.
659
676
 
660
677
  # ImGuiTableBgTarget_
661
678
  # Enum for ImGui::TableSetBgColor()
@@ -687,12 +704,13 @@ ImGuiTableColumnFlags_NoClip = 256 # 1 << 8 # Disable clipping f
687
704
  ImGuiTableColumnFlags_NoSort = 512 # 1 << 9 # Disable ability to sort on this field (even if ImGuiTableFlags_Sortable is set on the table).
688
705
  ImGuiTableColumnFlags_NoSortAscending = 1024 # 1 << 10 # Disable ability to sort in the ascending direction.
689
706
  ImGuiTableColumnFlags_NoSortDescending = 2048 # 1 << 11 # Disable ability to sort in the descending direction.
690
- ImGuiTableColumnFlags_NoHeaderLabel = 4096 # 1 << 12 # TableHeadersRow() will not submit label for this column. Convenient for some small columns. Name will still appear in context menu.
707
+ 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.
691
708
  ImGuiTableColumnFlags_NoHeaderWidth = 8192 # 1 << 13 # Disable header text width contribution to automatic column width.
692
709
  ImGuiTableColumnFlags_PreferSortAscending = 16384 # 1 << 14 # Make the initial sort direction Ascending when first sorting on this column (default).
693
710
  ImGuiTableColumnFlags_PreferSortDescending = 32768 # 1 << 15 # Make the initial sort direction Descending when first sorting on this column.
694
711
  ImGuiTableColumnFlags_IndentEnable = 65536 # 1 << 16 # Use current Indent value when entering cell (default for column 0).
695
712
  ImGuiTableColumnFlags_IndentDisable = 131072 # 1 << 17 # Ignore current Indent value when entering cell (default for columns > 0). Indentation changes _within_ the cell will still be honored.
713
+ ImGuiTableColumnFlags_AngledHeader = 262144 # 1 << 18 # TableHeadersRow() will submit an angled header row for this column. Note this will add an extra row.
696
714
  ImGuiTableColumnFlags_IsEnabled = 16777216 # 1 << 24 # Status: is enabled == not hidden by user/api (referred to as "Hide" in _DefaultHide and _NoHide) flags.
697
715
  ImGuiTableColumnFlags_IsVisible = 33554432 # 1 << 25 # Status: is visible == is enabled AND not clipped by scrolling.
698
716
  ImGuiTableColumnFlags_IsSorted = 67108864 # 1 << 26 # Status: is currently part of the sort specs
@@ -725,42 +743,43 @@ ImGuiTableColumnFlags_NoDirectResize_ = 1073741824 # 1 << 30 # [Internal] Disabl
725
743
  # - Using Stretch columns OFTEN DOES NOT MAKE SENSE if ScrollX is on, UNLESS you have specified a value for 'inner_width' in BeginTable().
726
744
  # If you specify a value for 'inner_width' then effectively the scrolling space is known and Stretch or mixed Fixed/Stretch columns become meaningful again.
727
745
  # - Read on documentation at the top of imgui_tables.cpp for details.
728
- ImGuiTableFlags_None = 0 # 0
729
- ImGuiTableFlags_Resizable = 1 # 1 << 0 # Enable resizing columns.
730
- ImGuiTableFlags_Reorderable = 2 # 1 << 1 # Enable reordering columns in header row (need calling TableSetupColumn() + TableHeadersRow() to display headers)
731
- ImGuiTableFlags_Hideable = 4 # 1 << 2 # Enable hiding/disabling columns in context menu.
732
- ImGuiTableFlags_Sortable = 8 # 1 << 3 # Enable sorting. Call TableGetSortSpecs() to obtain sort specs. Also see ImGuiTableFlags_SortMulti and ImGuiTableFlags_SortTristate.
733
- ImGuiTableFlags_NoSavedSettings = 16 # 1 << 4 # Disable persisting columns order, width and sort settings in the .ini file.
734
- ImGuiTableFlags_ContextMenuInBody = 32 # 1 << 5 # Right-click on columns body/contents will display table context menu. By default it is available in TableHeadersRow().
735
- ImGuiTableFlags_RowBg = 64 # 1 << 6 # Set each RowBg color with ImGuiCol_TableRowBg or ImGuiCol_TableRowBgAlt (equivalent of calling TableSetBgColor with ImGuiTableBgFlags_RowBg0 on each row manually)
736
- ImGuiTableFlags_BordersInnerH = 128 # 1 << 7 # Draw horizontal borders between rows.
737
- ImGuiTableFlags_BordersOuterH = 256 # 1 << 8 # Draw horizontal borders at the top and bottom.
738
- ImGuiTableFlags_BordersInnerV = 512 # 1 << 9 # Draw vertical borders between columns.
739
- ImGuiTableFlags_BordersOuterV = 1024 # 1 << 10 # Draw vertical borders on the left and right sides.
740
- ImGuiTableFlags_BordersH = 384 # ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH # Draw horizontal borders.
741
- ImGuiTableFlags_BordersV = 1536 # ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV # Draw vertical borders.
742
- ImGuiTableFlags_BordersInner = 640 # ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH # Draw inner borders.
743
- ImGuiTableFlags_BordersOuter = 1280 # ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH # Draw outer borders.
744
- ImGuiTableFlags_Borders = 1920 # ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter # Draw all borders.
745
- ImGuiTableFlags_NoBordersInBody = 2048 # 1 << 11 # [ALPHA] Disable vertical borders in columns Body (borders will always appear in Headers). -> May move to style
746
- ImGuiTableFlags_NoBordersInBodyUntilResize = 4096 # 1 << 12 # [ALPHA] Disable vertical borders in columns Body until hovered for resize (borders will always appear in Headers). -> May move to style
747
- ImGuiTableFlags_SizingFixedFit = 8192 # 1 << 13 # Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching contents width.
748
- ImGuiTableFlags_SizingFixedSame = 16384 # 2 << 13 # Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching the maximum contents width of all columns. Implicitly enable ImGuiTableFlags_NoKeepColumnsVisible.
749
- ImGuiTableFlags_SizingStretchProp = 24576 # 3 << 13 # Columns default to _WidthStretch with default weights proportional to each columns contents widths.
750
- ImGuiTableFlags_SizingStretchSame = 32768 # 4 << 13 # Columns default to _WidthStretch with default weights all equal, unless overridden by TableSetupColumn().
751
- ImGuiTableFlags_NoHostExtendX = 65536 # 1 << 16 # Make outer width auto-fit to columns, overriding outer_size.x value. Only available when ScrollX/ScrollY are disabled and Stretch columns are not used.
752
- ImGuiTableFlags_NoHostExtendY = 131072 # 1 << 17 # Make outer height stop exactly at outer_size.y (prevent auto-extending table past the limit). Only available when ScrollX/ScrollY are disabled. Data below the limit will be clipped and not visible.
753
- ImGuiTableFlags_NoKeepColumnsVisible = 262144 # 1 << 18 # Disable keeping column always minimally visible when ScrollX is off and table gets too small. Not recommended if columns are resizable.
754
- ImGuiTableFlags_PreciseWidths = 524288 # 1 << 19 # Disable distributing remainder width to stretched columns (width allocation on a 100-wide table with 3 columns: Without this flag: 33,33,34. With this flag: 33,33,33). With larger number of columns, resizing will appear to be less smooth.
755
- ImGuiTableFlags_NoClip = 1048576 # 1 << 20 # Disable clipping rectangle for every individual columns (reduce draw command count, items will be able to overflow into other columns). Generally incompatible with TableSetupScrollFreeze().
756
- ImGuiTableFlags_PadOuterX = 2097152 # 1 << 21 # Default if BordersOuterV is on. Enable outermost padding. Generally desirable if you have headers.
757
- ImGuiTableFlags_NoPadOuterX = 4194304 # 1 << 22 # Default if BordersOuterV is off. Disable outermost padding.
758
- ImGuiTableFlags_NoPadInnerX = 8388608 # 1 << 23 # Disable inner padding between columns (double inner padding if BordersOuterV is on, single inner padding if BordersOuterV is off).
759
- ImGuiTableFlags_ScrollX = 16777216 # 1 << 24 # Enable horizontal scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. Changes default sizing policy. Because this creates a child window, ScrollY is currently generally recommended when using ScrollX.
760
- ImGuiTableFlags_ScrollY = 33554432 # 1 << 25 # Enable vertical scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size.
761
- ImGuiTableFlags_SortMulti = 67108864 # 1 << 26 # Hold shift when clicking headers to sort on multiple column. TableGetSortSpecs() may return specs where (SpecsCount > 1).
762
- ImGuiTableFlags_SortTristate = 134217728 # 1 << 27 # Allow no sorting, disable default sorting. TableGetSortSpecs() may return specs where (SpecsCount == 0).
763
- ImGuiTableFlags_SizingMask_ = 57344 # ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame
746
+ ImGuiTableFlags_None = 0 # 0
747
+ ImGuiTableFlags_Resizable = 1 # 1 << 0 # Enable resizing columns.
748
+ ImGuiTableFlags_Reorderable = 2 # 1 << 1 # Enable reordering columns in header row (need calling TableSetupColumn() + TableHeadersRow() to display headers)
749
+ ImGuiTableFlags_Hideable = 4 # 1 << 2 # Enable hiding/disabling columns in context menu.
750
+ ImGuiTableFlags_Sortable = 8 # 1 << 3 # Enable sorting. Call TableGetSortSpecs() to obtain sort specs. Also see ImGuiTableFlags_SortMulti and ImGuiTableFlags_SortTristate.
751
+ ImGuiTableFlags_NoSavedSettings = 16 # 1 << 4 # Disable persisting columns order, width and sort settings in the .ini file.
752
+ ImGuiTableFlags_ContextMenuInBody = 32 # 1 << 5 # Right-click on columns body/contents will display table context menu. By default it is available in TableHeadersRow().
753
+ ImGuiTableFlags_RowBg = 64 # 1 << 6 # Set each RowBg color with ImGuiCol_TableRowBg or ImGuiCol_TableRowBgAlt (equivalent of calling TableSetBgColor with ImGuiTableBgFlags_RowBg0 on each row manually)
754
+ ImGuiTableFlags_BordersInnerH = 128 # 1 << 7 # Draw horizontal borders between rows.
755
+ ImGuiTableFlags_BordersOuterH = 256 # 1 << 8 # Draw horizontal borders at the top and bottom.
756
+ ImGuiTableFlags_BordersInnerV = 512 # 1 << 9 # Draw vertical borders between columns.
757
+ ImGuiTableFlags_BordersOuterV = 1024 # 1 << 10 # Draw vertical borders on the left and right sides.
758
+ ImGuiTableFlags_BordersH = 384 # ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH # Draw horizontal borders.
759
+ ImGuiTableFlags_BordersV = 1536 # ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV # Draw vertical borders.
760
+ ImGuiTableFlags_BordersInner = 640 # ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH # Draw inner borders.
761
+ ImGuiTableFlags_BordersOuter = 1280 # ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH # Draw outer borders.
762
+ ImGuiTableFlags_Borders = 1920 # ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter # Draw all borders.
763
+ ImGuiTableFlags_NoBordersInBody = 2048 # 1 << 11 # [ALPHA] Disable vertical borders in columns Body (borders will always appear in Headers). -> May move to style
764
+ ImGuiTableFlags_NoBordersInBodyUntilResize = 4096 # 1 << 12 # [ALPHA] Disable vertical borders in columns Body until hovered for resize (borders will always appear in Headers). -> May move to style
765
+ ImGuiTableFlags_SizingFixedFit = 8192 # 1 << 13 # Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching contents width.
766
+ ImGuiTableFlags_SizingFixedSame = 16384 # 2 << 13 # Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching the maximum contents width of all columns. Implicitly enable ImGuiTableFlags_NoKeepColumnsVisible.
767
+ ImGuiTableFlags_SizingStretchProp = 24576 # 3 << 13 # Columns default to _WidthStretch with default weights proportional to each columns contents widths.
768
+ ImGuiTableFlags_SizingStretchSame = 32768 # 4 << 13 # Columns default to _WidthStretch with default weights all equal, unless overridden by TableSetupColumn().
769
+ ImGuiTableFlags_NoHostExtendX = 65536 # 1 << 16 # Make outer width auto-fit to columns, overriding outer_size.x value. Only available when ScrollX/ScrollY are disabled and Stretch columns are not used.
770
+ ImGuiTableFlags_NoHostExtendY = 131072 # 1 << 17 # Make outer height stop exactly at outer_size.y (prevent auto-extending table past the limit). Only available when ScrollX/ScrollY are disabled. Data below the limit will be clipped and not visible.
771
+ ImGuiTableFlags_NoKeepColumnsVisible = 262144 # 1 << 18 # Disable keeping column always minimally visible when ScrollX is off and table gets too small. Not recommended if columns are resizable.
772
+ ImGuiTableFlags_PreciseWidths = 524288 # 1 << 19 # Disable distributing remainder width to stretched columns (width allocation on a 100-wide table with 3 columns: Without this flag: 33,33,34. With this flag: 33,33,33). With larger number of columns, resizing will appear to be less smooth.
773
+ ImGuiTableFlags_NoClip = 1048576 # 1 << 20 # Disable clipping rectangle for every individual columns (reduce draw command count, items will be able to overflow into other columns). Generally incompatible with TableSetupScrollFreeze().
774
+ ImGuiTableFlags_PadOuterX = 2097152 # 1 << 21 # Default if BordersOuterV is on. Enable outermost padding. Generally desirable if you have headers.
775
+ ImGuiTableFlags_NoPadOuterX = 4194304 # 1 << 22 # Default if BordersOuterV is off. Disable outermost padding.
776
+ ImGuiTableFlags_NoPadInnerX = 8388608 # 1 << 23 # Disable inner padding between columns (double inner padding if BordersOuterV is on, single inner padding if BordersOuterV is off).
777
+ ImGuiTableFlags_ScrollX = 16777216 # 1 << 24 # Enable horizontal scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. Changes default sizing policy. Because this creates a child window, ScrollY is currently generally recommended when using ScrollX.
778
+ ImGuiTableFlags_ScrollY = 33554432 # 1 << 25 # Enable vertical scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size.
779
+ ImGuiTableFlags_SortMulti = 67108864 # 1 << 26 # Hold shift when clicking headers to sort on multiple column. TableGetSortSpecs() may return specs where (SpecsCount > 1).
780
+ ImGuiTableFlags_SortTristate = 134217728 # 1 << 27 # Allow no sorting, disable default sorting. TableGetSortSpecs() may return specs where (SpecsCount == 0).
781
+ ImGuiTableFlags_HighlightHoveredColumn = 268435456 # 1 << 28 # Highlight column headers when hovered (may evolve into a fuller highlight)
782
+ ImGuiTableFlags_SizingMask_ = 57344 # ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame
764
783
 
765
784
  # ImGuiTableRowFlags_
766
785
  # Flags for ImGui::TableNextRow()
@@ -769,22 +788,23 @@ ImGuiTableRowFlags_Headers = 1 # 1 << 0 # Identify header row (set default backg
769
788
 
770
789
  # ImGuiTreeNodeFlags_
771
790
  # Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*()
772
- ImGuiTreeNodeFlags_None = 0 # 0
773
- ImGuiTreeNodeFlags_Selected = 1 # 1 << 0 # Draw as selected
774
- ImGuiTreeNodeFlags_Framed = 2 # 1 << 1 # Draw frame with background (e.g. for CollapsingHeader)
775
- ImGuiTreeNodeFlags_AllowOverlap = 4 # 1 << 2 # Hit testing to allow subsequent widgets to overlap this one
776
- ImGuiTreeNodeFlags_NoTreePushOnOpen = 8 # 1 << 3 # Don't do a TreePush() when open (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack
777
- ImGuiTreeNodeFlags_NoAutoOpenOnLog = 16 # 1 << 4 # Don't automatically and temporarily open node when Logging is active (by default logging will automatically open tree nodes)
778
- ImGuiTreeNodeFlags_DefaultOpen = 32 # 1 << 5 # Default node to be open
779
- ImGuiTreeNodeFlags_OpenOnDoubleClick = 64 # 1 << 6 # Need double-click to open node
780
- 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.
781
- ImGuiTreeNodeFlags_Leaf = 256 # 1 << 8 # No collapsing, no arrow (use as a convenience for leaf nodes).
782
- 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!
783
- 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().
784
- 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.
785
- ImGuiTreeNodeFlags_SpanFullWidth = 4096 # 1 << 12 # Extend hit box to the left-most and right-most edges (bypass the indented area).
786
- ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 8192 # 1 << 13 # (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop)
787
- ImGuiTreeNodeFlags_CollapsingHeader = 26 # ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog
791
+ ImGuiTreeNodeFlags_None = 0 # 0
792
+ ImGuiTreeNodeFlags_Selected = 1 # 1 << 0 # Draw as selected
793
+ ImGuiTreeNodeFlags_Framed = 2 # 1 << 1 # Draw frame with background (e.g. for CollapsingHeader)
794
+ ImGuiTreeNodeFlags_AllowOverlap = 4 # 1 << 2 # Hit testing to allow subsequent widgets to overlap this one
795
+ ImGuiTreeNodeFlags_NoTreePushOnOpen = 8 # 1 << 3 # Don't do a TreePush() when open (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack
796
+ ImGuiTreeNodeFlags_NoAutoOpenOnLog = 16 # 1 << 4 # Don't automatically and temporarily open node when Logging is active (by default logging will automatically open tree nodes)
797
+ ImGuiTreeNodeFlags_DefaultOpen = 32 # 1 << 5 # Default node to be open
798
+ ImGuiTreeNodeFlags_OpenOnDoubleClick = 64 # 1 << 6 # Need double-click to open node
799
+ 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.
800
+ ImGuiTreeNodeFlags_Leaf = 256 # 1 << 8 # No collapsing, no arrow (use as a convenience for leaf nodes).
801
+ 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!
802
+ 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().
803
+ 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.
804
+ ImGuiTreeNodeFlags_SpanFullWidth = 4096 # 1 << 12 # Extend hit box to the left-most and right-most edges (bypass the indented area).
805
+ ImGuiTreeNodeFlags_SpanAllColumns = 8192 # 1 << 13 # Frame will span all columns of its container table (text will still fit in current column)
806
+ ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 16384 # 1 << 14 # (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop)
807
+ ImGuiTreeNodeFlags_CollapsingHeader = 26 # ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog
788
808
 
789
809
  # ImGuiViewportFlags_
790
810
  # Flags stored in ImGuiViewport::Flags, giving indications to the platform backends.
@@ -813,14 +833,13 @@ ImGuiWindowFlags_NoFocusOnAppearing = 4096 # 1 << 12 # Disable taking fo
813
833
  ImGuiWindowFlags_NoBringToFrontOnFocus = 8192 # 1 << 13 # Disable bringing window to front when taking focus (e.g. clicking on it or programmatically giving it focus)
814
834
  ImGuiWindowFlags_AlwaysVerticalScrollbar = 16384 # 1 << 14 # Always show vertical scrollbar (even if ContentSize.y < Size.y)
815
835
  ImGuiWindowFlags_AlwaysHorizontalScrollbar = 32768 # 1<< 15 # Always show horizontal scrollbar (even if ContentSize.x < Size.x)
816
- ImGuiWindowFlags_AlwaysUseWindowPadding = 65536 # 1 << 16 # Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient)
817
- ImGuiWindowFlags_NoNavInputs = 262144 # 1 << 18 # No gamepad/keyboard navigation within the window
818
- ImGuiWindowFlags_NoNavFocus = 524288 # 1 << 19 # No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB)
819
- ImGuiWindowFlags_UnsavedDocument = 1048576 # 1 << 20 # 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.
820
- ImGuiWindowFlags_NoNav = 786432 # ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus
836
+ ImGuiWindowFlags_NoNavInputs = 65536 # 1 << 16 # No gamepad/keyboard navigation within the window
837
+ ImGuiWindowFlags_NoNavFocus = 131072 # 1 << 17 # No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB)
838
+ 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.
839
+ ImGuiWindowFlags_NoNav = 196608 # ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus
821
840
  ImGuiWindowFlags_NoDecoration = 43 # ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse
822
- ImGuiWindowFlags_NoInputs = 786944 # ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus
823
- ImGuiWindowFlags_NavFlattened = 8388608 # 1 << 23 # [BETA] On child window: allow gamepad/keyboard navigation to cross over parent border to this child or between sibling child windows.
841
+ ImGuiWindowFlags_NoInputs = 197120 # ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus
842
+ ImGuiWindowFlags_NavFlattened = 8388608 # 1 << 23 # [BETA] On child window: share focus scope, allow gamepad/keyboard navigation to cross over parent border to this child or between sibling child windows.
824
843
  ImGuiWindowFlags_ChildWindow = 16777216 # 1 << 24 # Don't use! For internal use by BeginChild()
825
844
  ImGuiWindowFlags_Tooltip = 33554432 # 1 << 25 # Don't use! For internal use by BeginTooltip()
826
845
  ImGuiWindowFlags_Popup = 67108864 # 1 << 26 # Don't use! For internal use by BeginPopup()
@@ -865,9 +884,9 @@ end
865
884
  # This is used by the Columns/Tables API, so items of each column can be batched together in a same draw call.
866
885
  class ImDrawListSplitter < FFI::Struct
867
886
  layout(
868
- :_Current, :int, # Current channel number (0)
869
- :_Count, :int, # Number of active channels (1+)
870
- :_Channels, ImVector.by_value # Draw channels (not resized down so _Count might be < Channels.Size)
887
+ :_Current, :int,
888
+ :_Count, :int,
889
+ :_Channels, ImVector.by_value
871
890
  )
872
891
 
873
892
  def Clear()
@@ -907,13 +926,13 @@ end
907
926
  # - The ClipRect/TextureId/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for).
908
927
  class ImDrawCmd < FFI::Struct
909
928
  layout(
910
- :ClipRect, ImVec4.by_value, # 4*4 // Clipping rectangle (x1, y1, x2, y2). Subtract ImDrawData->DisplayPos to get clipping rectangle in "viewport" coordinates
911
- :TextureId, :pointer, # 4-8 // User-provided texture ID. Set by user in ImfontAtlas::SetTexID() for fonts or passed to Image*() functions. Ignore if never using images or multiple fonts atlas.
912
- :VtxOffset, :uint, # 4 // Start offset in vertex buffer. ImGuiBackendFlags_RendererHasVtxOffset: always 0, otherwise may be >0 to support meshes larger than 64K vertices with 16-bit indices.
913
- :IdxOffset, :uint, # 4 // Start offset in index buffer.
914
- :ElemCount, :uint, # 4 // Number of indices (multiple of 3) to be rendered as triangles. Vertices are stored in the callee ImDrawList's vtx_buffer[] array, indices in idx_buffer[].
915
- :UserCallback, :pointer, # 4-8 // If != NULL, call the function instead of rendering the vertices. clip_rect and texture_id will be set normally.
916
- :UserCallbackData, :pointer # 4-8 // The draw callback code can access this.
929
+ :ClipRect, ImVec4.by_value,
930
+ :TextureId, :pointer,
931
+ :VtxOffset, :uint,
932
+ :IdxOffset, :uint,
933
+ :ElemCount, :uint,
934
+ :UserCallback, :pointer,
935
+ :UserCallbackData, :pointer
917
936
  )
918
937
 
919
938
  def GetTexID()
@@ -950,21 +969,21 @@ end
950
969
  # 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.
951
970
  class ImDrawList < FFI::Struct
952
971
  layout(
953
- :CmdBuffer, ImVector.by_value, # Draw commands. Typically 1 command = 1 GPU draw call, unless the command is a callback.
954
- :IdxBuffer, ImVector.by_value, # Index buffer. Each command consume ImDrawCmd::ElemCount of those
955
- :VtxBuffer, ImVector.by_value, # Vertex buffer.
956
- :Flags, :int, # Flags, you may poke into these to adjust anti-aliasing settings per-primitive.
957
- :_VtxCurrentIdx, :uint, # [Internal] generally == VtxBuffer.Size unless we are past 64K vertices, in which case this gets reset to 0.
958
- :_Data, :pointer, # Pointer to shared draw data (you can use ImGui::GetDrawListSharedData() to get the one from current ImGui context)
959
- :_OwnerName, :pointer, # Pointer to owner window's name for debugging
960
- :_VtxWritePtr, ImDrawVert.ptr, # [Internal] point within VtxBuffer.Data after each add command (to avoid using the ImVector<> operators too much)
961
- :_IdxWritePtr, :pointer, # [Internal] point within IdxBuffer.Data after each add command (to avoid using the ImVector<> operators too much)
962
- :_ClipRectStack, ImVector.by_value, # [Internal]
963
- :_TextureIdStack, ImVector.by_value, # [Internal]
964
- :_Path, ImVector.by_value, # [Internal] current path building
965
- :_CmdHeader, ImDrawCmdHeader.by_value, # [Internal] template of active commands. Fields should match those of CmdBuffer.back().
966
- :_Splitter, ImDrawListSplitter.by_value, # [Internal] for channels api (note: prefer using your own persistent instance of ImDrawListSplitter!)
967
- :_FringeScale, :float # [Internal] anti-alias fringe is scaled by this value, this helps to keep things sharp while zooming at vertex buffer content
972
+ :CmdBuffer, ImVector.by_value,
973
+ :IdxBuffer, ImVector.by_value,
974
+ :VtxBuffer, ImVector.by_value,
975
+ :Flags, :int,
976
+ :_VtxCurrentIdx, :uint,
977
+ :_Data, :pointer,
978
+ :_OwnerName, :pointer,
979
+ :_VtxWritePtr, ImDrawVert.ptr,
980
+ :_IdxWritePtr, :pointer,
981
+ :_ClipRectStack, ImVector.by_value,
982
+ :_TextureIdStack, ImVector.by_value,
983
+ :_Path, ImVector.by_value,
984
+ :_CmdHeader, ImDrawCmdHeader.by_value,
985
+ :_Splitter, ImDrawListSplitter.by_value,
986
+ :_FringeScale, :float
968
987
  )
969
988
 
970
989
  def AddBezierCubic(p1, p2, p3, p4, col, thickness, num_segments = 0)
@@ -995,6 +1014,14 @@ class ImDrawList < FFI::Struct
995
1014
  ImGui::ImDrawList_AddDrawCmd(self)
996
1015
  end
997
1016
 
1017
+ def AddEllipse(center, radius_x, radius_y, col, rot = 0.0, num_segments = 0, thickness = 1.0)
1018
+ ImGui::ImDrawList_AddEllipse(self, center, radius_x, radius_y, col, rot, num_segments, thickness)
1019
+ end
1020
+
1021
+ def AddEllipseFilled(center, radius_x, radius_y, col, rot = 0.0, num_segments = 0)
1022
+ ImGui::ImDrawList_AddEllipseFilled(self, center, radius_x, radius_y, col, rot, num_segments)
1023
+ end
1024
+
998
1025
  def AddImage(user_texture_id, p_min, p_max, uv_min = ImVec2.create(0,0), uv_max = ImVec2.create(1,1), col = ImColor.col32(255,255,255,255))
999
1026
  ImGui::ImDrawList_AddImage(self, user_texture_id, p_min, p_max, uv_min, uv_max, col)
1000
1027
  end
@@ -1111,6 +1138,10 @@ class ImDrawList < FFI::Struct
1111
1138
  ImGui::ImDrawList_PathClear(self)
1112
1139
  end
1113
1140
 
1141
+ def PathEllipticalArcTo(center, radius_x, radius_y, rot, a_min, a_max, num_segments = 0)
1142
+ ImGui::ImDrawList_PathEllipticalArcTo(self, center, radius_x, radius_y, rot, a_min, a_max, num_segments)
1143
+ end
1144
+
1114
1145
  def PathFillConvex(col)
1115
1146
  ImGui::ImDrawList_PathFillConvex(self, col)
1116
1147
  end
@@ -1248,28 +1279,28 @@ end
1248
1279
  # - This is an old API and it is currently awkward for those and various other reasons! We will address them in the future!
1249
1280
  class ImFontAtlas < FFI::Struct
1250
1281
  layout(
1251
- :Flags, :int, # Build flags (see ImFontAtlasFlags_)
1252
- :TexID, :pointer, # User data to refer to the texture once it has been uploaded to user's graphic systems. It is passed back to you during rendering via the ImDrawCmd structure.
1253
- :TexDesiredWidth, :int, # Texture width desired by user before Build(). Must be a power-of-two. If have many glyphs your graphics API have texture size restrictions you may want to increase texture width to decrease height.
1254
- :TexGlyphPadding, :int, # Padding between glyphs within texture in pixels. Defaults to 1. If your rendering method doesn't rely on bilinear filtering you may set this to 0 (will also need to set AntiAliasedLinesUseTex = false).
1255
- :Locked, :bool, # Marked as Locked by ImGui::NewFrame() so attempt to modify the atlas will assert.
1256
- :UserData, :pointer, # Store your own atlas related user-data (if e.g. you have multiple font atlas).
1257
- :TexReady, :bool, # Set when texture was built matching current font input
1258
- :TexPixelsUseColors, :bool, # Tell whether our texture data is known to use colors (rather than just alpha channel), in order to help backend select a format.
1259
- :TexPixelsAlpha8, :pointer, # 1 component per pixel, each component is unsigned 8-bit. Total size = TexWidth * TexHeight
1260
- :TexPixelsRGBA32, :pointer, # 4 component per pixel, each component is unsigned 8-bit. Total size = TexWidth * TexHeight * 4
1261
- :TexWidth, :int, # Texture width calculated during Build().
1262
- :TexHeight, :int, # Texture height calculated during Build().
1263
- :TexUvScale, ImVec2.by_value, # = (1.0f/TexWidth, 1.0f/TexHeight)
1264
- :TexUvWhitePixel, ImVec2.by_value, # Texture coordinates to a white pixel
1265
- :Fonts, ImVector.by_value, # Hold all the fonts returned by AddFont*. Fonts[0] is the default font upon calling ImGui::NewFrame(), use ImGui::PushFont()/PopFont() to change the current font.
1266
- :CustomRects, ImVector.by_value, # Rectangles for packing custom texture data into the atlas.
1267
- :ConfigData, ImVector.by_value, # Configuration data
1268
- :TexUvLines, [ImVec4.by_value, 64], # UVs for baked anti-aliased lines
1269
- :FontBuilderIO, :pointer, # Opaque interface to a font builder (default to stb_truetype, can be changed to use FreeType by defining IMGUI_ENABLE_FREETYPE).
1270
- :FontBuilderFlags, :uint, # Shared flags (for all fonts) for custom font builder. THIS IS BUILD IMPLEMENTATION DEPENDENT. Per-font override is also available in ImFontConfig.
1271
- :PackIdMouseCursors, :int, # Custom texture rectangle ID for white pixel and mouse cursors
1272
- :PackIdLines, :int # Custom texture rectangle ID for baked anti-aliased lines
1282
+ :Flags, :int,
1283
+ :TexID, :pointer,
1284
+ :TexDesiredWidth, :int,
1285
+ :TexGlyphPadding, :int,
1286
+ :Locked, :bool,
1287
+ :UserData, :pointer,
1288
+ :TexReady, :bool,
1289
+ :TexPixelsUseColors, :bool,
1290
+ :TexPixelsAlpha8, :pointer,
1291
+ :TexPixelsRGBA32, :pointer,
1292
+ :TexWidth, :int,
1293
+ :TexHeight, :int,
1294
+ :TexUvScale, ImVec2.by_value,
1295
+ :TexUvWhitePixel, ImVec2.by_value,
1296
+ :Fonts, ImVector.by_value,
1297
+ :CustomRects, ImVector.by_value,
1298
+ :ConfigData, ImVector.by_value,
1299
+ :TexUvLines, [ImVec4.by_value, 64],
1300
+ :FontBuilderIO, :pointer,
1301
+ :FontBuilderFlags, :uint,
1302
+ :PackIdMouseCursors, :int,
1303
+ :PackIdLines, :int
1273
1304
  )
1274
1305
 
1275
1306
  def AddCustomRectFontGlyph(font, id, width, height, advance_x, offset = ImVec2.create(0,0))
@@ -1296,12 +1327,12 @@ class ImFontAtlas < FFI::Struct
1296
1327
  ImGui::ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(self, compressed_font_data_base85, size_pixels, font_cfg, glyph_ranges)
1297
1328
  end
1298
1329
 
1299
- def AddFontFromMemoryCompressedTTF(compressed_font_data, compressed_font_size, size_pixels, font_cfg = nil, glyph_ranges = nil)
1300
- ImGui::ImFontAtlas_AddFontFromMemoryCompressedTTF(self, compressed_font_data, compressed_font_size, size_pixels, font_cfg, glyph_ranges)
1330
+ def AddFontFromMemoryCompressedTTF(compressed_font_data, compressed_font_data_size, size_pixels, font_cfg = nil, glyph_ranges = nil)
1331
+ ImGui::ImFontAtlas_AddFontFromMemoryCompressedTTF(self, compressed_font_data, compressed_font_data_size, size_pixels, font_cfg, glyph_ranges)
1301
1332
  end
1302
1333
 
1303
- def AddFontFromMemoryTTF(font_data, font_size, size_pixels, font_cfg = nil, glyph_ranges = nil)
1304
- ImGui::ImFontAtlas_AddFontFromMemoryTTF(self, font_data, font_size, size_pixels, font_cfg, glyph_ranges)
1334
+ def AddFontFromMemoryTTF(font_data, font_data_size, size_pixels, font_cfg = nil, glyph_ranges = nil)
1335
+ ImGui::ImFontAtlas_AddFontFromMemoryTTF(self, font_data, font_data_size, size_pixels, font_cfg, glyph_ranges)
1305
1336
  end
1306
1337
 
1307
1338
  def Build()
@@ -1402,10 +1433,10 @@ end
1402
1433
  # If prior to 1.87 you used io.KeysDownDuration[] (which was marked as internal), you should use GetKeyData(key)->DownDuration and *NOT* io.KeysData[key]->DownDuration.
1403
1434
  class ImGuiKeyData < FFI::Struct
1404
1435
  layout(
1405
- :Down, :bool, # True for if key is down
1406
- :DownDuration, :float, # Duration the key has been down (<0.0f: not pressed, 0.0f: just pressed, >0.0f: time held)
1407
- :DownDurationPrev, :float, # Last frame duration the key has been down
1408
- :AnalogValue, :float # 0.0f..1.0f for gamepad values
1436
+ :Down, :bool,
1437
+ :DownDuration, :float,
1438
+ :DownDurationPrev, :float,
1439
+ :AnalogValue, :float
1409
1440
  )
1410
1441
  end
1411
1442
 
@@ -1418,12 +1449,12 @@ end
1418
1449
  # - Windows are generally trying to stay within the Work Area of their host viewport.
1419
1450
  class ImGuiViewport < FFI::Struct
1420
1451
  layout(
1421
- :Flags, :int, # See ImGuiViewportFlags_
1422
- :Pos, ImVec2.by_value, # Main Area: Position of the viewport (Dear ImGui coordinates are the same as OS desktop/native coordinates)
1423
- :Size, ImVec2.by_value, # Main Area: Size of the viewport.
1424
- :WorkPos, ImVec2.by_value, # Work Area: Position of the viewport minus task bars, menus bars, status bars (>= Pos)
1425
- :WorkSize, ImVec2.by_value, # Work Area: Size of the viewport minus task bars, menu bars, status bars (<= Size)
1426
- :PlatformHandleRaw, :pointer # void* to hold lower-level, platform-native window handle (under Win32 this is expected to be a HWND, unused for other platforms)
1452
+ :Flags, :int,
1453
+ :Pos, ImVec2.by_value,
1454
+ :Size, ImVec2.by_value,
1455
+ :WorkPos, ImVec2.by_value,
1456
+ :WorkSize, ImVec2.by_value,
1457
+ :PlatformHandleRaw, :pointer
1427
1458
  )
1428
1459
 
1429
1460
  def GetCenter()
@@ -1463,15 +1494,15 @@ end
1463
1494
  # as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList)
1464
1495
  class ImDrawData < FFI::Struct
1465
1496
  layout(
1466
- :Valid, :bool, # Only valid after Render() is called and before the next NewFrame() is called.
1467
- :CmdListsCount, :int, # Number of ImDrawList* to render (should always be == CmdLists.size)
1468
- :TotalIdxCount, :int, # For convenience, sum of all ImDrawList's IdxBuffer.Size
1469
- :TotalVtxCount, :int, # For convenience, sum of all ImDrawList's VtxBuffer.Size
1470
- :CmdLists, ImVector.by_value, # Array of ImDrawList* to render. The ImDrawLists are owned by ImGuiContext and only pointed to from here.
1471
- :DisplayPos, ImVec2.by_value, # Top-left position of the viewport to render (== top-left of the orthogonal projection matrix to use) (== GetMainViewport()->Pos for the main viewport, == (0.0) in most single-viewport applications)
1472
- :DisplaySize, ImVec2.by_value, # Size of the viewport to render (== GetMainViewport()->Size for the main viewport, == io.DisplaySize in most single-viewport applications)
1473
- :FramebufferScale, ImVec2.by_value, # Amount of pixels for each unit of DisplaySize. Based on io.DisplayFramebufferScale. Generally (1,1) on normal display, (2,2) on OSX with Retina display.
1474
- :OwnerViewport, ImGuiViewport.ptr # Viewport carrying the ImDrawData instance, might be of use to the renderer (generally not).
1497
+ :Valid, :bool,
1498
+ :CmdListsCount, :int,
1499
+ :TotalIdxCount, :int,
1500
+ :TotalVtxCount, :int,
1501
+ :CmdLists, ImVector.by_value,
1502
+ :DisplayPos, ImVec2.by_value,
1503
+ :DisplaySize, ImVec2.by_value,
1504
+ :FramebufferScale, ImVec2.by_value,
1505
+ :OwnerViewport, ImGuiViewport.ptr
1475
1506
  )
1476
1507
 
1477
1508
  def AddDrawList(draw_list)
@@ -1504,26 +1535,26 @@ end
1504
1535
  # ImFontAtlas automatically loads a default embedded font for you when you call GetTexDataAsAlpha8() or GetTexDataAsRGBA32().
1505
1536
  class ImFont < FFI::Struct
1506
1537
  layout(
1507
- :IndexAdvanceX, ImVector.by_value, # 12-16 // out // // Sparse. Glyphs->AdvanceX in a directly indexable way (cache-friendly for CalcTextSize functions which only this this info, and are often bottleneck in large UI).
1508
- :FallbackAdvanceX, :float, # 4 // out // = FallbackGlyph->AdvanceX
1509
- :FontSize, :float, # 4 // in // // Height of characters/line, set during loading (don't change after loading)
1510
- :IndexLookup, ImVector.by_value, # 12-16 // out // // Sparse. Index glyphs by Unicode code-point.
1511
- :Glyphs, ImVector.by_value, # 12-16 // out // // All glyphs.
1512
- :FallbackGlyph, :pointer, # 4-8 // out // = FindGlyph(FontFallbackChar)
1513
- :ContainerAtlas, ImFontAtlas.ptr, # 4-8 // out // // What we has been loaded into
1514
- :ConfigData, :pointer, # 4-8 // in // // Pointer within ContainerAtlas->ConfigData
1515
- :ConfigDataCount, :short, # 2 // in // ~ 1 // Number of ImFontConfig involved in creating this font. Bigger than 1 when merging multiple font sources into one ImFont.
1516
- :FallbackChar, :ushort, # 2 // out // = FFFD/'?' // Character used if a glyph isn't found.
1517
- :EllipsisChar, :ushort, # 2 // out // = '...'/'.'// Character used for ellipsis rendering.
1518
- :EllipsisCharCount, :short, # 1 // out // 1 or 3
1519
- :EllipsisWidth, :float, # 4 // out // Width
1520
- :EllipsisCharStep, :float, # 4 // out // Step between characters when EllipsisCount > 0
1521
- :DirtyLookupTables, :bool, # 1 // out //
1522
- :Scale, :float, # 4 // in // = 1.f // Base font scale, multiplied by the per-window font scale which you can adjust with SetWindowFontScale()
1523
- :Ascent, :float, # 4+4 // out // // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize]
1538
+ :IndexAdvanceX, ImVector.by_value,
1539
+ :FallbackAdvanceX, :float,
1540
+ :FontSize, :float,
1541
+ :IndexLookup, ImVector.by_value,
1542
+ :Glyphs, ImVector.by_value,
1543
+ :FallbackGlyph, :pointer,
1544
+ :ContainerAtlas, ImFontAtlas.ptr,
1545
+ :ConfigData, :pointer,
1546
+ :ConfigDataCount, :short,
1547
+ :FallbackChar, :ushort,
1548
+ :EllipsisChar, :ushort,
1549
+ :EllipsisCharCount, :short,
1550
+ :EllipsisWidth, :float,
1551
+ :EllipsisCharStep, :float,
1552
+ :DirtyLookupTables, :bool,
1553
+ :Scale, :float,
1554
+ :Ascent, :float,
1524
1555
  :Descent, :float,
1525
- :MetricsTotalSurface, :int, # 4 // out // // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, we approximate the cost of padding between glyphs)
1526
- :Used4kPagesMap, [:uchar, 2] # 2 bytes if ImWchar=ImWchar16, 34 bytes if ImWchar==ImWchar32. Store 1-bit for each block of 4K codepoints that has one active glyph. This is mainly used to facilitate iterations across all used codepoints.
1556
+ :MetricsTotalSurface, :int,
1557
+ :Used4kPagesMap, [:uchar, 2]
1527
1558
  )
1528
1559
 
1529
1560
  def AddGlyph(src_cfg, c, x0, y0, x1, y1, u0, v0, u1, v1, advance_x)
@@ -1605,14 +1636,14 @@ end
1605
1636
  # See ImFontAtlas::AddCustomRectXXX functions.
1606
1637
  class ImFontAtlasCustomRect < FFI::Struct
1607
1638
  layout(
1608
- :Width, :ushort, # Input // Desired rectangle dimension
1639
+ :Width, :ushort,
1609
1640
  :Height, :ushort,
1610
- :X, :ushort, # Output // Packed position in Atlas
1641
+ :X, :ushort,
1611
1642
  :Y, :ushort,
1612
- :GlyphID, :uint, # Input // For custom font glyphs only (ID < 0x110000)
1613
- :GlyphAdvanceX, :float, # Input // For custom font glyphs only: glyph xadvance
1614
- :GlyphOffset, ImVec2.by_value, # Input // For custom font glyphs only: glyph display offset
1615
- :Font, ImFont.ptr # Input // For custom font glyphs only: target font
1643
+ :GlyphID, :uint,
1644
+ :GlyphAdvanceX, :float,
1645
+ :GlyphOffset, ImVec2.by_value,
1646
+ :Font, ImFont.ptr
1616
1647
  )
1617
1648
 
1618
1649
  def self.create()
@@ -1631,24 +1662,25 @@ end
1631
1662
 
1632
1663
  class ImFontConfig < FFI::Struct
1633
1664
  layout(
1634
- :FontData, :pointer, # // TTF/OTF data
1635
- :FontDataSize, :int, # // TTF/OTF data size
1636
- :FontDataOwnedByAtlas, :bool, # true // TTF/OTF data ownership taken by the container ImFontAtlas (will delete memory itself).
1637
- :FontNo, :int, # 0 // Index of font within TTF/OTF file
1638
- :SizePixels, :float, # // Size in pixels for rasterizer (more or less maps to the resulting font height).
1639
- :OversampleH, :int, # 2 // Rasterize at higher quality for sub-pixel positioning. Note the difference between 2 and 3 is minimal. You can reduce this to 1 for large glyphs save memory. Read https://github.com/nothings/stb/blob/master/tests/oversample/README.md for details.
1640
- :OversampleV, :int, # 1 // Rasterize at higher quality for sub-pixel positioning. This is not really useful as we don't use sub-pixel positions on the Y axis.
1641
- :PixelSnapH, :bool, # false // Align every glyph to pixel boundary. Useful e.g. if you are merging a non-pixel aligned font with the default font. If enabled, you can set OversampleH/V to 1.
1642
- :GlyphExtraSpacing, ImVec2.by_value, # 0, 0 // Extra spacing (in pixels) between glyphs. Only X axis is supported for now.
1643
- :GlyphOffset, ImVec2.by_value, # 0, 0 // Offset all glyphs from this font input.
1644
- :GlyphRanges, :pointer, # NULL // THE ARRAY DATA NEEDS TO PERSIST AS LONG AS THE FONT IS ALIVE. Pointer to a user-provided list of Unicode range (2 value per range, values are inclusive, zero-terminated list).
1645
- :GlyphMinAdvanceX, :float, # 0 // Minimum AdvanceX for glyphs, set Min to align font icons, set both Min/Max to enforce mono-space font
1646
- :GlyphMaxAdvanceX, :float, # FLT_MAX // Maximum AdvanceX for glyphs
1647
- :MergeMode, :bool, # false // Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g. ASCII font + icons + Japanese glyphs). You may want to use GlyphOffset.y when merge font of different heights.
1648
- :FontBuilderFlags, :uint, # 0 // Settings for custom font builder. THIS IS BUILDER IMPLEMENTATION DEPENDENT. Leave as zero if unsure.
1649
- :RasterizerMultiply, :float, # 1.0f // Brighten (>1.0f) or darken (<1.0f) font output. Brightening small fonts may be a good workaround to make them more readable.
1650
- :EllipsisChar, :ushort, # -1 // Explicitly specify unicode codepoint of ellipsis character. When fonts are being merged first specified ellipsis will be used.
1651
- :Name, [:char, 40], # Name (strictly to ease debugging)
1665
+ :FontData, :pointer,
1666
+ :FontDataSize, :int,
1667
+ :FontDataOwnedByAtlas, :bool,
1668
+ :FontNo, :int,
1669
+ :SizePixels, :float,
1670
+ :OversampleH, :int,
1671
+ :OversampleV, :int,
1672
+ :PixelSnapH, :bool,
1673
+ :GlyphExtraSpacing, ImVec2.by_value,
1674
+ :GlyphOffset, ImVec2.by_value,
1675
+ :GlyphRanges, :pointer,
1676
+ :GlyphMinAdvanceX, :float,
1677
+ :GlyphMaxAdvanceX, :float,
1678
+ :MergeMode, :bool,
1679
+ :FontBuilderFlags, :uint,
1680
+ :RasterizerMultiply, :float,
1681
+ :RasterizerDensity, :float,
1682
+ :EllipsisChar, :ushort,
1683
+ :Name, [:char, 40],
1652
1684
  :DstFont, ImFont.ptr
1653
1685
  )
1654
1686
 
@@ -1666,15 +1698,15 @@ end
1666
1698
  # (Note: some language parsers may fail to convert the 31+1 bitfield members, in this case maybe drop store a single u32 or we can rework this)
1667
1699
  class ImFontGlyph < FFI::Struct
1668
1700
  layout(
1669
- :Colored, :uint, # Flag to indicate glyph is colored and should generally ignore tinting (make it usable with no shift on little-endian as this is used in loops)
1670
- :Visible, :uint, # Flag to indicate glyph has no visible pixels (e.g. space). Allow early out when rendering.
1671
- :Codepoint, :uint, # 0x0000..0x10FFFF
1672
- :AdvanceX, :float, # Distance to next character (= data from font + ImFontConfig::GlyphExtraSpacing.x baked in)
1673
- :X0, :float, # Glyph corners
1701
+ :Colored, :uint,
1702
+ :Visible, :uint,
1703
+ :Codepoint, :uint,
1704
+ :AdvanceX, :float,
1705
+ :X0, :float,
1674
1706
  :Y0, :float,
1675
1707
  :X1, :float,
1676
1708
  :Y1, :float,
1677
- :U0, :float, # Texture coordinates
1709
+ :U0, :float,
1678
1710
  :V0, :float,
1679
1711
  :U1, :float,
1680
1712
  :V1, :float
@@ -1685,7 +1717,7 @@ end
1685
1717
  # This is essentially a tightly packed of vector of 64k booleans = 8KB storage.
1686
1718
  class ImFontGlyphRangesBuilder < FFI::Struct
1687
1719
  layout(
1688
- :UsedChars, ImVector.by_value # Store 1-bit per Unicode code point (0=unused, 1=used)
1720
+ :UsedChars, ImVector.by_value
1689
1721
  )
1690
1722
 
1691
1723
  def AddChar(c)
@@ -1728,99 +1760,96 @@ end
1728
1760
 
1729
1761
  class ImGuiIO < FFI::Struct
1730
1762
  layout(
1731
- :ConfigFlags, :int, # = 0 // See ImGuiConfigFlags_ enum. Set by user/application. Gamepad/keyboard navigation options, etc.
1732
- :BackendFlags, :int, # = 0 // See ImGuiBackendFlags_ enum. Set by backend (imgui_impl_xxx files or custom backend) to communicate features supported by the backend.
1733
- :DisplaySize, ImVec2.by_value, # <unset> // Main display size, in pixels (generally == GetMainViewport()->Size). May change every frame.
1734
- :DeltaTime, :float, # = 1.0f/60.0f // Time elapsed since last frame, in seconds. May change every frame.
1735
- :IniSavingRate, :float, # = 5.0f // Minimum time between saving positions/sizes to .ini file, in seconds.
1736
- :IniFilename, :pointer, # = "imgui.ini" // Path to .ini file (important: default "imgui.ini" is relative to current working dir!). Set NULL to disable automatic .ini loading/saving or if you want to manually call LoadIniSettingsXXX() / SaveIniSettingsXXX() functions.
1737
- :LogFilename, :pointer, # = "imgui_log.txt"// Path to .log file (default parameter to ImGui::LogToFile when no file is specified).
1738
- :UserData, :pointer, # = NULL // Store your own data.
1739
- :Fonts, ImFontAtlas.ptr, # <auto> // Font atlas: load, rasterize and pack one or more fonts into a single texture.
1740
- :FontGlobalScale, :float, # = 1.0f // Global scale all fonts
1741
- :FontAllowUserScaling, :bool, # = false // Allow user scaling text of individual window with CTRL+Wheel.
1742
- :FontDefault, ImFont.ptr, # = NULL // Font to use on NewFrame(). Use NULL to uses Fonts->Fonts[0].
1743
- :DisplayFramebufferScale, ImVec2.by_value, # = (1, 1) // For retina display or other situations where window coordinates are different from framebuffer coordinates. This generally ends up in ImDrawData::FramebufferScale.
1744
- :MouseDrawCursor, :bool, # = false // Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor). Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by backend implementations.
1745
- :ConfigMacOSXBehaviors, :bool, # = defined(__APPLE__) // OS X style: Text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text, Multi-selection in lists uses Cmd/Super instead of Ctrl.
1746
- :ConfigInputTrickleEventQueue, :bool, # = true // Enable input queue trickling: some types of events submitted during the same frame (e.g. button down + up) will be spread over multiple frames, improving interactions with low framerates.
1747
- :ConfigInputTextCursorBlink, :bool, # = true // Enable blinking cursor (optional as some users consider it to be distracting).
1748
- :ConfigInputTextEnterKeepActive, :bool, # = false // [BETA] Pressing Enter will keep item active and select contents (single-line only).
1749
- :ConfigDragClickToInputText, :bool, # = false // [BETA] Enable turning DragXXX widgets into text input with a simple mouse click-release (without moving). Not desirable on devices without a keyboard.
1750
- :ConfigWindowsResizeFromEdges, :bool, # = true // Enable resizing of windows from their edges and from the lower-left corner. This requires (io.BackendFlags & ImGuiBackendFlags_HasMouseCursors) because it needs mouse cursor feedback. (This used to be a per-window ImGuiWindowFlags_ResizeFromAnySide flag)
1751
- :ConfigWindowsMoveFromTitleBarOnly, :bool, # = false // Enable allowing to move windows only when clicking on their title bar. Does not apply to windows without a title bar.
1752
- :ConfigMemoryCompactTimer, :float, # = 60.0f // Timer (in seconds) to free transient windows/tables memory buffers when unused. Set to -1.0f to disable.
1753
- :MouseDoubleClickTime, :float, # = 0.30f // Time for a double-click, in seconds.
1754
- :MouseDoubleClickMaxDist, :float, # = 6.0f // Distance threshold to stay in to validate a double-click, in pixels.
1755
- :MouseDragThreshold, :float, # = 6.0f // Distance threshold before considering we are dragging.
1756
- :KeyRepeatDelay, :float, # = 0.275f // When holding a key/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.).
1757
- :KeyRepeatRate, :float, # = 0.050f // When holding a key/button, rate at which it repeats, in seconds.
1758
- :ConfigDebugBeginReturnValueOnce, :bool, # = false // First-time calls to Begin()/BeginChild() will return false. NEEDS TO BE SET AT APPLICATION BOOT TIME if you don't want to miss windows.
1759
- :ConfigDebugBeginReturnValueLoop, :bool, # = false // Some calls to Begin()/BeginChild() will return false. Will cycle through window depths then repeat. Suggested use: add "io.ConfigDebugBeginReturnValue = io.KeyShift" in your main loop then occasionally press SHIFT. Windows should be flickering while running.
1760
- :ConfigDebugIgnoreFocusLoss, :bool, # = false // Ignore io.AddFocusEvent(false), consequently not calling io.ClearInputKeys() in input processing.
1761
- :ConfigDebugIniSettings, :bool, # = false // Save .ini data with extra comments (particularly helpful for Docking, but makes saving slower)
1762
- :BackendPlatformName, :pointer, # = NULL
1763
- :BackendRendererName, :pointer, # = NULL
1764
- :BackendPlatformUserData, :pointer, # = NULL // User data for platform backend
1765
- :BackendRendererUserData, :pointer, # = NULL // User data for renderer backend
1766
- :BackendLanguageUserData, :pointer, # = NULL // User data for non C++ programming language backend
1763
+ :ConfigFlags, :int,
1764
+ :BackendFlags, :int,
1765
+ :DisplaySize, ImVec2.by_value,
1766
+ :DeltaTime, :float,
1767
+ :IniSavingRate, :float,
1768
+ :IniFilename, :pointer,
1769
+ :LogFilename, :pointer,
1770
+ :UserData, :pointer,
1771
+ :Fonts, ImFontAtlas.ptr,
1772
+ :FontGlobalScale, :float,
1773
+ :FontAllowUserScaling, :bool,
1774
+ :FontDefault, ImFont.ptr,
1775
+ :DisplayFramebufferScale, ImVec2.by_value,
1776
+ :MouseDrawCursor, :bool,
1777
+ :ConfigMacOSXBehaviors, :bool,
1778
+ :ConfigInputTrickleEventQueue, :bool,
1779
+ :ConfigInputTextCursorBlink, :bool,
1780
+ :ConfigInputTextEnterKeepActive, :bool,
1781
+ :ConfigDragClickToInputText, :bool,
1782
+ :ConfigWindowsResizeFromEdges, :bool,
1783
+ :ConfigWindowsMoveFromTitleBarOnly, :bool,
1784
+ :ConfigMemoryCompactTimer, :float,
1785
+ :MouseDoubleClickTime, :float,
1786
+ :MouseDoubleClickMaxDist, :float,
1787
+ :MouseDragThreshold, :float,
1788
+ :KeyRepeatDelay, :float,
1789
+ :KeyRepeatRate, :float,
1790
+ :ConfigDebugIsDebuggerPresent, :bool,
1791
+ :ConfigDebugBeginReturnValueOnce, :bool,
1792
+ :ConfigDebugBeginReturnValueLoop, :bool,
1793
+ :ConfigDebugIgnoreFocusLoss, :bool,
1794
+ :ConfigDebugIniSettings, :bool,
1795
+ :BackendPlatformName, :pointer,
1796
+ :BackendRendererName, :pointer,
1797
+ :BackendPlatformUserData, :pointer,
1798
+ :BackendRendererUserData, :pointer,
1799
+ :BackendLanguageUserData, :pointer,
1767
1800
  :GetClipboardTextFn, :pointer,
1768
1801
  :SetClipboardTextFn, :pointer,
1769
1802
  :ClipboardUserData, :pointer,
1770
1803
  :SetPlatformImeDataFn, :pointer,
1804
+ :PlatformLocaleDecimalPoint, :ushort,
1805
+ :WantCaptureMouse, :bool,
1806
+ :WantCaptureKeyboard, :bool,
1807
+ :WantTextInput, :bool,
1808
+ :WantSetMousePos, :bool,
1809
+ :WantSaveIniSettings, :bool,
1810
+ :NavActive, :bool,
1811
+ :NavVisible, :bool,
1812
+ :Framerate, :float,
1813
+ :MetricsRenderVertices, :int,
1814
+ :MetricsRenderIndices, :int,
1815
+ :MetricsRenderWindows, :int,
1816
+ :MetricsActiveWindows, :int,
1817
+ :MouseDelta, ImVec2.by_value,
1771
1818
  :_UnusedPadding, :pointer,
1772
- :PlatformLocaleDecimalPoint, :ushort, # '.' // [Experimental] Configure decimal point e.g. '.' or ',' useful for some languages (e.g. German), generally pulled from *localeconv()->decimal_point
1773
- :WantCaptureMouse, :bool, # Set when Dear ImGui will use mouse inputs, in this case do not dispatch them to your main game/application (either way, always pass on mouse inputs to imgui). (e.g. unclicked mouse is hovering over an imgui window, widget is active, mouse was clicked over an imgui window, etc.).
1774
- :WantCaptureKeyboard, :bool, # Set when Dear ImGui will use keyboard inputs, in this case do not dispatch them to your main game/application (either way, always pass keyboard inputs to imgui). (e.g. InputText active, or an imgui window is focused and navigation is enabled, etc.).
1775
- :WantTextInput, :bool, # Mobile/console: when set, you may display an on-screen keyboard. This is set by Dear ImGui when it wants textual keyboard input to happen (e.g. when a InputText widget is active).
1776
- :WantSetMousePos, :bool, # MousePos has been altered, backend should reposition mouse on next frame. Rarely used! Set only when ImGuiConfigFlags_NavEnableSetMousePos flag is enabled.
1777
- :WantSaveIniSettings, :bool, # When manual .ini load/save is active (io.IniFilename == NULL), this will be set to notify your application that you can call SaveIniSettingsToMemory() and save yourself. Important: clear io.WantSaveIniSettings yourself after saving!
1778
- :NavActive, :bool, # Keyboard/Gamepad navigation is currently allowed (will handle ImGuiKey_NavXXX events) = a window is focused and it doesn't use the ImGuiWindowFlags_NoNavInputs flag.
1779
- :NavVisible, :bool, # Keyboard/Gamepad navigation is visible and allowed (will handle ImGuiKey_NavXXX events).
1780
- :Framerate, :float, # Estimate of application framerate (rolling average over 60 frames, based on io.DeltaTime), in frame per second. Solely for convenience. Slow applications may not want to use a moving average or may want to reset underlying buffers occasionally.
1781
- :MetricsRenderVertices, :int, # Vertices output during last call to Render()
1782
- :MetricsRenderIndices, :int, # Indices output during last call to Render() = number of triangles * 3
1783
- :MetricsRenderWindows, :int, # Number of visible windows
1784
- :MetricsActiveWindows, :int, # Number of active windows
1785
- :MetricsActiveAllocations, :int, # Number of active allocations, updated by MemAlloc/MemFree based on current context. May be off if you have multiple imgui contexts.
1786
- :MouseDelta, ImVec2.by_value, # Mouse delta. Note that this is zero if either current or previous position are invalid (-FLT_MAX,-FLT_MAX), so a disappearing/reappearing mouse won't have a huge delta.
1787
- :KeyMap, [:int, 652], # [LEGACY] Input: map of indices into the KeysDown[512] entries array which represent your "native" keyboard state. The first 512 are now unused and should be kept zero. Legacy backend will write into KeyMap[] using ImGuiKey_ indices which are always >512.
1788
- :KeysDown, [:bool, 652], # [LEGACY] Input: Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys). This used to be [512] sized. It is now ImGuiKey_COUNT to allow legacy io.KeysDown[GetKeyIndex(...)] to work without an overflow.
1789
- :NavInputs, [:float, 16], # [LEGACY] Since 1.88, NavInputs[] was removed. Backends from 1.60 to 1.86 won't build. Feed gamepad inputs via io.AddKeyEvent() and ImGuiKey_GamepadXXX enums.
1790
- :Ctx, :pointer, # Parent UI context (needs to be set explicitly by parent).
1791
- :MousePos, ImVec2.by_value, # Mouse position, in pixels. Set to ImVec2(-FLT_MAX, -FLT_MAX) if mouse is unavailable (on another screen, etc.)
1792
- :MouseDown, [:bool, 5], # Mouse buttons: 0=left, 1=right, 2=middle + extras (ImGuiMouseButton_COUNT == 5). Dear ImGui mostly uses left and right buttons. Other buttons allow us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API.
1793
- :MouseWheel, :float, # Mouse wheel Vertical: 1 unit scrolls about 5 lines text. >0 scrolls Up, <0 scrolls Down. Hold SHIFT to turn vertical scroll into horizontal scroll.
1794
- :MouseWheelH, :float, # Mouse wheel Horizontal. >0 scrolls Left, <0 scrolls Right. Most users don't have a mouse with a horizontal wheel, may not be filled by all backends.
1795
- :MouseSource, :int, # Mouse actual input peripheral (Mouse/TouchScreen/Pen).
1796
- :KeyCtrl, :bool, # Keyboard modifier down: Control
1797
- :KeyShift, :bool, # Keyboard modifier down: Shift
1798
- :KeyAlt, :bool, # Keyboard modifier down: Alt
1799
- :KeySuper, :bool, # Keyboard modifier down: Cmd/Super/Windows
1800
- :KeyMods, :int, # Key mods flags (any of ImGuiMod_Ctrl/ImGuiMod_Shift/ImGuiMod_Alt/ImGuiMod_Super flags, same as io.KeyCtrl/KeyShift/KeyAlt/KeySuper but merged into flags. DOES NOT CONTAINS ImGuiMod_Shortcut which is pretranslated). Read-only, updated by NewFrame()
1801
- :KeysData, [ImGuiKeyData.by_value, 652], # Key state for all known keys. Use IsKeyXXX() functions to access this.
1802
- :WantCaptureMouseUnlessPopupClose, :bool, # Alternative to WantCaptureMouse: (WantCaptureMouse == true && WantCaptureMouseUnlessPopupClose == false) when a click over void is expected to close a popup.
1803
- :MousePosPrev, ImVec2.by_value, # Previous mouse position (note that MouseDelta is not necessary == MousePos-MousePosPrev, in case either position is invalid)
1804
- :MouseClickedPos, [ImVec2.by_value, 5], # Position at time of clicking
1805
- :MouseClickedTime, [:double, 5], # Time of last click (used to figure out double-click)
1806
- :MouseClicked, [:bool, 5], # Mouse button went from !Down to Down (same as MouseClickedCount[x] != 0)
1807
- :MouseDoubleClicked, [:bool, 5], # Has mouse button been double-clicked? (same as MouseClickedCount[x] == 2)
1808
- :MouseClickedCount, [:ushort, 5], # == 0 (not clicked), == 1 (same as MouseClicked[]), == 2 (double-clicked), == 3 (triple-clicked) etc. when going from !Down to Down
1809
- :MouseClickedLastCount, [:ushort, 5], # Count successive number of clicks. Stays valid after mouse release. Reset after another click is done.
1810
- :MouseReleased, [:bool, 5], # Mouse button went from Down to !Down
1811
- :MouseDownOwned, [:bool, 5], # Track if button was clicked inside a dear imgui window or over void blocked by a popup. We don't request mouse capture from the application if click started outside ImGui bounds.
1812
- :MouseDownOwnedUnlessPopupClose, [:bool, 5], # Track if button was clicked inside a dear imgui window.
1813
- :MouseWheelRequestAxisSwap, :bool, # On a non-Mac system, holding SHIFT requests WheelY to perform the equivalent of a WheelX event. On a Mac system this is already enforced by the system.
1814
- :MouseDownDuration, [:float, 5], # Duration the mouse button has been down (0.0f == just clicked)
1815
- :MouseDownDurationPrev, [:float, 5], # Previous time the mouse button has been down
1816
- :MouseDragMaxDistanceSqr, [:float, 5], # Squared maximum distance of how much mouse has traveled from the clicking point (used for moving thresholds)
1817
- :PenPressure, :float, # Touch/Pen pressure (0.0f to 1.0f, should be >0.0f only when MouseDown[0] == true). Helper storage currently unused by Dear ImGui.
1818
- :AppFocusLost, :bool, # Only modify via AddFocusEvent()
1819
- :AppAcceptingEvents, :bool, # Only modify via SetAppAcceptingEvents()
1820
- :BackendUsingLegacyKeyArrays, :char, # -1: unknown, 0: using AddKeyEvent(), 1: using legacy io.KeysDown[]
1821
- :BackendUsingLegacyNavInputArray, :bool, # 0: using AddKeyAnalogEvent(), 1: writing to legacy io.NavInputs[] directly
1822
- :InputQueueSurrogate, :ushort, # For AddInputCharacterUTF16()
1823
- :InputQueueCharacters, ImVector.by_value # Queue of _characters_ input (obtained by platform backend). Fill using AddInputCharacter() helper.
1819
+ :Ctx, :pointer,
1820
+ :MousePos, ImVec2.by_value,
1821
+ :MouseDown, [:bool, 5],
1822
+ :MouseWheel, :float,
1823
+ :MouseWheelH, :float,
1824
+ :MouseSource, :int,
1825
+ :KeyCtrl, :bool,
1826
+ :KeyShift, :bool,
1827
+ :KeyAlt, :bool,
1828
+ :KeySuper, :bool,
1829
+ :KeyMods, :int,
1830
+ :KeysData, [ImGuiKeyData.by_value, 154],
1831
+ :WantCaptureMouseUnlessPopupClose, :bool,
1832
+ :MousePosPrev, ImVec2.by_value,
1833
+ :MouseClickedPos, [ImVec2.by_value, 5],
1834
+ :MouseClickedTime, [:double, 5],
1835
+ :MouseClicked, [:bool, 5],
1836
+ :MouseDoubleClicked, [:bool, 5],
1837
+ :MouseClickedCount, [:ushort, 5],
1838
+ :MouseClickedLastCount, [:ushort, 5],
1839
+ :MouseReleased, [:bool, 5],
1840
+ :MouseDownOwned, [:bool, 5],
1841
+ :MouseDownOwnedUnlessPopupClose, [:bool, 5],
1842
+ :MouseWheelRequestAxisSwap, :bool,
1843
+ :MouseDownDuration, [:float, 5],
1844
+ :MouseDownDurationPrev, [:float, 5],
1845
+ :MouseDragMaxDistanceSqr, [:float, 5],
1846
+ :PenPressure, :float,
1847
+ :AppFocusLost, :bool,
1848
+ :AppAcceptingEvents, :bool,
1849
+ :BackendUsingLegacyKeyArrays, :char,
1850
+ :BackendUsingLegacyNavInputArray, :bool,
1851
+ :InputQueueSurrogate, :ushort,
1852
+ :InputQueueCharacters, ImVector.by_value
1824
1853
  )
1825
1854
 
1826
1855
  def AddFocusEvent(focused)
@@ -1900,19 +1929,19 @@ end
1900
1929
  # - ImGuiInputTextFlags_CallbackResize: Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow.
1901
1930
  class ImGuiInputTextCallbackData < FFI::Struct
1902
1931
  layout(
1903
- :Ctx, :pointer, # Parent UI context
1904
- :EventFlag, :int, # One ImGuiInputTextFlags_Callback* // Read-only
1905
- :Flags, :int, # What user passed to InputText() // Read-only
1906
- :UserData, :pointer, # What user passed to InputText() // Read-only
1907
- :EventChar, :ushort, # Character input // Read-write // [CharFilter] Replace character with another one, or set to zero to drop. return 1 is equivalent to setting EventChar=0;
1908
- :EventKey, :int, # Key pressed (Up/Down/TAB) // Read-only // [Completion,History]
1909
- :Buf, :pointer, # Text buffer // Read-write // [Resize] Can replace pointer / [Completion,History,Always] Only write to pointed data, don't replace the actual pointer!
1910
- :BufTextLen, :int, # Text length (in bytes) // Read-write // [Resize,Completion,History,Always] Exclude zero-terminator storage. In C land: == strlen(some_text), in C++ land: string.length()
1911
- :BufSize, :int, # Buffer size (in bytes) = capacity+1 // Read-only // [Resize,Completion,History,Always] Include zero-terminator storage. In C land == ARRAYSIZE(my_char_array), in C++ land: string.capacity()+1
1912
- :BufDirty, :bool, # Set if you modify Buf/BufTextLen! // Write // [Completion,History,Always]
1913
- :CursorPos, :int, # // Read-write // [Completion,History,Always]
1914
- :SelectionStart, :int, # // Read-write // [Completion,History,Always] == to SelectionEnd when no selection)
1915
- :SelectionEnd, :int # // Read-write // [Completion,History,Always]
1932
+ :Ctx, :pointer,
1933
+ :EventFlag, :int,
1934
+ :Flags, :int,
1935
+ :UserData, :pointer,
1936
+ :EventChar, :ushort,
1937
+ :EventKey, :int,
1938
+ :Buf, :pointer,
1939
+ :BufTextLen, :int,
1940
+ :BufSize, :int,
1941
+ :BufDirty, :bool,
1942
+ :CursorPos, :int,
1943
+ :SelectionStart, :int,
1944
+ :SelectionEnd, :int
1916
1945
  )
1917
1946
 
1918
1947
  def ClearSelection()
@@ -1967,13 +1996,13 @@ end
1967
1996
  # - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc.
1968
1997
  class ImGuiListClipper < FFI::Struct
1969
1998
  layout(
1970
- :Ctx, :pointer, # Parent UI context
1971
- :DisplayStart, :int, # First item to display, updated by each call to Step()
1972
- :DisplayEnd, :int, # End of items to display (exclusive)
1973
- :ItemsCount, :int, # [Internal] Number of items
1974
- :ItemsHeight, :float, # [Internal] Height of item after a first step and item submission can calculate it
1975
- :StartPosY, :float, # [Internal] Cursor position at the time of Begin() or after table frozen rows are all processed
1976
- :TempData, :pointer # [Internal] Internal data
1999
+ :Ctx, :pointer,
2000
+ :DisplayStart, :int,
2001
+ :DisplayEnd, :int,
2002
+ :ItemsCount, :int,
2003
+ :ItemsHeight, :float,
2004
+ :StartPosY, :float,
2005
+ :TempData, :pointer
1977
2006
  )
1978
2007
 
1979
2008
  def Begin(items_count, items_height = -1.0)
@@ -2009,14 +2038,14 @@ end
2009
2038
  # Data payload for Drag and Drop operations: AcceptDragDropPayload(), GetDragDropPayload()
2010
2039
  class ImGuiPayload < FFI::Struct
2011
2040
  layout(
2012
- :Data, :pointer, # Data (copied and owned by dear imgui)
2013
- :DataSize, :int, # Data size
2014
- :SourceId, :uint, # Source item id
2015
- :SourceParentId, :uint, # Source parent id (if available)
2016
- :DataFrameCount, :int, # Data timestamp
2017
- :DataType, [:char, 33], # Data type tag (short user-supplied string, 32 characters max)
2018
- :Preview, :bool, # Set when AcceptDragDropPayload() was called and mouse has been hovering the target item (nb: handle overlapping drag targets)
2019
- :Delivery, :bool # Set when AcceptDragDropPayload() was called and mouse button is released over the target item.
2041
+ :Data, :pointer,
2042
+ :DataSize, :int,
2043
+ :SourceId, :uint,
2044
+ :SourceParentId, :uint,
2045
+ :DataFrameCount, :int,
2046
+ :DataType, [:char, 33],
2047
+ :Preview, :bool,
2048
+ :Delivery, :bool
2020
2049
  )
2021
2050
 
2022
2051
  def Clear()
@@ -2048,9 +2077,9 @@ end
2048
2077
  # (Optional) Support for IME (Input Method Editor) via the io.SetPlatformImeDataFn() function.
2049
2078
  class ImGuiPlatformImeData < FFI::Struct
2050
2079
  layout(
2051
- :WantVisible, :bool, # A widget wants the IME to be visible
2052
- :InputPos, ImVec2.by_value, # Position of the input cursor
2053
- :InputLineHeight, :float # Line height
2080
+ :WantVisible, :bool,
2081
+ :InputPos, ImVec2.by_value,
2082
+ :InputLineHeight, :float
2054
2083
  )
2055
2084
 
2056
2085
  def self.create()
@@ -2067,10 +2096,10 @@ end
2067
2096
  # NB: For basic min/max size constraint on each axis you don't need to use the callback! The SetNextWindowSizeConstraints() parameters are enough.
2068
2097
  class ImGuiSizeCallbackData < FFI::Struct
2069
2098
  layout(
2070
- :UserData, :pointer, # Read-only. What user passed to SetNextWindowSizeConstraints(). Generally store an integer or float in here (need reinterpret_cast<>).
2071
- :Pos, ImVec2.by_value, # Read-only. Window position, for reference.
2072
- :CurrentSize, ImVec2.by_value, # Read-only. Current window size.
2073
- :DesiredSize, ImVec2.by_value # Read-write. Desired size, based on user's mouse position. Write to this field to restrain resizing.
2099
+ :UserData, :pointer,
2100
+ :Pos, ImVec2.by_value,
2101
+ :CurrentSize, ImVec2.by_value,
2102
+ :DesiredSize, ImVec2.by_value
2074
2103
  )
2075
2104
  end
2076
2105
 
@@ -2151,55 +2180,57 @@ end
2151
2180
 
2152
2181
  class ImGuiStyle < FFI::Struct
2153
2182
  layout(
2154
- :Alpha, :float, # Global alpha applies to everything in Dear ImGui.
2155
- :DisabledAlpha, :float, # Additional alpha multiplier applied by BeginDisabled(). Multiply over current value of Alpha.
2156
- :WindowPadding, ImVec2.by_value, # Padding within a window.
2157
- :WindowRounding, :float, # Radius of window corners rounding. Set to 0.0f to have rectangular windows. Large values tend to lead to variety of artifacts and are not recommended.
2158
- :WindowBorderSize, :float, # Thickness of border around windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly).
2159
- :WindowMinSize, ImVec2.by_value, # Minimum window size. This is a global setting. If you want to constrain individual windows, use SetNextWindowSizeConstraints().
2160
- :WindowTitleAlign, ImVec2.by_value, # Alignment for title bar text. Defaults to (0.0f,0.5f) for left-aligned,vertically centered.
2161
- :WindowMenuButtonPosition, :int, # Side of the collapsing/docking button in the title bar (None/Left/Right). Defaults to ImGuiDir_Left.
2162
- :ChildRounding, :float, # Radius of child window corners rounding. Set to 0.0f to have rectangular windows.
2163
- :ChildBorderSize, :float, # Thickness of border around child windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly).
2164
- :PopupRounding, :float, # Radius of popup window corners rounding. (Note that tooltip windows use WindowRounding)
2165
- :PopupBorderSize, :float, # Thickness of border around popup/tooltip windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly).
2166
- :FramePadding, ImVec2.by_value, # Padding within a framed rectangle (used by most widgets).
2167
- :FrameRounding, :float, # Radius of frame corners rounding. Set to 0.0f to have rectangular frame (used by most widgets).
2168
- :FrameBorderSize, :float, # Thickness of border around frames. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly).
2169
- :ItemSpacing, ImVec2.by_value, # Horizontal and vertical spacing between widgets/lines.
2170
- :ItemInnerSpacing, ImVec2.by_value, # Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its label).
2171
- :CellPadding, ImVec2.by_value, # Padding within a table cell. CellPadding.y may be altered between different rows.
2172
- :TouchExtraPadding, ImVec2.by_value, # Expand reactive bounding box for touch-based system where touch position is not accurate enough. Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget. So don't grow this too much!
2173
- :IndentSpacing, :float, # Horizontal indentation when e.g. entering a tree node. Generally == (FontSize + FramePadding.x*2).
2174
- :ColumnsMinSpacing, :float, # Minimum horizontal spacing between two columns. Preferably > (FramePadding.x + 1).
2175
- :ScrollbarSize, :float, # Width of the vertical scrollbar, Height of the horizontal scrollbar.
2176
- :ScrollbarRounding, :float, # Radius of grab corners for scrollbar.
2177
- :GrabMinSize, :float, # Minimum width/height of a grab box for slider/scrollbar.
2178
- :GrabRounding, :float, # Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs.
2179
- :LogSliderDeadzone, :float, # The size in pixels of the dead-zone around zero on logarithmic sliders that cross zero.
2180
- :TabRounding, :float, # Radius of upper corners of a tab. Set to 0.0f to have rectangular tabs.
2181
- :TabBorderSize, :float, # Thickness of border around tabs.
2182
- :TabMinWidthForCloseButton, :float, # Minimum width for close button to appear on an unselected tab when hovered. Set to 0.0f to always show when hovering, set to FLT_MAX to never show close button unless selected.
2183
- :ColorButtonPosition, :int, # Side of the color button in the ColorEdit4 widget (left/right). Defaults to ImGuiDir_Right.
2184
- :ButtonTextAlign, ImVec2.by_value, # Alignment of button text when button is larger than text. Defaults to (0.5f, 0.5f) (centered).
2185
- :SelectableTextAlign, ImVec2.by_value, # Alignment of selectable text. Defaults to (0.0f, 0.0f) (top-left aligned). It's generally important to keep this left-aligned if you want to lay multiple items on a same line.
2186
- :SeparatorTextBorderSize, :float, # Thickkness of border in SeparatorText()
2187
- :SeparatorTextAlign, ImVec2.by_value, # Alignment of text within the separator. Defaults to (0.0f, 0.5f) (left aligned, center).
2188
- :SeparatorTextPadding, ImVec2.by_value, # Horizontal offset of text from each edge of the separator + spacing on other axis. Generally small values. .y is recommended to be == FramePadding.y.
2189
- :DisplayWindowPadding, ImVec2.by_value, # Window position are clamped to be visible within the display area or monitors by at least this amount. Only applies to regular windows.
2190
- :DisplaySafeAreaPadding, ImVec2.by_value, # If you cannot see the edges of your screen (e.g. on a TV) increase the safe area padding. Apply to popups/tooltips as well regular windows. NB: Prefer configuring your TV sets correctly!
2191
- :MouseCursorScale, :float, # Scale software rendered mouse cursor (when io.MouseDrawCursor is enabled). May be removed later.
2192
- :AntiAliasedLines, :bool, # Enable anti-aliased lines/borders. Disable if you are really tight on CPU/GPU. Latched at the beginning of the frame (copied to ImDrawList).
2193
- :AntiAliasedLinesUseTex, :bool, # Enable anti-aliased lines/borders using textures where possible. Require backend to render with bilinear filtering (NOT point/nearest filtering). Latched at the beginning of the frame (copied to ImDrawList).
2194
- :AntiAliasedFill, :bool, # Enable anti-aliased edges around filled shapes (rounded rectangles, circles, etc.). Disable if you are really tight on CPU/GPU. Latched at the beginning of the frame (copied to ImDrawList).
2195
- :CurveTessellationTol, :float, # Tessellation tolerance when using PathBezierCurveTo() without a specific number of segments. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality.
2196
- :CircleTessellationMaxError, :float, # Maximum error (in pixels) allowed when using AddCircle()/AddCircleFilled() or drawing rounded corner rectangles with no explicit segment count specified. Decrease for higher quality but more geometry.
2183
+ :Alpha, :float,
2184
+ :DisabledAlpha, :float,
2185
+ :WindowPadding, ImVec2.by_value,
2186
+ :WindowRounding, :float,
2187
+ :WindowBorderSize, :float,
2188
+ :WindowMinSize, ImVec2.by_value,
2189
+ :WindowTitleAlign, ImVec2.by_value,
2190
+ :WindowMenuButtonPosition, :int,
2191
+ :ChildRounding, :float,
2192
+ :ChildBorderSize, :float,
2193
+ :PopupRounding, :float,
2194
+ :PopupBorderSize, :float,
2195
+ :FramePadding, ImVec2.by_value,
2196
+ :FrameRounding, :float,
2197
+ :FrameBorderSize, :float,
2198
+ :ItemSpacing, ImVec2.by_value,
2199
+ :ItemInnerSpacing, ImVec2.by_value,
2200
+ :CellPadding, ImVec2.by_value,
2201
+ :TouchExtraPadding, ImVec2.by_value,
2202
+ :IndentSpacing, :float,
2203
+ :ColumnsMinSpacing, :float,
2204
+ :ScrollbarSize, :float,
2205
+ :ScrollbarRounding, :float,
2206
+ :GrabMinSize, :float,
2207
+ :GrabRounding, :float,
2208
+ :LogSliderDeadzone, :float,
2209
+ :TabRounding, :float,
2210
+ :TabBorderSize, :float,
2211
+ :TabMinWidthForCloseButton, :float,
2212
+ :TabBarBorderSize, :float,
2213
+ :TableAngledHeadersAngle, :float,
2214
+ :ColorButtonPosition, :int,
2215
+ :ButtonTextAlign, ImVec2.by_value,
2216
+ :SelectableTextAlign, ImVec2.by_value,
2217
+ :SeparatorTextBorderSize, :float,
2218
+ :SeparatorTextAlign, ImVec2.by_value,
2219
+ :SeparatorTextPadding, ImVec2.by_value,
2220
+ :DisplayWindowPadding, ImVec2.by_value,
2221
+ :DisplaySafeAreaPadding, ImVec2.by_value,
2222
+ :MouseCursorScale, :float,
2223
+ :AntiAliasedLines, :bool,
2224
+ :AntiAliasedLinesUseTex, :bool,
2225
+ :AntiAliasedFill, :bool,
2226
+ :CurveTessellationTol, :float,
2227
+ :CircleTessellationMaxError, :float,
2197
2228
  :Colors, [ImVec4.by_value, 53],
2198
- :HoverStationaryDelay, :float, # Delay for IsItemHovered(ImGuiHoveredFlags_Stationary). Time required to consider mouse stationary.
2199
- :HoverDelayShort, :float, # Delay for IsItemHovered(ImGuiHoveredFlags_DelayShort). Usually used along with HoverStationaryDelay.
2200
- :HoverDelayNormal, :float, # Delay for IsItemHovered(ImGuiHoveredFlags_DelayNormal). "
2201
- :HoverFlagsForTooltipMouse, :int, # Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip()/SetItemTooltip() while using mouse.
2202
- :HoverFlagsForTooltipNav, :int # Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip()/SetItemTooltip() while using keyboard/gamepad.
2229
+ :HoverStationaryDelay, :float,
2230
+ :HoverDelayShort, :float,
2231
+ :HoverDelayNormal, :float,
2232
+ :HoverFlagsForTooltipMouse, :int,
2233
+ :HoverFlagsForTooltipNav, :int
2203
2234
  )
2204
2235
 
2205
2236
  def self.create()
@@ -2219,10 +2250,10 @@ end
2219
2250
  # Sorting specification for one column of a table (sizeof == 12 bytes)
2220
2251
  class ImGuiTableColumnSortSpecs < FFI::Struct
2221
2252
  layout(
2222
- :ColumnUserID, :uint, # User id of the column (if specified by a TableSetupColumn() call)
2223
- :ColumnIndex, :short, # Index of the column
2224
- :SortOrder, :short, # Index within parent ImGuiTableSortSpecs (always stored in order starting from 0, tables sorted on a single criteria will always have a 0 here)
2225
- :SortDirection, :int # ImGuiSortDirection_Ascending or ImGuiSortDirection_Descending (you can use this or SortSign, whichever is more convenient for your sort function)
2253
+ :ColumnUserID, :uint,
2254
+ :ColumnIndex, :short,
2255
+ :SortOrder, :short,
2256
+ :SortDirection, :int
2226
2257
  )
2227
2258
 
2228
2259
  def self.create()
@@ -2241,9 +2272,9 @@ end
2241
2272
  # Make sure to set 'SpecsDirty = false' after sorting, else you may wastefully sort your data every frame!
2242
2273
  class ImGuiTableSortSpecs < FFI::Struct
2243
2274
  layout(
2244
- :Specs, :pointer, # Pointer to sort spec array.
2245
- :SpecsCount, :int, # Sort spec count. Most often 1. May be > 1 when ImGuiTableFlags_SortMulti is enabled. May be == 0 when ImGuiTableFlags_SortTristate is enabled.
2246
- :SpecsDirty, :bool # Set to true when specs have changed since last time! Use this to sort again, then clear the flag.
2275
+ :Specs, :pointer,
2276
+ :SpecsCount, :int,
2277
+ :SpecsDirty, :bool
2247
2278
  )
2248
2279
 
2249
2280
  def self.create()
@@ -2381,16 +2412,16 @@ class ImGuiStoragePair < FFI::Struct
2381
2412
  :val_p, :pointer
2382
2413
  )
2383
2414
 
2384
- def self.create(_key, _val_i)
2385
- return ImGuiStoragePair.new(ImGui::ImGuiStoragePair_ImGuiStoragePair_Int(_key, _val_i))
2415
+ def self.create(_key, _val)
2416
+ return ImGuiStoragePair.new(ImGui::ImGuiStoragePair_ImGuiStoragePair_Int(_key, _val))
2386
2417
  end
2387
2418
 
2388
- def self.create(_key, _val_f)
2389
- return ImGuiStoragePair.new(ImGui::ImGuiStoragePair_ImGuiStoragePair_Float(_key, _val_f))
2419
+ def self.create(_key, _val)
2420
+ return ImGuiStoragePair.new(ImGui::ImGuiStoragePair_ImGuiStoragePair_Float(_key, _val))
2390
2421
  end
2391
2422
 
2392
- def self.create(_key, _val_p)
2393
- return ImGuiStoragePair.new(ImGui::ImGuiStoragePair_ImGuiStoragePair_Ptr(_key, _val_p))
2423
+ def self.create(_key, _val)
2424
+ return ImGuiStoragePair.new(ImGui::ImGuiStoragePair_ImGuiStoragePair_Ptr(_key, _val))
2394
2425
  end
2395
2426
 
2396
2427
  def destroy()
@@ -2471,6 +2502,8 @@ module ImGui
2471
2502
  [:ImDrawList_AddCircleFilled, [:pointer, ImVec2.by_value, :float, :uint, :int], :void],
2472
2503
  [:ImDrawList_AddConvexPolyFilled, [:pointer, :pointer, :int, :uint], :void],
2473
2504
  [:ImDrawList_AddDrawCmd, [:pointer], :void],
2505
+ [:ImDrawList_AddEllipse, [:pointer, ImVec2.by_value, :float, :float, :uint, :float, :int, :float], :void],
2506
+ [:ImDrawList_AddEllipseFilled, [:pointer, ImVec2.by_value, :float, :float, :uint, :float, :int], :void],
2474
2507
  [:ImDrawList_AddImage, [:pointer, :pointer, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, :uint], :void],
2475
2508
  [:ImDrawList_AddImageQuad, [:pointer, :pointer, 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],
2476
2509
  [:ImDrawList_AddImageRounded, [:pointer, :pointer, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, :uint, :float, :int], :void],
@@ -2499,6 +2532,7 @@ module ImGui
2499
2532
  [:ImDrawList_PathBezierCubicCurveTo, [:pointer, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, :int], :void],
2500
2533
  [:ImDrawList_PathBezierQuadraticCurveTo, [:pointer, ImVec2.by_value, ImVec2.by_value, :int], :void],
2501
2534
  [:ImDrawList_PathClear, [:pointer], :void],
2535
+ [:ImDrawList_PathEllipticalArcTo, [:pointer, ImVec2.by_value, :float, :float, :float, :float, :float, :int], :void],
2502
2536
  [:ImDrawList_PathFillConvex, [:pointer, :uint], :void],
2503
2537
  [:ImDrawList_PathLineTo, [:pointer, ImVec2.by_value], :void],
2504
2538
  [:ImDrawList_PathLineToMergeDuplicate, [:pointer, ImVec2.by_value], :void],
@@ -2688,9 +2722,8 @@ module ImGui
2688
2722
  [:igAlignTextToFramePadding, [], :void],
2689
2723
  [:igArrowButton, [:pointer, :int], :bool],
2690
2724
  [:igBegin, [:pointer, :pointer, :int], :bool],
2691
- [:igBeginChild_Str, [:pointer, ImVec2.by_value, :bool, :int], :bool],
2692
- [:igBeginChild_ID, [:uint, ImVec2.by_value, :bool, :int], :bool],
2693
- [:igBeginChildFrame, [:uint, ImVec2.by_value, :int], :bool],
2725
+ [:igBeginChild_Str, [:pointer, ImVec2.by_value, :int, :int], :bool],
2726
+ [:igBeginChild_ID, [:uint, ImVec2.by_value, :int, :int], :bool],
2694
2727
  [:igBeginCombo, [:pointer, :pointer, :int], :bool],
2695
2728
  [:igBeginDisabled, [:bool], :void],
2696
2729
  [:igBeginDragDropSource, [:int], :bool],
@@ -2733,9 +2766,10 @@ module ImGui
2733
2766
  [:igColumns, [:int, :pointer, :bool], :void],
2734
2767
  [:igCombo_Str_arr, [:pointer, :pointer, :pointer, :int, :int], :bool],
2735
2768
  [:igCombo_Str, [:pointer, :pointer, :pointer, :int], :bool],
2736
- [:igCombo_FnBoolPtr, [:pointer, :pointer, :pointer, :pointer, :int, :int], :bool],
2769
+ [:igCombo_FnStrPtr, [:pointer, :pointer, :pointer, :pointer, :int, :int], :bool],
2737
2770
  [:igCreateContext, [:pointer], :pointer],
2738
2771
  [:igDebugCheckVersionAndDataLayout, [:pointer, :size_t, :size_t, :size_t, :size_t, :size_t, :size_t], :bool],
2772
+ [:igDebugFlashStyleColor, [:int], :void],
2739
2773
  [:igDebugTextEncoding, [:pointer], :void],
2740
2774
  [:igDestroyContext, [:pointer], :void],
2741
2775
  [:igDragFloat, [:pointer, :pointer, :float, :float, :float, :pointer, :int], :bool],
@@ -2753,7 +2787,6 @@ module ImGui
2753
2787
  [:igDummy, [ImVec2.by_value], :void],
2754
2788
  [:igEnd, [], :void],
2755
2789
  [:igEndChild, [], :void],
2756
- [:igEndChildFrame, [], :void],
2757
2790
  [:igEndCombo, [], :void],
2758
2791
  [:igEndDisabled, [], :void],
2759
2792
  [:igEndDragDropSource, [], :void],
@@ -2866,6 +2899,7 @@ module ImGui
2866
2899
  [:igIsItemHovered, [:int], :bool],
2867
2900
  [:igIsItemToggledOpen, [], :bool],
2868
2901
  [:igIsItemVisible, [], :bool],
2902
+ [:igIsKeyChordPressed, [:int], :bool],
2869
2903
  [:igIsKeyDown, [:int], :bool],
2870
2904
  [:igIsKeyPressed, [:int, :bool], :bool],
2871
2905
  [:igIsKeyReleased, [:int], :bool],
@@ -2885,7 +2919,7 @@ module ImGui
2885
2919
  [:igIsWindowHovered, [:int], :bool],
2886
2920
  [:igLabelText, [:pointer, :pointer, :varargs], :void],
2887
2921
  [:igListBox_Str_arr, [:pointer, :pointer, :pointer, :int, :int], :bool],
2888
- [:igListBox_FnBoolPtr, [:pointer, :pointer, :pointer, :pointer, :int, :int], :bool],
2922
+ [:igListBox_FnStrPtr, [:pointer, :pointer, :pointer, :pointer, :int, :int], :bool],
2889
2923
  [:igLoadIniSettingsFromDisk, [:pointer], :void],
2890
2924
  [:igLoadIniSettingsFromMemory, [:pointer, :size_t], :void],
2891
2925
  [:igLogButtons, [], :void],
@@ -2993,8 +3027,8 @@ module ImGui
2993
3027
  [:igShowDebugLogWindow, [:pointer], :void],
2994
3028
  [:igShowDemoWindow, [:pointer], :void],
2995
3029
  [:igShowFontSelector, [:pointer], :void],
3030
+ [:igShowIDStackToolWindow, [:pointer], :void],
2996
3031
  [:igShowMetricsWindow, [:pointer], :void],
2997
- [:igShowStackToolWindow, [:pointer], :void],
2998
3032
  [:igShowStyleEditor, [:pointer], :void],
2999
3033
  [:igShowStyleSelector, [:pointer], :bool],
3000
3034
  [:igShowUserGuide, [], :void],
@@ -3015,6 +3049,7 @@ module ImGui
3015
3049
  [:igStyleColorsDark, [:pointer], :void],
3016
3050
  [:igStyleColorsLight, [:pointer], :void],
3017
3051
  [:igTabItemButton, [:pointer, :int], :bool],
3052
+ [:igTableAngledHeadersRow, [], :void],
3018
3053
  [:igTableGetColumnCount, [], :int],
3019
3054
  [:igTableGetColumnFlags, [:int], :int],
3020
3055
  [:igTableGetColumnIndex, [], :int],
@@ -3095,30 +3130,24 @@ module ImGui
3095
3130
  # Some information such as 'flags' or 'p_open' will only be considered by the first call to Begin().
3096
3131
  # - Begin() return false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting
3097
3132
  # anything to the window. Always call a matching End() for each Begin() call, regardless of its return value!
3098
- # [Important: due to legacy reason, this is inconsistent with most other functions such as BeginMenu/EndMenu,
3099
- # BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding BeginXXX function
3100
- # returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.]
3133
+ # [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all other functions
3134
+ # such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding
3135
+ # BeginXXX function returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.]
3101
3136
  # - Note that the bottom of window stack always contains a window called "Debug".
3102
3137
  def self.Begin(name, p_open = nil, flags = 0)
3103
3138
  igBegin(name, p_open, flags)
3104
3139
  end
3105
3140
 
3106
- # arg: str_id(const char*), size(ImVec2), border(bool), flags(ImGuiWindowFlags)
3141
+ # arg: str_id(const char*), size(ImVec2), child_flags(ImGuiChildFlags), window_flags(ImGuiWindowFlags)
3107
3142
  # ret: bool
3108
- def self.BeginChild_Str(str_id, size = ImVec2.create(0,0), border = false, flags = 0)
3109
- igBeginChild_Str(str_id, size, border, flags)
3143
+ def self.BeginChild_Str(str_id, size = ImVec2.create(0,0), child_flags = 0, window_flags = 0)
3144
+ igBeginChild_Str(str_id, size, child_flags, window_flags)
3110
3145
  end
3111
3146
 
3112
- # arg: id(ImGuiID), size(ImVec2), border(bool), flags(ImGuiWindowFlags)
3147
+ # arg: id(ImGuiID), size(ImVec2), child_flags(ImGuiChildFlags), window_flags(ImGuiWindowFlags)
3113
3148
  # ret: bool
3114
- def self.BeginChild_ID(id, size = ImVec2.create(0,0), border = false, flags = 0)
3115
- igBeginChild_ID(id, size, border, flags)
3116
- end
3117
-
3118
- # arg: id(ImGuiID), size(ImVec2), flags(ImGuiWindowFlags)
3119
- # ret: bool
3120
- def self.BeginChildFrame(id, size, flags = 0) # helper to create a child window / scrolling region that looks like a normal widget frame
3121
- igBeginChildFrame(id, size, flags)
3149
+ def self.BeginChild_ID(id, size = ImVec2.create(0,0), child_flags = 0, window_flags = 0)
3150
+ igBeginChild_ID(id, size, child_flags, window_flags)
3122
3151
  end
3123
3152
 
3124
3153
  # arg: label(const char*), preview_value(const char*), flags(ImGuiComboFlags)
@@ -3167,9 +3196,9 @@ module ImGui
3167
3196
  # ret: bool
3168
3197
  #
3169
3198
  # Tooltips: helpers for showing a tooltip when hovering an item
3170
- # - BeginItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_Tooltip) && BeginTooltip())' idiom.
3171
- # - SetItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_Tooltip)) { SetTooltip(...); }' idiom.
3172
- # - Where 'ImGuiHoveredFlags_Tooltip' itself is a shortcut to use 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav' depending on active input type. For mouse it defaults to 'ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort'.
3199
+ # - BeginItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_ForTooltip) && BeginTooltip())' idiom.
3200
+ # - SetItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_ForTooltip)) { SetTooltip(...); }' idiom.
3201
+ # - Where 'ImGuiHoveredFlags_ForTooltip' itself is a shortcut to use 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav' depending on active input type. For mouse it defaults to 'ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort'.
3173
3202
  def self.BeginItemTooltip() # begin/append a tooltip window if preceding item was hovered.
3174
3203
  igBeginItemTooltip()
3175
3204
  end
@@ -3178,8 +3207,8 @@ module ImGui
3178
3207
  # ret: bool
3179
3208
  #
3180
3209
  # Widgets: List Boxes
3181
- # - This is essentially a thin wrapper to using BeginChild/EndChild with some stylistic changes.
3182
- # - The BeginListBox()/EndListBox() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() or any items.
3210
+ # - This is essentially a thin wrapper to using BeginChild/EndChild with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label.
3211
+ # - You can submit contents and manage your selection state however you want it, by creating e.g. Selectable() or any other items.
3183
3212
  # - 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.
3184
3213
  # - 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
3185
3214
  # - Choose frame height: size.y > 0.0f: custom / size.y < 0.0f or -FLT_MIN: bottom-align / size.y = 0.0f (default): arbitrary default height which can fit ~7 items
@@ -3212,8 +3241,15 @@ module ImGui
3212
3241
  # arg: str_id(const char*), flags(ImGuiWindowFlags)
3213
3242
  # ret: bool
3214
3243
  #
3215
- # Popups: begin/end functions
3216
- # - BeginPopup(): query popup state, if open start appending into the window. Call EndPopup() afterwards. ImGuiWindowFlags are forwarded to the window.
3244
+ # Popups, Modals
3245
+ # - They block normal mouse hovering detection (and therefore most mouse interactions) behind them.
3246
+ # - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE.
3247
+ # - Their visibility state (~bool) is held internally instead of being held by the programmer as we are used to with regular Begin*() calls.
3248
+ # - The 3 properties above are related: we need to retain popup visibility state in the library because popups may be closed as any time.
3249
+ # - You can bypass the hovering restriction by using ImGuiHoveredFlags_AllowWhenBlockedByPopup when calling IsItemHovered() or IsWindowHovered().
3250
+ # - IMPORTANT: Popup identifiers are relative to the current ID stack, so OpenPopup and BeginPopup generally needs to be at the same level of the stack.
3251
+ # This is sometimes leading to confusing mistakes. May rework this in the future.
3252
+ # - BeginPopup(): query popup state, if open start appending into the window. Call EndPopup() afterwards if returned true. ImGuiWindowFlags are forwarded to the window.
3217
3253
  # - BeginPopupModal(): block every interaction behind the window, cannot be closed by user, add a dimming background, has a title bar.
3218
3254
  def self.BeginPopup(str_id, flags = 0) # return true if the popup is open, and you can start outputting to it.
3219
3255
  igBeginPopup(str_id, flags)
@@ -3283,12 +3319,10 @@ module ImGui
3283
3319
  # TableNextColumn() will automatically wrap-around into the next row if needed.
3284
3320
  # - IMPORTANT: Comparatively to the old Columns() API, we need to call TableNextColumn() for the first column!
3285
3321
  # - Summary of possible call flow:
3286
- # --------------------------------------------------------------------------------------------------------
3287
- # TableNextRow() -> TableSetColumnIndex(0) -> Text("Hello 0") -> TableSetColumnIndex(1) -> Text("Hello 1") // OK
3288
- # TableNextRow() -> TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK
3289
- # TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK: TableNextColumn() automatically gets to next row!
3290
- # TableNextRow() -> Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear!
3291
- # --------------------------------------------------------------------------------------------------------
3322
+ # - TableNextRow() -> TableSetColumnIndex(0) -> Text("Hello 0") -> TableSetColumnIndex(1) -> Text("Hello 1") // OK
3323
+ # - TableNextRow() -> TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK
3324
+ # - TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK: TableNextColumn() automatically gets to next row!
3325
+ # - TableNextRow() -> Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear!
3292
3326
  # - 5. Call EndTable()
3293
3327
  def self.BeginTable(str_id, column, flags = 0, outer_size = ImVec2.create(0.0,0.0), inner_width = 0.0) # Implied outer_size = ImVec2(0.0f, 0.0f), inner_width = 0.0f
3294
3328
  igBeginTable(str_id, column, flags, outer_size, inner_width)
@@ -3457,10 +3491,10 @@ module ImGui
3457
3491
  igCombo_Str(label, current_item, items_separated_by_zeros, popup_max_height_in_items)
3458
3492
  end
3459
3493
 
3460
- # arg: label(const char*), current_item(int*), items_getter(bool(*)(void* data,int idx,const char** out_text)), data(void*), items_count(int), popup_max_height_in_items(int)
3494
+ # arg: label(const char*), current_item(int*), getter(const char*(*)(void* user_data,int idx)), user_data(void*), items_count(int), popup_max_height_in_items(int)
3461
3495
  # ret: bool
3462
- def self.Combo_FnBoolPtr(label, current_item, items_getter, data, items_count, popup_max_height_in_items = -1)
3463
- igCombo_FnBoolPtr(label, current_item, items_getter, data, items_count, popup_max_height_in_items)
3496
+ def self.Combo_FnStrPtr(label, current_item, getter, user_data, items_count, popup_max_height_in_items = -1)
3497
+ igCombo_FnStrPtr(label, current_item, getter, user_data, items_count, popup_max_height_in_items)
3464
3498
  end
3465
3499
 
3466
3500
  # arg: shared_font_atlas(ImFontAtlas*)
@@ -3480,10 +3514,17 @@ module ImGui
3480
3514
  igDebugCheckVersionAndDataLayout(version_str, sz_io, sz_style, sz_vec2, sz_vec4, sz_drawvert, sz_drawidx)
3481
3515
  end
3482
3516
 
3517
+ # arg: idx(ImGuiCol)
3518
+ # ret: void
3519
+ def self.DebugFlashStyleColor(idx)
3520
+ igDebugFlashStyleColor(idx)
3521
+ end
3522
+
3483
3523
  # arg: text(const char*)
3484
3524
  # ret: void
3485
3525
  #
3486
3526
  # Debug Utilities
3527
+ # - Your main debugging friend is the ShowMetricsWindow() function, which is also accessible from Demo->Tools->Metrics Debugger
3487
3528
  def self.DebugTextEncoding(text)
3488
3529
  igDebugTextEncoding(text)
3489
3530
  end
@@ -3595,11 +3636,6 @@ module ImGui
3595
3636
  igEndChild()
3596
3637
  end
3597
3638
 
3598
- # ret: void
3599
- def self.EndChildFrame() # always call EndChildFrame() regardless of BeginChildFrame() return values (which indicates a collapsed/clipped window)
3600
- igEndChildFrame()
3601
- end
3602
-
3603
3639
  # ret: void
3604
3640
  def self.EndCombo() # only call EndCombo() if BeginCombo() returns true!
3605
3641
  igEndCombo()
@@ -3760,38 +3796,47 @@ module ImGui
3760
3796
  end
3761
3797
 
3762
3798
  # ret: void
3763
- def self.GetCursorPos() # cursor position in window coordinates (relative to window position)
3799
+ def self.GetCursorPos() # [window-local] cursor position in window coordinates (relative to window position)
3764
3800
  pOut = ImVec2.new
3765
3801
  igGetCursorPos(pOut)
3766
3802
  return pOut
3767
3803
  end
3768
3804
 
3769
3805
  # ret: float
3770
- def self.GetCursorPosX() # (some functions are using window-relative coordinates, such as: GetCursorPos, GetCursorStartPos, GetContentRegionMax, GetWindowContentRegion* etc.
3806
+ def self.GetCursorPosX() # [window-local] "
3771
3807
  igGetCursorPosX()
3772
3808
  end
3773
3809
 
3774
3810
  # ret: float
3775
- def self.GetCursorPosY() # other functions such as GetCursorScreenPos or everything in ImDrawList::
3811
+ def self.GetCursorPosY() # [window-local] "
3776
3812
  igGetCursorPosY()
3777
3813
  end
3778
3814
 
3779
3815
  # ret: void
3780
- def self.GetCursorScreenPos() # cursor position in absolute coordinates (useful to work with ImDrawList API). generally top-left == GetMainViewport()->Pos == (0,0) in single viewport mode, and bottom-right == GetMainViewport()->Pos+Size == io.DisplaySize in single-viewport mode.
3816
+ #
3817
+ # Layout cursor positioning
3818
+ # - By "cursor" we mean the current output position.
3819
+ # - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down.
3820
+ # - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget.
3821
+ # - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API:
3822
+ # - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward.
3823
+ # - Window-local coordinates: SameLine(), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), GetContentRegionMax(), GetWindowContentRegion*(), PushTextWrapPos()
3824
+ # - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates.
3825
+ def self.GetCursorScreenPos() # cursor position in absolute coordinates (prefer using this, also more useful to work with ImDrawList API).
3781
3826
  pOut = ImVec2.new
3782
3827
  igGetCursorScreenPos(pOut)
3783
3828
  return pOut
3784
3829
  end
3785
3830
 
3786
3831
  # ret: void
3787
- def self.GetCursorStartPos() # initial cursor position in window coordinates
3832
+ def self.GetCursorStartPos() # [window-local] initial cursor position, in window coordinates
3788
3833
  pOut = ImVec2.new
3789
3834
  igGetCursorStartPos(pOut)
3790
3835
  return pOut
3791
3836
  end
3792
3837
 
3793
3838
  # ret: pointer
3794
- def self.GetDragDropPayload() # peek directly into the current payload from anywhere. may return NULL. use ImGuiPayload::IsDataType() to test for the payload type.
3839
+ def self.GetDragDropPayload() # peek directly into the current payload from anywhere. returns NULL when drag and drop is finished or inactive. use ImGuiPayload::IsDataType() to test for the payload type.
3795
3840
  igGetDragDropPayload()
3796
3841
  end
3797
3842
 
@@ -3987,7 +4032,7 @@ module ImGui
3987
4032
  end
3988
4033
 
3989
4034
  # ret: pointer
3990
- def self.GetStyle() # access the Style structure (colors, sizes). Always use PushStyleCol(), PushStyleVar() to modify style mid-frame!
4035
+ def self.GetStyle() # access the Style structure (colors, sizes). Always use PushStyleColor(), PushStyleVar() to modify style mid-frame!
3991
4036
  igGetStyle()
3992
4037
  end
3993
4038
 
@@ -4053,14 +4098,14 @@ module ImGui
4053
4098
  end
4054
4099
 
4055
4100
  # ret: void
4056
- 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, GetScreenCursorPos())
4101
+ 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())
4057
4102
  pOut = ImVec2.new
4058
4103
  igGetWindowPos(pOut)
4059
4104
  return pOut
4060
4105
  end
4061
4106
 
4062
4107
  # ret: void
4063
- def self.GetWindowSize() # get current window size (note: it is unlikely you need to use this. Consider using GetScreenCursorPos() and e.g. GetContentRegionAvail() instead)
4108
+ def self.GetWindowSize() # get current window size (note: it is unlikely you need to use this. Consider using GetCursorScreenPos() and e.g. GetContentRegionAvail() instead)
4064
4109
  pOut = ImVec2.new
4065
4110
  igGetWindowSize(pOut)
4066
4111
  return pOut
@@ -4071,19 +4116,21 @@ module ImGui
4071
4116
  igGetWindowWidth()
4072
4117
  end
4073
4118
 
4074
- # arg: user_texture_id(ImTextureID), size(ImVec2), uv0(ImVec2), uv1(ImVec2), tint_col(ImVec4), border_col(ImVec4)
4119
+ # arg: user_texture_id(ImTextureID), image_size(ImVec2), uv0(ImVec2), uv1(ImVec2), tint_col(ImVec4), border_col(ImVec4)
4075
4120
  # ret: void
4076
4121
  #
4077
4122
  # Widgets: Images
4078
4123
  # - Read about ImTextureID here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples
4079
- def self.Image(user_texture_id, 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)
4080
- igImage(user_texture_id, size, uv0, uv1, tint_col, border_col)
4124
+ # - 'uv0' and 'uv1' are texture coordinates. Read about them from the same link above.
4125
+ # - Note that Image() may add +2.0f to provided size if a border is visible, ImageButton() adds style.FramePadding*2.0f to provided size.
4126
+ 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)
4127
+ igImage(user_texture_id, image_size, uv0, uv1, tint_col, border_col)
4081
4128
  end
4082
4129
 
4083
- # arg: str_id(const char*), user_texture_id(ImTextureID), size(ImVec2), uv0(ImVec2), uv1(ImVec2), bg_col(ImVec4), tint_col(ImVec4)
4130
+ # arg: str_id(const char*), user_texture_id(ImTextureID), image_size(ImVec2), uv0(ImVec2), uv1(ImVec2), bg_col(ImVec4), tint_col(ImVec4)
4084
4131
  # ret: bool
4085
- def self.ImageButton(str_id, user_texture_id, size, uv0 = ImVec2.create(0,0), uv1 = ImVec2.create(1,1), bg_col = ImVec4.create(0,0,0,0), tint_col = ImVec4.create(1,1,1,1)) # Implied uv0 = ImVec2(0, 0), uv1 = ImVec2(1, 1), bg_col = ImVec4(0, 0, 0, 0), tint_col = ImVec4(1, 1, 1, 1)
4086
- igImageButton(str_id, user_texture_id, size, uv0, uv1, bg_col, tint_col)
4132
+ def self.ImageButton(str_id, user_texture_id, image_size, uv0 = ImVec2.create(0,0), uv1 = ImVec2.create(1,1), bg_col = ImVec4.create(0,0,0,0), tint_col = ImVec4.create(1,1,1,1)) # Implied uv0 = ImVec2(0, 0), uv1 = ImVec2(1, 1), bg_col = ImVec4(0, 0, 0, 0), tint_col = ImVec4(1, 1, 1, 1)
4133
+ igImageButton(str_id, user_texture_id, image_size, uv0, uv1, bg_col, tint_col)
4087
4134
  end
4088
4135
 
4089
4136
  # arg: indent_w(float)
@@ -4262,6 +4309,12 @@ module ImGui
4262
4309
  igIsItemVisible()
4263
4310
  end
4264
4311
 
4312
+ # arg: key_chord(ImGuiKeyChord)
4313
+ # ret: bool
4314
+ def self.IsKeyChordPressed(key_chord) # was key chord (mods + key) pressed, e.g. you can pass 'ImGuiMod_Ctrl | ImGuiKey_S' as a key-chord. This doesn't do any routing or focus check, please consider using Shortcut() function instead.
4315
+ igIsKeyChordPressed(key_chord)
4316
+ end
4317
+
4265
4318
  # arg: key(ImGuiKey)
4266
4319
  # ret: bool
4267
4320
  #
@@ -4377,7 +4430,7 @@ module ImGui
4377
4430
 
4378
4431
  # arg: flags(ImGuiHoveredFlags)
4379
4432
  # ret: bool
4380
- def self.IsWindowHovered(flags = 0) # is current window hovered (and typically: not blocked by a popup/modal)? see flags for options. NB: If you are trying to check whether your mouse should be dispatched to imgui or to your app, you should use the 'io.WantCaptureMouse' boolean for that! Please read the FAQ!
4433
+ def self.IsWindowHovered(flags = 0) # is current window hovered and hoverable (e.g. not blocked by a popup/modal)? See ImGuiHoveredFlags_ for options. IMPORTANT: If you are trying to check whether your mouse should be dispatched to Dear ImGui or to your underlying app, you should not use this function! Use the 'io.WantCaptureMouse' boolean for that! Refer to FAQ entry "How can I tell whether to dispatch mouse/keyboard to Dear ImGui or my application?" for details.
4381
4434
  igIsWindowHovered(flags)
4382
4435
  end
4383
4436
 
@@ -4393,10 +4446,10 @@ module ImGui
4393
4446
  igListBox_Str_arr(label, current_item, items, items_count, height_in_items)
4394
4447
  end
4395
4448
 
4396
- # arg: label(const char*), current_item(int*), items_getter(bool(*)(void* data,int idx,const char** out_text)), data(void*), items_count(int), height_in_items(int)
4449
+ # arg: label(const char*), current_item(int*), getter(const char*(*)(void* user_data,int idx)), user_data(void*), items_count(int), height_in_items(int)
4397
4450
  # ret: bool
4398
- def self.ListBox_FnBoolPtr(label, current_item, items_getter, data, items_count, height_in_items = -1)
4399
- igListBox_FnBoolPtr(label, current_item, items_getter, data, items_count, height_in_items)
4451
+ def self.ListBox_FnStrPtr(label, current_item, getter, user_data, items_count, height_in_items = -1)
4452
+ igListBox_FnStrPtr(label, current_item, getter, user_data, items_count, height_in_items)
4400
4453
  end
4401
4454
 
4402
4455
  # arg: ini_filename(const char*)
@@ -4733,13 +4786,7 @@ module ImGui
4733
4786
 
4734
4787
  # ret: void
4735
4788
  #
4736
- # Cursor / Layout
4737
- # - By "cursor" we mean the current output position.
4738
- # - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down.
4739
- # - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget.
4740
- # - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API:
4741
- # Window-local coordinates: SameLine(), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), GetContentRegionMax(), GetWindowContentRegion*(), PushTextWrapPos()
4742
- # Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions.
4789
+ # Other layout functions
4743
4790
  def self.Separator() # separator, generally horizontal. inside a menu bar or in horizontal layout mode, this becomes a vertical separator.
4744
4791
  igSeparator()
4745
4792
  end
@@ -4793,19 +4840,19 @@ module ImGui
4793
4840
 
4794
4841
  # arg: local_pos(ImVec2)
4795
4842
  # ret: void
4796
- def self.SetCursorPos(local_pos) # are using the main, absolute coordinate system.
4843
+ def self.SetCursorPos(local_pos) # [window-local] "
4797
4844
  igSetCursorPos(local_pos)
4798
4845
  end
4799
4846
 
4800
4847
  # arg: local_x(float)
4801
4848
  # ret: void
4802
- def self.SetCursorPosX(local_x) # GetWindowPos() + GetCursorPos() == GetCursorScreenPos() etc.)
4849
+ def self.SetCursorPosX(local_x) # [window-local] "
4803
4850
  igSetCursorPosX(local_x)
4804
4851
  end
4805
4852
 
4806
4853
  # arg: local_y(float)
4807
4854
  # ret: void
4808
- def self.SetCursorPosY(local_y) #
4855
+ def self.SetCursorPosY(local_y) # [window-local] "
4809
4856
  igSetCursorPosY(local_y)
4810
4857
  end
4811
4858
 
@@ -4924,7 +4971,7 @@ module ImGui
4924
4971
 
4925
4972
  # arg: size_min(ImVec2), size_max(ImVec2), custom_callback(ImGuiSizeCallback), custom_callback_data(void*)
4926
4973
  # ret: void
4927
- def self.SetNextWindowSizeConstraints(size_min, size_max, custom_callback = nil, custom_callback_data = nil) # set next window size limits. use -1,-1 on either X/Y axis to preserve the current size. Sizes will be rounded down. Use callback to apply non-trivial programmatic constraints.
4974
+ def self.SetNextWindowSizeConstraints(size_min, size_max, custom_callback = nil, custom_callback_data = nil) # set next window size limits. use 0.0f or FLT_MAX if you don't want limits. Use -1 for both min and max of same axis to preserve current size (which itself is a constraint). Use callback to apply non-trivial programmatic constraints.
4928
4975
  igSetNextWindowSizeConstraints(size_min, size_max, custom_callback, custom_callback_data)
4929
4976
  end
4930
4977
 
@@ -5063,14 +5110,14 @@ module ImGui
5063
5110
 
5064
5111
  # arg: p_open(bool*)
5065
5112
  # ret: void
5066
- def self.ShowMetricsWindow(p_open = nil) # create Metrics/Debugger window. display Dear ImGui internals: windows, draw commands, various internal state, etc.
5067
- igShowMetricsWindow(p_open)
5113
+ def self.ShowIDStackToolWindow(p_open = nil) # Implied p_open = NULL
5114
+ igShowIDStackToolWindow(p_open)
5068
5115
  end
5069
5116
 
5070
5117
  # arg: p_open(bool*)
5071
5118
  # ret: void
5072
- def self.ShowStackToolWindow(p_open = nil) # create Stack Tool window. hover items with mouse to query information about the source of their unique ID.
5073
- igShowStackToolWindow(p_open)
5119
+ def self.ShowMetricsWindow(p_open = nil) # create Metrics/Debugger window. display Dear ImGui internals: windows, draw commands, various internal state, etc.
5120
+ igShowMetricsWindow(p_open)
5074
5121
  end
5075
5122
 
5076
5123
  # arg: ref(ImGuiStyle*)
@@ -5165,7 +5212,7 @@ module ImGui
5165
5212
 
5166
5213
  # arg: label(const char*)
5167
5214
  # ret: bool
5168
- def self.SmallButton(label) # button with FramePadding=(0,0) to easily embed within text
5215
+ def self.SmallButton(label) # button with (FramePadding.y == 0) to easily embed within text
5169
5216
  igSmallButton(label)
5170
5217
  end
5171
5218
 
@@ -5200,6 +5247,11 @@ module ImGui
5200
5247
  igTabItemButton(label, flags)
5201
5248
  end
5202
5249
 
5250
+ # ret: void
5251
+ def self.TableAngledHeadersRow() # submit a row with angled headers for every column with the ImGuiTableColumnFlags_AngledHeader flag. MUST BE FIRST ROW.
5252
+ igTableAngledHeadersRow()
5253
+ end
5254
+
5203
5255
  # ret: int
5204
5256
  def self.TableGetColumnCount() # return number of columns (value passed to BeginTable)
5205
5257
  igTableGetColumnCount()
@@ -5246,7 +5298,7 @@ module ImGui
5246
5298
  end
5247
5299
 
5248
5300
  # ret: void
5249
- def self.TableHeadersRow() # submit all headers cells based on data provided to TableSetupColumn() + submit context menu
5301
+ def self.TableHeadersRow() # submit a row with headers cells based on data provided to TableSetupColumn() + submit context menu
5250
5302
  igTableHeadersRow()
5251
5303
  end
5252
5304
 
@@ -5369,7 +5421,7 @@ module ImGui
5369
5421
  end
5370
5422
 
5371
5423
  # ret: void
5372
- def self.TreePop() # ~ Unindent()+PopId()
5424
+ def self.TreePop() # ~ Unindent()+PopID()
5373
5425
  igTreePop()
5374
5426
  end
5375
5427
 
@@ -5438,19 +5490,29 @@ module ImGui
5438
5490
  #
5439
5491
  # Child Windows
5440
5492
  # - Use child windows to begin into a self-contained independent scrolling/clipping regions within a host window. Child windows can embed their own child.
5441
- # - For each independent axis of 'size': ==0.0f: use remaining host window size / >0.0f: fixed size / <0.0f: use remaining window size minus abs(size) / Each axis can use a different mode, e.g. ImVec2(0,400).
5442
- # - BeginChild() returns false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting anything to the window.
5443
- # Always call a matching EndChild() for each BeginChild() call, regardless of its return value.
5444
- # [Important: due to legacy reason, this is inconsistent with most other functions such as BeginMenu/EndMenu,
5445
- # BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding BeginXXX function
5446
- # returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.]
5493
+ # - Before 1.90 (November 2023), the "ImGuiChildFlags child_flags = 0" parameter was "bool border = false".
5494
+ # This API is backward compatible with old code, as we guarantee that ImGuiChildFlags_Border == true.
5495
+ # Consider updating your old call sites:
5496
+ # BeginChild("Name", size, false) -> Begin("Name", size, 0); or Begin("Name", size, ImGuiChildFlags_None);
5497
+ # BeginChild("Name", size, true) -> Begin("Name", size, ImGuiChildFlags_Border);
5498
+ # - Manual sizing (each axis can use a different setting e.g. ImVec2(0.0f, 400.0f)):
5499
+ # == 0.0f: use remaining parent window size for this axis.
5500
+ # > 0.0f: use specified size for this axis.
5501
+ # < 0.0f: right/bottom-align to specified distance from available content boundaries.
5502
+ # - Specifying ImGuiChildFlags_AutoResizeX or ImGuiChildFlags_AutoResizeY makes the sizing automatic based on child contents.
5503
+ # Combining both ImGuiChildFlags_AutoResizeX _and_ ImGuiChildFlags_AutoResizeY defeats purpose of a scrolling region and is NOT recommended.
5504
+ # - BeginChild() returns false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting
5505
+ # anything to the window. Always call a matching EndChild() for each BeginChild() call, regardless of its return value.
5506
+ # [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all other functions
5507
+ # such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding
5508
+ # BeginXXX function returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.]
5447
5509
  def self.BeginChild(*arg)
5448
- # arg: 0:str_id(const char*), 1:size(ImVec2), 2:border(bool), 3:flags(ImGuiWindowFlags)
5510
+ # arg: 0:str_id(const char*), 1:size(ImVec2), 2:child_flags(ImGuiChildFlags), 3:window_flags(ImGuiWindowFlags)
5449
5511
  # ret: bool
5450
- return igBeginChild_Str(arg[0], arg[1], arg[2], arg[3]) if arg.length == 4 && (arg[0].kind_of?(String) && arg[1].kind_of?(ImVec2) && (arg[2].is_a?(TrueClass) || arg[2].is_a?(FalseClass)) && arg[3].kind_of?(Integer))
5451
- # arg: 0:id(ImGuiID), 1:size(ImVec2), 2:border(bool), 3:flags(ImGuiWindowFlags)
5512
+ return igBeginChild_Str(arg[0], arg[1], arg[2], arg[3]) if arg.length == 4 && (arg[0].kind_of?(String) && arg[1].kind_of?(ImVec2) && arg[2].kind_of?(Integer) && arg[3].kind_of?(Integer))
5513
+ # arg: 0:id(ImGuiID), 1:size(ImVec2), 2:child_flags(ImGuiChildFlags), 3:window_flags(ImGuiWindowFlags)
5452
5514
  # ret: bool
5453
- return igBeginChild_ID(arg[0], arg[1], arg[2], arg[3]) if arg.length == 4 && (arg[0].kind_of?(Integer) && arg[1].kind_of?(ImVec2) && (arg[2].is_a?(TrueClass) || arg[2].is_a?(FalseClass)) && arg[3].kind_of?(Integer))
5515
+ return igBeginChild_ID(arg[0], arg[1], arg[2], arg[3]) if arg.length == 4 && (arg[0].kind_of?(Integer) && arg[1].kind_of?(ImVec2) && arg[2].kind_of?(Integer) && arg[3].kind_of?(Integer))
5454
5516
  $stderr.puts("[Warning] BeginChild : No matching functions found (#{arg})")
5455
5517
  end
5456
5518
 
@@ -5481,9 +5543,9 @@ module ImGui
5481
5543
  # arg: 0:label(const char*), 1:current_item(int*), 2:items_separated_by_zeros(const char*), 3:popup_max_height_in_items(int)
5482
5544
  # ret: bool
5483
5545
  return igCombo_Str(arg[0], arg[1], arg[2], arg[3]) if arg.length == 4 && (arg[0].kind_of?(String) && arg[1].kind_of?(FFI::Pointer) && arg[2].kind_of?(String) && arg[3].kind_of?(Integer))
5484
- # arg: 0:label(const char*), 1:current_item(int*), 2:items_getter(bool(*)(void* data,int idx,const char** out_text)), 3:data(void*), 4:items_count(int), 5:popup_max_height_in_items(int)
5546
+ # arg: 0:label(const char*), 1:current_item(int*), 2:getter(const char*(*)(void* user_data,int idx)), 3:user_data(void*), 4:items_count(int), 5:popup_max_height_in_items(int)
5485
5547
  # ret: bool
5486
- return igCombo_FnBoolPtr(arg[0], arg[1], arg[2], arg[3], arg[4], arg[5]) if arg.length == 6 && (arg[0].kind_of?(String) && arg[1].kind_of?(FFI::Pointer) && arg[2].kind_of?(String) && arg[3].kind_of?(FFI::Pointer) && arg[4].kind_of?(Integer) && arg[5].kind_of?(Integer))
5548
+ return igCombo_FnStrPtr(arg[0], arg[1], arg[2], arg[3], arg[4], arg[5]) if arg.length == 6 && (arg[0].kind_of?(String) && arg[1].kind_of?(FFI::Pointer) && arg[2].kind_of?(String) && arg[3].kind_of?(FFI::Pointer) && arg[4].kind_of?(Integer) && arg[5].kind_of?(Integer))
5487
5549
  $stderr.puts("[Warning] Combo : No matching functions found (#{arg})")
5488
5550
  end
5489
5551
 
@@ -5527,9 +5589,9 @@ module ImGui
5527
5589
  # arg: 0:label(const char*), 1:current_item(int*), 2:items(const char* const[]), 3:items_count(int), 4:height_in_items(int)
5528
5590
  # ret: bool
5529
5591
  return igListBox_Str_arr(arg[0], arg[1], arg[2], arg[3], arg[4]) if arg.length == 5 && (arg[0].kind_of?(String) && arg[1].kind_of?(FFI::Pointer) && arg[2].kind_of?(FFI::Pointer) && arg[3].kind_of?(Integer) && arg[4].kind_of?(Integer))
5530
- # arg: 0:label(const char*), 1:current_item(int*), 2:items_getter(bool(*)(void* data,int idx,const char** out_text)), 3:data(void*), 4:items_count(int), 5:height_in_items(int)
5592
+ # arg: 0:label(const char*), 1:current_item(int*), 2:getter(const char*(*)(void* user_data,int idx)), 3:user_data(void*), 4:items_count(int), 5:height_in_items(int)
5531
5593
  # ret: bool
5532
- return igListBox_FnBoolPtr(arg[0], arg[1], arg[2], arg[3], arg[4], arg[5]) if arg.length == 6 && (arg[0].kind_of?(String) && arg[1].kind_of?(FFI::Pointer) && arg[2].kind_of?(String) && arg[3].kind_of?(FFI::Pointer) && arg[4].kind_of?(Integer) && arg[5].kind_of?(Integer))
5594
+ return igListBox_FnStrPtr(arg[0], arg[1], arg[2], arg[3], arg[4], arg[5]) if arg.length == 6 && (arg[0].kind_of?(String) && arg[1].kind_of?(FFI::Pointer) && arg[2].kind_of?(String) && arg[3].kind_of?(FFI::Pointer) && arg[4].kind_of?(Integer) && arg[5].kind_of?(Integer))
5533
5595
  $stderr.puts("[Warning] ListBox : No matching functions found (#{arg})")
5534
5596
  end
5535
5597
 
@@ -5726,7 +5788,7 @@ module ImGui
5726
5788
  $stderr.puts("[Warning] TreeNodeEx : No matching functions found (#{arg})")
5727
5789
  end
5728
5790
 
5729
- def self.TreePush(*arg) # ~ Indent()+PushId(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired.
5791
+ def self.TreePush(*arg) # ~ Indent()+PushID(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired.
5730
5792
  # arg: 0:str_id(const char*)
5731
5793
  # ret: void
5732
5794
  return igTreePush_Str(arg[0]) if arg.length == 1 && (arg[0].kind_of?(String))