|
JUCE
|
Specifies a set of gaps to be left around the sides of a rectangle. More...
#include <juce_BorderSize.h>
Public Member Functions | |
| BorderSize ()=default | |
| Creates a null border. More... | |
| BorderSize (ValueType topGap, ValueType leftGap, ValueType bottomGap, ValueType rightGap) noexcept | |
| Creates a border with the given gaps. More... | |
| BorderSize (ValueType allGaps) noexcept | |
| Creates a border with the given gap on all sides. More... | |
| ValueType | getTop () const noexcept |
| Returns the gap that should be left at the top of the region. More... | |
| ValueType | getLeft () const noexcept |
| Returns the gap that should be left at the left of the region. More... | |
| ValueType | getBottom () const noexcept |
| Returns the gap that should be left at the bottom of the region. More... | |
| ValueType | getRight () const noexcept |
| Returns the gap that should be left at the right of the region. More... | |
| ValueType | getTopAndBottom () const noexcept |
| Returns the sum of the top and bottom gaps. More... | |
| ValueType | getLeftAndRight () const noexcept |
| Returns the sum of the left and right gaps. More... | |
| bool | isEmpty () const noexcept |
| Returns true if this border has no thickness along any edge. More... | |
| void | setTop (ValueType newTopGap) noexcept |
| Changes the top gap. More... | |
| void | setLeft (ValueType newLeftGap) noexcept |
| Changes the left gap. More... | |
| void | setBottom (ValueType newBottomGap) noexcept |
| Changes the bottom gap. More... | |
| void | setRight (ValueType newRightGap) noexcept |
| Changes the right gap. More... | |
| Rectangle< ValueType > | subtractedFrom (const Rectangle< ValueType > &original) const noexcept |
| Returns a rectangle with these borders removed from it. More... | |
| void | subtractFrom (Rectangle< ValueType > &rectangle) const noexcept |
| Removes this border from a given rectangle. More... | |
| Rectangle< ValueType > | addedTo (const Rectangle< ValueType > &original) const noexcept |
| Returns a rectangle with these borders added around it. More... | |
| void | addTo (Rectangle< ValueType > &rectangle) const noexcept |
| Adds this border around a given rectangle. More... | |
| BorderSize< ValueType > | subtractedFrom (const BorderSize< ValueType > &other) const noexcept |
| Removes this border from another border. More... | |
| BorderSize< ValueType > | addedTo (const BorderSize< ValueType > &other) const noexcept |
| Adds this border to another border. More... | |
| template<typename ScalarType > | |
| BorderSize< ValueType > | multipliedBy (ScalarType scalar) const noexcept |
| Multiplies each member of the border by a scalar. More... | |
| bool | operator== (const BorderSize &other) const noexcept |
| bool | operator!= (const BorderSize &other) const noexcept |
Specifies a set of gaps to be left around the sides of a rectangle.
This is basically the size of the spaces at the top, bottom, left and right of a rectangle. It's used by various component classes to specify borders.
|
default |
Creates a null border.
All sizes are left as 0.
|
noexcept |
Creates a border with the given gaps.
|
explicitnoexcept |
Creates a border with the given gap on all sides.
|
noexcept |
Returns the gap that should be left at the top of the region.
|
noexcept |
Returns the gap that should be left at the left of the region.
|
noexcept |
Returns the gap that should be left at the bottom of the region.
|
noexcept |
Returns the gap that should be left at the right of the region.
|
noexcept |
Returns the sum of the top and bottom gaps.
|
noexcept |
Returns the sum of the left and right gaps.
|
noexcept |
Returns true if this border has no thickness along any edge.
|
noexcept |
Changes the top gap.
|
noexcept |
Changes the left gap.
|
noexcept |
Changes the bottom gap.
|
noexcept |
Changes the right gap.
|
noexcept |
Returns a rectangle with these borders removed from it.
Referenced by BorderSize< ValueType >::subtractFrom().
|
noexcept |
Removes this border from a given rectangle.
References BorderSize< ValueType >::subtractedFrom().
|
noexcept |
Returns a rectangle with these borders added around it.
Referenced by BorderSize< ValueType >::addTo().
|
noexcept |
Adds this border around a given rectangle.
References BorderSize< ValueType >::addedTo().
|
noexcept |
Removes this border from another border.
|
noexcept |
Adds this border to another border.
|
noexcept |
Multiplies each member of the border by a scalar.
|
noexcept |
|
noexcept |