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 (const BorderSize &)=default | |
Creates a copy of another 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... | |
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... | |
ValueType | getBottom () const noexcept |
Returns the gap that should be left at the bottom of the region. More... | |
ValueType | getLeft () const noexcept |
Returns the gap that should be left at the left of the region. More... | |
ValueType | getLeftAndRight () const noexcept |
Returns the sum of the left and right gaps. More... | |
ValueType | getRight () const noexcept |
Returns the gap that should be left at the right of the region. More... | |
ValueType | getTop () const noexcept |
Returns the gap that should be left at the top of the region. More... | |
ValueType | getTopAndBottom () const noexcept |
Returns the sum of the top and bottom gaps. More... | |
bool | isEmpty () const noexcept |
Returns true if this border has no thickness along any edge. More... | |
bool | operator!= (const BorderSize &other) const noexcept |
bool | operator== (const BorderSize &other) const noexcept |
void | setBottom (ValueType newBottomGap) noexcept |
Changes the bottom gap. More... | |
void | setLeft (ValueType newLeftGap) noexcept |
Changes the left gap. More... | |
void | setRight (ValueType newRightGap) noexcept |
Changes the right gap. More... | |
void | setTop (ValueType newTopGap) noexcept |
Changes the top 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... | |
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.
{Graphics}
|
default |
Creates a null border.
All sizes are left as 0.
|
default |
Creates a copy of another border.
|
inlinenoexcept |
Creates a border with the given gaps.
|
inlineexplicitnoexcept |
Creates a border with the given gap on all sides.
|
inlinenoexcept |
Returns a rectangle with these borders added around it.
Referenced by juce::BorderSize< int >::addTo().
|
inlinenoexcept |
Adds this border around a given rectangle.
|
inlinenoexcept |
Returns the gap that should be left at the bottom of the region.
|
inlinenoexcept |
Returns the gap that should be left at the left of the region.
|
inlinenoexcept |
Returns the sum of the left and right gaps.
|
inlinenoexcept |
Returns the gap that should be left at the right of the region.
|
inlinenoexcept |
Returns the gap that should be left at the top of the region.
|
inlinenoexcept |
Returns the sum of the top and bottom gaps.
|
inlinenoexcept |
Returns true if this border has no thickness along any edge.
|
inlinenoexcept |
|
inlinenoexcept |
Referenced by juce::BorderSize< int >::operator!=().
|
inlinenoexcept |
Changes the bottom gap.
|
inlinenoexcept |
Changes the left gap.
|
inlinenoexcept |
Changes the right gap.
|
inlinenoexcept |
Changes the top gap.
|
inlinenoexcept |
Returns a rectangle with these borders removed from it.
Referenced by juce::BorderSize< int >::subtractFrom().
|
inlinenoexcept |
Removes this border from a given rectangle.
|
private |
|
private |
|
private |
|
private |