2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an ”AS IS” BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 * @file FUi_DragDropEventArg.cpp
19 * @brief This is the implementation file for _DragDropEventArg class
22 * This file contains the implementation of %_DragDropEventArg class.
26 #include "FUi_DragDropEventArg.h"
28 using namespace Tizen::Base;
29 using namespace Tizen::Base::Runtime;
31 namespace Tizen { namespace Ui
33 _DragDropEventArg::_DragDropEventArg(const Control& source, DragDropStatus status)
34 : __pSource(const_cast <Control*>(&source))
35 , __pDraggedControl(null)
36 , __dragDropStatus(status)
37 , __startPosition(-1, -1)
38 , __currentPosition(-1, -1)
43 _DragDropEventArg::~_DragDropEventArg(void)
49 _DragDropEventArg::GetDragDropStatus(void) const
51 return (__dragDropStatus);
55 const Tizen::Ui::Control*
56 _DragDropEventArg::GetSource(void) const
62 const Tizen::Graphics::FloatPoint
63 _DragDropEventArg::GetStartPosition(void) const
65 return __startPosition;
68 const Tizen::Graphics::FloatPoint
69 _DragDropEventArg::GetCurrentPosition(void) const
71 return __currentPosition;
75 _DragDropEventArg::SetDraggedControl(const Tizen::Ui::Control* pDraggedControl)
77 __pDraggedControl = (Tizen::Ui::Control*) pDraggedControl;
78 // if( pDragedControl == null) return E_FAILURE;
82 const Tizen::Ui::Control*
83 _DragDropEventArg::GetDraggedControl(void) const
85 return (const Tizen::Ui::Control*) __pDraggedControl;
89 _DragDropEventArg::SetTouchPosition(float startX, float startY, float currentX, float currentY)
91 __startPosition = Tizen::Graphics::FloatPoint(startX, startY);
92 __currentPosition = Tizen::Graphics::FloatPoint(currentX, currentY);