AUI Framework  develop
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
on_state.h
1/*
2 * AUI Framework - Declarative UI toolkit for modern C++20
3 * Copyright (C) 2020-2024 Alex2772 and Contributors
4 *
5 * SPDX-License-Identifier: MPL-2.0
6 *
7 * This Source Code Form is subject to the terms of the Mozilla Public
8 * License, v. 2.0. If a copy of the MPL was not distributed with this
9 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 */
11
12#pragma once
13
14#include <AUI/ASS/Rule.h>
15#include <AUI/ASS/PropertyListRecursive.h>
16
17namespace ass::on_state {
18 namespace impl {
20 public:
21 bool isPossiblyApplicable(AView* view) override {
22 return true;
23 }
24 };
25 }
26
43 public:
44 template<typename... Declarations>
45 Hovered(Declarations&&... declarations):
46 ConditionalPropertyList(hovered<impl::OnStateSelector>{}, std::forward<Declarations>(declarations)...)
47 {}
48 };
49
66 public:
67 template<typename... Declarations>
68 Activated(Declarations&&... declarations):
69 ConditionalPropertyList(activated<impl::OnStateSelector>{}, std::forward<Declarations>(declarations)...)
70 {}
71 };
72
89 public:
90 template<typename... Declarations>
91 Focused(Declarations&&... declarations):
92 ConditionalPropertyList(focused<impl::OnStateSelector>{}, std::forward<Declarations>(declarations)...)
93 {}
94 };
95
112 public:
113 template<typename... Declarations>
114 Disabled(Declarations&&... declarations):
115 ConditionalPropertyList(disabled<impl::OnStateSelector>{}, std::forward<Declarations>(declarations)...)
116 {}
117 };
118}
Base class of all UI objects.
Definition AView.h:78
Definition AAssSelector.h:28
Definition PropertyListRecursive.h:62
Definition activated.h:21
Definition disabled.h:20
Definition focused.h:21
Definition hovered.h:21
Definition on_state.h:19