Skip to content

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

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.

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.

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.

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.

bool transportbar_shown()

Declared in crosspad-gui/components/transport_bar.h:68.

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.

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.

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.

One of the bar’s readouts, for measuring the layout from the host.

FieldTypeDescription
idconst char *“bpm”, “pos” or “vox”
xint32_t
yint32_t
wint32_t
hint32_t
textconst char *the label’s own buffer; valid until the next repaint

Declared in crosspad-gui/components/transport_bar.h:71.

MacroValueDescription
TRANSPORT_BAR_HEIGHT30