32class SampleMarkerEditor final :
public UI {
34 SampleMarkerEditor() =
default;
36 bool opened()
override;
37 bool getGreyoutColsAndRows(uint32_t* cols, uint32_t* rows)
override;
38 void selectEncoderAction(int8_t offset)
override;
39 ActionResult padAction(int32_t x, int32_t y, int32_t velocity)
override;
40 ActionResult buttonAction(deluge::hid::Button b,
bool on,
bool inCardRoutine)
override;
41 ActionResult verticalEncoderAction(int32_t offset,
bool inCardRoutine)
override;
42 ActionResult horizontalEncoderAction(int32_t offset)
override;
43 void graphicsRoutine()
override;
44 ActionResult timerCallback()
override;
45 bool renderMainPads(uint32_t whichRows,
RGB image[][kDisplayWidth + kSideBarWidth] =
nullptr,
46 uint8_t occupancyMask[][kDisplayWidth + kSideBarWidth] =
nullptr,
47 bool drawUndefinedArea =
true)
override;
48 bool renderSidebar(uint32_t whichRows,
RGB image[][kDisplayWidth + kSideBarWidth] =
nullptr,
49 uint8_t occupancyMask[][kDisplayWidth + kSideBarWidth] =
nullptr)
override;
62 MarkerType markerType;
70 UIType getUIType()
override {
return UIType::SAMPLE_MARKER_EDITOR; }
74 static constexpr int32_t kInvalidColumn = -2147483648;
75 void writeValue(uint32_t value, MarkerType markerTypeNow = MarkerType::NOT_AVAILABLE);
77 int32_t getStartColOnScreen(int32_t unscrolledPos);
78 int32_t getEndColOnScreen(int32_t unscrolledPos);
79 int32_t getStartPosFromCol(int32_t col);
80 int32_t getEndPosFromCol(int32_t col);
82 void recordScrollAndZoom();
83 bool shouldAllowExtraScrollRight();
90 void renderColumn(int32_t xDisplay,
RGB image[kDisplayHeight][kDisplayWidth + kSideBarWidth],
91 MarkerColumn cols[kNumMarkerTypes], int32_t supressMask);
93 void renderMarkerInCol(int32_t xDisplay,
RGB thisImage[kDisplayHeight][kDisplayWidth + kSideBarWidth],
94 MarkerType type, int32_t yStart, int32_t yEnd,
bool dimmly);
97 [[nodiscard]] MarkerType
reverseRemap(MarkerType type)
const;
void renderMarkerInCol(int32_t xDisplay, RGB thisImage[kDisplayHeight][kDisplayWidth+kSideBarWidth], MarkerType type, int32_t yStart, int32_t yEnd, bool dimmly)
Draw a single marker.
Definition sample_marker_editor.cpp:1071
MarkerType reverseRemap(MarkerType type) const
Swap a marker to its inverse, if the sample is currently reversed.
Definition sample_marker_editor.cpp:82
void renderColumn(int32_t xDisplay, RGB image[kDisplayHeight][kDisplayWidth+kSideBarWidth], MarkerColumn cols[kNumMarkerTypes], int32_t supressMask)
Definition sample_marker_editor.cpp:1283