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