1 #ifndef __DALI_CUSTOM_ACTOR_H__
2 #define __DALI_CUSTOM_ACTOR_H__
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
11 // http://floralicense.org/license/
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.
21 * @addtogroup CAPI_DALI_FRAMEWORK
26 #include <dali/public-api/actors/actor.h>
27 #include <dali/public-api/actors/custom-actor-impl.h>
29 namespace Dali DALI_IMPORT_API
32 namespace Internal DALI_INTERNAL
38 * CustomActor is a base class for custom UI controls.
39 * The implementation of the control must be supplied; see CustomActorImpl for more details.
41 class DALI_IMPORT_API CustomActor : public Actor
46 * Create an uninitialized CustomActor handle. Only derived versions can be instantiated.
47 * Calling member functions with an uninitialized Dali::Object is not allowed.
52 * Downcast an Object handle to CustomActor. If handle points to a CustomActor the
53 * downcast produces valid handle. If not the returned handle is left uninitialized.
54 * @param[in] handle to An object
55 * @return handle to a CustomActor or an uninitialized handle
57 static CustomActor DownCast( BaseHandle handle );
61 * Dali::Object derived classes do not contain member data.
63 virtual ~CustomActor();
66 * Retrieve the custom actor implementation.
67 * @return The implementation.
69 CustomActorImpl& GetImplementation();
72 * Retrieve the custom actor implementation.
73 * @return The implementation.
75 const CustomActorImpl& GetImplementation() const;
78 * Create an initialised CustomActor.
79 * @param[in] implementation The implementation for this custom actor.
80 * @return A handle to a newly allocated Dali resource.
82 CustomActor(CustomActorImpl& implementation);
85 * @copydoc Dali::BaseHandle::operator=
87 using BaseHandle::operator=;
89 public: // Not intended for application developers
92 * This constructor is used internally to create additional CustomActor handles.
93 * @param [in] actor A pointer to a newly allocated Dali resource
95 CustomActor(Internal::CustomActor* actor);
103 #endif // __DALI_CUSTOM_ACTOR_H__