-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathView.h
48 lines (38 loc) · 1.33 KB
/
View.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
//// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
//// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
//// PARTICULAR PURPOSE.
////
//// Copyright (c) Microsoft Corporation. All rights reserved
#pragma once
#include <wrl.h>
#include "D2DRenderer.h"
ref class View
{
public:
View();
void Initialize(
_In_ Windows::UI::Core::CoreWindow^ window,
_In_ Windows::ApplicationModel::Core::CoreApplicationView^ applicationView
);
// Declare Event Handlers
void OnWindowSizeChanged(
_In_ Windows::UI::Core::CoreWindow^ sender,
_In_ Windows::UI::Core::WindowSizeChangedEventArgs^ args
);
void OnMouseMove(
_In_ Windows::UI::Core::CoreWindow^ sender,
_In_ Windows::UI::Core::PointerEventArgs^ args
);
void OnMouseDown(
_In_ Windows::UI::Core::CoreWindow^ sender,
_In_ Windows::UI::Core::PointerEventArgs^ args
);
void OnLogicalDpiChanged(__in Platform::Object^ sender);
void Run();
private:
D2DRenderer^ m_renderer;
Windows::UI::Core::CoreWindow^ m_window;
Windows::ApplicationModel::Core::CoreApplicationView^ m_applicationView;
float m_dpi;
};