aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/controls/button.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-03-19 19:11:04 +0800
committercrupest <crupest@outlook.com>2020-03-19 19:11:04 +0800
commitad29543fe081d2a0a5e6737f9073399e4e91383f (patch)
tree10f3a7519aa0f52fada56b10e226dc709972fd1d /include/cru/ui/controls/button.hpp
parente3eb653a856fe6793d3ddab371c3e71290fc7a9b (diff)
downloadcru-ad29543fe081d2a0a5e6737f9073399e4e91383f.tar.gz
cru-ad29543fe081d2a0a5e6737f9073399e4e91383f.tar.bz2
cru-ad29543fe081d2a0a5e6737f9073399e4e91383f.zip
...
Diffstat (limited to 'include/cru/ui/controls/button.hpp')
-rw-r--r--include/cru/ui/controls/button.hpp20
1 files changed, 1 insertions, 19 deletions
diff --git a/include/cru/ui/controls/button.hpp b/include/cru/ui/controls/button.hpp
index a95b75ce..fb636a33 100644
--- a/include/cru/ui/controls/button.hpp
+++ b/include/cru/ui/controls/button.hpp
@@ -1,28 +1,10 @@
#pragma once
#include "../content_control.hpp"
+#include "base.hpp"
#include "../click_detector.hpp"
namespace cru::ui::controls {
-struct ButtonStateStyle {
- std::shared_ptr<platform::graph::IBrush> border_brush;
- Thickness border_thickness;
- CornerRadius border_radius;
- std::shared_ptr<platform::graph::IBrush> foreground_brush;
- std::shared_ptr<platform::graph::IBrush> background_brush;
-};
-
-struct ButtonStyle {
- // corresponds to ClickState::None
- ButtonStateStyle normal;
- // corresponds to ClickState::Hover
- ButtonStateStyle hover;
- // corresponds to ClickState::Press
- ButtonStateStyle press;
- // corresponds to ClickState::PressInactive
- ButtonStateStyle press_cancel;
-};
-
class Button : public ContentControl {
public:
static constexpr std::string_view control_type = "Button";