3#include "qml_material/carousel/carousel_keylines.hpp"
4#include "qml_material/carousel/carousel_strategy.hpp"
9struct CarouselScrollStrategy {
10 KeylineList default_keylines;
11 QVector<KeylineList> start_steps;
12 QVector<KeylineList> end_steps;
13 qreal start_shift_distance = 0;
14 qreal end_shift_distance = 0;
15 bool centered_hero =
false;
16 qreal viewport_size = 0;
17 QVector<qreal> end_shift_points;
19 static auto build(
const CarouselLayoutInput& in,
const KeylineList& default_keylines)
20 -> CarouselScrollStrategy;
22 auto keylinesForScrollOffset(qreal scroll_offset, qreal max_scroll_offset,
23 bool round_to_step =
false) const -> KeylineList;
25 auto snapOffsets(const CarouselLayoutInput&) const -> QVector<qreal>;
26 auto initialCenter(const CarouselLayoutInput&) const -> qreal;