AUI Framework  develop
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
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
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:540
virtual int getContentMinimumWidth()
Definition AView.cpp:248
Declarative view trait.
Definition Declarative.h:170