42 border.subtractFrom (bounds);
50 border.addTo (bounds);
void checkBounds(Rectangle< int > &bounds, const Rectangle< int > &previousBounds, const Rectangle< int > &limits, bool isStretchingTop, bool isStretchingLeft, bool isStretchingBottom, bool isStretchingRight) override
This callback changes the given coordinates to impose whatever the current constraints are set to be.
virtual BorderSize< int > getAdditionalBorder() const =0
Returns the border that should be applied to the constrained bounds.
virtual ComponentBoundsConstrainer * getWrappedConstrainer() const =0
Returns a pointer to another constrainer that will be used as the base for any resizing operations.
virtual void checkBounds(Rectangle< int > &bounds, const Rectangle< int > &previousBounds, const Rectangle< int > &limits, bool isStretchingTop, bool isStretchingLeft, bool isStretchingBottom, bool isStretchingRight)
This callback changes the given coordinates to impose whatever the current constraints are set to be.
Manages a rectangle and allows geometric operations to be performed on it.
Rectangle withX(ValueType newX) const noexcept
Returns a rectangle which has the same size and y-position as this one, but with a different x-positi...
Rectangle withPosition(ValueType newX, ValueType newY) const noexcept
Returns a rectangle with the same size as this one, but a new position.
Rectangle withBottomY(ValueType newBottomY) const noexcept
Returns a rectangle which has the same size and x-position as this one, but whose bottom edge has the...
Rectangle withRightX(ValueType newRightX) const noexcept
Returns a rectangle which has the same size and y-position as this one, but whose right-hand edge has...
Rectangle withY(ValueType newY) const noexcept
Returns a rectangle which has the same size and x-position as this one, but with a different y-positi...
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...