transport_bar
#include "crosspad-gui/components/transport_bar.h"Generated from crosspad-gui/components/transport_bar.h in crosspad-gui. Edit the header’s doxygen comments to change this page.
The transport, always at the top of the screen.
Recipes that use it: Tempo and transport
Functions
Section titled “Functions”transportbar_create
Section titled “transportbar_create”lv_obj_t * transportbar_create(lv_obj_t *parent, lv_obj_t *status_bar)Build the bar as a child of parent, visible, and own it from here.
status_bar is what a tap on the battery swaps to; nullptr disables it.
Declared in crosspad-gui/components/transport_bar.h:54.
transportbar_refresh
Section titled “transportbar_refresh”void transportbar_refresh()Repaint from the core transport now rather than on the next tick.
Used in Tempo and transport.
Declared in crosspad-gui/components/transport_bar.h:57.
transportbar_set_mode_handler
Section titled “transportbar_set_mode_handler”void transportbar_set_mode_handler(void(*handler)())What a MODE tap calls.
mode_overlay_init() installs mode_overlay_toggle(). A long press on MODE is the way to the status bar instead (see transportbar_show) this design has no room for an arrow, and the wifi, Bluetooth, SD and loader glyphs live nowhere else.
Declared in crosspad-gui/components/transport_bar.h:63.
transportbar_show
Section titled “transportbar_show”void transportbar_show(bool show)Swap with the status bar.
show=false reveals the icons, show=true brings the transport back. No-op without a status bar to swap with.
Declared in crosspad-gui/components/transport_bar.h:67.
transportbar_shown
Section titled “transportbar_shown”bool transportbar_shown()Declared in crosspad-gui/components/transport_bar.h:68.
transportbar_probe
Section titled “transportbar_probe”uint8_t transportbar_probe(TransportBarReadout *out, uint8_t max)Fill up to max readouts and return how many were written.
These labels sit in no encoder group, so ui snapshot cannot see them; this call reports their position and size.
Declared in crosspad-gui/components/transport_bar.h:84.
transportbar_toggle_focus
Section titled “transportbar_toggle_focus”bool transportbar_toggle_focus()Jump the encoder’s focus to the transport, and a second call back to where it came from what the power button’s 0.5 s hold does.
A shortcut, not the way in: the keys are appended to the encoder’s group, so turning past a screen’s last field reaches them anyway. LVGL skips hidden and LV_STATE_DISABLED objects when it navigates, so a hidden bar and a key the claim holder cannot honour drop out of the rotation on their own. The jump lands on PLAY when stopped, STOP otherwise.
False when there is no bar, or it is not the one on screen.
Declared in crosspad-gui/components/transport_bar.h:96.
transportbar_has_focus
Section titled “transportbar_has_focus”bool transportbar_has_focus()True while the encoder’s focus is on one of the bar’s keys or values.
Declared in crosspad-gui/components/transport_bar.h:99.
crosspad_gui::TransportBarReadout
Section titled “crosspad_gui::TransportBarReadout”One of the bar’s readouts, for measuring the layout from the host.
| Field | Type | Description |
|---|---|---|
id | const char * | “bpm”, “pos” or “vox” |
x | int32_t | |
y | int32_t | |
w | int32_t | |
h | int32_t | |
text | const char * | the label’s own buffer; valid until the next repaint |
Declared in crosspad-gui/components/transport_bar.h:71.
Macros
Section titled “Macros”| Macro | Value | Description |
|---|---|---|
TRANSPORT_BAR_HEIGHT | 30 |