AUI Framework  develop
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
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:
28 ATabButtonView() {
29
30 }
31 ATabButtonView(const AString& text): ALabel(text) {
32
33 }
34
35 void setCurrent(bool current);
36};
37
38class API_AUI_VIEWS ATabButtonRow: public AViewContainerBase {
39private:
40 _<AViewContainer> mContents;
41
42public:
43 ATabButtonRow();
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
auto text() const
Label's text property.
Definition AAbstractLabel.h:37
Represents a simple single-line text display view.
Definition ALabel.h:23
Represents a Unicode character string.
Definition AString.h:37
An std::weak_ptr with AUI extensions.
Definition SharedPtrTypes.h:178
Interface to work with ass::Selected selector.
Definition Selected.h:21