xtd 0.2.0
Loading...
Searching...
No Matches
xtd::forms::flat_button_appearance Class Reference
Inheritance diagram for xtd::forms::flat_button_appearance:
xtd::object xtd::iequatable< flat_button_appearance > xtd::interface xtd::equality_operators< type_t, equatable_t >

Definition

Provides properties that specify the appearance of xtd::forms::button controls whose xtd::forms::flat_style is xtd::forms::flat_style::flat.

Header
#include <xtd/forms/flat_button_appearance>
Namespace
xtd::forms
Library
xtd.forms
Examples
border_style.cpp, calculator.cpp, and flat_button.cpp.

Public Constructors

 flat_button_appearance ()
 Initializes a new instance of the xtd::forms::flat_button_appearance class.
 

Public Properties

std::optional< xtd::drawing::colorborder_color () const noexcept
 Gets the color of the border around the button.
 
flat_button_appearanceborder_color (const xtd::drawing::color &color)
 Sets the color of the border around the button.
 
flat_button_appearanceborder_color (std::nullptr_t color)
 Resets the color of the border around the button.
 
std::optional< int32border_radius () const noexcept
 Gets a value that specifies the radius, in pixels, of the border around the button.
 
flat_button_appearanceborder_radius (int32 radius)
 Sets a value that specifies the radius, in pixels, of the border around the button.
 
flat_button_appearanceborder_radius (std::nullptr_t radius)
 Resets a value that specifies the radius, in pixels, of the border around the button.
 
std::optional< int32border_size () const noexcept
 Gets a value that specifies the size, in pixels, of the border around the button.
 
flat_button_appearanceborder_size (int32 size)
 Sets a value that specifies the size, in pixels, of the border around the button.
 
flat_button_appearanceborder_size (std::nullptr_t size)
 Resets a value that specifies the size, in pixels, of the border around the button.
 
std::optional< xtd::drawing::colorchecked_back_color () const noexcept
 Gets the color of the client area of the button when the button is checked and the mouse pointer is outside the bounds of the control.
 
flat_button_appearancechecked_back_color (const xtd::drawing::color &color)
 Sets the color of the client area of the button when the button is checked and the mouse pointer is outside the bounds of the control.
 
flat_button_appearancechecked_back_color (std::nullptr_t color)
 Resets the color of the client area of the button when the button is checked and the mouse pointer is outside the bounds of the control.
 
std::optional< xtd::drawing::colormouse_down_back_color () const noexcept
 Gets the color of the client area of the button when the mouse is pressed within the bounds of the control.
 
flat_button_appearancemouse_down_back_color (const xtd::drawing::color &color)
 Sets the color of the client area of the button when the mouse is pressed within the bounds of the control.
 
flat_button_appearancemouse_down_back_color (std::nullptr_t color)
 Resets the color of the client area of the button when the mouse is pressed within the bounds of the control.
 
std::optional< xtd::drawing::colormouse_over_back_color () const noexcept
 Gets the color of the client area of the button when the mouse pointer is within the bounds of the control.
 
flat_button_appearancemouse_over_back_color (const xtd::drawing::color &color)
 Sets the color of the client area of the button when the mouse pointer is within the bounds of the control.
 
flat_button_appearancemouse_over_back_color (std::nullptr_t color)
 Resets the color of the client area of the button when the mouse pointer is within the bounds of the control.
 

Public Methods

bool equals (const flat_button_appearance &other) const noexcept override
 
virtual bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object.
 
template<typename object_a_t , typename object_b_t >
static bool equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are considered equal.
 

Additional Inherited Members

- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object.
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type.
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance.
 
template<typename object_t >
xtd::uptr< object_t > memberwise_clone () const
 Creates a shallow copy of the current object.
 
virtual xtd::string to_string () const noexcept
 Returns a xtd::string that represents the current object.
 
- Public Member Functions inherited from xtd::iequatable< flat_button_appearance >
virtual bool equals (const flat_button_appearance &) const noexcept=0
 Indicates whether the current object is equal to another object of the same type.
 
- Static Public Member Functions inherited from xtd::object
template<typename object_a_t , typename object_b_t >
static bool equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are considered equal.
 
template<typename object_a_t , typename object_b_t >
static bool reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are the same instance.
 

Constructor & Destructor Documentation

◆ flat_button_appearance()

xtd::forms::flat_button_appearance::flat_button_appearance ( )

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

Member Function Documentation

◆ border_color() [1/3]

std::optional< xtd::drawing::color > xtd::forms::flat_button_appearance::border_color ( ) const
noexcept

Gets the color of the border around the button.

Returns
A xtd::drawing::color structure representing the color of the border around the button.

◆ border_color() [2/3]

flat_button_appearance & xtd::forms::flat_button_appearance::border_color ( const xtd::drawing::color color)

Sets the color of the border around the button.

Parameters
colorA xtd::drawing::color structure representing the color of the border around the button.
Returns
Current xtd::forms::flat_button_appearance.

◆ border_color() [3/3]

flat_button_appearance & xtd::forms::flat_button_appearance::border_color ( std::nullptr_t  color)

Resets the color of the border around the button.

Parameters
colornullptr.
Returns
Current xtd::forms::flat_button_appearance.

◆ border_radius() [1/3]

std::optional< int32 > xtd::forms::flat_button_appearance::border_radius ( ) const
noexcept

Gets a value that specifies the radius, in pixels, of the border around the button.

Returns
An int32 representing the radius, in pixels, of the border around the button.

◆ border_radius() [2/3]

flat_button_appearance & xtd::forms::flat_button_appearance::border_radius ( int32  radius)

Sets a value that specifies the radius, in pixels, of the border around the button.

Parameters
sizeAn int32 representing the radius, in pixels, of the border around the button.
Returns
Current xtd::forms::flat_button_appearance.

◆ border_radius() [3/3]

flat_button_appearance & xtd::forms::flat_button_appearance::border_radius ( std::nullptr_t  radius)

Resets a value that specifies the radius, in pixels, of the border around the button.

Parameters
sizenullptr.
Returns
Current xtd::forms::flat_button_appearance.

◆ border_size() [1/3]

std::optional< int32 > xtd::forms::flat_button_appearance::border_size ( ) const
noexcept

Gets a value that specifies the size, in pixels, of the border around the button.

Returns
An int32 representing the size, in pixels, of the border around the button.

◆ border_size() [2/3]

flat_button_appearance & xtd::forms::flat_button_appearance::border_size ( int32  size)

Sets a value that specifies the size, in pixels, of the border around the button.

Parameters
sizeAn int32 representing the size, in pixels, of the border around the button.
Returns
Current xtd::forms::flat_button_appearance.

◆ border_size() [3/3]

flat_button_appearance & xtd::forms::flat_button_appearance::border_size ( std::nullptr_t  size)

Resets a value that specifies the size, in pixels, of the border around the button.

Parameters
sizenullptr.
Returns
Current xtd::forms::flat_button_appearance.

◆ checked_back_color() [1/3]

std::optional< xtd::drawing::color > xtd::forms::flat_button_appearance::checked_back_color ( ) const
noexcept

Gets the color of the client area of the button when the button is checked and the mouse pointer is outside the bounds of the control.

Returns
A xtd::drawing::color structure representing the color of the client area of the button.
Examples
border_style.cpp.

◆ checked_back_color() [2/3]

flat_button_appearance & xtd::forms::flat_button_appearance::checked_back_color ( const xtd::drawing::color color)

Sets the color of the client area of the button when the button is checked and the mouse pointer is outside the bounds of the control.

Parameters
colorA xtd::drawing::color structure representing the color of the client area of the button.structure representing the color of the client area of the button.
Returns
Current xtd::forms::flat_button_appearance.

◆ checked_back_color() [3/3]

flat_button_appearance & xtd::forms::flat_button_appearance::checked_back_color ( std::nullptr_t  color)

Resets the color of the client area of the button when the button is checked and the mouse pointer is outside the bounds of the control.

Parameters
colornullptr.
Returns
Current flat_button_appearance.

◆ mouse_down_back_color() [1/3]

std::optional< xtd::drawing::color > xtd::forms::flat_button_appearance::mouse_down_back_color ( ) const
noexcept

Gets the color of the client area of the button when the mouse is pressed within the bounds of the control.

Returns
A xtd::drawing::color structure representing the color of the client area of the button.

◆ mouse_down_back_color() [2/3]

flat_button_appearance & xtd::forms::flat_button_appearance::mouse_down_back_color ( const xtd::drawing::color color)

Sets the color of the client area of the button when the mouse is pressed within the bounds of the control.

Parameters
colorA xtd::drawing::color structure representing the color of the client area of the button.
Returns
Current xtd::forms::flat_button_appearance.

◆ mouse_down_back_color() [3/3]

flat_button_appearance & xtd::forms::flat_button_appearance::mouse_down_back_color ( std::nullptr_t  color)

Resets the color of the client area of the button when the mouse is pressed within the bounds of the control.

Parameters
colornullptr.
Returns
Current xtd::forms::flat_button_appearance.

◆ mouse_over_back_color() [1/3]

std::optional< xtd::drawing::color > xtd::forms::flat_button_appearance::mouse_over_back_color ( ) const
noexcept

Gets the color of the client area of the button when the mouse pointer is within the bounds of the control.

Returns
A xtd::drawing::color structure representing the color of the client area of the button.

◆ mouse_over_back_color() [2/3]

flat_button_appearance & xtd::forms::flat_button_appearance::mouse_over_back_color ( const xtd::drawing::color color)

Sets the color of the client area of the button when the mouse pointer is within the bounds of the control.

Parameters
colorA xtd::drawing::color structure representing the color of the client area of the button.
Returns
Current xtd::forms::flat_button_appearance.

◆ mouse_over_back_color() [3/3]

flat_button_appearance & xtd::forms::flat_button_appearance::mouse_over_back_color ( std::nullptr_t  color)

Resets the color of the client area of the button when the mouse pointer is within the bounds of the control.

Parameters
colornullptr.
Returns
Current xtd::forms::flat_button_appearance.

◆ equals() [1/2]

virtual bool xtd::object::equals ( const object obj) const
virtualnoexcept

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.
Examples
The following code example compares the current instance with another object.
#include <xtd/console>
using namespace xtd;
auto main() -> int {
auto object1 = new_ptr<object>();
auto object2 = new_ptr<object>();
auto object3 = object2;
console::write_line(object1->equals(*object3));
console::write_line(*object1 == *object3);
object3 = object1;
console::write_line(object1->equals(*object3));
console::write_line(*object1 == *object3);
}
// This code produces the following output :
//
// false
// false
// true
// true
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10

Reimplemented from xtd::object.

◆ equals() [2/2]

template<typename object_a_t , typename object_b_t >
static bool xtd::object::equals ( const object_a_t &  object_a,
const object_b_t &  object_b 
)
inlinestaticnoexcept

Determines whether the specified object instances are considered equal.

Parameters
object_aThe first object to compare.
object_bThe second object to compare.
Returns
true if object_a is the same instance as object_b or if both are null references or if object_a(object_b) returns true. otherwise, false.
Examples
The following code example compares different objects.
#include <xtd/console>
using namespace xtd;
auto main() -> int {
string s1 = "Tom";
string s2 = "Carol";
console::write_line("object::equals(\"{0}\", \"{1}\") => {2}", s1, s2, object::equals(s1, s2));
s1 = "Tom";
s2 = "Tom";
console::write_line("object::equals(\"{0}\", \"{1}\") => {2}", s1, s2, object::equals(s1, s2));
s1 = "";
s2 = "Tom";
console::write_line("object::equals(\"{0}\", \"{1}\") => {2}", s1, s2, object::equals(s1, s2));
s1 = "Carol";
s2 = "";
console::write_line("object::equals(\"{0}\", \"{1}\") => {2}", s1, s2, object::equals(s1, s2));
s1 = "";
s2 = "";
console::write_line("object::equals(\"{0}\", \"{1}\") => {2}", s1, s2, object::equals(s1, s2));
}
// This code produces the following output :
//
// object::equals("Tom", "Carol") => false
// object::equals("Tom", "Tom") => true
// object::equals("", "Tom") => false
// object::equals("Carol", "") => false
// object::equals("", "") => true
virtual bool equals(const object &obj) const noexcept
Determines whether the specified object is equal to the current object.

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