1 #ifndef DALI_TOOLKIT_CONTROL_WRAPPER_H
2 #define DALI_TOOLKIT_CONTROL_WRAPPER_H
5 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali-toolkit/public-api/controls/control.h>
30 namespace Internal DALI_INTERNAL
36 * @brief ControlWrapper is a base class for custom UI controls developed in managed code (i.e. C#.NET).
38 * The implementation of the ControlWrapper must be supplied; see Internal::ControlWrapper for more details.
40 class DALI_IMPORT_API ControlWrapper : public Control
46 * @brief Create a new instance of a ControlWrapper.
48 * @return A handle to a new ControlWrapper.
50 static ControlWrapper New( Internal::ControlWrapper& implementation );
53 * @brief Creates an empty ControlWrapper handle.
60 * This is non-virtual since derived Handle types must not contain data or virtual methods.
65 * @brief Copy constructor.
67 * Creates another handle that points to the same real object
68 * @param[in] handle Handle to the copied object
70 ControlWrapper( const ControlWrapper& handle );
73 * @brief Assignment operator.
75 * Changes this handle to point to another real object
76 * @param[in] handle Handle to the object
77 * @return A reference to this
79 ControlWrapper& operator=( const ControlWrapper& handle );
82 * @brief Downcast an Object handle to ControlWrapper.
84 * If handle points to a ControlWrapper the
85 * downcast produces valid handle. If not the returned handle is left uninitialized.
86 * @param[in] handle Handle to an object
87 * @return handle to a ControlWrapper or an uninitialized handle
89 static ControlWrapper DownCast( BaseHandle handle );
91 public: // Not intended for application developers
94 * @brief Creates a handle using the Toolkit::Internal implementation.
96 * @param[in] implementation The Control implementation.
98 ControlWrapper( Internal::ControlWrapper& implementation );
101 * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
103 * @param[in] internal A pointer to the internal CustomActor.
105 explicit ControlWrapper( Dali::Internal::CustomActor* internal );
108 } // namespace Toolkit
112 #endif // DALI_TOOLKIT_CONTROL_WRAPPER_H