AUI Framework  develop
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
ACustomCaptionWindow.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#include "ACustomWindow.h"
   14#include <AUI/View/AButton.h>
   15#include <AUI/View/ASpacerExpanding.h>
   16#include <AUI/Util/UIBuildingHelpers.h>
   17#include "CustomCaptionWindowImplWin32.h"
   18
   19using CustomCaptionWindowImplCurrent = CustomCaptionWindowImplWin32;
   20
   21
   49class API_AUI_VIEWS ACustomCaptionWindow : public ACustomWindow, private CustomCaptionWindowImplCurrent {
   50public:
   51    ACustomCaptionWindow(const AString& name, int width, int height, bool stacked = false);
   52
   53    ACustomCaptionWindow() : ACustomCaptionWindow("Custom Caption Window", 240, 124) {}
   54
   55    ~ACustomCaptionWindow() override = default;
   56
   60    [[nodiscard]]
   62    {
   63        return mCaptionContainer;
   64    }
   65
   69    [[nodiscard]]
   71    {
   72        return mContentContainer;
   73    }
   74
   75protected:
   76    bool isCustomCaptionMaximized() override;
   77
   78private:
   79    // these functions are hidden; use ACustomCaptionWindow::getContentContainer() instead
   80    using ACustomWindow::setLayout;
   81    using ACustomWindow::setViews;
   82    using ACustomWindow::addView;
   83    using ACustomWindow::addViews;
   84    using ACustomWindow::removeAllViews;
   85    using ACustomWindow::removeView;
   86    using ACustomWindow::setContents;
   87
   88};
const _< AViewContainer > & getContentContainer() const
Definition ACustomCaptionWindow.h:70
const _< AViewContainer > & getCaptionContainer() const
Definition ACustomCaptionWindow.h:61
Represents a Unicode character string.
Definition AString.h:38
void setViews(AVector< _< AView > > views)
Replace views.
void setLayout(_unique< ALayout > layout)
Set new layout manager for this AViewContainerBase. DESTROYS OLD LAYOUT MANAGER WITH ITS VIEWS!...
void addViews(AVector< _< AView > > views)
Add all views from vector.
void removeAllViews()
Remove all views from container.
void removeView(const _< AView > &view)
Remove view from the container.
void addView(const _< AView > &view)
Add view to the container.
void setContents(const _< AViewContainer > &container)
Moves (like via std::move) all children and layout of the specified container to this container.
Definition CustomCaptionWindowImplWin32.h:21
An std::weak_ptr with AUI extensions.
Definition SharedPtrTypes.h:178