53 lines
2.2 KiB
C++
53 lines
2.2 KiB
C++
#pragma once
|
|
|
|
#include "stdafx.h"
|
|
#include "Editor.h"
|
|
|
|
namespace Template_UWP
|
|
{
|
|
// Main entry point for our app. Connects the app with the Windows shell and handles application lifecycle events.
|
|
ref class App sealed : public Windows::ApplicationModel::Core::IFrameworkView
|
|
{
|
|
public:
|
|
App();
|
|
|
|
// IFrameworkView Methods.
|
|
virtual void Initialize(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView);
|
|
virtual void SetWindow(Windows::UI::Core::CoreWindow^ window);
|
|
virtual void Load(Platform::String^ entryPoint);
|
|
virtual void Run();
|
|
virtual void Uninitialize();
|
|
|
|
protected:
|
|
// Application lifecycle event handlers.
|
|
void OnActivated(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView, Windows::ApplicationModel::Activation::IActivatedEventArgs^ args);
|
|
void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ args);
|
|
void OnResuming(Platform::Object^ sender, Platform::Object^ args);
|
|
|
|
// Window event handlers.
|
|
void OnWindowSizeChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ args);
|
|
void OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args);
|
|
void OnWindowClosed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::CoreWindowEventArgs^ args);
|
|
|
|
// DisplayInformation event handlers.
|
|
void OnDpiChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args);
|
|
void OnOrientationChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args);
|
|
void OnDisplayContentsInvalidated(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args);
|
|
|
|
// Input handlers
|
|
void OnKeyDown(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ key);
|
|
void OnCharacterReceived(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::CharacterReceivedEventArgs^ key);
|
|
|
|
private:
|
|
Editor editor;
|
|
bool m_windowClosed;
|
|
bool m_windowVisible;
|
|
};
|
|
}
|
|
|
|
ref class Direct3DApplicationSource sealed : Windows::ApplicationModel::Core::IFrameworkViewSource
|
|
{
|
|
public:
|
|
virtual Windows::ApplicationModel::Core::IFrameworkView^ CreateView();
|
|
};
|