X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Ftext-view%2Ftext-view.cpp;h=36d7ec3e7df7da30588c4dc23f4e901c421f6e11;hb=2ddfbb9e23a7c3fc30e604236c41e0ef6d2ed6a2;hp=f03d94addb509923837657e088ca16275d1cc633;hpb=bf2155ead4441b35df9e85eb10743c5bedba777e;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/public-api/controls/text-view/text-view.cpp b/dali-toolkit/public-api/controls/text-view/text-view.cpp index f03d94a..36d7ec3 100644 --- a/dali-toolkit/public-api/controls/text-view/text-view.cpp +++ b/dali-toolkit/public-api/controls/text-view/text-view.cpp @@ -1,25 +1,24 @@ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Flora License, Version 1.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://floralicense.org/license/ -// -// 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. -// +/* + * Copyright (c) 2014 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 namespace Dali @@ -35,6 +34,7 @@ TextView::CharacterLayoutInfo::CharacterLayoutInfo() : mSize(), mPosition(), mIsNewLineChar( false ), + mIsNewParagraphChar( false ), mIsRightToLeftCharacter( false ), mIsVisible( true ), mDescender() @@ -48,7 +48,8 @@ TextView::CharacterLayoutInfo::~CharacterLayoutInfo() TextView::CharacterLayoutInfo::CharacterLayoutInfo( const TextView::CharacterLayoutInfo& characterLayoutInfo ) : mSize( characterLayoutInfo.mSize ), mPosition( characterLayoutInfo.mPosition ), - mIsNewLineChar( characterLayoutInfo.mIsNewLineChar ), + mIsNewLineChar( characterLayoutInfo.mIsNewParagraphChar ), + mIsNewParagraphChar( characterLayoutInfo.mIsNewParagraphChar ), mIsRightToLeftCharacter( characterLayoutInfo.mIsRightToLeftCharacter ), mIsVisible( characterLayoutInfo.mIsVisible ), mDescender( characterLayoutInfo.mDescender ) @@ -59,7 +60,8 @@ TextView::CharacterLayoutInfo& TextView::CharacterLayoutInfo::operator=( const T { mSize = characterLayoutInfo.mSize; mPosition = characterLayoutInfo.mPosition; - mIsNewLineChar = characterLayoutInfo.mIsNewLineChar; + mIsNewLineChar = characterLayoutInfo.mIsNewParagraphChar; + mIsNewParagraphChar = characterLayoutInfo.mIsNewParagraphChar; mIsRightToLeftCharacter = characterLayoutInfo.mIsRightToLeftCharacter; mIsVisible = characterLayoutInfo.mIsVisible; mDescender = characterLayoutInfo.mDescender; @@ -69,13 +71,14 @@ TextView::CharacterLayoutInfo& TextView::CharacterLayoutInfo::operator=( const T TextView::CharacterLayoutInfo::CharacterLayoutInfo( const Size& size, const Vector3& position, - const bool isNewLineChar, - const bool isRightToLeftCharacter, - const bool isVisible, - const float descender ) + bool isNewParagraphChar, + bool isRightToLeftCharacter, + bool isVisible, + float descender ) : mSize( size ), mPosition( position ), - mIsNewLineChar( isNewLineChar ), + mIsNewLineChar( isNewParagraphChar ), + mIsNewParagraphChar( isNewParagraphChar ), mIsRightToLeftCharacter( isRightToLeftCharacter ), mIsVisible( isVisible ), mDescender( descender ) @@ -126,7 +129,7 @@ TextView::FadeBoundary::FadeBoundary() { } -TextView::FadeBoundary::FadeBoundary( const PixelSize left, const PixelSize right, const PixelSize top, const PixelSize bottom ) +TextView::FadeBoundary::FadeBoundary( PixelSize left, PixelSize right, PixelSize top, PixelSize bottom ) : mLeft( left ), mRight( right ), mTop( top ), @@ -196,27 +199,27 @@ void TextView::SetText( const MarkupProcessor::StyledTextArray& text ) GetImpl( *this ).SetText( text ); } -void TextView::InsertTextAt( const std::size_t position, const std::string& text ) +void TextView::InsertTextAt( std::size_t position, const std::string& text ) { GetImpl( *this ).InsertTextAt( position, text ); } -void TextView::InsertTextAt( const std::size_t position, const MarkupProcessor::StyledTextArray& text ) +void TextView::InsertTextAt( std::size_t position, const MarkupProcessor::StyledTextArray& text ) { GetImpl( *this ).InsertTextAt( position, text ); } -void TextView::ReplaceTextFromTo( const std::size_t position, const std::size_t numberOfCharacters, const std::string& text ) +void TextView::ReplaceTextFromTo( std::size_t position, std::size_t numberOfCharacters, const std::string& text ) { GetImpl( *this ).ReplaceTextFromTo( position, numberOfCharacters, text ); } -void TextView::ReplaceTextFromTo( const std::size_t position, const std::size_t numberOfCharacters, const MarkupProcessor::StyledTextArray& text ) +void TextView::ReplaceTextFromTo( std::size_t position, std::size_t numberOfCharacters, const MarkupProcessor::StyledTextArray& text ) { GetImpl( *this ).ReplaceTextFromTo( position, numberOfCharacters, text ); } -void TextView::RemoveTextFrom( const std::size_t position, const std::size_t numberOfCharacters ) +void TextView::RemoveTextFrom( std::size_t position, std::size_t numberOfCharacters ) { GetImpl( *this ).RemoveTextFrom( position, numberOfCharacters ); } @@ -226,7 +229,7 @@ std::string TextView::GetText() const return GetImpl( *this ).GetText(); } -void TextView::SetLineHeightOffset( const PointSize offset ) +void TextView::SetLineHeightOffset( PointSize offset ) { GetImpl( *this ).SetLineHeightOffset( offset ); } @@ -236,7 +239,7 @@ PointSize TextView::GetLineHeightOffset() const return GetImpl( *this ).GetLineHeightOffset(); } -void TextView::SetStyleToCurrentText( const TextStyle& style, const TextStyle::Mask mask ) +void TextView::SetStyleToCurrentText( const TextStyle& style, TextStyle::Mask mask ) { GetImpl( *this ).SetStyleToCurrentText( style, mask ); } @@ -361,11 +364,21 @@ bool TextView::IsScrollPositionTrimmed() const return GetImpl( *this ).IsScrollPositionTrimmed(); } -TextView::ScrolledSignalV2& TextView::ScrolledSignal() +TextView::ScrolledSignalType& TextView::ScrolledSignal() { return GetImpl( *this ).ScrolledSignal(); } +void TextView::SetMarkupProcessingEnabled( bool enable ) +{ + return GetImpl( *this ).SetMarkupProcessingEnabled( enable ); +} + +bool TextView::IsMarkupProcessingEnabled() const +{ + return GetImpl( *this ).IsMarkupProcessingEnabled(); +} + TextView::TextView( Internal::TextView& implementation ) : Control( implementation ) {