AUI Framework  master
Cross-platform module-based framework for developing C++20 desktop applications
ATabView.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//
13// Created by alex2 on 24.10.2020.
14//
15
16#pragma once
17
18#include "APageView.h"
19#include "ALabel.h"
20
21class API_AUI_VIEWS ATabButtonView: public ALabel, public ass::ISelectable {
22private:
23 bool mCurrent = false;
24protected:
25 bool selectableIsSelectedImpl() override;
26
27public:
29
30 }
32
33 }
34
35 void setCurrent(bool current);
36};
37
38class API_AUI_VIEWS ATabButtonRow: public AViewContainerBase {
39private:
40 _<AViewContainer> mContents;
41
42public:
44 void setCurrent(size_t i, bool current);
45 void addTab(const AString& name);
46
47 const _<AViewContainer>& getContents() const {
48 return mContents;
49 }
50};
51
60class API_AUI_VIEWS ATabView: public AViewContainerBase {
61private:
62 _<APageView> mPageView;
64
65public:
66 ATabView();
67
68 void addTab(const _<AView>& view, const AString& name = {});
69 void setTabId(unsigned tabId);
70
71};
72
73
Represents a simple single-line text display view.
Definition: ALabel.h:23
Represents a Unicode character string.
Definition: AString.h:37
Definition: ATabView.h:38
Definition: ATabView.h:21
Tab host.
Definition: ATabView.h:60
A view that represents a set of views.
Definition: AViewContainerBase.h:68
An std::weak_ptr with AUI extensions.
Definition: SharedPtrTypes.h:177
Definition: Selected.h:18
Definition: Text.h:21