AUI Framework  develop
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
APathChooserView.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 15.04.2021.
14//
15
16
17#pragma once
18
19
20#include "AViewContainer.h"
21#include "ATextField.h"
22
27class API_AUI_VIEWS APathChooserView: public AViewContainerBase {
28private:
29 _<ATextField> mPathField;
30
31public:
32 explicit APathChooserView(const APath& defaultPath = "");
33
34 void setPath(const APath& path);
35 APath getPath() const;
36
37signals:
38 emits<APath> changed;
39};
40
41
42
43template<>
45public:
46 static auto setup(const _<APathChooserView>& v) {}
47
48 static auto getGetter() {
49 return &APathChooserView::changed;
50 }
51 static auto getSetter() {
52 return &APathChooserView::setPath;
53 }
54};
A text field with "..." button prompting path.
Definition APathChooserView.h:27
An add-on to AString with functions for working with the path.
Definition APath.h:107
An std::weak_ptr with AUI extensions.
Definition SharedPtrTypes.h:178
ASignal< Args... > emits
A signal declaration.
Definition ASignal.h:348
Defines how View handles properties of FieldType type.
Definition ADataBinding.h:37
static void(View::*)(const FieldType &v) getSetter()
Returns setter for ADataBinding (deprecated)
Definition ADataBinding.h:63
static void setup(const _< View > &view)
Called then view linked with field.
Definition ADataBinding.h:43
static ASignal< FieldType >View::* getGetter()
Returns getter for ADataBinding (deprecated)
Definition ADataBinding.h:55