27class TimelineView :
public RootUI {
29 TimelineView() =
default;
31 void scrollFinished()
override;
35 virtual uint32_t getMaxZoom() = 0;
36 virtual bool calculateZoomPinSquares(uint32_t oldScroll, uint32_t newScroll, uint32_t newZoom,
38 virtual uint32_t getMaxLength() = 0;
39 virtual bool setupScroll(uint32_t oldScroll);
40 [[nodiscard]]
virtual int32_t getNavSysId()
const {
return NAVIGATION_CLIP; }
42 virtual void tellMatrixDriverWhichRowsContainSomethingZoomable() {
45 ActionResult buttonAction(deluge::hid::Button b,
bool on,
bool inCardRoutine)
override;
46 void displayZoomLevel(
bool justPopup =
false);
47 ActionResult horizontalEncoderAction(int32_t offset)
override;
48 void displayScrollPos();
49 void displayNumberOfBarsAndBeats(uint32_t number, uint32_t quantization,
bool countFromOne,
50 char const* tooLongText);
51 void initiateXScroll(uint32_t newXScroll, int32_t numSquaresToScroll = kDisplayWidth);
52 bool zoomToMax(
bool inOnly =
false);
53 void initiateXZoom(int32_t zoomMagnitude, int32_t newScroll, uint32_t oldZoom);
54 void midiLearnFlash()
override;
56 bool scrollRightToEndOfLengthIfNecessary(int32_t maxLength);
58 bool scrollLeftIfTooFarRight(int32_t maxLength);
60 void tripletsButtonPressed();
61 void setTripletsLEDState();
63 [[nodiscard]] int32_t getPosFromSquare(int32_t square, int32_t localScroll = -1)
const;
64 [[nodiscard]] int32_t getPosFromSquare(int32_t square, int32_t xScroll, uint32_t xZoom)
const;
65 int32_t getSquareFromPos(int32_t pos,
bool* rightOnSquare =
nullptr, int32_t localScroll = -1);
66 int32_t getSquareFromPos(int32_t pos,
bool* rightOnSquare, int32_t xScroll, uint32_t xZoom);
67 int32_t getSquareEndFromPos(int32_t pos, int32_t localScroll = -1);
68 bool isSquareDefined(int32_t square, int32_t xScroll = -1);
69 bool isSquareDefined(int32_t square, int32_t xScroll, uint32_t xZoom);
71 [[nodiscard]]
bool inTripletsView()
const;