X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-controller-impl.h;h=44ae88e2a19170e155eec244b4b81f72d8f6a5f0;hb=23b11d5e9e206a703616aeef9bea3f75647a54db;hp=af3c7c670d74dfab20447bad790dd1bfa3d07d22;hpb=2f253707eb7acc2d0dd6d17c23f9cec8199771ab;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/text-controller-impl.h b/dali-toolkit/internal/text/text-controller-impl.h index af3c7c6..44ae88e 100644 --- a/dali-toolkit/internal/text/text-controller-impl.h +++ b/dali-toolkit/internal/text/text-controller-impl.h @@ -1,5 +1,5 @@ -#ifndef __DALI_TOOLKIT_TEXT_CONTROLLER_IMPL_H__ -#define __DALI_TOOLKIT_TEXT_CONTROLLER_IMPL_H__ +#ifndef DALI_TOOLKIT_TEXT_CONTROLLER_IMPL_H +#define DALI_TOOLKIT_TEXT_CONTROLLER_IMPL_H /* * Copyright (c) 2016 Samsung Electronics Co., Ltd. @@ -285,8 +285,10 @@ struct OutlineDefaults struct Controller::Impl { - Impl( ControlInterface& controlInterface ) + Impl( ControlInterface* controlInterface, + EditableControlInterface* editableControlInterface ) : mControlInterface( controlInterface ), + mEditableControlInterface( editableControlInterface ), mLogicalModel(), mVisualModel(), mFontDefaults( NULL ), @@ -302,9 +304,11 @@ struct Controller::Impl mLayoutEngine(), mModifyEvents(), mTextColor( Color::BLACK ), + mScrollPosition(), mTextUpdateInfo(), mOperationsPending( NO_OPERATION ), mMaximumNumberOfCharacters( 50u ), + mAlignmentOffset( 0.f ), mRecalculateNaturalSize( true ), mMarkupProcessorEnabled( false ), mClipboardHideEnabled( true ), @@ -477,6 +481,12 @@ struct Controller::Impl return !result; // If NumberOfItems greater than 0, return false } + bool IsClipboardVisible() + { + bool result( mClipboard && mClipboard.IsVisible() ); + return result; + } + /** * @brief Calculates the start character index of the first paragraph to be updated and * the end character index of the last paragraph to be updated. @@ -584,7 +594,7 @@ struct Controller::Impl void SendSelectionToClipboard( bool deleteAfterSending ); - void GetTextFromClipboard( unsigned int itemIndex, std::string& retrievedString ); + void RequestGetTextFromClipboard(); void RepositionSelectionHandles(); void RepositionSelectionHandles( float visualX, float visualY ); @@ -680,7 +690,8 @@ private: public: - ControlInterface& mControlInterface; ///< Reference to the text controller. + ControlInterface* mControlInterface; ///< Reference to the text controller. + EditableControlInterface* mEditableControlInterface; ///< Reference to the editable text controller. LogicalModelPtr mLogicalModel; ///< Pointer to the logical model. VisualModelPtr mVisualModel; ///< Pointer to the visual model. FontDefaults* mFontDefaults; ///< Avoid allocating this when the user does not specify a font. @@ -704,6 +715,7 @@ public: TextUpdateInfo mTextUpdateInfo; ///< Info of the characters updated. OperationsMask mOperationsPending; ///< Operations pending to be done to layout the text. Length mMaximumNumberOfCharacters; ///< Maximum number of characters that can be inserted. + float mAlignmentOffset; ///< The alignment offset. bool mRecalculateNaturalSize:1; ///< Whether the natural size needs to be recalculated. bool mMarkupProcessorEnabled:1; ///< Whether the mark-up procesor is enabled. @@ -719,4 +731,4 @@ public: } // namespace Dali -#endif // __DALI_TOOLKIT_TEXT_CONTROLLER_H__ +#endif // DALI_TOOLKIT_TEXT_CONTROLLER_H