Ocean
Loading...
Searching...
No Matches
ApplicationWindow.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_PLATFORM_WIN_APPLICATION_WINDOW_H
9#define META_OCEAN_PLATFORM_WIN_APPLICATION_WINDOW_H
10
13
14#include <string>
15
16namespace Ocean
17{
18
19namespace Platform
20{
21
22namespace Win
23{
24
25/**
26 * This class implements an application window.
27 * @ingroup platformwin
28 */
29class OCEAN_PLATFORM_WIN_EXPORT ApplicationWindow : virtual public Window
30{
31 public:
32
33 /**
34 * Creates a new application window.
35 * @param instance Application instance
36 * @param name The name of the application window
37 */
38 ApplicationWindow(HINSTANCE instance, const std::wstring& name);
39
40 /**
41 * Destructs the application window.
42 */
44
45 /**
46 * Starts the application.
47 */
48 int start();
49
50 /**
51 * Closes the application explicitly.
52 */
53 void close();
54
55 protected:
56
57 /**
58 * Function for a destroy event.
59 */
60 void onDestroy() override;
61
62 private:
63
64 /// State determining whether the application is about to be closed.
65 bool applicationAboutToClosed_ = false;
66};
67
68}
69
70}
71
72}
73
74#endif // META_OCEAN_PLATFORM_WIN_APPLICATION_WINDOW_H
This class implements an application window.
Definition ApplicationWindow.h:30
~ApplicationWindow() override
Destructs the application window.
ApplicationWindow(HINSTANCE instance, const std::wstring &name)
Creates a new application window.
void close()
Closes the application explicitly.
int start()
Starts the application.
void onDestroy() override
Function for a destroy event.
This class is the base class for all windows.
Definition Window.h:31
The namespace covering the entire Ocean framework.
Definition Accessor.h:15