Implement ui::event_interceptor::width/height_constraints
This commit is contained in:
parent
b00e59ab08
commit
a7d331544c
2 changed files with 16 additions and 0 deletions
|
|
@ -11,6 +11,8 @@ namespace psemek::ui
|
||||||
: single_container
|
: single_container
|
||||||
{
|
{
|
||||||
geom::box<float, 2> size_constraints() const override;
|
geom::box<float, 2> size_constraints() const override;
|
||||||
|
geom::interval<float> width_constraints(float height) const override;
|
||||||
|
geom::interval<float> height_constraints(float width) const override;
|
||||||
|
|
||||||
struct shape const & shape() const override;
|
struct shape const & shape() const override;
|
||||||
void reshape(geom::box<float, 2> const & bbox) override;
|
void reshape(geom::box<float, 2> const & bbox) override;
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,20 @@ namespace psemek::ui
|
||||||
return element::size_constraints();
|
return element::size_constraints();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
geom::interval<float> event_interceptor::width_constraints(float height) const
|
||||||
|
{
|
||||||
|
if (child_)
|
||||||
|
return child_->width_constraints(height);
|
||||||
|
return element::width_constraints(height);
|
||||||
|
}
|
||||||
|
|
||||||
|
geom::interval<float> event_interceptor::height_constraints(float width) const
|
||||||
|
{
|
||||||
|
if (child_)
|
||||||
|
return child_->height_constraints(width);
|
||||||
|
return element::height_constraints(width);
|
||||||
|
}
|
||||||
|
|
||||||
shape const & event_interceptor::shape() const
|
shape const & event_interceptor::shape() const
|
||||||
{
|
{
|
||||||
static const null_shape fallback_shape;
|
static const null_shape fallback_shape;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue