xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
flat_button_appearance.h
Go to the documentation of this file.
1
4#pragma once
5#include <optional>
6#include <xtd/object.h>
7#include <xtd/drawing/color.h>
8#include "theme_colors.h"
9
11namespace xtd {
13 namespace forms {
21 public:
27 flat_button_appearance& operator=(const flat_button_appearance&) = default;
28 bool operator==(const flat_button_appearance& other) const {return border_color_ == other.border_color_ && border_size_ == other.border_size_ && checked_back_color_ == other.checked_back_color_ && mouse_down_back_color_ == other.mouse_down_back_color_ && mouse_over_back_color_ == other.mouse_over_back_color_;}
29 bool operator!=(const flat_button_appearance& other) const {return !operator==(other);}
31
34 std::optional<xtd::drawing::color> border_color() const;
43
46 int32_t border_size() const;
51
54 std::optional<xtd::drawing::color> checked_back_color() const;
63
66 std::optional<xtd::drawing::color> mouse_down_back_color() const;
75
78 std::optional<xtd::drawing::color> mouse_over_back_color() const;
87
88 private:
89 std::optional<xtd::drawing::color> border_color_;
90 int32_t border_size_ = 1;
91 std::optional<xtd::drawing::color> checked_back_color_;
92 std::optional<xtd::drawing::color> mouse_down_back_color_;
93 std::optional<xtd::drawing::color> mouse_over_back_color_;
94 };
95 }
96}
97
Represents an ARGB (alpha, red, green, blue) color.
Definition: color.h:39
Provides properties that specify the appearance of xtd::forms::button controls whose xtd::forms::flat...
Definition: flat_button_appearance.h:20
flat_button_appearance & checked_back_color(nullptr_t color)
Resets the color of the client area of the button when the button is checked and the mouse pointer is...
std::optional< xtd::drawing::color > checked_back_color() const
Gets the color of the client area of the button when the button is checked and the mouse pointer is o...
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 o...
flat_button_appearance & mouse_down_back_color(nullptr_t color)
Resets the color of the client area of the button when the mouse is pressed within the bounds of the ...
std::optional< xtd::drawing::color > mouse_over_back_color() const
Gets the color of the client area of the button when the mouse pointer is within the bounds of the co...
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 co...
std::optional< xtd::drawing::color > border_color() const
Gets the color of the border around the button.
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 co...
std::optional< xtd::drawing::color > mouse_down_back_color() const
Gets the color of the client area of the button when the mouse is pressed within the bounds of the co...
int32_t border_size() const
Gets a value that specifies the size, in pixels, of the border around the button.
flat_button_appearance & border_color(nullptr_t color)
Resets the color of the border around the button.
flat_button_appearance()=default
Initializes a new instance of the xtd::forms::flat_button_appearance class.
flat_button_appearance & border_size(int32_t size)
Sets a value that specifies the size, in pixels, of the border around the button.
flat_button_appearance & border_color(const xtd::drawing::color &color)
Sets the color of the border around the button.
flat_button_appearance & mouse_over_back_color(nullptr_t color)
Resets the color of the client area of the button when the mouse pointer is within the bounds of the ...
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition: object.h:26
Contains xtd::drawing::color class.
size_t size
Represents a size of any object in bytes.
Definition: types.h:171
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17
Contains xtd::object class.
Contains xtd::forms::theme_colors class.