Skip to content

mode_overlay

#include "crosspad-gui/components/mode_overlay.h"

Generated from crosspad-gui/components/mode_overlay.h in crosspad-gui. Edit the header’s doxygen comments to change this page.

MODE + pad: switch between apps from the pad grid.

const ModeEntry * mode_overlay_default_map(size_t *count)

The default map: Sampler / Sequencer / Song / Arrange, Recorder / Slicer, PitchPlay / PadMixer / Mixer / DawControl, KitSelector / Instructions / Firmware / Settings.

A platform that wants switches (FULL LEVEL, NOTE REPEAT…) on a row passes its own table with ModeKind::Toggle entries.

Declared in crosspad-gui/components/mode_overlay.h:54.

void mode_overlay_init(lv_obj_t *app_container, const ModeEntry *entries, size_t count)

Where apps are started (MainScreenResult::app_container) and what the map shows.

entries are copied, so a stack table is fine. Registers the “ModeOverlay” pad logic and installs mode_overlay_toggle() as the transport bar’s MODE handler.

Declared in crosspad-gui/components/mode_overlay.h:60.

void mode_overlay_bind_toggle(uint8_t pad, void(*toggle)(), bool(*isOn)())

Bind a switch’s action and state to the entry with that pad number.

Works on the default map (it keeps its own mutable copy).

Declared in crosspad-gui/components/mode_overlay.h:64.

void mode_overlay_open()

Declared in crosspad-gui/components/mode_overlay.h:66.

void mode_overlay_close()

Declared in crosspad-gui/components/mode_overlay.h:67.

void mode_overlay_toggle()

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

bool mode_overlay_is_open()

Declared in crosspad-gui/components/mode_overlay.h:69.

void mode_overlay_select_pad(uint8_t padIdx)

Act on pad padIdx (0..15) as if its cell were tapped.

Safe from any task: the work is posted with IGuiPlatform::postToGui().

Declared in crosspad-gui/components/mode_overlay.h:73.

void mode_overlay_go_home()

Go home what the board opens on: every app on screen is closed and the map comes up with nothing under it.

Whatever holds the transport keeps playing.

Declared in crosspad-gui/components/mode_overlay.h:78.

bool mode_overlay_open_app(const char *name)

Open the app registered under name as if its pad had been hit: the same container, the same hand-over of the pads, the same transport-bar refresh.

Returns false when no app answers to that name, or when it is already the one running.

This is how one app hands the screen to another Arrange opening the Recorder to fill a new audio track, a seq track’s EDIT opening the Sampler instead of each app learning the launch rules for itself.

Declared in crosspad-gui/components/mode_overlay.h:88.

ValueValueDescription
CoreWhere the music is made (pads 1-4). Theme colour.
AppAn app with its own screen.
ToggleNo screen: flips a switch and the map closes (outlined cell).
RareOnce-a-session apps, drawn quieter.

Declared in crosspad-gui/components/mode_overlay.h:31.

FieldTypeDescription
paduint8_t1..16
labelconst char *On the cell, <= 8 chars, Title Case.
hintconst char *Bottom line, <= 8 chars, may be "".
coloruint32_t0xRRGGBB cell accent and pad LED
kindModeKind
appconst char *App name as registered (IApp::getName()); nullptr for toggles.
togglevoid(*)()Called for ModeKind::Toggle.
isOnbool(*)()Optional: a toggle’s state, to fill its cell.

Declared in crosspad-gui/components/mode_overlay.h:38.