Dali 3D User Interface Engine
toolkit-clipboard-event-notifier.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 
19 
23 
24 namespace Dali
25 {
26 
27 namespace Internal
28 {
29 
30 namespace Adaptor
31 {
32 
33 class ClipboardEventNotifier : public Dali::BaseObject
34 {
35 public:
36 
38 
39  // Creation
42 
43  // Public API
44  const std::string& GetContent() const;
45  void SetContent( const std::string& content );
46  void ClearContent();
48 
49  // Signals
51  {
53  }
54 
55 private:
56  // Construction & Destruction
58  virtual ~ClipboardEventNotifier();
59 
60  // Undefined
63 
64 private:
65 
66  std::string mContent;
68 
70 
71 public:
72 
73  // Helpers for public-api forwarding methods
74 
76  {
77  DALI_ASSERT_ALWAYS( detector && "ClipboardEventNotifier handle is empty" );
78 
79  BaseObject& handle = detector.GetBaseObject();
80 
81  return static_cast<Internal::Adaptor::ClipboardEventNotifier&>(handle);
82  }
83 
85  {
86  DALI_ASSERT_ALWAYS( detector && "ClipboardEventNotifier handle is empty" );
87 
88  const BaseObject& handle = detector.GetBaseObject();
89 
90  return static_cast<const Internal::Adaptor::ClipboardEventNotifier&>(handle);
91  }
92 
93 };
94 
96 
98 {
99  return Get();
100 }
101 
103 {
105  {
107  }
109 }
110 
111 const std::string& ClipboardEventNotifier::GetContent() const
112 {
113  return mContent;
114 }
115 
116 void ClipboardEventNotifier::SetContent( const std::string& content )
117 {
118  mContent = content;
119 }
120 
122 {
123  mContent.clear();
124 }
125 
127 {
128  if ( !mContentSelectedSignal.Empty() )
129  {
130  Dali::ClipboardEventNotifier handle( this );
131  mContentSelectedSignal.Emit( handle );
132  }
133 }
134 
136 : mContent()
137 {
138 }
139 
141 {
142 }
143 
144 } // namespace Adaptor
145 } // namespace Internal
146 
148 
150 {
151 }
152 
154 {
156 }
157 
159 {
160 }
161 
162 const std::string& ClipboardEventNotifier::GetContent() const
163 {
165 }
166 
167 void ClipboardEventNotifier::SetContent( const std::string& content )
168 {
170 }
171 
173 {
175 }
176 
178 {
180 }
181 
183 {
185 }
186 
188 : BaseHandle( notifier )
189 {
190 }
191 
192 } // namespace Dali
Dali Docs Home
Read more about Dali