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. | |
| BorderSize (ValueType allGaps) noexcept | |
| Creates a border with the given gap on all sides. | |
| BorderSize (ValueType topGap, ValueType leftGap, ValueType bottomGap, ValueType rightGap) noexcept | |
| Creates a border with the given gaps. | |
| BorderSize< ValueType > | addedTo (const BorderSize< ValueType > &other) const noexcept |
| Adds this border to another border. | |
| Rectangle< ValueType > | addedTo (const Rectangle< ValueType > &original) const noexcept |
| Returns a rectangle with these borders added around it. | |
| void | addTo (Rectangle< ValueType > &rectangle) const noexcept |
| Adds this border around a given rectangle. | |
| ValueType | getBottom () const noexcept |
| Returns the gap that should be left at the bottom of the region. | |
| ValueType | getLeft () const noexcept |
| Returns the gap that should be left at the left of the region. | |
| ValueType | getLeftAndRight () const noexcept |
| Returns the sum of the left and right gaps. | |
| ValueType | getRight () const noexcept |
| Returns the gap that should be left at the right of the region. | |
| ValueType | getTop () const noexcept |
| Returns the gap that should be left at the top of the region. | |
| ValueType | getTopAndBottom () const noexcept |
| Returns the sum of the top and bottom gaps. | |
| bool | isEmpty () const noexcept |
| Returns true if this border has no thickness along any edge. | |
| template<typename ScalarType > | |
| BorderSize< ValueType > | multipliedBy (ScalarType scalar) const noexcept |
| Multiplies each member of the border by a scalar. | |
| bool | operator!= (const BorderSize &other) const noexcept |
| bool | operator== (const BorderSize &other) const noexcept |
| void | setBottom (ValueType newBottomGap) noexcept |
| Changes the bottom gap. | |
| void | setLeft (ValueType newLeftGap) noexcept |
| Changes the left gap. | |
| void | setRight (ValueType newRightGap) noexcept |
| Changes the right gap. | |
| void | setTop (ValueType newTopGap) noexcept |
| Changes the top gap. | |
| BorderSize< ValueType > | subtractedFrom (const BorderSize< ValueType > &other) const noexcept |
| Removes this border from another border. | |
| Rectangle< ValueType > | subtractedFrom (const Rectangle< ValueType > &original) const noexcept |
| Returns a rectangle with these borders removed from it. | |
| void | subtractFrom (Rectangle< ValueType > &rectangle) const noexcept |
| Removes this border from a given rectangle. | |
Private Member Functions | |
| auto | tie () const |
Private Attributes | |
| ValueType | bottom {} |
| ValueType | left {} |
| ValueType | right {} |
| ValueType | top {} |
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.
@tags{Graphics}
|
default |
Creates a null border.
All sizes are left as 0.
|
inlinenoexcept |
Creates a border with the given gaps.
|
inlineexplicitnoexcept |
Creates a border with the given gap on all sides.
|
inlinenoexcept |
Adds this border to another border.
References juce::BorderSize< ValueType >::bottom, juce::BorderSize< ValueType >::left, juce::BorderSize< ValueType >::right, and juce::BorderSize< ValueType >::top.
|
inlinenoexcept |
Returns a rectangle with these borders added around it.
References juce::BorderSize< ValueType >::bottom, juce::BorderSize< ValueType >::left, juce::BorderSize< ValueType >::right, and juce::BorderSize< ValueType >::top.
Referenced by juce::BorderSize< ValueType >::addTo(), and juce::StandaloneFilterWindow::MainContentComponent::computeBorder().
|
inlinenoexcept |
Adds this border around a given rectangle.
References juce::BorderSize< ValueType >::addedTo().
|
inlinenoexcept |
Returns the gap that should be left at the bottom of the region.
References juce::BorderSize< ValueType >::bottom.
|
inlinenoexcept |
Returns the gap that should be left at the left of the region.
References juce::BorderSize< ValueType >::left.
|
inlinenoexcept |
Returns the sum of the left and right gaps.
References juce::BorderSize< ValueType >::left, and juce::BorderSize< ValueType >::right.
|
inlinenoexcept |
Returns the gap that should be left at the right of the region.
References juce::BorderSize< ValueType >::right.
|
inlinenoexcept |
Returns the gap that should be left at the top of the region.
References juce::BorderSize< ValueType >::top.
|
inlinenoexcept |
Returns the sum of the top and bottom gaps.
References juce::BorderSize< ValueType >::bottom, and juce::BorderSize< ValueType >::top.
|
inlinenoexcept |
Returns true if this border has no thickness along any edge.
References juce::BorderSize< ValueType >::bottom, juce::BorderSize< ValueType >::left, juce::BorderSize< ValueType >::right, and juce::BorderSize< ValueType >::top.
|
inlinenoexcept |
Multiplies each member of the border by a scalar.
References juce::BorderSize< ValueType >::bottom, juce::BorderSize< ValueType >::left, juce::BorderSize< ValueType >::right, and juce::BorderSize< ValueType >::top.
|
inlinenoexcept |
References juce::BorderSize< ValueType >::tie().
|
inlinenoexcept |
References juce::BorderSize< ValueType >::tie().
|
inlinenoexcept |
Changes the bottom gap.
References juce::BorderSize< ValueType >::bottom.
|
inlinenoexcept |
Changes the left gap.
References juce::BorderSize< ValueType >::left.
|
inlinenoexcept |
Changes the right gap.
References juce::BorderSize< ValueType >::right.
|
inlinenoexcept |
Changes the top gap.
References juce::BorderSize< ValueType >::top.
|
inlinenoexcept |
Removes this border from another border.
References juce::BorderSize< ValueType >::bottom, juce::BorderSize< ValueType >::left, juce::BorderSize< ValueType >::right, and juce::BorderSize< ValueType >::top.
|
inlinenoexcept |
Returns a rectangle with these borders removed from it.
References juce::BorderSize< ValueType >::bottom, juce::BorderSize< ValueType >::left, juce::BorderSize< ValueType >::right, and juce::BorderSize< ValueType >::top.
Referenced by juce::BorderSize< ValueType >::subtractFrom().
|
inlinenoexcept |
Removes this border from a given rectangle.
References juce::BorderSize< ValueType >::subtractedFrom().
|
inlineprivate |
|
private |
Referenced by juce::BorderSize< ValueType >::addedTo(), juce::BorderSize< ValueType >::addedTo(), juce::BorderSize< ValueType >::getBottom(), juce::BorderSize< ValueType >::getTopAndBottom(), juce::BorderSize< ValueType >::isEmpty(), juce::BorderSize< ValueType >::multipliedBy(), juce::BorderSize< ValueType >::setBottom(), juce::BorderSize< ValueType >::subtractedFrom(), juce::BorderSize< ValueType >::subtractedFrom(), and juce::BorderSize< ValueType >::tie().
|
private |
Referenced by juce::BorderSize< ValueType >::addedTo(), juce::BorderSize< ValueType >::addedTo(), juce::BorderSize< ValueType >::getLeft(), juce::BorderSize< ValueType >::getLeftAndRight(), juce::BorderSize< ValueType >::isEmpty(), juce::BorderSize< ValueType >::multipliedBy(), juce::BorderSize< ValueType >::setLeft(), juce::BorderSize< ValueType >::subtractedFrom(), juce::BorderSize< ValueType >::subtractedFrom(), and juce::BorderSize< ValueType >::tie().
|
private |
Referenced by juce::BorderSize< ValueType >::addedTo(), juce::BorderSize< ValueType >::addedTo(), juce::BorderSize< ValueType >::getLeftAndRight(), juce::BorderSize< ValueType >::getRight(), juce::BorderSize< ValueType >::isEmpty(), juce::BorderSize< ValueType >::multipliedBy(), juce::BorderSize< ValueType >::setRight(), juce::BorderSize< ValueType >::subtractedFrom(), juce::BorderSize< ValueType >::subtractedFrom(), and juce::BorderSize< ValueType >::tie().
|
private |
Referenced by juce::BorderSize< ValueType >::addedTo(), juce::BorderSize< ValueType >::addedTo(), juce::BorderSize< ValueType >::getTop(), juce::BorderSize< ValueType >::getTopAndBottom(), juce::BorderSize< ValueType >::isEmpty(), juce::BorderSize< ValueType >::multipliedBy(), juce::BorderSize< ValueType >::setTop(), juce::BorderSize< ValueType >::subtractedFrom(), juce::BorderSize< ValueType >::subtractedFrom(), and juce::BorderSize< ValueType >::tie().