Public entry point for the libui-ng wrapper.
Public entry point for the libui-ng wrapper.
(append! box child)(append! box child stretchy?)Appends a child to a box, transferring ownership to the box.
A stretchy child consumes spare space.
Appends a child to a box, transferring ownership to the box. A stretchy child consumes spare space.
(append-combobox-item! combobox text)Appends a text item to a combo box.
Appends a text item to a combo box.
(append-editable-combobox-item! combobox text)Appends a suggestion to an editable combo box.
Appends a suggestion to an editable combo box.
(append-form-child! form label child)(append-form-child! form label child stretchy?)Appends a labelled child to a form, transferring ownership to the form.
A stretchy child consumes spare vertical space.
Appends a labelled child to a form, transferring ownership to the form. A stretchy child consumes spare vertical space.
(append-grid-child! grid child left top)(append-grid-child!
grid
child
left
top
{:keys [xspan yspan hexpand? vexpand? halign valign]
:or
{xspan 1 yspan 1 hexpand? false vexpand? false halign :fill valign :fill}})Places a child on a grid, transferring ownership to the grid.
left and top are zero-based cell coordinates. Options are :xspan,
:yspan, :hexpand?, :vexpand?, and :halign/:valign, each one of
:fill, :start, :center or :end.
Places a child on a grid, transferring ownership to the grid. `left` and `top` are zero-based cell coordinates. Options are `:xspan`, `:yspan`, `:hexpand?`, `:vexpand?`, and `:halign`/`:valign`, each one of `:fill`, `:start`, `:center` or `:end`.
(append-menu-about-item! menu)Appends the platform's About item and returns it.
Appends the platform's About item and returns it.
(append-menu-check-item! menu name)Appends a checkable item to a menu and returns the item.
Appends a checkable item to a menu and returns the item.
(append-menu-item! menu name)Appends a clickable item to a menu and returns the item.
Appends a clickable item to a menu and returns the item.
(append-menu-preferences-item! menu)Appends the platform's Preferences item and returns it.
Appends the platform's Preferences item and returns it.
(append-menu-quit-item! menu)Appends the platform's Quit item and returns it.
The item is driven by on-should-quit! and cannot take a click handler.
Appends the platform's Quit item and returns it. The item is driven by `on-should-quit!` and cannot take a click handler.
(append-menu-separator! menu)Appends a dividing line to a menu.
Appends a dividing line to a menu.
(append-multiline-entry! entry text)Appends text to a multiline entry.
Appends text to a multiline entry.
(append-radio-button! radio-buttons text)Appends a labelled option to a radio button group.
Appends a labelled option to a radio button group.
(append-tab! tabs title child)Appends a titled page and transfers ownership of its child to the tabs.
Appends a titled page and transfers ownership of its child to the tabs.
(append-table-button-column! table name button-column)(append-table-button-column! table name button-column {:keys [clickable?]})Appends a column of buttons labelled from a :string model column.
Clicking a button calls the model's :set-cell-value! with a nil value.
Options support :clickable?, encoded like :editable?.
Appends a column of buttons labelled from a `:string` model column. Clicking a button calls the model's `:set-cell-value!` with a nil value. Options support `:clickable?`, encoded like `:editable?`.
(append-table-checkbox-column! table name checkbox-column)(append-table-checkbox-column! table name checkbox-column {:keys [editable?]})Appends a checkbox column reading an :int model column.
Options support :editable? as in append-table-text-column!.
Appends a checkbox column reading an `:int` model column. Options support `:editable?` as in `append-table-text-column!`.
(append-table-checkbox-text-column! table name checkbox-column text-column)(append-table-checkbox-text-column! table
name
checkbox-column
text-column
{:keys [checkbox-editable? text-editable?
color-column]})Appends a column pairing a checkbox with text.
Options are :checkbox-editable?, :text-editable? and :color-column.
Appends a column pairing a checkbox with text. Options are `:checkbox-editable?`, `:text-editable?` and `:color-column`.
(append-table-image-column! table name image-column)Appends a column of images read from image-column of the model.
Appends a column of images read from `image-column` of the model.
(append-table-image-text-column! table name image-column text-column)(append-table-image-text-column! table
name
image-column
text-column
{:keys [editable? color-column]})Appends a column pairing an image with text. Options match
append-table-text-column!.
Appends a column pairing an image with text. Options match `append-table-text-column!`.
(append-table-progress-bar-column! table name progress-column)Appends a progress bar column reading an :int model column.
Cell values run 0 through 100, or -1 for indeterminate.
Appends a progress bar column reading an `:int` model column. Cell values run 0 through 100, or -1 for indeterminate.
(append-table-text-column! table name text-column)(append-table-text-column! table
name
text-column
{:keys [editable? color-column]})Appends a text column reading text-column of the model.
Options are :editable? (see below) and :color-column, a :color model
column supplying the text colour. :editable? accepts false or :never,
true or :always, or an :int model column deciding per row.
Appends a text column reading `text-column` of the model. Options are `:editable?` (see below) and `:color-column`, a `:color` model column supplying the text colour. `:editable?` accepts false or `:never`, true or `:always`, or an `:int` model column deciding per row.
(box-child-count box)Returns the number of children in a box.
Returns the number of children in a box.
(button text)Creates a button with the supplied label.
Creates a button with the supplied label.
(checkbox text)Creates a checkbox with the supplied label.
Creates a checkbox with the supplied label.
(checkbox-text checkbox)Returns a checkbox label.
Returns a checkbox label.
(checked? checkbox)Returns true when a checkbox is checked.
Returns true when a checkbox is checked.
(clear-combobox! combobox)Removes all items from a combo box.
Removes all items from a combo box.
(color-button)Creates a button that opens the platform colour chooser.
Creates a button that opens the platform colour chooser.
(color-button-color button)Returns a colour button's colour as [r g b a], each 0.0 through 1.0.
Returns a colour button's colour as `[r g b a]`, each 0.0 through 1.0.
(combobox)Creates a non-editable combo box.
Creates a non-editable combo box.
(combobox-item-count combobox)Returns the number of items in a combo box.
Returns the number of items in a combo box.
(combobox-selected-index combobox)Returns the selected item index, or -1 when no item is selected.
Returns the selected item index, or -1 when no item is selected.
(date-picker)Creates a picker for a calendar date.
Creates a picker for a calendar date.
(date-time-picker)Creates a picker for a combined date and time.
Creates a picker for a combined date and time.
(delete-child! box index)Detaches the zero-based child from a box without destroying it.
The caller resumes ownership and must either attach the child elsewhere or destroy it exactly once.
Detaches the zero-based child from a box without destroying it. The caller resumes ownership and must either attach the child elsewhere or destroy it exactly once.
(delete-combobox-item! combobox index)Removes the zero-based item from a combo box.
Removes the zero-based item from a combo box.
(delete-form-child! form index)Detaches the zero-based child from a form without destroying it.
The caller resumes ownership and must either attach the child elsewhere or destroy it exactly once.
Detaches the zero-based child from a form without destroying it. The caller resumes ownership and must either attach the child elsewhere or destroy it exactly once.
(delete-tab! tabs index)Detaches a zero-based tab page without destroying its child.
The caller resumes ownership of the child and must either attach it elsewhere or destroy it exactly once.
Detaches a zero-based tab page without destroying its child. The caller resumes ownership of the child and must either attach it elsewhere or destroy it exactly once.
(destroy! control)Destroys a control and its owned child hierarchy.
Destroy each top-level control exactly once before uninitializing libui-ng.
Destroys a control and its owned child hierarchy. Destroy each top-level control exactly once before uninitializing libui-ng.
(detach-child! window)Detaches a window's root child without destroying it.
The caller resumes ownership and must either attach the child elsewhere or destroy it exactly once.
Detaches a window's root child without destroying it. The caller resumes ownership and must either attach the child elsewhere or destroy it exactly once.
(detach-group-child! group)Detaches a group's child without destroying it.
The caller resumes ownership and must either attach the child elsewhere or destroy it exactly once.
Detaches a group's child without destroying it. The caller resumes ownership and must either attach the child elsewhere or destroy it exactly once.
(disable-menu-item! item)Disables a menu item.
Disables a menu item.
(editable-combobox)Creates a combo box whose text may also be typed freely.
Creates a combo box whose text may also be typed freely.
(editable-combobox-text combobox)Returns an editable combo box's current text.
Returns an editable combo box's current text.
(enabled? control)Returns true when a control is enabled.
Returns true when a control is enabled.
(entry-read-only? entry)Returns true when a single-line entry is read-only.
Returns true when a single-line entry is read-only.
(entry-text entry)Returns a single-line entry's text.
Returns a single-line entry's text.
(error-box! window title description)Shows a modal error message box parented to window.
Shows a modal error message box parented to `window`.
(font-button)Creates a button that opens the platform font chooser.
Creates a button that opens the platform font chooser.
(font-button-font button)Returns a font button's selection as a descriptor map.
Keys are :family, :size, :weight, :italic and :stretch.
Returns a font button's selection as a descriptor map. Keys are `:family`, `:size`, `:weight`, `:italic` and `:stretch`.
(form)Creates a container that lays out labelled children in two columns.
Creates a container that lays out labelled children in two columns.
(form-child-count form)Returns the number of children in a form.
Returns the number of children in a form.
(free-table-model! model)Frees a table model.
Destroy every table using the model first.
Frees a table model. Destroy every table using the model first.
(grid)Creates a container that places children on a two-dimensional grid.
Creates a container that places children on a two-dimensional grid.
(group title)Creates a titled container with one child.
Creates a titled container with one child.
(horizontal-box)Creates a horizontal layout container.
Creates a horizontal layout container.
(horizontal-separator)Creates a horizontal dividing line.
Creates a horizontal dividing line.
(init!)Loads and initializes libui-ng on the current thread.
Loads and initializes libui-ng on the current thread.
(initialized?)Returns true while libui-ng is initialized.
Returns true while libui-ng is initialized.
(insert-combobox-item! combobox index text)Inserts a text item into a combo box at a zero-based index.
Inserts a text item into a combo box at a zero-based index.
(insert-grid-child! grid child existing edge)(insert-grid-child!
grid
child
existing
edge
{:keys [xspan yspan hexpand? vexpand? halign valign]
:or
{xspan 1 yspan 1 hexpand? false vexpand? false halign :fill valign :fill}})Places a child on a grid relative to an existing child.
edge is :leading, :top, :trailing or :bottom. Options match
append-grid-child!.
Places a child on a grid relative to an `existing` child. `edge` is `:leading`, `:top`, `:trailing` or `:bottom`. Options match `append-grid-child!`.
(insert-tab! tabs title index child)Inserts a titled page at a zero-based index.
Ownership of the child transfers to the tabs.
Inserts a titled page at a zero-based index. Ownership of the child transfers to the tabs.
(loaded?)Returns true when libui-ng has been loaded in this process.
Returns true when libui-ng has been loaded in this process.
(main!)Runs the native event loop until quit! is called.
Runs the native event loop until `quit!` is called.
(menu name)Creates a top-level menu.
Build every menu before creating the first window that shows a menu bar. Menus are not controls and are never destroyed.
Creates a top-level menu. Build every menu before creating the first window that shows a menu bar. Menus are not controls and are never destroyed.
(menu-item-checked? item)Returns true when a checkable menu item is checked.
Returns true when a checkable menu item is checked.
(message-box! window title description)Shows a modal message box parented to window.
Shows a modal message box parented to `window`.
(multiline-entry)Creates a wrapping multiline text entry.
Creates a wrapping multiline text entry.
(multiline-entry-read-only? entry)Returns true when a multiline entry is read-only.
Returns true when a multiline entry is read-only.
(multiline-entry-text entry)Returns a multiline entry's text.
Returns a multiline entry's text.
(non-wrapping-multiline-entry)Creates a multiline entry that scrolls horizontally instead of wrapping.
Reads and writes with the multiline-entry-text family.
Creates a multiline entry that scrolls horizontally instead of wrapping. Reads and writes with the `multiline-entry-text` family.
(on-click! button handler)Registers a no-argument button click handler.
Registers a no-argument button click handler.
(on-closing! window handler)Registers a no-argument window closing handler.
Return truthy to allow the window to be destroyed, falsey to keep it open.
Registers a no-argument window closing handler. Return truthy to allow the window to be destroyed, falsey to keep it open.
(on-color-change! button handler)Registers a handler receiving the colour button's [r g b a] colour.
Registers a handler receiving the colour button's `[r g b a]` colour.
(on-combobox-selection! combobox handler)Registers a handler receiving the selected zero-based index, or -1.
Registers a handler receiving the selected zero-based index, or -1.
(on-editable-combobox-change! combobox handler)Registers a handler receiving the editable combo box's current text.
Registers a handler receiving the editable combo box's current text.
(on-entry-change! entry handler)Registers a handler receiving the current single-line entry text.
Registers a handler receiving the current single-line entry text.
(on-font-change! button handler)Registers a handler receiving the font button's descriptor map.
Registers a handler receiving the font button's descriptor map.
(on-menu-item-click! item handler)Registers a no-argument handler for a menu item.
Registers a no-argument handler for a menu item.
(on-multiline-entry-change! entry handler)Registers a handler receiving the current multiline entry text.
Registers a handler receiving the current multiline entry text.
(on-picker-change! picker handler)Registers a handler receiving the picker's current time map.
Registers a handler receiving the picker's current time map.
(on-radio-selection! radio-buttons handler)Registers a handler receiving the selected option index, or -1.
Registers a handler receiving the selected option index, or -1.
(on-should-quit! handler)Registers the application-wide quit handler.
Return truthy to let the application quit. Only one handler is active at a time; registering again replaces the previous one.
Registers the application-wide quit handler. Return truthy to let the application quit. Only one handler is active at a time; registering again replaces the previous one.
(on-slider-change! slider handler)Registers a handler receiving the slider's current value while dragging.
Registers a handler receiving the slider's current value while dragging.
(on-slider-release! slider handler)Registers a handler called when the slider's handle is let go.
Registers a handler called when the slider's handle is let go.
(on-spinbox-change! spinbox handler)Registers a handler receiving the spinbox's current value.
Registers a handler receiving the spinbox's current value.
(on-tab-selected! tabs handler)Registers a handler receiving the newly visible page's index.
Registers a handler receiving the newly visible page's index.
(on-table-header-clicked! table handler)Registers a handler receiving the clicked zero-based header column.
Registers a handler receiving the clicked zero-based header column.
(on-table-row-clicked! table handler)Registers a handler receiving the clicked zero-based row.
Registers a handler receiving the clicked zero-based row.
(on-table-row-double-clicked! table handler)Registers a handler receiving the double-clicked zero-based row.
Registers a handler receiving the double-clicked zero-based row.
(on-table-selection-change! table handler)Registers a handler receiving the selected row indices as a vector.
Registers a handler receiving the selected row indices as a vector.
(on-toggle! checkbox handler)Registers a handler receiving the checkbox's current checked state.
Registers a handler receiving the checkbox's current checked state.
(on-window-content-size-change! window handler)Registers a handler receiving the window's new [width height].
Registers a handler receiving the window's new `[width height]`.
(on-window-focus-change! window handler)Registers a handler receiving true when the window gained focus.
Registers a handler receiving true when the window gained focus.
(on-window-position-change! window handler)Registers a handler receiving the window's new [x y].
Registers a handler receiving the window's new `[x y]`.
(open-file-dialog! window)Shows a modal file chooser and returns the chosen path, or nil if cancelled.
Shows a modal file chooser and returns the chosen path, or nil if cancelled.
(open-folder-dialog! window)Shows a modal folder chooser and returns the chosen path, or nil if cancelled.
Shows a modal folder chooser and returns the chosen path, or nil if cancelled.
(password-entry)Creates a single-line entry that masks its text.
Creates a single-line entry that masks its text.
(picker-time picker)Returns a picker's value as {:year :month :day :hour :minute :second}.
Months are 1 through 12 and years are absolute, unlike the underlying
struct tm.
Returns a picker's value as `{:year :month :day :hour :minute :second}`.
Months are 1 through 12 and years are absolute, unlike the underlying
`struct tm`.(progress-bar)Creates a progress bar. Values are 0 through 100, or -1 for indeterminate.
Creates a progress bar. Values are 0 through 100, or -1 for indeterminate.
(progress-value progress-bar)Returns a progress bar's integer value.
Returns a progress bar's integer value.
(queue-on-ui! function)Queues a no-argument function on the libui-ng thread without blocking.
Returns a CompletableFuture completed with the function's result or error.
Queues a no-argument function on the libui-ng thread without blocking. Returns a CompletableFuture completed with the function's result or error.
(quit!)Requests that the native event loop stop.
Requests that the native event loop stop.
(radio-buttons)Creates an empty group of radio buttons.
Creates an empty group of radio buttons.
(radio-selected-index radio-buttons)Returns the selected option index, or -1 when none is selected.
Returns the selected option index, or -1 when none is selected.
(save-file-dialog! window)Shows a modal save dialog and returns the chosen path, or nil if cancelled.
The file is not created; the caller decides what to write.
Shows a modal save dialog and returns the chosen path, or nil if cancelled. The file is not created; the caller decides what to write.
(search-entry)Creates a single-line entry styled as a search field.
Reads and writes with the entry-text family.
Creates a single-line entry styled as a search field. Reads and writes with the `entry-text` family.
(set-button-text! button text)Sets a button label.
Sets a button label.
(set-checkbox-text! checkbox text)Sets a checkbox label.
Sets a checkbox label.
(set-checked! checkbox checked?)Sets whether a checkbox is checked.
Sets whether a checkbox is checked.
(set-child! window child)Sets the single root child of a window, transferring ownership to it.
Sets the single root child of a window, transferring ownership to it.
(set-color-button-color! button [r g b a])Sets a colour button's colour. Each component runs 0.0 through 1.0.
Sets a colour button's colour. Each component runs 0.0 through 1.0.
(set-combobox-selected-index! combobox index)Selects an item by zero-based index; -1 clears the selection.
Selects an item by zero-based index; -1 clears the selection.
(set-editable-combobox-text! combobox text)Sets an editable combo box's text.
Sets an editable combo box's text.
(set-entry-read-only! entry read-only?)Sets whether a single-line entry is read-only.
Sets whether a single-line entry is read-only.
(set-entry-text! entry text)Sets a single-line entry's text.
Sets a single-line entry's text.
(set-form-padded! form padded?)Enables or disables platform-standard spacing between a form's children.
Enables or disables platform-standard spacing between a form's children.
(set-grid-padded! grid padded?)Enables or disables platform-standard spacing between a grid's children.
Enables or disables platform-standard spacing between a grid's children.
(set-group-child! group child)Sets the single child of a titled group, transferring ownership to it.
Sets the single child of a titled group, transferring ownership to it.
(set-group-margined! group margined?)Enables or disables platform-standard padding inside a group.
Enables or disables platform-standard padding inside a group.
(set-group-title! group title)Sets a group's title.
Sets a group's title.
(set-label-text! label text)Sets a label's text.
Sets a label's text.
(set-menu-item-checked! item checked?)Sets whether a checkable menu item is checked.
Sets whether a checkable menu item is checked.
(set-multiline-entry-read-only! entry read-only?)Sets whether a multiline entry is read-only.
Sets whether a multiline entry is read-only.
(set-multiline-entry-text! entry text)Replaces a multiline entry's text.
Replaces a multiline entry's text.
(set-padded! box padded?)Enables or disables platform-standard spacing between a box's children.
Enables or disables platform-standard spacing between a box's children.
(set-picker-time! picker time)Sets a picker's value from {:year :month :day :hour :minute :second}.
Months are 1 through 12 and years are absolute. Missing keys default to midnight on 1 January 1970.
Sets a picker's value from `{:year :month :day :hour :minute :second}`.
Months are 1 through 12 and years are absolute. Missing keys default to
midnight on 1 January 1970.(set-progress-value! progress-bar value)Sets progress to 0 through 100, or -1 for indeterminate.
Sets progress to 0 through 100, or -1 for indeterminate.
(set-radio-selected-index! radio-buttons index)Selects an option by zero-based index; -1 clears the selection.
Selects an option by zero-based index; -1 clears the selection.
(set-slider-range! slider minimum maximum)Sets a slider's bounds, clamping the current value into the new range.
Sets a slider's bounds, clamping the current value into the new range.
(set-slider-tooltip! slider tooltip?)Sets whether a slider shows its value in a tooltip.
Sets whether a slider shows its value in a tooltip.
(set-slider-value! slider value)Sets a slider's value, clamped to its range.
Sets a slider's value, clamped to its range.
(set-spinbox-value! spinbox value)Sets a spinbox's value, clamped to its range.
Sets a spinbox's value, clamped to its range.
(set-tab-margined! tabs index margined?)Enables or disables platform-standard padding inside one tab page.
Enables or disables platform-standard padding inside one tab page.
(set-tab-selected-index! tabs index)Shows the tab page at a zero-based index.
Shows the tab page at a zero-based index.
(set-table-column-width! table column width)Sets a table column's width in pixels; -1 restores automatic sizing.
Sets a table column's width in pixels; -1 restores automatic sizing.
(set-table-header-sort-indicator! table column indicator)Sets a column's sort indicator to :none, :ascending or :descending.
This only draws the arrow; sorting the rows is the model's job.
Sets a column's sort indicator to `:none`, `:ascending` or `:descending`. This only draws the arrow; sorting the rows is the model's job.
(set-table-header-visible! table visible?)Sets whether a table shows its header row.
Sets whether a table shows its header row.
(set-table-selection! table rows)Selects the supplied row indices, replacing any previous selection.
Selecting more rows than the selection mode allows does nothing.
Selects the supplied row indices, replacing any previous selection. Selecting more rows than the selection mode allows does nothing.
(set-table-selection-mode! table mode)Sets a table's selection mode to :none, :zero-or-one, :one or
:zero-or-many.
Changing the mode clears the current selection.
Sets a table's selection mode to `:none`, `:zero-or-one`, `:one` or `:zero-or-many`. Changing the mode clears the current selection.
(set-window-borderless! window borderless?)Sets whether a window has a system border.
Sets whether a window has a system border.
(set-window-content-size! window width height)Resizes a window's content area.
Resizes a window's content area.
(set-window-fullscreen! window fullscreen?)Sets whether a window is fullscreen.
Sets whether a window is fullscreen.
(set-window-margined! window margined?)Enables or disables platform-standard padding around a window's child.
Enables or disables platform-standard padding around a window's child.
(set-window-position! window x y)Moves a window to a screen coordinate.
Moves a window to a screen coordinate.
(set-window-resizeable! window resizeable?)Sets whether a window can be resized by the user.
Sets whether a window can be resized by the user.
(set-window-title! window text)Sets a window title.
Sets a window title.
(slider minimum maximum)Creates a slider bounded by minimum and maximum.
Creates a slider bounded by `minimum` and `maximum`.
(slider-tooltip? slider)Returns true when a slider shows its value in a tooltip.
Returns true when a slider shows its value in a tooltip.
(slider-value slider)Returns a slider's value.
Returns a slider's value.
(spinbox minimum maximum)Creates a numeric spinbox bounded by minimum and maximum.
Creates a numeric spinbox bounded by `minimum` and `maximum`.
(spinbox-value spinbox)Returns a spinbox's value.
Returns a spinbox's value.
(tab-margined? tabs index)Returns true when the page at a zero-based index is padded.
Returns true when the page at a zero-based index is padded.
(tab-page-count tabs)Returns the number of pages in a tab container.
Returns the number of pages in a tab container.
(tab-selected-index tabs)Returns the zero-based index of the visible tab page.
Returns the zero-based index of the visible tab page.
(table model)(table model
{:keys [row-background-color-column]
:or {row-background-color-column -1}})Creates a table rendering model.
Options support :row-background-color-column, a :color model column
supplying each row's background, defaulting to -1 for the platform default.
Creates a table rendering `model`. Options support `:row-background-color-column`, a `:color` model column supplying each row's background, defaulting to -1 for the platform default.
(table-column-width table column)Returns a table column's width in pixels, or -1 when it is automatic.
Returns a table column's width in pixels, or -1 when it is automatic.
(table-header-sort-indicator table column)Returns a column's sort indicator: :none, :ascending or :descending.
Returns a column's sort indicator: `:none`, `:ascending` or `:descending`.
(table-header-visible? table)Returns true when a table shows its header row.
Returns true when a table shows its header row.
(table-model {:keys [column-types row-count cell-value set-cell-value!]})Creates a table model driven by Clojure callbacks.
:column-types is a vector of :string, :int, :color or :image, one
per model column; libui-ng requires it to stay constant for the model's
lifetime. :row-count is called with no arguments and returns the current
number of rows. :cell-value receives a zero-based row and column and
returns that cell's value, or nil for the column's default. :set-cell-value!
is optional and receives a row, a column, and the edited value whenever the
user commits an edit.
Values are converted by column type: :string accepts anything str
handles, :int accepts integers and booleans, and :color accepts an
[r g b] or [r g b a] vector of 0.0-to-1.0 components.
The callbacks run on the libui-ng thread. Retaining them requires an allocation that is never reclaimed, so create models once rather than per refresh.
Creates a table model driven by Clojure callbacks. `:column-types` is a vector of `:string`, `:int`, `:color` or `:image`, one per model column; libui-ng requires it to stay constant for the model's lifetime. `:row-count` is called with no arguments and returns the current number of rows. `:cell-value` receives a zero-based row and column and returns that cell's value, or nil for the column's default. `:set-cell-value!` is optional and receives a row, a column, and the edited value whenever the user commits an edit. Values are converted by column type: `:string` accepts anything `str` handles, `:int` accepts integers and booleans, and `:color` accepts an `[r g b]` or `[r g b a]` vector of 0.0-to-1.0 components. The callbacks run on the libui-ng thread. Retaining them requires an allocation that is never reclaimed, so create models once rather than per refresh.
(table-row-changed! model index)Tells the model's tables that the row at index changed.
Tells the model's tables that the row at `index` changed.
(table-row-deleted! model index)Tells the model's tables that the row previously at index was removed.
Tells the model's tables that the row previously at `index` was removed.
(table-row-inserted! model index)Tells the model's tables that a row was inserted at index.
Tells the model's tables that a row was inserted at `index`.
(table-selection table)Returns the selected row indices as a vector, empty when nothing is selected.
Returns the selected row indices as a vector, empty when nothing is selected.
(table-selection-mode table)Returns a table's selection mode.
Returns a table's selection mode.
(time-picker)Creates a picker for a wall-clock time.
Creates a picker for a wall-clock time.
(timer! milliseconds handler)Calls handler on the libui-ng thread after milliseconds.
Return truthy from the handler to schedule another run, falsey to stop.
Calls `handler` on the libui-ng thread after `milliseconds`. Return truthy from the handler to schedule another run, falsey to stop.
An Executor that posts each Runnable to libui-ng's main queue.
An Executor that posts each Runnable to libui-ng's main queue.
(ui-thread?)Returns true when called on the thread that initialized libui-ng.
Returns true when called on the thread that initialized libui-ng.
(uninit!)Uninitializes libui-ng on the thread that initialized it.
Uninitializes libui-ng on the thread that initialized it.
(vertical-box)Creates a vertical layout container.
Creates a vertical layout container.
(vertical-separator)Creates a vertical dividing line.
Creates a vertical dividing line.
(visible? control)Returns true when a control is visible.
Returns true when a control is visible.
(window title width height)(window title width height {:keys [menubar?] :or {menubar? false}})Creates a window. Options supports :menubar?, which defaults to false.
Creates a window. Options supports `:menubar?`, which defaults to false.
(window-borderless? window)Returns true when a window has no system border.
Returns true when a window has no system border.
(window-content-size window)Returns a window's content area as [width height].
Returns a window's content area as `[width height]`.
(window-focused? window)Returns true when a window holds keyboard focus.
Returns true when a window holds keyboard focus.
(window-fullscreen? window)Returns true when a window is fullscreen.
Returns true when a window is fullscreen.
(window-margined? window)Returns true when a window pads its child.
Returns true when a window pads its child.
(window-position window)Returns a window's position as [x y] in screen coordinates.
Returns a window's position as `[x y]` in screen coordinates.
(window-resizeable? window)Returns true when a window can be resized by the user.
Returns true when a window can be resized by the user.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |