: color( Dali::Color::BLACK ),
position(),
cursorHeight( 0.0f ),
- lineHeight( 0.0f )
+ lineHeight( 0.0f ),
+ glyphOffset( 0.0f )
{
}
Vector2 position;
float cursorHeight;
float lineHeight;
+ float glyphOffset;
};
struct HandleImpl
mBoundingBox(),
mHighlightColor( LIGHT_BLUE ),
mHighlightPosition( Vector2::ZERO ),
+ mHighlightSize( Vector2::ZERO ),
+ mControlSize( Vector2::ZERO ),
+ mHighlightOutlineOffset( 0.f ),
mActiveCursor( ACTIVE_CURSOR_NONE ),
mCursorBlinkInterval( CURSOR_BLINK_INTERVAL ),
mCursorBlinkDuration( 0.0f ),
if ( mHighlightActor )
{
// Sets the position of the highlight actor inside the decorator.
- mHighlightActor.SetPosition( mHighlightPosition.x,
- mHighlightPosition.y );
+ mHighlightActor.SetPosition( mHighlightPosition.x + mHighlightOutlineOffset,
+ mHighlightPosition.y + mHighlightOutlineOffset );
const unsigned int numberOfQuads = mHighlightQuadList.Count();
if( 0u != numberOfQuads )
Vector2 mHighlightPosition; ///< The position of the highlight actor.
Size mHighlightSize; ///< The size of the highlighted text.
Size mControlSize; ///< The control's size. Set by the Relayout.
+ float mHighlightOutlineOffset; ///< The outline's offset.
unsigned int mActiveCursor;
unsigned int mCursorBlinkInterval;
return mImpl->mCursor[cursor].position;
}
+void Decorator::SetGlyphOffset( Cursor cursor, float glyphOffset )
+{
+ Impl::CursorImpl& cursorImpl = mImpl->mCursor[cursor];
+
+ cursorImpl.glyphOffset = glyphOffset;
+}
+
+const float Decorator::GetGlyphOffset( Cursor cursor) const
+{
+ return mImpl->mCursor[cursor].glyphOffset;
+}
+
void Decorator::SetCursorColor( Cursor cursor, const Dali::Vector4& color )
{
mImpl->mCursor[cursor].color = color;
*( mImpl->mHighlightQuadList.Begin() + index ) = quad;
}
-void Decorator::SetHighLightBox( const Vector2& position, const Size& size )
+void Decorator::SetHighLightBox( const Vector2& position, const Size& size, float outlineOffset )
{
mImpl->mHighlightPosition = position;
mImpl->mHighlightSize = size;
+ mImpl->mHighlightOutlineOffset = outlineOffset;
}
void Decorator::ClearHighlights()
{
mImpl->mHighlightQuadList.Clear();
mImpl->mHighlightPosition = Vector2::ZERO;
+ mImpl->mHighlightOutlineOffset = 0.f;
}
void Decorator::ResizeHighlightQuads( unsigned int numberOfQuads )
return mImpl->mIsHighlightBoxActive;
}
+bool Decorator::IsHighlightVisible() const
+{
+ return ( mImpl->mHighlightActor && mImpl->mHighlightActor.GetParent() );
+}
+
void Decorator::SetTextDepth( int textDepth )
{
mImpl->mTextDepth = textDepth;