MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / UWPWindow

Method UWPWindow

Source/Engine/Platform/UWP/UWPWindow.cpp:295–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293}
294
295UWPWindow::UWPWindow(const CreateWindowSettings& settings, UWPWindowImpl* impl)
296 : WindowBase(settings)
297 , _impl(impl)
298 , _logicalSize(Float2::Zero)
299{
300 ASSERT(Impl::Window == nullptr);
301 Impl::Window = this;
302
303 // Link
304 _impl->UserData = this;
305 _impl->SizeChanged = &::OnSizeChanged;
306 _impl->VisibilityChanged = &::OnVisibilityChanged;
307 _impl->DpiChanged = &::OnDpiChanged;
308 _impl->Closed = &::OnClosed;
309 _impl->FocusChanged = &::OnFocusChanged;
310 _impl->KeyDown = &::OnKeyDown;
311 _impl->KeyUp = &::OnKeyUp;
312 _impl->CharacterReceived = &::OnCharacterReceived;
313 _impl->MouseMoved = &::OnMouseMoved;
314 _impl->PointerPressed = &::OnPointerPressed;
315 _impl->PointerMoved = &::OnPointerMoved;
316 _impl->PointerWheelChanged = &::OnPointerWheelChanged;
317 _impl->PointerReleased = &::OnPointerReleased;
318 _impl->PointerExited = &::OnPointerExited;
319
320 // Peek properties
321 Char buffer[200];
322 _impl->GetTitle(buffer, 200);
323 _title = buffer;
324 _impl->GetDpi(&_dpi);
325 _dpiScale = _dpi / 96.0f;
326 float x, y;
327 _impl->GetBounds(&x, &y, &_logicalSize.X, &_logicalSize.Y);
328 _impl->GetMousePosition(&Impl::Mouse->MousePosition.X, &Impl::Mouse->MousePosition.Y);
329 OnSizeChange();
330}
331
332UWPWindow::~UWPWindow()
333{

Callers

nothing calls this directly

Calls 4

GetTitleMethod · 0.45
GetDpiMethod · 0.45
GetBoundsMethod · 0.45
GetMousePositionMethod · 0.45

Tested by

no test coverage detected