Skip to content

guitar_prometheus::ScorePicker

guitar_prometheus::ScorePicker

Functions

Name
constexpr intidForPartIndex(int partIndex)
-1 (all parts) → 1; i ≥ 0 (part index) → i + 2.
constexpr intpartIndexFromId(int comboBoxId)
1-1 (all parts); id ≥ 2id - 2 (part index).

Attributes

Name
constexpr intkAllPartsId
Picker contract for the View → Score panel.
constexpr intkFirstPartId

Functions Documentation

function idForPartIndex

constexpr int idForPartIndex(
int partIndex
)

-1 (all parts) → 1; i ≥ 0 (part index) → i + 2.

function partIndexFromId

constexpr int partIndexFromId(
int comboBoxId
)

1-1 (all parts); id ≥ 2id - 2 (part index).

Any other input falls through to -1 so the panel safely defaults to the all-parts view.

Attributes Documentation

variable kAllPartsId

constexpr int kAllPartsId = 1;

Picker contract for the View → Score panel.

The combo box reserves id=1 for “(All parts)” and per-part entries start at id=2 in score-part order. Helpers translate between the picker’s combo-box ids and the panel’s selectedPartIndex_ semantics (-1 == multi-part stack, 0..N-1 == single part). Pure integer math so tests don’t need JUCE GUI.

variable kFirstPartId

constexpr int kFirstPartId = 2;

Updated on 2026-05-29 at 07:39:53 +0000