FakeUi

class FakeUi

Host-side renderer and driver for the UI snapshot: lets plugins and the runtime be tested without the car.

Constructors

Link copied to clipboard
constructor(table: UiTable)

Functions

Link copied to clipboard
open fun answer(value: Int)
A confirm's row: DIALOG_DONE with value (1 is Yes), as the adapter sends it.
Link copied to clipboard
open fun back()
Link copied to clipboard
open fun carRows(): List<String>
Car drawer labels in order, Plugins row first; a row with an icon shows its tag first.
Link copied to clipboard
open fun choose(pageKey: String, itemId: String, index: Int)
CHOICE: opens the choice's sub-page and selects option index on it, as a user does (open the row, pick the radio, land back on the page).
Link copied to clipboard
open fun dialog(): String
The dialog up: confirm:<title>|<text>|<yes>|<no> or speller:<title>|<text> (the typed text, or the initial one); null for none, or once answered here.
Link copied to clipboard
open fun hasPage(pageKey: String): Boolean
Whether the page is registered (an empty page is registered; render is empty for both).
Link copied to clipboard
open fun leave()
BACK on the dialog: a speller is done with its text, a confirm is No.
Link copied to clipboard
open fun openPageKey(): String
The visible page key after following the latest openSeq; null when none is open.
Link copied to clipboard
open fun pick(pageKey: String, entryKey: String, index: Int)
DROPDOWN: VALUE_REQUESTED with option index, unchecked (the runtime drops one out of range).
Link copied to clipboard
open fun render(pageKey: String): List<String>
line per entry; empty for an unknown page.
Link copied to clipboard
open fun select(pageKey: String, entryKey: String)
LINK and CHOICE: navigate locally (to the target, or the choice's derived page); ITEM: ENTRY_SELECTED; RADIO: ENTRY_SELECTED, then back to the page the choice is on.
Link copied to clipboard
open fun selectRow(index: Int)
Records ROW_SELECTED; the page opens from the next snapshot, like the adapter.
Link copied to clipboard
The text colour of each status part, in the same order as statusParts; null for the bar's own.
Link copied to clipboard
open fun statusContexts(): List<Long>
The context bitmask of each status part, in the same order as statusParts; 0 for every context.
Link copied to clipboard
open fun statusLine(): String
The text-only status line (no icons).
Link copied to clipboard
open fun statusParts(): List<String>
The status line with icons: one string per part, an item's icon tag before its text.
Link copied to clipboard
open fun toast(): String
[tag] text of the latest toast (the status tag); null for none.
Link copied to clipboard
open fun toastSeq(): Long
The sequence number of the latest toast, 0 for none: it rises with each toast, even one with the same text.
Link copied to clipboard
open fun toggle(pageKey: String, entryKey: String)
TOGGLE_REQUESTED with the opposite of the current state; nothing for a disabled toggle.
Link copied to clipboard
open fun turn(pageKey: String, entryKey: String, value: Int)
SLIDER: VALUE_REQUESTED with the raw value (the runtime clamps and snaps it).
Link copied to clipboard
open fun type(text: String)
Sets the speller's text (unchecked: the runtime cleans it to maxLen).