2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.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.tizenopensource.org/license
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.
17 #ifndef _SAMPLE_LONGPRESS_GESTURE_DETECTOR_H_
18 #define _SAMPLE_LONGPRESS_GESTURE_DETECTOR_H_
20 #include "FUiITouchLongPressGestureEventListener.h"
23 class SampleLongPressGestureDetectorForm:
25 public Osp::Ui::ITouchLongPressGestureEventListener,
26 public Osp::Ui::ITouchEventListener,
27 public Osp::Ui::ITextEventListener
30 SampleLongPressGestureDetectorForm(void);
31 virtual ~SampleLongPressGestureDetectorForm();
33 virtual bool Initialize(void);
35 virtual result OnInitializing(void);
36 virtual result OnTerminating(void);
38 virtual void OnLongPressGestureDetected(Osp::Ui::TouchLongPressGestureDetector& gestureDetector);
39 virtual void OnLongPressGestureCanceled(Osp::Ui::TouchLongPressGestureDetector& gestureDetector);
41 virtual void OnTextValueChanged(const Osp::Ui::Control& source);
42 virtual void OnTextValueChangeCanceled(const Osp::Ui::Control& source);
44 virtual void OnActionPerformed(const Osp::Ui::Control& source, int actionId);
45 virtual result OnDraw(void);
47 virtual void OnTouchFocusIn (const Osp::Ui::Control &source, const Osp::Graphics::Point ¤tPosition, const Osp::Ui::TouchEventInfo &touchInfo);
48 virtual void OnTouchFocusOut (const Osp::Ui::Control &source, const Osp::Graphics::Point ¤tPosition, const Osp::Ui::TouchEventInfo &touchInfo);
49 virtual void OnTouchMoved (const Osp::Ui::Control &source, const Osp::Graphics::Point ¤tPosition, const Osp::Ui::TouchEventInfo &touchInfo);
50 virtual void OnTouchPressed (const Osp::Ui::Control &source, const Osp::Graphics::Point ¤tPosition, const Osp::Ui::TouchEventInfo &touchInfo);
51 virtual void OnTouchReleased (const Osp::Ui::Control &source, const Osp::Graphics::Point ¤tPosition, const Osp::Ui::TouchEventInfo &touchInfo);
54 static const int ID_BUTTON_CLEAR = 101;
55 Osp::Ui::Controls::Label* __pDurationLabel;
56 Osp::Ui::Controls::Label* __pFingerCountLabel;
57 Osp::Ui::Controls::EditField* __pDuration;
58 Osp::Ui::Controls::EditField* __pFingerCount;
59 Osp::Ui::Controls::Label* __pTouchArea;
60 Osp::Ui::Controls::Label* __pTouchResult;
61 Osp::Ui::Controls::Button* __pClearButton;
62 Osp::Ui::TouchLongPressGestureDetector* __pLongPressGesture;
63 int __previousDuration;
64 int __previousTouchCount;
65 Osp::Graphics::Canvas* __pCanvas;
68 #endif /* _SAMPLE_LONGPRESS_GESTURE_DETECTOR_H_ */