@@ -699,6 +699,9 @@ pub fn setNextWindowSize(args: SetNextWindowSize) void {
699
699
}
700
700
extern fn zguiSetNextWindowSize (w : f32 , h : f32 , cond : Condition ) void ;
701
701
//--------------------------------------------------------------------------------------------------
702
+ extern fn zguiSetNextWindowContentSize (w : f32 , h : f32 ) void ;
703
+ pub const setNextWindowContentSize = zguiSetNextWindowContentSize ;
704
+ //--------------------------------------------------------------------------------------------------
702
705
const SetNextWindowCollapsed = struct {
703
706
collapsed : bool ,
704
707
cond : Condition = .none ,
@@ -712,6 +715,9 @@ extern fn zguiSetNextWindowCollapsed(collapsed: bool, cond: Condition) void;
712
715
pub const setNextWindowFocus = zguiSetNextWindowFocus ;
713
716
extern fn zguiSetNextWindowFocus () void ;
714
717
//--------------------------------------------------------------------------------------------------
718
+ extern fn zguiSetNextWindowScroll (scroll_x : f32 , scroll_y : f32 ) void ;
719
+ pub const setNextWindowScroll = zguiSetNextWindowScroll ;
720
+ //--------------------------------------------------------------------------------------------------
715
721
const SetNextWindowBgAlpha = struct {
716
722
alpha : f32 ,
717
723
};
@@ -725,11 +731,19 @@ pub fn setWindowFocus(name: ?[:0]const u8) void {
725
731
}
726
732
extern fn zguiSetWindowFocus (name : ? [* :0 ]const u8 ) void ;
727
733
//-------------------------------------------------------------------------------------------------
734
+ extern fn zguiSetWindowFontScale (scale : f32 ) void ;
735
+ pub const setWindowFontScale = zguiSetWindowFontScale ;
736
+ //-------------------------------------------------------------------------------------------------
728
737
pub fn setKeyboardFocusHere (offset : i32 ) void {
729
738
zguiSetKeyboardFocusHere (offset );
730
739
}
731
740
extern fn zguiSetKeyboardFocusHere (offset : c_int ) void ;
732
741
742
+ extern fn zguiSetNavCursorVisible (visible : bool ) void ;
743
+ pub const setNavCursorVisible = zguiSetNavCursorVisible ;
744
+
745
+ extern fn zguiSetNextItemAllowOverlap () void ;
746
+ pub const setNextItemAllowOverlap = zguiSetNextItemAllowOverlap ;
733
747
//--------------------------------------------------------------------------------------------------
734
748
const Begin = struct {
735
749
popen : ? * bool = null ,
@@ -1457,6 +1471,9 @@ pub const getMouseCursor = zguiGetMouseCursor;
1457
1471
pub const setMouseCursor = zguiSetMouseCursor ;
1458
1472
extern fn zguiGetMouseCursor () Cursor ;
1459
1473
extern fn zguiSetMouseCursor (cursor : Cursor ) void ;
1474
+
1475
+ extern fn zguiSetNextFrameWantCaptureMouse (want_capture_mouse : bool ) void ;
1476
+ pub const setNextFrameWantCaptureMouse = zguiSetNextFrameWantCaptureMouse ;
1460
1477
//--------------------------------------------------------------------------------------------------
1461
1478
pub fn getMousePos () [2 ]f32 {
1462
1479
var pos : [2 ]f32 = undefined ;
@@ -1746,6 +1763,13 @@ pub fn progressBar(args: ProgressBar) void {
1746
1763
zguiProgressBar (args .fraction , args .w , args .h , if (args .overlay ) | o | o else null );
1747
1764
}
1748
1765
extern fn zguiProgressBar (fraction : f32 , w : f32 , h : f32 , overlay : ? [* :0 ]const u8 ) void ;
1766
+ //--------------------------------------------------------------------------------------------------
1767
+ extern fn zguiTextLink (label : [* :0 ]const u8 ) bool ;
1768
+ pub const textLink = zguiTextLink ;
1769
+
1770
+ extern fn zguiTextLinkOpenURL (label : [* :0 ]const u8 , url : ? [* :0 ]const u8 ) void ;
1771
+ pub const textLinkOpenURL = zguiTextLinkOpenURL ;
1772
+
1749
1773
//--------------------------------------------------------------------------------------------------
1750
1774
//
1751
1775
// Widgets: Combo Box
@@ -2995,6 +3019,9 @@ extern fn zguiTreePushPtrId(ptr_id: *const anyopaque) void;
2995
3019
pub const treePop = zguiTreePop ;
2996
3020
extern fn zguiTreePop () void ;
2997
3021
//--------------------------------------------------------------------------------------------------
3022
+ extern fn zguiGetTreeNodeToLabelSpacing () f32 ;
3023
+ pub const getTreeNodeToLabelSpacing = zguiGetTreeNodeToLabelSpacing ;
3024
+ //--------------------------------------------------------------------------------------------------
2998
3025
const CollapsingHeaderStatePtr = struct {
2999
3026
pvisible : * bool ,
3000
3027
flags : TreeNodeFlags = .{},
@@ -3080,6 +3107,15 @@ pub fn beginListBox(label: [:0]const u8, args: BeginListBox) bool {
3080
3107
pub const endListBox = zguiEndListBox ;
3081
3108
extern fn zguiBeginListBox (label : [* :0 ]const u8 , w : f32 , h : f32 ) bool ;
3082
3109
extern fn zguiEndListBox () void ;
3110
+ extern fn zguiListBox (label : [* :0 ]const u8 , current_item : * i32 , items : [* ]const [* :0 ]const u8 , item_count : i32 , height_in_items : i32 ) bool ;
3111
+ pub const ListBox = struct {
3112
+ current_item : * i32 ,
3113
+ items : []const [* :0 ]const u8 ,
3114
+ height_in_items : i32 = -1 ,
3115
+ };
3116
+ pub fn listBox (label : [* :0 ]const u8 , args : ListBox ) bool {
3117
+ return zguiListBox (label , args .current_item , args .items .ptr , @intCast (args .items .len ), args .height_in_items );
3118
+ }
3083
3119
//--------------------------------------------------------------------------------------------------
3084
3120
//
3085
3121
// Widgets: Tables
@@ -3313,6 +3349,9 @@ extern fn zguiTableGetColumnFlags(column_n: i32) TableColumnFlags;
3313
3349
pub const tableSetColumnEnabled = zguiTableSetColumnEnabled ;
3314
3350
extern fn zguiTableSetColumnEnabled (column_n : i32 , v : bool ) void ;
3315
3351
3352
+ extern fn zguiTableGetHoveredColumn () i32 ;
3353
+ pub const tableGetHoveredColumn = zguiTableGetHoveredColumn ;
3354
+
3316
3355
pub fn tableSetBgColor (args : struct {
3317
3356
target : TableBgTarget ,
3318
3357
color : u32 ,
@@ -3322,6 +3361,37 @@ pub fn tableSetBgColor(args: struct {
3322
3361
}
3323
3362
extern fn zguiTableSetBgColor (target : TableBgTarget , color : c_uint , column_n : c_int ) void ;
3324
3363
3364
+ pub const Columns = struct {
3365
+ count : i32 = 1 ,
3366
+ id : ? [* :0 ]const u8 = null ,
3367
+ borders : bool = true ,
3368
+ };
3369
+ extern fn zguiColumns (count : i32 , id : ? [* :0 ]const u8 , borders : bool ) void ;
3370
+ pub fn columns (args : Columns ) void {
3371
+ zguiColumns (args .count , args .id , args .borders );
3372
+ }
3373
+
3374
+ extern fn zguiNextColumn () void ;
3375
+ pub const nextColumn = zguiNextColumn ;
3376
+
3377
+ extern fn zguiGetColumnIndex () i32 ;
3378
+ pub const getColumnIndex = zguiGetColumnIndex ;
3379
+
3380
+ extern fn zguiGetColumnWidth (column_index : i32 ) f32 ;
3381
+ pub const getColumnWidth = zguiGetColumnWidth ;
3382
+
3383
+ extern fn zguiSetColumnWidth (column_index : i32 , width : f32 ) void ;
3384
+ pub const setColumnWidth = zguiSetColumnWidth ;
3385
+
3386
+ extern fn zguiGetColumnOffset (column_index : i32 ) f32 ;
3387
+ pub const getColumnOffset = zguiGetColumnOffset ;
3388
+
3389
+ extern fn zguiSetColumnOffset (column_index : i32 , offset_x : f32 ) void ;
3390
+ pub const setColumnOffset = zguiSetColumnOffset ;
3391
+
3392
+ extern fn zguiGetColumnsCount () i32 ;
3393
+ pub const getColumnsCount = zguiGetColumnsCount ;
3394
+
3325
3395
//--------------------------------------------------------------------------------------------------
3326
3396
//
3327
3397
// Item/Widgets Utilities and Query Functions
@@ -3350,6 +3420,7 @@ pub const isMouseReleased = zguiIsMouseReleased;
3350
3420
pub const isMouseDoubleClicked = zguiIsMouseDoubleClicked ;
3351
3421
/// `pub fn getMouseClickedCount(mouse_button: MouseButton) bool`
3352
3422
pub const getMouseClickedCount = zguiGetMouseClickedCount ;
3423
+ pub const isAnyMouseDown = zguiIsAnyMouseDown ;
3353
3424
/// `pub fn isMouseDragging(mouse_button: MouseButton, lock_threshold: f32) bool`
3354
3425
pub const isMouseDragging = zguiIsMouseDragging ;
3355
3426
/// `pub fn isItemClicked(mouse_button: MouseButton) bool`
@@ -3377,6 +3448,7 @@ extern fn zguiIsMouseClicked(mouse_button: MouseButton) bool;
3377
3448
extern fn zguiIsMouseReleased (mouse_button : MouseButton ) bool ;
3378
3449
extern fn zguiIsMouseDoubleClicked (mouse_button : MouseButton ) bool ;
3379
3450
extern fn zguiGetMouseClickedCount (mouse_button : MouseButton ) u32 ;
3451
+ extern fn zguiIsAnyMouseDown () bool ;
3380
3452
extern fn zguiIsMouseDragging (mouse_button : MouseButton , lock_threshold : f32 ) bool ;
3381
3453
extern fn zguiIsItemHovered (flags : HoveredFlags ) bool ;
3382
3454
extern fn zguiIsItemActive () bool ;
@@ -3452,6 +3524,11 @@ pub fn isKeyReleased(key: Key) bool {
3452
3524
pub fn setNextFrameWantCaptureKeyboard (want_capture_keyboard : bool ) void {
3453
3525
zguiSetNextFrameWantCaptureKeyboard (want_capture_keyboard );
3454
3526
}
3527
+ extern fn zguiGetKeyPressedAmount (key : Key , repeat_delay : f32 , rate : f32 ) i32 ;
3528
+ pub const getKeyPressedAmount = zguiGetKeyPressedAmount ;
3529
+
3530
+ extern fn zguiSetItemKeyOwner (key : Key ) void ;
3531
+ pub const setItemKeyOwner = zguiSetItemKeyOwner ;
3455
3532
3456
3533
extern fn zguiIsKeyDown (key : Key ) bool ;
3457
3534
extern fn zguiIsKeyPressed (key : Key , repeat : bool ) bool ;
@@ -3652,6 +3729,10 @@ extern fn zguiBeginTabItem(label: [*:0]const u8, p_open: ?*bool, flags: TabItemF
3652
3729
extern fn zguiEndTabItem () void ;
3653
3730
extern fn zguiEndTabBar () void ;
3654
3731
extern fn zguiSetTabItemClosed (tab_or_docked_window_label : [* :0 ]const u8 ) void ;
3732
+
3733
+ extern fn zguiTabItemButton (label : [* :0 ]const u8 , flags : TabItemFlags ) bool ;
3734
+ pub const tabItemButton = zguiTabItemButton ;
3735
+
3655
3736
//--------------------------------------------------------------------------------------------------
3656
3737
//
3657
3738
// Viewport
@@ -3885,6 +3966,9 @@ pub const getWindowDrawList = zguiGetWindowDrawList;
3885
3966
pub const getBackgroundDrawList = zguiGetBackgroundDrawList ;
3886
3967
pub const getForegroundDrawList = zguiGetForegroundDrawList ;
3887
3968
3969
+ extern fn zguiGetWindowDpiScale () f32 ;
3970
+ pub const getWindowDpiScale = zguiGetWindowDpiScale ;
3971
+
3888
3972
pub const createDrawList = zguiCreateDrawList ;
3889
3973
pub fn destroyDrawList (draw_list : DrawList ) void {
3890
3974
if (draw_list .getOwnerName ()) | owner | {
0 commit comments