LMMS
Loading...
Searching...
No Matches
juce::BorderSize< ValueType > Class Template Reference

#include <juce_BorderSize.h>

Public Member Functions

 BorderSize ()=default
 BorderSize (ValueType topGap, ValueType leftGap, ValueType bottomGap, ValueType rightGap) noexcept
 BorderSize (ValueType allGaps) noexcept
ValueType getTop () const noexcept
ValueType getLeft () const noexcept
ValueType getBottom () const noexcept
ValueType getRight () const noexcept
ValueType getTopAndBottom () const noexcept
ValueType getLeftAndRight () const noexcept
bool isEmpty () const noexcept
void setTop (ValueType newTopGap) noexcept
void setLeft (ValueType newLeftGap) noexcept
void setBottom (ValueType newBottomGap) noexcept
void setRight (ValueType newRightGap) noexcept
Rectangle< ValueType > subtractedFrom (const Rectangle< ValueType > &original) const noexcept
void subtractFrom (Rectangle< ValueType > &rectangle) const noexcept
Rectangle< ValueType > addedTo (const Rectangle< ValueType > &original) const noexcept
void addTo (Rectangle< ValueType > &rectangle) const noexcept
BorderSize< ValueType > subtractedFrom (const BorderSize< ValueType > &other) const noexcept
BorderSize< ValueType > addedTo (const BorderSize< ValueType > &other) const noexcept
template<typename ScalarType>
BorderSize< ValueType > multipliedBy (ScalarType scalar) const noexcept
bool operator== (const BorderSize &other) const noexcept
bool operator!= (const BorderSize &other) const noexcept

Private Member Functions

auto tie () const

Private Attributes

ValueType top {}
ValueType left {}
ValueType bottom {}
ValueType right {}

Detailed Description

template<typename ValueType>
class juce::BorderSize< ValueType >

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.

See also
Rectangle

@tags{Graphics}

Constructor & Destructor Documentation

◆ BorderSize() [1/3]

template<typename ValueType>
juce::BorderSize< ValueType >::BorderSize ( )
default

Creates a null border. All sizes are left as 0.

◆ BorderSize() [2/3]

template<typename ValueType>
juce::BorderSize< ValueType >::BorderSize ( ValueType topGap,
ValueType leftGap,
ValueType bottomGap,
ValueType rightGap )
inlinenoexcept

Creates a border with the given gaps.

◆ BorderSize() [3/3]

template<typename ValueType>
juce::BorderSize< ValueType >::BorderSize ( ValueType allGaps)
inlineexplicitnoexcept

Creates a border with the given gap on all sides.

Member Function Documentation

◆ addedTo() [1/2]

template<typename ValueType>
BorderSize< ValueType > juce::BorderSize< ValueType >::addedTo ( const BorderSize< ValueType > & other) const
inlinenoexcept

Adds this border to another border.

◆ addedTo() [2/2]

template<typename ValueType>
Rectangle< ValueType > juce::BorderSize< ValueType >::addedTo ( const Rectangle< ValueType > & original) const
inlinenoexcept

Returns a rectangle with these borders added around it.

◆ addTo()

template<typename ValueType>
void juce::BorderSize< ValueType >::addTo ( Rectangle< ValueType > & rectangle) const
inlinenoexcept

Adds this border around a given rectangle.

◆ getBottom()

template<typename ValueType>
ValueType juce::BorderSize< ValueType >::getBottom ( ) const
inlinenoexcept

Returns the gap that should be left at the bottom of the region.

◆ getLeft()

template<typename ValueType>
ValueType juce::BorderSize< ValueType >::getLeft ( ) const
inlinenoexcept

Returns the gap that should be left at the left of the region.

◆ getLeftAndRight()

template<typename ValueType>
ValueType juce::BorderSize< ValueType >::getLeftAndRight ( ) const
inlinenoexcept

Returns the sum of the left and right gaps.

◆ getRight()

template<typename ValueType>
ValueType juce::BorderSize< ValueType >::getRight ( ) const
inlinenoexcept

Returns the gap that should be left at the right of the region.

◆ getTop()

template<typename ValueType>
ValueType juce::BorderSize< ValueType >::getTop ( ) const
inlinenoexcept

Returns the gap that should be left at the top of the region.

◆ getTopAndBottom()

template<typename ValueType>
ValueType juce::BorderSize< ValueType >::getTopAndBottom ( ) const
inlinenoexcept

Returns the sum of the top and bottom gaps.

◆ isEmpty()

template<typename ValueType>
bool juce::BorderSize< ValueType >::isEmpty ( ) const
inlinenoexcept

Returns true if this border has no thickness along any edge.

◆ multipliedBy()

template<typename ValueType>
template<typename ScalarType>
BorderSize< ValueType > juce::BorderSize< ValueType >::multipliedBy ( ScalarType scalar) const
inlinenoexcept

Multiplies each member of the border by a scalar.

◆ operator!=()

template<typename ValueType>
bool juce::BorderSize< ValueType >::operator!= ( const BorderSize< ValueType > & other) const
inlinenoexcept

◆ operator==()

template<typename ValueType>
bool juce::BorderSize< ValueType >::operator== ( const BorderSize< ValueType > & other) const
inlinenoexcept

◆ setBottom()

template<typename ValueType>
void juce::BorderSize< ValueType >::setBottom ( ValueType newBottomGap)
inlinenoexcept

Changes the bottom gap.

◆ setLeft()

template<typename ValueType>
void juce::BorderSize< ValueType >::setLeft ( ValueType newLeftGap)
inlinenoexcept

Changes the left gap.

◆ setRight()

template<typename ValueType>
void juce::BorderSize< ValueType >::setRight ( ValueType newRightGap)
inlinenoexcept

Changes the right gap.

◆ setTop()

template<typename ValueType>
void juce::BorderSize< ValueType >::setTop ( ValueType newTopGap)
inlinenoexcept

Changes the top gap.

◆ subtractedFrom() [1/2]

template<typename ValueType>
BorderSize< ValueType > juce::BorderSize< ValueType >::subtractedFrom ( const BorderSize< ValueType > & other) const
inlinenoexcept

Removes this border from another border.

◆ subtractedFrom() [2/2]

template<typename ValueType>
Rectangle< ValueType > juce::BorderSize< ValueType >::subtractedFrom ( const Rectangle< ValueType > & original) const
inlinenoexcept

Returns a rectangle with these borders removed from it.

◆ subtractFrom()

template<typename ValueType>
void juce::BorderSize< ValueType >::subtractFrom ( Rectangle< ValueType > & rectangle) const
inlinenoexcept

Removes this border from a given rectangle.

◆ tie()

template<typename ValueType>
auto juce::BorderSize< ValueType >::tie ( ) const
inlineprivate

Member Data Documentation

◆ bottom

template<typename ValueType>
ValueType juce::BorderSize< ValueType >::bottom {}
private

◆ left

template<typename ValueType>
ValueType juce::BorderSize< ValueType >::left {}
private

◆ right

template<typename ValueType>
ValueType juce::BorderSize< ValueType >::right {}
private

◆ top

template<typename ValueType>
ValueType juce::BorderSize< ValueType >::top {}
private

The documentation for this class was generated from the following file: