AUI Framework  develop
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
IPropertyBase.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/api.h>
15#include <AUI/Geometry2D/ARect.h>
16
17class API_AUI_VIEWS AView;
18class API_AUI_VIEWS AAssHelper;
19struct ARenderContext;
20
21namespace ass::prop {
25 enum class PropertySlot {
26 NONE,
27
28 TRANSFORM_OFFSET,
29 TRANSFORM_ROTATE,
30 TRANSFORM_SCALE,
31
32 SHADOW,
33 RENDER_OVERFLOW,
34 IMAGE_RENDERING,
35 BACKDROP,
36 BACKGROUND_SOLID,
37 BACKGROUND_IMAGE,
38 BACKGROUND_EFFECT,
39 BORDER,
40 SHADOW_INNER,
41 TEXT_SHADOW,
42
43 COUNT,
44 };
45
50 struct API_AUI_VIEWS IPropertyBase { // ignore ass_properties
51 public:
52 virtual void applyFor(AView* view) {};
53 virtual void renderFor(AView* view, const ARenderContext& ctx) {}
54 virtual bool isNone() { return false; }
55 [[nodiscard]] virtual PropertySlot getPropertySlot() const {
56 return PropertySlot::NONE;
57 }
58 virtual void updateInvalidPixelRect(ARect<int>& invalidRect) const {}
59 };
60 template<typename PropertyStruct>
61 struct Property;
62}
Remember, ASS is not a butt. ASS is Aui Style Sheets.
Definition AAssHelper.h:32
Base class of all UI objects.
Definition AView.h:78
Axis aligned 2D rectangle.
Definition ARect.h:24
Render context passed to AView::render.
Definition ARenderContext.h:43
Base class for all properties.
Definition IPropertyBase.h:50
Definition IPropertyBase.h:61