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; }
46 virtual void tellMatrixDriverWhichRowsContainSomethingZoomable();
48 ActionResult buttonAction(deluge::hid::Button b,
bool on,
bool inCardRoutine)
override;
49 void displayZoomLevel(
bool justPopup =
false);
50 ActionResult horizontalEncoderAction(int32_t offset)
override;
51 void displayScrollPos();
52 void displayNumberOfBarsAndBeats(uint32_t number, uint32_t quantization,
bool countFromOne,
53 char const* tooLongText);
54 void initiateXScroll(uint32_t newXScroll, int32_t numSquaresToScroll = kDisplayWidth);
55 bool zoomToMax(
bool inOnly =
false);
56 void initiateXZoom(int32_t zoomMagnitude, int32_t newScroll, uint32_t oldZoom);
57 void midiLearnFlash()
override;
59 bool scrollRightToEndOfLengthIfNecessary(int32_t maxLength);
61 bool scrollLeftIfTooFarRight(int32_t maxLength);
63 void tripletsButtonPressed();
64 void setTripletsLEDState();
66 [[nodiscard]] int32_t getPosFromSquare(int32_t square, int32_t localScroll = -1)
const;
67 [[nodiscard]] int32_t getPosFromSquare(int32_t square, int32_t xScroll, uint32_t xZoom)
const;
68 int32_t getSquareFromPos(int32_t pos,
bool* rightOnSquare =
nullptr, int32_t localScroll = -1);
69 int32_t getSquareFromPos(int32_t pos,
bool* rightOnSquare, int32_t xScroll, uint32_t xZoom);
70 int32_t getSquareEndFromPos(int32_t pos, int32_t localScroll = -1);
71 bool isSquareDefined(int32_t square, int32_t xScroll = -1);
72 bool isSquareDefined(int32_t square, int32_t xScroll, uint32_t xZoom);
74 [[nodiscard]]
bool inTripletsView()
const;