AUI Framework  master
Cross-platform module-based framework for developing C++20 desktop applications
ASpacerFixed.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/View/AView.h>
15#include <AUI/Util/AMetric.h>
16#include <AUI/Util/Declarative.h>
17
39class API_AUI_VIEWS ASpacerFixed: public AView {
40public:
41 explicit ASpacerFixed(AMetric space): mSpace(space) {}
42 bool consumesClick(const glm::ivec2& pos) override;
43 int getContentMinimumWidth() override;
44 int getContentMinimumHeight() override;
45
46private:
47 AMetric mSpace;
48};
49
50
51namespace declarative {
52 using SpacerFixed = aui::ui_building::view<ASpacerFixed>;
53}
Stores dimensions in scalable units (dp, pt, etc...).
Definition: AMetric.h:75
Fixed-size view which is useful in UI building.
Definition: ASpacerFixed.h:39
Base class of all UI objects.
Definition: AView.h:77
virtual int getContentMinimumHeight()
Definition: AView.cpp:252
virtual bool consumesClick(const glm::ivec2 &pos)
Determines whether this AView processes this click or passes it thru.
Definition: AView.cpp:534
virtual int getContentMinimumWidth()
Definition: AView.cpp:248
Definition: Declarative.h:91