xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Go to the documentation of this file.
1 #pragma once
5 #include <optional>
6 #include <xtd/object.h>
7 #include <xtd/drawing/color.h>
8 #include "theme_colors.h"
11 namespace xtd {
13  namespace forms {
20  class flat_button_appearance : public object {
21  public:
26  flat_button_appearance() = default;
32  flat_button_appearance& operator=(const flat_button_appearance&) = default;
33  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_;}
34  bool operator!=(const flat_button_appearance& other) const {return !operator==(other);}
42  std::optional<xtd::drawing::color> border_color() const;
50  flat_button_appearance& border_color(nullptr_t color);
54  int32_t border_size() const;
62  std::optional<xtd::drawing::color> checked_back_color() const;
74  std::optional<xtd::drawing::color> mouse_down_back_color() const;
86  std::optional<xtd::drawing::color> mouse_over_back_color() const;
97  private:
98  std::optional<xtd::drawing::color> border_color_;
99  int32_t border_size_ = 1;
100  std::optional<xtd::drawing::color> checked_back_color_;
101  std::optional<xtd::drawing::color> mouse_down_back_color_;
102  std::optional<xtd::drawing::color> mouse_over_back_color_;
103  };
104  }
105 }
Contains xtd::forms::theme_colors class.
int32_t border_size() const
Gets a value that specifies the size, in pixels, of the border around the button. ...
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Represents an ARGB (alpha, red, green, blue) color.
Definition: color.h:39
std::optional< xtd::drawing::color > border_color() const
Gets the color of the border around the button.
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...
The operating system is other.
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...
Contains xtd::drawing::color class.
Contains xtd::object class.
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes...
Definition: object.h:27
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
Provides properties that specify the appearance of xtd::forms::button controls whose xtd::forms::flat...
Definition: flat_button_appearance.h:20
Initializes a new instance of the xtd::forms::flat_button_appearance class.
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...
size_t size
Represents a size of any object in bytes.
Definition: types.h:171