AUI Framework
master
Cross-platform module-based framework for developing C++20 desktop applications
IRenderingContext.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
14
15
#include "AWindowNativePtr.h"
16
#include "IRenderingContext.h"
17
#include <AUI/Common/AString.h>
18
#include <AUI/Enum/WindowStyle.h>
19
#include <AUI/Image/AImage.h>
20
21
class
AWindowBase
;
22
class
AWindow
;
23
class
IRenderer
;
24
36
class
API_AUI_VIEWS
IRenderingContext
{
37
public
:
38
struct
API_AUI_VIEWS
Init
{
39
AWindow
& window;
40
AString
name;
41
int
width
;
42
int
height
;
43
WindowStyle ws;
44
AWindow
* parent;
45
46
void
setRenderingContext(_unique<IRenderingContext>&& context)
const
;
47
};
48
virtual
void
init(
const
Init
& init);
49
virtual
~IRenderingContext
() =
default
;
50
virtual
void
destroyNativeWindow(
AWindowBase
& window) = 0;
51
52
virtual
AImage makeScreenshot() = 0;
53
54
virtual
void
beginPaint(
AWindowBase
& window) = 0;
55
virtual
void
endPaint(
AWindowBase
& window) = 0;
56
virtual
void
beginResize(
AWindowBase
& window) = 0;
57
virtual
void
endResize(
AWindowBase
& window) = 0;
58
59
virtual
IRenderer
& renderer() = 0;
60
};
AString
Represents a Unicode character string.
Definition:
AString.h:37
AWindowBase
Definition:
AWindowBase.h:33
AWindow
Represents a window in the underlying windowing system.
Definition:
AWindow.h:45
IRenderer
Base class for rendering.
Definition:
IRenderer.h:149
IRenderingContext
Glue between AWindow and IRenderer.
Definition:
IRenderingContext.h:36
IRenderingContext::Init
Definition:
IRenderingContext.h:38
ViewAssertionSize
Definition:
Size.h:22