AUI Framework  develop
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
AAnimatedDrawable.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 dervisdev on 1/12/2023.
14//
15#pragma once
16
17#include "IDrawable.h"
18#include "AUI/Image/IAnimatedImageFactory.h"
19#include "AUI/Render/IRenderer.h"
20#include "AUI/Common/ASignal.h"
21
22class API_AUI_VIEWS AAnimatedDrawable : public IDrawable, public AObject {
23private:
25 _<ITexture> mTexture;
26public:
27 explicit AAnimatedDrawable(_<IAnimatedImageFactory> factory);
28 ~AAnimatedDrawable() override = default;
29
30 void draw(IRenderer& render, const IDrawable::Params& params) override;
31 glm::ivec2 getSizeHint() override;
32
33signals:
34 emits<> animationFinished;
35};
36
An abstract image that determines itself how it is displayed. Essentially an abstraction from vector ...
Definition IDrawable.h:28
virtual void draw(IRenderer &render, const IDrawable::Params &params)=0
Called when the image needs to be displayed. It is assumed that the renderer is already set to the de...
virtual glm::ivec2 getSizeHint()=0
Base class for rendering.
Definition IRenderer.h:149
An std::weak_ptr with AUI extensions.
Definition SharedPtrTypes.h:178
ASignal< Args... > emits
A signal declaration.
Definition ASignal.h:348
Definition IDrawable.h:43