xtd 1.0.0
Loading...
Searching...
No Matches
xtd::forms::shadow Class Reference
Inheritance diagram for xtd::forms::shadow:
xtd::object xtd::iequatable< shadow > xtd::interface xtd::extensions::equality_operators< shadow, iequatable< shadow > >

Definition

Represents a shadow within a xtd::forms::shadow_label control.

Header
#include <xtd/forms/shadow>
Namespace
xtd::forms
Library
xtd.forms
Remarks
The xtd::forms::shadow_label::shadow class defines the properties of a shadow within a xtd::forms::shadow_label control. You can use these properties to provide data to the xtd::forms::shadow_label::shadow_clicked event of the xtd::forms::shadow_label control to perform tasks when the shadow is clicked in the control. The xtd::forms::shadow_label::shadow_data property enables you to define information that the xtd::forms::shadow_label::shadow_clicked event can use to display a URL within your web browser or to open a file.
In addition to information related to the shadow, the properties of the xtd::forms::shadow_label::shadow class also help define the text of the xtd::forms::shadow_label::lLink and its display state. The xtd::forms::shadow_label::start and xtd::forms::shadow_label::length properties define the location and length of text from the text of the xtd::forms::shadow_label control to display as a shadow. The xtd::forms::shadow_label::enabled property allows you to display the shadow as a disabled shadow, and the xtd::forms::shadow_label::visited property can alert the user that they already visited the specified shadow in the current instance of the xtd::forms::shadow_label.
You can display multiple shadows in a single xtd::forms::shadow_label control. Each xtd::forms::shadow_label::shadow is added into the xtd::forms::shadow_label::shadow_collection associated with the xtd::forms::shadow_label control. To obtain the collection of shadows defined in a xtd::forms::shadow_label control, use the xtd::forms::shadow_label::shadows property.

Public Constructors

 shadow ()
 Initializes a new instance of the xtd::forms::shadow class.
 shadow (xtd::int32 x, xtd::int32 y)
 Initializes a new instance of the xtd::forms::shadow class with the specified offset x, and offset y.
 shadow (xtd::int32 x, xtd::int32 y, xtd::int32 radius)
 Initializes a new instance of the xtd::forms::shadow class with the specified offset x, offset y, and radius.
 shadow (xtd::int32 x, xtd::int32 y, const xtd::drawing::color &color)
 Initializes a new instance of the xtd::forms::shadow class with the specified offset x, offset y and color.
 shadow (xtd::int32 x, xtd::int32 y, xtd::int32 radius, const xtd::drawing::color &color)
 Initializes a new instance of the xtd::forms::shadow class with the specified offset x, offset y, and color.
 shadow (const xtd::drawing::point &offset)
 Initializes a new instance of the xtd::forms::shadow class with the specified offset point.
 shadow (const xtd::drawing::point &offset, xtd::int32 radius)
 Initializes a new instance of the xtd::forms::shadow class with the specified offset point, and radius.
 shadow (const xtd::drawing::point &offset, const xtd::drawing::color &color)
 Initializes a new instance of the xtd::forms::shadow class with the specified offset point, and color.
 shadow (const xtd::drawing::point &offset, xtd::int32 radius, const xtd::drawing::color &color)
 Initializes a new instance of the xtd::forms::shadow class with the specified offset point, radius, and color.

Public Properties

auto color () const noexcept -> const xtd::drawing::color &
 Gets the shadow color.
auto color (const xtd::drawing::color &value) noexcept -> shadow &
 Sets the shadow color.
auto offset () const noexcept -> const xtd::drawing::point &
 Gets the shadow offset in pixels.
auto offset (const xtd::drawing::point &value) noexcept -> shadow &
 Sets the shadow offset point in pixels.
auto radius () const noexcept -> xtd::int32
 Gets the shadow blurring radius in pixels.
auto radius (xtd::int32 value) noexcept -> shadow &
 Sets the shadow blurring radius in pixels.
auto x () const noexcept -> xtd::int32
 Gets the shadow offset x in pixels.
auto x (xtd::int32 value) noexcept -> shadow &
 Sets the shadow offset x in pixels.
auto y () const noexcept -> xtd::int32
 Gets the shadow offset y in pixels.
auto y (xtd::int32 value) noexcept -> shadow &
 Sets the shadow offset y in pixels.

Public Methods

auto equals (const xtd::object &obj) const noexcept -> bool override
 Determines whether the specified object is equal to the current object.
auto equals (const shadow &other) const noexcept -> bool override
 Determines whether the specified object is equal to the current object.
auto get_hash_code () const noexcept -> xtd::usize override
 Serves as a hash function for a particular type.

Additional Inherited Members

 object ()=default
 Create a new instance of the ultimate base class object.
virtual auto get_type () const noexcept -> type_object
 Gets the type of the current instance.
template<typename object_t>
auto memberwise_clone () const -> xtd::unique_ptr_object< object_t >
 Creates a shallow copy of the current object.
virtual auto to_string () const -> xtd::string
 Returns a xtd::string that represents the current object.
virtual auto equals (const shadow &) const noexcept -> bool=0
 Indicates whether the current object is equal to another object of the same type.
template<typename object_a_t, typename object_b_t>
static auto equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool
 Determines whether the specified object instances are considered equal.
template<typename object_a_t, typename object_b_t>
static auto reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool
 Determines whether the specified object instances are the same instance.

Constructor & Destructor Documentation

◆ shadow() [1/9]

xtd::forms::shadow::shadow ( )

Initializes a new instance of the xtd::forms::shadow class.

Remarks
When you create an instance of xtd::forms::shadow, the following read/write properties are set to initial values.
Property Initial Value
color xtd::application::style_sheet().system_colors().shadow_text()
offset x 2
offset y 2
radius 0

◆ shadow() [2/9]

xtd::forms::shadow::shadow ( xtd::int32 x,
xtd::int32 y )

Initializes a new instance of the xtd::forms::shadow class with the specified offset x, and offset y.

Parameters
xThe shadow offset x in pixels.
yThe shadow offset y in pixels.

◆ shadow() [3/9]

xtd::forms::shadow::shadow ( xtd::int32 x,
xtd::int32 y,
xtd::int32 radius )

Initializes a new instance of the xtd::forms::shadow class with the specified offset x, offset y, and radius.

Parameters
xThe shadow offset x in pixels.
yThe shadow offset y in pixels.
radiusThe shadow blurring radius.

◆ shadow() [4/9]

xtd::forms::shadow::shadow ( xtd::int32 x,
xtd::int32 y,
const xtd::drawing::color & color )

Initializes a new instance of the xtd::forms::shadow class with the specified offset x, offset y and color.

Parameters
xThe shadow offset x in pixels.
yThe shadow offset y in pixels.

◆ shadow() [5/9]

xtd::forms::shadow::shadow ( xtd::int32 x,
xtd::int32 y,
xtd::int32 radius,
const xtd::drawing::color & color )

Initializes a new instance of the xtd::forms::shadow class with the specified offset x, offset y, and color.

Parameters
xThe shadow offset x in pixels.
yThe shadow offset y in pixels.
radiusThe shadow blurring radius.

◆ shadow() [6/9]

xtd::forms::shadow::shadow ( const xtd::drawing::point & offset)
explicit

Initializes a new instance of the xtd::forms::shadow class with the specified offset point.

Parameters
offsetThe shadow offset point in pixels.

◆ shadow() [7/9]

xtd::forms::shadow::shadow ( const xtd::drawing::point & offset,
xtd::int32 radius )

Initializes a new instance of the xtd::forms::shadow class with the specified offset point, and radius.

Parameters
offsetThe shadow offset point in pixels.
radiusThe shadow blurring radius.

◆ shadow() [8/9]

xtd::forms::shadow::shadow ( const xtd::drawing::point & offset,
const xtd::drawing::color & color )

Initializes a new instance of the xtd::forms::shadow class with the specified offset point, and color.

Parameters
offsetThe shadow offset point in pixels.
colorThe shadow color.

◆ shadow() [9/9]

xtd::forms::shadow::shadow ( const xtd::drawing::point & offset,
xtd::int32 radius,
const xtd::drawing::color & color )

Initializes a new instance of the xtd::forms::shadow class with the specified offset point, radius, and color.

Parameters
offsetThe shadow offset point in pixels.
radiusThe shadow blurring radius.
colorThe shadow color.

Member Function Documentation

◆ color() [1/2]

auto xtd::forms::shadow::color ( ) const -> const xtd::drawing::color &
nodiscardnoexcept

Gets the shadow color.

Returns
The shadow color.

◆ color() [2/2]

auto xtd::forms::shadow::color ( const xtd::drawing::color & value) -> shadow &
noexcept

Sets the shadow color.

Parameters
valueThe shadow color.
Returns
This current instance.

◆ offset() [1/2]

auto xtd::forms::shadow::offset ( ) const -> const xtd::drawing::point &
nodiscardnoexcept

Gets the shadow offset in pixels.

Returns
The shadow offset.

◆ offset() [2/2]

auto xtd::forms::shadow::offset ( const xtd::drawing::point & value) -> shadow &
noexcept

Sets the shadow offset point in pixels.

Parameters
valueThe shadow offset point.
Returns
This current instance.

◆ radius() [1/2]

auto xtd::forms::shadow::radius ( ) const -> xtd::int32
nodiscardnoexcept

Gets the shadow blurring radius in pixels.

Returns
The shadow blurring radius.

◆ radius() [2/2]

auto xtd::forms::shadow::radius ( xtd::int32 value) -> shadow &
noexcept

Sets the shadow blurring radius in pixels.

Parameters
valueThe shadow blurring radius.
Returns
This current instance.

◆ x() [1/2]

auto xtd::forms::shadow::x ( ) const -> xtd::int32
nodiscardnoexcept

Gets the shadow offset x in pixels.

Returns
The shadow offset x.

◆ x() [2/2]

auto xtd::forms::shadow::x ( xtd::int32 value) -> shadow &
noexcept

Sets the shadow offset x in pixels.

Parameters
valueThe shadow offset x.
Returns
This current instance.

◆ y() [1/2]

auto xtd::forms::shadow::y ( ) const -> xtd::int32
nodiscardnoexcept

Gets the shadow offset y in pixels.

Returns
The shadow offset y.

◆ y() [2/2]

auto xtd::forms::shadow::y ( xtd::int32 value) -> shadow &
noexcept

Sets the shadow offset y in pixels.

Parameters
valueThe shadow offset y.
Returns
This current instance.

◆ equals() [1/2]

auto xtd::forms::shadow::equals ( const xtd::object & obj) const -> bool
nodiscardoverridevirtualnoexcept

Determines whether the specified object is equal to the current object.

Parameters
objThe object to compare with the current object.
Returns
true if the specified object is equal to the current object. otherwise, false.

Reimplemented from xtd::object.

◆ equals() [2/2]

auto xtd::forms::shadow::equals ( const shadow & other) const -> bool
nodiscardoverridenoexcept

Determines whether the specified object is equal to the current object.

Parameters
otherThe object to compare with the current object.
Returns
true if the specified object is equal to the current object. otherwise, false.

◆ get_hash_code()

auto xtd::forms::shadow::get_hash_code ( ) const -> xtd::usize
nodiscardoverridevirtualnoexcept

Serves as a hash function for a particular type.

Returns
A hash code for the current object.

Reimplemented from xtd::object.


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