Represents the different sections of a resizable border, which allow it to resized in different ways. More...
Public Types | |
| enum | Zones { centre = 0, left = 1, top = 2, right = 4, bottom = 8 } |
| Creates a Zone from a combination of the flags in. More... | |
Public Member Functions | |
| Zone (int zoneFlags=0) noexcept | |
| Zone (const Zone &other) noexcept | |
| Zone & | operator= (const Zone &other) noexcept |
| bool | operator== (const Zone &other) const noexcept |
| bool | operator!= (const Zone &other) const noexcept |
| MouseCursor | getMouseCursor () const noexcept |
| Returns an appropriate mouse-cursor for this resize zone. | |
| bool | isDraggingWholeObject () const noexcept |
| Returns true if dragging this zone will move the enire object without resizing it. | |
| bool | isDraggingLeftEdge () const noexcept |
| Returns true if dragging this zone will move the object's left edge. | |
| bool | isDraggingRightEdge () const noexcept |
| Returns true if dragging this zone will move the object's right edge. | |
| bool | isDraggingTopEdge () const noexcept |
| Returns true if dragging this zone will move the object's top edge. | |
| bool | isDraggingBottomEdge () const noexcept |
| Returns true if dragging this zone will move the object's bottom edge. | |
| template<typename ValueType > | |
| const Rectangle< ValueType > | resizeRectangleBy (Rectangle< ValueType > original, const Point< ValueType > &distance) const noexcept |
| Resizes this rectangle by the given amount, moving just the edges that this zone applies to. | |
| int | getZoneFlags () const noexcept |
| Returns the raw flags for this zone. | |
Static Public Member Functions | |
| static const Zone | fromPositionOnBorder (const Rectangle< int > &totalSize, const BorderSize< int > &border, const Point< int > &position) |
| Given a point within a rectangle with a resizable border, this returns the zone that the point lies within. | |
Represents the different sections of a resizable border, which allow it to resized in different ways.
Creates a Zone from a combination of the flags in.
| ResizableBorderComponent::Zone::Zone | ( | int | zoneFlags = 0 | ) | [explicit] |
| ResizableBorderComponent::Zone::Zone | ( | const Zone & | other | ) |
| bool ResizableBorderComponent::Zone::operator== | ( | const Zone & | other | ) | const |
| bool ResizableBorderComponent::Zone::operator!= | ( | const Zone & | other | ) | const |
| static const Zone ResizableBorderComponent::Zone::fromPositionOnBorder | ( | const Rectangle< int > & | totalSize, |
| const BorderSize< int > & | border, | ||
| const Point< int > & | position | ||
| ) | [static] |
Given a point within a rectangle with a resizable border, this returns the zone that the point lies within.
Returns an appropriate mouse-cursor for this resize zone.
| bool ResizableBorderComponent::Zone::isDraggingWholeObject | ( | ) | const |
Returns true if dragging this zone will move the enire object without resizing it.
| bool ResizableBorderComponent::Zone::isDraggingLeftEdge | ( | ) | const |
Returns true if dragging this zone will move the object's left edge.
| bool ResizableBorderComponent::Zone::isDraggingRightEdge | ( | ) | const |
Returns true if dragging this zone will move the object's right edge.
| bool ResizableBorderComponent::Zone::isDraggingTopEdge | ( | ) | const |
Returns true if dragging this zone will move the object's top edge.
| bool ResizableBorderComponent::Zone::isDraggingBottomEdge | ( | ) | const |
Returns true if dragging this zone will move the object's bottom edge.
| const Rectangle<ValueType> ResizableBorderComponent::Zone::resizeRectangleBy | ( | Rectangle< ValueType > | original, |
| const Point< ValueType > & | distance | ||
| ) | const |
Resizes this rectangle by the given amount, moving just the edges that this zone applies to.
References jmax(), jmin(), and Rectangle< ValueType >::setLeft().
| int ResizableBorderComponent::Zone::getZoneFlags | ( | ) | const |
Returns the raw flags for this zone.