Loading...
Searching...
No Matches
ComponentPeer::OptionalBorderSize Class Referencefinal

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

Public Member Functions

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

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]

ComponentPeer::OptionalBorderSize::OptionalBorderSize ( )

Default constructor.

Creates an invalid object.

◆ OptionalBorderSize() [2/2]

ComponentPeer::OptionalBorderSize::OptionalBorderSize ( BorderSize< int > size)
explicit

Constructor.

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

Member Function Documentation

◆ operator bool()

ComponentPeer::OptionalBorderSize::operator bool ( ) const
explicitnoexcept

Returns true if a valid value has been provided.

◆ operator*()

const auto & ComponentPeer::OptionalBorderSize::operator* ( ) const
noexcept

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 * ComponentPeer::OptionalBorderSize::operator-> ( ) const
noexcept

Returns a pointer to the value.

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

References jassert.

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram