From: Agnelo Vaz Date: Tue, 26 May 2015 12:45:15 +0000 (+0100) Subject: Move TextSelectionPopup from public to devel X-Git-Tag: dali_1.0.42~20^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2b4be89fbaad622c93c957ad425a485ba0cc8bd4;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git Move TextSelectionPopup from public to devel Change-Id: I67ed206d8083606ba5435c502e668414095bd9dc Signed-off-by: Agnelo Vaz --- diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextSelectionPopup.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextSelectionPopup.cpp index d4914f5915..b248e010df 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextSelectionPopup.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextSelectionPopup.cpp @@ -19,6 +19,7 @@ #include #include #include +#include using namespace Dali; using namespace Toolkit; diff --git a/dali-toolkit/dali-toolkit.h b/dali-toolkit/dali-toolkit.h index eeeaa44ad0..9cef6c3a0c 100644 --- a/dali-toolkit/dali-toolkit.h +++ b/dali-toolkit/dali-toolkit.h @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include diff --git a/dali-toolkit/devel-api/controls/text-controls/text-selection-popup.cpp b/dali-toolkit/devel-api/controls/text-controls/text-selection-popup.cpp new file mode 100644 index 0000000000..f41f6678c1 --- /dev/null +++ b/dali-toolkit/devel-api/controls/text-controls/text-selection-popup.cpp @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// CLASS HEADER +#include + +// INTERNAL INCLUDES +#include + +using namespace Dali; + +namespace Dali +{ + +namespace Toolkit +{ + +TextSelectionPopup TextSelectionPopup::New() +{ + return Internal::TextSelectionPopup::New(); +} + +TextSelectionPopup::TextSelectionPopup() +{ +} + +TextSelectionPopup::TextSelectionPopup( const TextSelectionPopup& handle ) +: Control( handle ) +{ +} + +TextSelectionPopup& TextSelectionPopup::operator=( const TextSelectionPopup& handle ) +{ + if( &handle != this ) + { + Control::operator=( handle ); + } + return *this; +} + +TextSelectionPopup::~TextSelectionPopup() +{ +} + +TextSelectionPopup TextSelectionPopup::DownCast( BaseHandle handle ) +{ + return Control::DownCast(handle); +} + +TextSelectionPopup::TextSelectionPopup( Internal::TextSelectionPopup& implementation ) +: Control(implementation) +{ +} + +TextSelectionPopup::TextSelectionPopup( Dali::Internal::CustomActor* internal ) +: Control( internal ) +{ + VerifyCustomActorPointer( internal ); +} + + +} // namespace Toolkit + +} // namespace Dali diff --git a/dali-toolkit/devel-api/controls/text-controls/text-selection-popup.h b/dali-toolkit/devel-api/controls/text-controls/text-selection-popup.h new file mode 100644 index 0000000000..2243f2d92d --- /dev/null +++ b/dali-toolkit/devel-api/controls/text-controls/text-selection-popup.h @@ -0,0 +1,143 @@ +#ifndef __DALI_TOOLKIT_TEXT_SELECTION_POPUP_H__ +#define __DALI_TOOLKIT_TEXT_SELECTION_POPUP_H__ + +/* + * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// INTERNAL INCLUDES +#include + +namespace Dali +{ + +namespace Toolkit +{ + +namespace Internal DALI_INTERNAL +{ +class TextSelectionPopup; +} + +/** + * @brief A control which provides a Popup with a number of buttons + * + * The style of the pop can be set through style sheets, this includes the images for the buttons + * A Show and Hide API is provided. + * + * If the buttons exceed the size constraints of the popup then it will offer scrolling. + * + * + */ +class DALI_IMPORT_API TextSelectionPopup : public Control +{ +public: + + /** + * @brief The start and end property ranges for this control. + */ + enum PropertyRange + { + PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, + PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices + }; + + /** + * @brief An enumeration of properties belonging to the TextLabel class. + */ + struct Property + { + enum + { + + POPUP_MAX_SIZE, ///< name "popup-max-size", The max size the Popup can be, type VECTOR2 + POPUP_BACKGROUND_IMAGE, ///< name "popup-background-image", The image to display for popup background type STRING + POPUP_CLIPBOARD_BUTTON_ICON_IMAGE, ///< name "popup-clipboard-button-image", The image to use as the popup clipboard icon, type STRING + POPUP_CUT_BUTTON_ICON_IMAGE, ///< name "popup-cut-button-image", The image to use as the popup cut icon, type STRING + POPUP_COPY_BUTTON_ICON_IMAGE, ///< name "popup-copy-button-image", The image to use as the popup copy icon, type STRING + POPUP_PASTE_BUTTON_ICON_IMAGE, ///< name "popup-paste-button-image", The image to use as the popup paste icon, type STRING + POPUP_SELECT_BUTTON_ICON_IMAGE, ///< name "popup-select-button-image", The image to use as the popup select icon, type STRING + POPUP_SELECT_ALL_BUTTON_ICON_IMAGE, ///< name "popup-select-all-button-image", The image to use as the popup select all icon, type STRING + }; + }; + + /** + * Create the TextSelectionPopup control. + * @return A handle to the TextSelectionPopup control. + */ + static TextSelectionPopup New(); + + /** + * @brief Creates an empty handle. + */ + TextSelectionPopup(); + + /** + * @brief Copy constructor. + * + * @param[in] handle The handle to copy from. + */ + TextSelectionPopup( const TextSelectionPopup& handle ); + + /** + * @brief Assignment operator. + * + * @param[in] handle The handle to copy from. + * @return A reference to this. + */ + TextSelectionPopup& operator=( const TextSelectionPopup& handle ); + + /** + * @brief Destructor + * + * This is non-virtual since derived Handle types must not contain data or virtual methods. + */ + ~TextSelectionPopup(); + + /** + * @brief Downcast a handle to TextSelectionPopup. + * + * If the BaseHandle points is a TextSelectionPopup the downcast returns a valid handle. + * If not the returned handle is left empty. + * + * @param[in] handle Handle to an object + * @return handle to a TextSelectionPopup or an empty handle + */ + static TextSelectionPopup DownCast( BaseHandle handle ); + +public: // Not intended for application developers + + /** + * @brief Creates a handle using the Toolkit::Internal implementation. + * + * @param[in] implementation The Control implementation. + */ + DALI_INTERNAL TextSelectionPopup( Internal::TextSelectionPopup& implementation ); + + /** + * @brief Allows the creation of this Control from an Internal::CustomActor pointer. + * + * @param[in] internal A pointer to the internal CustomActor. + */ + explicit DALI_INTERNAL TextSelectionPopup( Dali::Internal::CustomActor* internal ); + +}; // Class TextSelectionPopup + +} // namespace Toolkit + +} // namepsace Dali + +#endif // __DALI_TOOLKIT_TEXT_SELECTION_POPUP_H__ diff --git a/dali-toolkit/devel-api/file.list b/dali-toolkit/devel-api/file.list index 5e0a8ff1e3..7a940c11d5 100755 --- a/dali-toolkit/devel-api/file.list +++ b/dali-toolkit/devel-api/file.list @@ -16,6 +16,7 @@ devel_api_src_files = \ $(devel_api_src_dir)/controls/shadow-view/shadow-view.cpp \ $(devel_api_src_dir)/controls/slider/slider.cpp \ $(devel_api_src_dir)/controls/super-blur-view/super-blur-view.cpp \ + $(devel_api_src_dir)/controls/text-controls/text-selection-popup.cpp \ $(devel_api_src_dir)/controls/tool-bar/tool-bar.cpp \ $(devel_api_src_dir)/styling/style-manager.cpp \ $(devel_api_src_dir)/scripting/script.cpp \ @@ -132,6 +133,9 @@ devel_api_shader_effects_header_files = \ devel_api_super_blur_view_header_files = \ $(devel_api_src_dir)/controls/super-blur-view/super-blur-view.h +devel_api_text_selection_popup_header_files = \ + $(devel_api_src_dir)/controls/text-controls/text-selection-popup.h + devel_api_tool_bar_header_files = \ $(devel_api_src_dir)/controls/tool-bar/tool-bar.h diff --git a/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.h b/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.h index 07535798e8..892c563269 100644 --- a/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.h +++ b/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.h @@ -21,7 +21,7 @@ // INTERNAL INCLUDES #include #include -#include +#include // EXTERNAL INCLUDES #include diff --git a/dali-toolkit/internal/text/decorator/text-decorator.cpp b/dali-toolkit/internal/text/decorator/text-decorator.cpp index 73297901c0..f529f70a56 100644 --- a/dali-toolkit/internal/text/decorator/text-decorator.cpp +++ b/dali-toolkit/internal/text/decorator/text-decorator.cpp @@ -47,7 +47,7 @@ #include #include #include -#include +#include #ifdef DEBUG_ENABLED #define DECORATOR_DEBUG diff --git a/dali-toolkit/public-api/controls/text-controls/text-selection-popup.cpp b/dali-toolkit/public-api/controls/text-controls/text-selection-popup.cpp deleted file mode 100644 index 4c553753b5..0000000000 --- a/dali-toolkit/public-api/controls/text-controls/text-selection-popup.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -// CLASS HEADER -#include - -// INTERNAL INCLUDES -#include - -using namespace Dali; - -namespace Dali -{ - -namespace Toolkit -{ - -TextSelectionPopup TextSelectionPopup::New() -{ - return Internal::TextSelectionPopup::New(); -} - -TextSelectionPopup::TextSelectionPopup() -{ -} - -TextSelectionPopup::TextSelectionPopup( const TextSelectionPopup& handle ) -: Control( handle ) -{ -} - -TextSelectionPopup& TextSelectionPopup::operator=( const TextSelectionPopup& handle ) -{ - if( &handle != this ) - { - Control::operator=( handle ); - } - return *this; -} - -TextSelectionPopup::~TextSelectionPopup() -{ -} - -TextSelectionPopup TextSelectionPopup::DownCast( BaseHandle handle ) -{ - return Control::DownCast(handle); -} - -TextSelectionPopup::TextSelectionPopup( Internal::TextSelectionPopup& implementation ) -: Control(implementation) -{ -} - -TextSelectionPopup::TextSelectionPopup( Dali::Internal::CustomActor* internal ) -: Control( internal ) -{ - VerifyCustomActorPointer( internal ); -} - - -} // namespace Toolkit - -} // namespace Dali diff --git a/dali-toolkit/public-api/controls/text-controls/text-selection-popup.h b/dali-toolkit/public-api/controls/text-controls/text-selection-popup.h deleted file mode 100644 index 2243f2d92d..0000000000 --- a/dali-toolkit/public-api/controls/text-controls/text-selection-popup.h +++ /dev/null @@ -1,143 +0,0 @@ -#ifndef __DALI_TOOLKIT_TEXT_SELECTION_POPUP_H__ -#define __DALI_TOOLKIT_TEXT_SELECTION_POPUP_H__ - -/* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -// INTERNAL INCLUDES -#include - -namespace Dali -{ - -namespace Toolkit -{ - -namespace Internal DALI_INTERNAL -{ -class TextSelectionPopup; -} - -/** - * @brief A control which provides a Popup with a number of buttons - * - * The style of the pop can be set through style sheets, this includes the images for the buttons - * A Show and Hide API is provided. - * - * If the buttons exceed the size constraints of the popup then it will offer scrolling. - * - * - */ -class DALI_IMPORT_API TextSelectionPopup : public Control -{ -public: - - /** - * @brief The start and end property ranges for this control. - */ - enum PropertyRange - { - PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, - PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices - }; - - /** - * @brief An enumeration of properties belonging to the TextLabel class. - */ - struct Property - { - enum - { - - POPUP_MAX_SIZE, ///< name "popup-max-size", The max size the Popup can be, type VECTOR2 - POPUP_BACKGROUND_IMAGE, ///< name "popup-background-image", The image to display for popup background type STRING - POPUP_CLIPBOARD_BUTTON_ICON_IMAGE, ///< name "popup-clipboard-button-image", The image to use as the popup clipboard icon, type STRING - POPUP_CUT_BUTTON_ICON_IMAGE, ///< name "popup-cut-button-image", The image to use as the popup cut icon, type STRING - POPUP_COPY_BUTTON_ICON_IMAGE, ///< name "popup-copy-button-image", The image to use as the popup copy icon, type STRING - POPUP_PASTE_BUTTON_ICON_IMAGE, ///< name "popup-paste-button-image", The image to use as the popup paste icon, type STRING - POPUP_SELECT_BUTTON_ICON_IMAGE, ///< name "popup-select-button-image", The image to use as the popup select icon, type STRING - POPUP_SELECT_ALL_BUTTON_ICON_IMAGE, ///< name "popup-select-all-button-image", The image to use as the popup select all icon, type STRING - }; - }; - - /** - * Create the TextSelectionPopup control. - * @return A handle to the TextSelectionPopup control. - */ - static TextSelectionPopup New(); - - /** - * @brief Creates an empty handle. - */ - TextSelectionPopup(); - - /** - * @brief Copy constructor. - * - * @param[in] handle The handle to copy from. - */ - TextSelectionPopup( const TextSelectionPopup& handle ); - - /** - * @brief Assignment operator. - * - * @param[in] handle The handle to copy from. - * @return A reference to this. - */ - TextSelectionPopup& operator=( const TextSelectionPopup& handle ); - - /** - * @brief Destructor - * - * This is non-virtual since derived Handle types must not contain data or virtual methods. - */ - ~TextSelectionPopup(); - - /** - * @brief Downcast a handle to TextSelectionPopup. - * - * If the BaseHandle points is a TextSelectionPopup the downcast returns a valid handle. - * If not the returned handle is left empty. - * - * @param[in] handle Handle to an object - * @return handle to a TextSelectionPopup or an empty handle - */ - static TextSelectionPopup DownCast( BaseHandle handle ); - -public: // Not intended for application developers - - /** - * @brief Creates a handle using the Toolkit::Internal implementation. - * - * @param[in] implementation The Control implementation. - */ - DALI_INTERNAL TextSelectionPopup( Internal::TextSelectionPopup& implementation ); - - /** - * @brief Allows the creation of this Control from an Internal::CustomActor pointer. - * - * @param[in] internal A pointer to the internal CustomActor. - */ - explicit DALI_INTERNAL TextSelectionPopup( Dali::Internal::CustomActor* internal ); - -}; // Class TextSelectionPopup - -} // namespace Toolkit - -} // namepsace Dali - -#endif // __DALI_TOOLKIT_TEXT_SELECTION_POPUP_H__ diff --git a/dali-toolkit/public-api/file.list b/dali-toolkit/public-api/file.list index 3607815902..3bd88d8665 100755 --- a/dali-toolkit/public-api/file.list +++ b/dali-toolkit/public-api/file.list @@ -22,7 +22,6 @@ public_api_src_files = \ $(public_api_src_dir)/controls/table-view/table-view.cpp \ $(public_api_src_dir)/controls/text-controls/text-label.cpp \ $(public_api_src_dir)/controls/text-controls/text-field.cpp \ - $(public_api_src_dir)/controls/text-controls/text-selection-popup.cpp \ $(public_api_src_dir)/controls/gaussian-blur-view/gaussian-blur-view.cpp \ $(public_api_src_dir)/controls/image-view/masked-image-view.cpp \ $(public_api_src_dir)/focus-manager/focus-manager.cpp \ @@ -83,8 +82,7 @@ public_api_table_view_header_files = \ public_api_text_controls_header_files = \ $(public_api_src_dir)/controls/text-controls/text-label.h \ - $(public_api_src_dir)/controls/text-controls/text-field.h \ - $(public_api_src_dir)/controls/text-controls/text-selection-popup.h + $(public_api_src_dir)/controls/text-controls/text-field.h public_api_focus_manager_header_files = \ $(public_api_src_dir)/focus-manager/focus-manager.h \