Adding new test harness
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / toolkit-clipboard.h
1 #ifndef  __TOOLKIT_CLIPBOARD_H__
2 #define  __TOOLKIT_CLIPBOARD_H__
3
4 //
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 //
7 // Licensed under the Flora License, Version 1.0 (the License);
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 //     http://floralicense.org/license/
12 //
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an AS IS BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
18 //
19
20 #define __DALI_CLIPBOARD_H__
21
22 // EXTERNAL INCLUDES
23 #include <dali/public-api/math/rect.h>
24 #include <dali/public-api/object/base-handle.h>
25
26 namespace Dali DALI_IMPORT_API
27 {
28
29 namespace Internal DALI_INTERNAL
30 {
31
32 namespace Adaptor
33 {
34 class Clipboard;
35 }
36 }
37
38 /**
39  * The Clipboard can operate using various funtion.
40  * Clipboard can manage it's item and set show / hide status.
41  */
42 class Clipboard : public BaseHandle
43 {
44 public:
45   /**
46    * Create an uninitialized Clipboard;
47    *  this can be initialized with one of the derived Clipboard' New() methods
48    */
49   Clipboard();
50
51   /**
52    * Virtual destructor.
53    */
54   virtual ~Clipboard();
55
56   /**
57    * This constructor is used by Adaptor::GetClipboard().
58    * @param[in] clipboard A pointer to the clipboard.
59    */
60   Clipboard( Internal::Adaptor::Clipboard* clipboard );
61
62   /**
63    * Retrieve a handle to the ClipboardEventNotifier instance
64    * @return A handle to the Clipboard
65    */
66   static Clipboard Get();
67
68   /**
69    * Send the given string to the clipboard
70    * @param[in] itemData string to send to clip board
71    * @return bool true if the internal clip board sending was successful.
72    */
73   bool SetItem( const std::string& itemData );
74
75   /**
76    * Retreive the string at the given index in the clip board.
77    * @param[in] index item in clipboard list to retrieve
78    * @return string the text item at the current index.
79    */
80   std::string GetItem( unsigned int index );
81
82   /**
83    * Returns the number of item currently in the clipboard
84    * @return unsigned int number of clipboard items
85    */
86   unsigned int NumberOfItems();
87
88   /**
89    * Show the clipboard window
90    */
91   void ShowClipboard();
92
93   /**
94    * Hide the clipboard window
95    */
96   void HideClipboard();
97
98 };
99 } // namespace Dali
100
101 #endif // __TOOLKIT_CLIPBOARD_H__