JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::ComponentPeer::OptionalBorderSize Class Referencefinal

Represents the window borders around a window component. More...

#include <juce_ComponentPeer.h>

Collaboration diagram for juce::ComponentPeer::OptionalBorderSize:

Public Member Functions

 OptionalBorderSize ()
 Default constructor. More...
 
 OptionalBorderSize (BorderSize< int > size)
 Constructor. More...
 
 operator bool () const noexcept
 Returns true if a valid value has been provided. More...
 
const auto & operator* () const noexcept
 Returns a reference to the value. More...
 
const auto * operator-> () const noexcept
 Returns a pointer to the value. More...
 

Private Attributes

BorderSize< intborderSize
 
bool valid
 

Detailed Description

Represents the window borders around a window component.

You must use operator bool() to evaluate the validity of the object before accessing its value.

Returned by getFrameSizeIfPresent(). A missing value may be returned on Linux for a short time after window creation.

Constructor & Destructor Documentation

◆ OptionalBorderSize() [1/2]

juce::ComponentPeer::OptionalBorderSize::OptionalBorderSize ( )
inline

Default constructor.

Creates an invalid object.

◆ OptionalBorderSize() [2/2]

juce::ComponentPeer::OptionalBorderSize::OptionalBorderSize ( BorderSize< int size)
inlineexplicit

Constructor.

Creates a valid object containing the provided BorderSize<int>.

Member Function Documentation

◆ operator bool()

juce::ComponentPeer::OptionalBorderSize::operator bool ( ) const
inlineexplicitnoexcept

Returns true if a valid value has been provided.

◆ operator*()

const auto& juce::ComponentPeer::OptionalBorderSize::operator* ( ) const
inlinenoexcept

Returns a reference to the value.

You must not call this function on an invalid object. Use operator bool() to determine validity.

References jassert.

◆ operator->()

const auto* juce::ComponentPeer::OptionalBorderSize::operator-> ( ) const
inlinenoexcept

Returns a pointer to the value.

You must not call this function on an invalid object. Use operator bool() to determine validity.

References jassert.

Member Data Documentation

◆ borderSize

BorderSize<int> juce::ComponentPeer::OptionalBorderSize::borderSize
private

◆ valid

bool juce::ComponentPeer::OptionalBorderSize::valid
private

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