34 Impl(
Element child,
float x,
float y)
37 void ComputeRequirement()
override {
39 requirement_.selection = Requirement::Selection::NORMAL;
41 Box& box = requirement_.selected_box;
42 box.
x_min = int(
float(requirement_.min_x) * x_);
43 box.
y_min = int(
float(requirement_.min_y) * y_);
44 box.
x_max = int(
float(requirement_.min_x) * x_);
45 box.
y_max = int(
float(requirement_.min_y) * y_);
54 return std::make_shared<Impl>(std::move(child), x, y);
73 Impl(
Element child,
int x,
int y)
76 void ComputeRequirement()
override {
78 requirement_.selection = Requirement::Selection::NORMAL;
80 Box& box = requirement_.selected_box;
93 return std::make_shared<Impl>(std::move(child), x, y);
void ComputeRequirement() override
Compute how much space an elements needs.
Decorator focusPositionRelative(float x, float y)
Used inside a frame, this force the view to be scrolled toward a a given position....
std::function< Element(Element)> Decorator
std::shared_ptr< Node > Element
Decorator focusPosition(int x, int y)
Used inside a frame, this force the view to be scrolled toward a a given position....