X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-scroller.h;h=b8dc10f6d5323f441cac49f0b4c4b99e477c0a17;hp=2d611bbd8e6257fd45b40f886931a7aa602ff8b1;hb=3a23cbcd64ab5780928e4a141e497242c9989110;hpb=b134e246fb1cd7d1f31f7cca5bfa33b6a559d7be diff --git a/dali-toolkit/internal/text/text-scroller.h b/dali-toolkit/internal/text/text-scroller.h index 2d611bb..b8dc10f 100644 --- a/dali-toolkit/internal/text/text-scroller.h +++ b/dali-toolkit/internal/text/text-scroller.h @@ -22,6 +22,7 @@ #include #include #include +#include // INTERNAL INCLUDES #include @@ -60,14 +61,16 @@ public: /** * @brief Set parameters relating to source required for scrolling * - * @param[in] sourceActor source actor to be scrolled + * @param[in] scrollingTextActor actor containing the text to be scrolled + * @param[in] renderer renderer to render the text + * @param[in] textureSet texture of the text to be scrolled * @param[in] controlSize size of the control to scroll within - * @param[in] offScreenSize size of the sourceActor + * @param[in] textNaturalSize natural size of the text * @param[in] direction text direction true for right to left text - * @param[in] alignmentOffset alignment of source text - * + * @param[in] horizontalAlignment horizontal alignment of the text + * @param[in] verticalAlignment vertical alignment of the text */ - void SetParameters( Actor sourceActor, const Size& controlSize, const Size& offScreenSize, CharacterDirection direction, float alignmentOffset, Layout::HorizontalAlignment horizontalAlignment ); + void SetParameters( Actor scrollingTextActor, Dali::Renderer renderer, TextureSet textureSet, const Size& controlSize, const Size& offScreenSize, CharacterDirection direction, Layout::HorizontalAlignment horizontalAlignment, Layout::VerticalAlignment verticalAlignment ); /** * @brief Set the gap distance to elapse before the text wraps around @@ -134,18 +137,6 @@ public: */ DevelTextLabel::AutoScrollStopMode::Type GetStopMode() const; - /** - * @brief Get the camera used to look at source, should be added to the parent of target actor. - * @return camera Actor - */ - Actor GetSourceCamera() const; - - /** - * @brief Get the resulting scrolling text actor, add to target actor which will show scrolling text - * @return mesh Actor - */ - Actor GetScrollingText() const; - private: // Implementation /** @@ -172,25 +163,21 @@ private: // Implementation /** * @brief variables required to set up scrolling animation + * @param[in] scrollingTextActor actor that shows scrolling text * @param[in] scrollAmount distance to animate text for the given duration * @param[in] scrollDuration duration of aninmation * @param[in] loopCount number of times to loop the scrolling text */ - void StartScrolling( float scrollAmount, float scrollDuration, int loopCount ); - - /** - * @brief When scrolling ended, the actors are cleaned up so no longer staged. - */ - void CleanUp(); + void StartScrolling( Actor scrollingTextActor, float scrollAmount, float scrollDuration, int loopCount ); private: - RenderTask mRenderTask; // Renders full text to a FrameBuffer which is then scrolled. - CameraActor mOffscreenCameraActor; // Camera used by render task - Actor mScrollingTextActor; // Actor used to show scrolling text ScrollerInterface& mScrollerInterface; // Interface implemented by control that requires scrolling Property::Index mScrollDeltaIndex; // Property used by shader to represent distance to scroll Animation mScrollAnimation; // Animation used to update the mScrollDeltaIndex + Dali::Renderer mRenderer; // Renderer used to render the text + Shader mShader; // Shader originally used by the renderer while not scrolling + TextureSet mTextureSet; // Texture originally used by the renderer while not scrolling int mScrollSpeed; ///< Speed which text should automatically scroll at int mLoopCount; ///< Number of time the text should scroll