UXComboBox
UXComboBox is the editable form of a popup button. You type the text, a
suggestion list narrows by case-insensitive prefix as you type, and a
completion fills in the first match. The text, the suggestions and the prefix
matching form a pure, testable model; the backend draws the field and runs the
drop-down.
#use <UXKit>Overview
Section titled “Overview”UXComboBox* font = new UXComboBox();font.addItem((u8*)"Helvetica");font.addItem((u8*)"Hobo");font.addItem((u8*)"Times");font.setText((u8*)"H");// completionIndex() == 0, matchCount() == 2font.acceptCompletion(); // text is now "Helvetica"Conforms to
Section titled “Conforms to”- Inherits
UXControl: theweak:callback action, enablement, the fire path.
Topics
Section titled “Topics”Suggestions · addItem · removeAllItems · count · itemAt Text · text · setText Completion · completionIndex · completion · matchCount · selectItem · acceptCompletion
addItem
Section titled “addItem”void addItem(u8* s)Appends a suggestion.
removeAllItems
Section titled “removeAllItems”void removeAllItems(void)Empties the suggestion list. The text, which belongs to the user, stays.
i32 count(void)How many suggestions the list holds.
itemAt
Section titled “itemAt”u8* itemAt(i32 i)The suggestion’s text.
u8* text(void)The current text, whether typed, completed or picked.
setText
Section titled “setText”void setText(u8* s)Replaces the text; the completion queries answer against it.
completionIndex
Section titled “completionIndex”i32 completionIndex(void)The first suggestion with the current text as a case-insensitive prefix,
-1 when nothing matches or the text is empty.
completion
Section titled “completion”u8* completion(void)The matching suggestion’s full text, or the current text unchanged when nothing matches (a completion never destroys what was typed).
matchCount
Section titled “matchCount”i32 matchCount(void)How many suggestions still match the prefix. A drop-down shows these, and an autocompleting UI uses the count to decide whether completing helps.
selectItem
Section titled “selectItem”void selectItem(i32 i)Commits a suggestion into the text (the drop-down pick).
acceptCompletion
Section titled “acceptCompletion”void acceptCompletion(void)Commits the first match into the text (Tab completion).
Platform appearance
Section titled “Platform appearance”
App-drawn through the shared drawRect seam: the same rendering on every backend, captured here from this platform’s own paint path.

App-drawn through the shared drawRect seam: the same rendering on every backend, captured here from this platform’s own paint path.

App-drawn through the shared drawRect seam: the same rendering on every backend, captured here from this platform’s own paint path.

App-drawn through the shared drawRect seam: the same rendering on every backend, captured here from this platform’s own paint path.

App-drawn through the shared drawRect seam: the same rendering on every backend, captured here from this platform’s own paint path.

App-drawn through the shared drawRect seam: the same rendering on every backend, captured here from this platform’s own paint path.

App-drawn through the shared drawRect seam: the same rendering on every backend, captured here from this platform’s own paint path.
Example
Section titled “Example”A tag entry that completes against the known set:
void onTagKey(UXTextField* sender) { combo.setText(sender.text()); hint.setText(combo.matchCount() > (i32)0 ? combo.completion() : (u8*)"");}