From 0fb7a0e0b2b9e04ca414b1e47c69cc854c79831b Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 1 Dec 2020 23:20:01 +0800 Subject: ... --- include/cru/ui/helper/Styler.hpp | 47 ---------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 include/cru/ui/helper/Styler.hpp (limited to 'include/cru/ui/helper/Styler.hpp') diff --git a/include/cru/ui/helper/Styler.hpp b/include/cru/ui/helper/Styler.hpp deleted file mode 100644 index ed8bfbdc..00000000 --- a/include/cru/ui/helper/Styler.hpp +++ /dev/null @@ -1,47 +0,0 @@ -#pragma once -#include "cru/common/Base.hpp" -#include "cru/common/Event.hpp" -#include "cru/ui/Base.hpp" -#include "cru/ui/helper/ClickDetector.hpp" -#include "gsl/pointers" - -#include - -namespace cru::ui::helper { -struct ControlStyleState { - ClickState click_state; - bool focus; -}; - -class Styler : public Object { - public: - // You could provide your click detector. Otherwise a new one will be created. - explicit Styler(gsl::not_null control, - ClickDetector* click_detector = nullptr); - - CRU_DELETE_COPY(Styler) - CRU_DELETE_MOVE(Styler) - - ~Styler(); - - public: - gsl::not_null GetControl() const { return control_; } - gsl::not_null GetClickDetector() const { - return click_detector_; - } - - IEvent* StateChangeEvent() { return &state_change_event_; } - - private: - void RaiseStateChangeEvent(); - - private: - gsl::not_null control_; - std::unique_ptr managed_click_detector_; - gsl::not_null click_detector_; - - Event state_change_event_; - - EventRevokerListGuard event_guard_; -}; -} // namespace cru::ui::helper -- cgit v1.2.3