1//************************************ bs::framework - Copyright 2018 Marko Pintera **************************************//
2//*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********//
3#include "Platform/BsDropTarget.h"
4
5namespace bs
6{
7 void DropTarget::_clear()
8 {
9 mFileList.clear();
10 }
11
12 bool DropTarget::_isInside(const Vector2I& pos) const
13 {
14 return mArea.contains(pos);
15 }
16
17 void DropTarget::_setFileList(const Vector<Path>& fileList)
18 {
19 _clear();
20
21 mDropType = DropTargetType::FileList;
22 mFileList = fileList;
23 }
24
25 SPtr<DropTarget> DropTarget::create(const RenderWindow* window, const Rect2I& area)
26 {
27 DropTarget* target = new (bs_alloc<DropTarget>()) DropTarget(window, area);
28 return bs_shared_ptr(target);
29 }
30}
31
32