1 #ifndef __DALI_TOOLKIT_TEXT_SELECTION_POPUP_H__
2 #define __DALI_TOOLKIT_TEXT_SELECTION_POPUP_H__
5 * Copyright (c) 2015 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
32 class TextSelectionPopup;
36 * @brief A control which provides a Popup with a number of buttons
38 * The style of the pop can be set through style sheets, this includes the images for the buttons
39 * A Show and Hide API is provided.
41 * If the buttons exceed the size constraints of the popup then it will offer scrolling.
45 class DALI_IMPORT_API TextSelectionPopup : public Control
50 * @brief The start and end property ranges for this control.
54 PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
55 PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices
59 * @brief An enumeration of properties belonging to the TextLabel class.
66 POPUP_MAX_SIZE, ///< name "popup-max-size", The max size the Popup can be, type VECTOR2
67 POPUP_BACKGROUND_IMAGE, ///< name "popup-background-image", The image to display for popup background type STRING
68 POPUP_CLIPBOARD_BUTTON_ICON_IMAGE, ///< name "popup-clipboard-button-image", The image to use as the popup clipboard icon, type STRING
69 POPUP_CUT_BUTTON_ICON_IMAGE, ///< name "popup-cut-button-image", The image to use as the popup cut icon, type STRING
70 POPUP_COPY_BUTTON_ICON_IMAGE, ///< name "popup-copy-button-image", The image to use as the popup copy icon, type STRING
71 POPUP_PASTE_BUTTON_ICON_IMAGE, ///< name "popup-paste-button-image", The image to use as the popup paste icon, type STRING
72 POPUP_SELECT_BUTTON_ICON_IMAGE, ///< name "popup-select-button-image", The image to use as the popup select icon, type STRING
73 POPUP_SELECT_ALL_BUTTON_ICON_IMAGE, ///< name "popup-select-all-button-image", The image to use as the popup select all icon, type STRING
78 * Create the TextSelectionPopup control.
79 * @return A handle to the TextSelectionPopup control.
81 static TextSelectionPopup New();
84 * @brief Creates an empty handle.
89 * @brief Copy constructor.
91 * @param[in] handle The handle to copy from.
93 TextSelectionPopup( const TextSelectionPopup& handle );
96 * @brief Assignment operator.
98 * @param[in] handle The handle to copy from.
99 * @return A reference to this.
101 TextSelectionPopup& operator=( const TextSelectionPopup& handle );
106 * This is non-virtual since derived Handle types must not contain data or virtual methods.
108 ~TextSelectionPopup();
111 * @brief Downcast a handle to TextSelectionPopup.
113 * If the BaseHandle points is a TextSelectionPopup the downcast returns a valid handle.
114 * If not the returned handle is left empty.
116 * @param[in] handle Handle to an object
117 * @return handle to a TextSelectionPopup or an empty handle
119 static TextSelectionPopup DownCast( BaseHandle handle );
121 public: // Not intended for application developers
124 * @brief Creates a handle using the Toolkit::Internal implementation.
126 * @param[in] implementation The Control implementation.
128 DALI_INTERNAL TextSelectionPopup( Internal::TextSelectionPopup& implementation );
131 * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
133 * @param[in] internal A pointer to the internal CustomActor.
135 explicit DALI_INTERNAL TextSelectionPopup( Dali::Internal::CustomActor* internal );
137 }; // Class TextSelectionPopup
139 } // namespace Toolkit
143 #endif // __DALI_TOOLKIT_TEXT_SELECTION_POPUP_H__