(Properties) Added ability to add non-animatable event-thread only properties via...
[platform/core/uifw/dali-core.git] / dali / internal / event / actor-attachments / actor-attachment-impl.cpp
1 //
2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 // CLASS HEADER
18 #include <dali/internal/event/actor-attachments/actor-attachment-impl.h>
19
20 // INTERNAL INCLUDES
21 #include <dali/public-api/common/dali-common.h>
22
23 namespace Dali
24 {
25
26 namespace Internal
27 {
28
29 bool ActorAttachment::OnStage() const
30 {
31   return mIsOnStage;
32 }
33
34 ActorAttachment::ActorAttachment( Stage& stage )
35 : mStage( &stage ),
36   mIsOnStage( false )
37 {
38 }
39
40 ActorAttachment::~ActorAttachment()
41 {
42 }
43
44 /**
45  * This method is called by the parent actor.
46  */
47 void ActorAttachment::Connect()
48 {
49   mIsOnStage = true;
50
51   // Notification for derived classes
52   OnStageConnection();
53 }
54
55 /**
56  * This method is called by the parent actor.
57  */
58 void ActorAttachment::Disconnect()
59 {
60   // Notification for derived classes
61   OnStageDisconnection();
62
63   mIsOnStage = false;
64 }
65
66 } // namespace Internal
67
68 } // namespace Dali