On this page

controls.h

The kit's controls. They come in through isolenui/kit/kit.h, each one its own file in isolenui/src/kit.

#include "isolenui/kit/controls.h". The guide starts at Buttons and choices.

Collapsible body and field reload

Explained in Text input.

ui::collapsible_beginui::collapsible_endui::field_reload

Quiet icon button

Explained in Buttons and choices.

ui::icon_button_flat

Buttons and choices

Explained in Buttons and choices.

ui::buttonui::button_accentui::icon_buttonui::icon_button_accentui::checkboxui::toggleui::radioui::tabsui::tabs_flagui::tabs_verticalui::segmented

Numeric input

Explained in Numeric input.

ui::sliderui::slider_intui::dragui::stepper

Text fields

Explained in Text editing and IME.

ui::text_boxui::search_boxUI_EDIT_MAXui::field_exui::field_flagui::field_upui::field_downui::field_enterui::field_escapeui::field_homeui::field_endui::field_pagesui::field_hostedui::field_searchui::field_liveui::field_bareui::field_out

Lists and sections

Explained in Text input.

ui::comboui::collapsible

Example

widgets_buttons.cpp
#include "isolenui/ui/ui.h"
#include "isolenui/kit/kit.h"

struct panel_state {
    bool notify = true;
    bool dark = false;
    uint32_t quality = 0;
    uint32_t tab = 0;
};

static void controls(ui::ctx* u, panel_state* s, gfx_svg gear_icon)
{
    // button, a plain click
    if (ui::button(u, "rebuild atlas")) {
        // rebuild here
    }

    // button_accent, the same thing styled for the primary action
    if (ui::button_accent(u, "publish")) {
        // publish here
    }

    // icon_button, falls back to the label when the icon handle is not live
    if (ui::icon_button(u, gear_icon, "settings")) {
        // open settings here
    }

    // checkbox, toggles a bool in place
    ui::checkbox(u, "notify on finish", &s->notify);

    // toggle, the same bool but drawn as a switch
    ui::toggle(u, "dark mode", &s->dark);

    // radio, one of a small fixed set of options
    ui::radio(u, "low", 0u, &s->quality);
    ui::radio(u, "high", 1u, &s->quality);

    // tabs, a labelled strip that writes the chosen index back
    static const char* const tab_items[] = { "general", "audio", "video" };
    ui::tabs(u, tab_items, 3u, &s->tab);

    // segmented, the same idea drawn as one bordered strip
    static const char* const seg_items[] = { "list", "grid" };
    static uint32_t view_mode = 0;
    ui::segmented(u, seg_items, 2u, &view_mode);
}

Last updated 23 October 2026