Former-commit-id: 6991c60426c0a41d88174fbe404dee49fc13dc2b [formerly 662192d79c314e08128b196cd352188eff903fb0] [formerly d238c31726f70ecf078d8e8cc3dc3032cf1529ca [formerly 5caa1f462aed257779cfe5e8413729062f026bf5]] Former-commit-id: 296fe5698e0bf5d8b058de032a8549df1c4891eb [formerly 20dfabc83b4eb8c2cc89138a05c29d53e17c952a] Former-commit-id: 44b7f726bc84056071b9e577357a736e78436767
26 lines
840 B
C++
26 lines
840 B
C++
// Copyright (C) 2015 Jérôme Leclercq
|
|
// This file is part of the "Nazara Development Kit"
|
|
// For conditions of distribution and use, see copyright notice in Prerequesites.hpp
|
|
|
|
#include <NDK/Canvas.hpp>
|
|
|
|
namespace Ndk
|
|
{
|
|
inline Canvas::Canvas(WorldHandle world, Nz::EventHandler& eventHandler) :
|
|
m_hoveredWidget(nullptr),
|
|
m_world(std::move(world))
|
|
{
|
|
m_canvas = this;
|
|
|
|
m_mouseButtonPressedSlot.Connect(eventHandler.OnMouseButtonPressed, this, &Canvas::OnMouseButtonPressed);
|
|
m_mouseButtonReleasedSlot.Connect(eventHandler.OnMouseButtonReleased, this, &Canvas::OnMouseButtonRelease);
|
|
m_mouseMovedSlot.Connect(eventHandler.OnMouseMoved, this, &Canvas::OnMouseMoved);
|
|
m_mouseLeftSlot.Connect(eventHandler.OnMouseLeft, this, &Canvas::OnMouseLeft);
|
|
}
|
|
|
|
inline const WorldHandle& Canvas::GetWorld() const
|
|
{
|
|
return m_world;
|
|
}
|
|
}
|