PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFYSingleTextWidget
Responder which represents a widget to display a single uneditable text.
#include <SFYSingleTextWidget.h.hpp>
class SFYSingleTextWidget : public SFYWidget;
SFMTYPEDEFCLASS(SFYSingleTextWidget)

Inheritance diagram

 Inheritance diagram of SFYSingleTextWidgetClass

Collaboration diagram

 Collaboration diagram of SFYSingleTextWidgetClass

Description

How to use

SFYSingleTextWidget is a responder with the function of displaying a single uneditable text.

In general, this class is used as a child responder contained internally by the parent responder such as SFZTextButtonControl, SFZSingleTextLabelControl, or SFZSingleTextBoxControl, which will display a single text.

In these responders, all processings such as setting a single text, its color, its font, its alignment, or its scroll are delegated to this class.

[Note] The state of this responder when used

When this class is used, its state is set to "visible"+"active"+"disable"+"unfocus".

In general, this class is used as a responder which will not handle the key event.

[Caution] Default value of the transparency attribute

Since the default value of the transparency attribute of this class is set to "true", the background will be never drawn in the color set with the SFYWidget::SetBackgroundColor function unless the transparency attribute is set to "false" using the SFYResponder::SetPropertyTransparent function.

[Caution] About the virtual region

In this class, it is recommended to equalize the virtual region with the real region for the intuitive text alignment or scroll.

For instance, though all the text is not displayed, the text will not start to scroll even if the SFYSingleTextWidget::StartScroll function is called when the following relation stands up.

[Width of virtual region] ≧ [Width of single text] > [Width of real region]

Reference

SFZTextButtonControl | SFZSingleTextLabelControl | SFZSingleTextBoxControl | SFZComboBoxControl | SFZCheckboxControl | SFZRadiobuttonControl | SFZTitlePlainFrame | SFZTitleFlatFrame | SFZTitleBevelFrame | SFYSingleEditWidget | Virtual Region | Real Region | Local Region

Member

Constructor/Destructor
SFYSingleTextWidget( Void )
Constructor of the SFYSingleTextWidget class.
~SFYSingleTextWidget( Void )
Destructor of the SFYSingleTextWidget class.
Public Functions
AEEFont GetFont( Void )
Get the font.
SFXSizeConstRef GetFontSize( Void )
Get the font size.
HorizontalEnum GetHorizontalAlign( Void )
Get the horizontal alignment.
DirectionEnum GetScrollDirection( Void )
Get the scroll direction.
UInt32 GetScrollInterval( Void )
Get the scroll-interval. [milliseconds]
SInt16 GetScrollStep( Void )
Get the scroll-step. [pixels]
SFXWideStringConstRef GetText( Void )
Get the text.
SFXRGBColorConstRef GetTextColor( Void )
Get the color of text.
SFXSizeConstRef GetTextSize( Void )
Get the size of the text.
VerticalEnum GetVerticalAlign( Void )
Get the vertical alignment.
UInt32 GetWaitInterval( Void )
Get the waiting time to start to scroll. [milliseconds]
static
SFYSingleTextWidgetSmp
NewInstance( SFCErrorPtr exception = null )
Create a new instance of this responder class.
Void SetFont( AEEFont param )
Set the font to the specified value .
Void SetHorizontalAlign( HorizontalEnum param )
Set the horizontal alignment to the specified value.
Void SetScrollDirection( DirectionEnum param )
Set the scroll direction to the specified value.
Void SetScrollInterval( UInt32 param )
Set the scroll-interval to the specified value. [milliseconds]
Void SetScrollStep( SInt16 param )
Set the scroll-step to the specified value. [pixels]
SFCError SetText( SFXPathConstRef path , UInt16 id )
Set the text to the specified value.
SFCError SetText( SFXWideStringConstRef param )
Set the text to the specified value.
Void SetTextColor( SFXRGBColorConstRef param )
Set the color of text to the specified value.
Void SetVerticalAlign( VerticalEnum param )
Set the vertical alignment to the specified value.
Void SetWaitInterval( UInt32 param )
Set the waiting time to start the scroll to the specified value. [milliseconds]
Void StartScroll( Void )
Start to scroll the text.
Void StopScroll( Void )
Stop to scroll the text.
Void ClearHandler( Void ) (inherits from SFYResponder)
Unregister all handlers from this responder.
Void ClearTracer( Void ) (inherits from SFYResponder)
Unregister all dispatching rules from the tracer of this responder.
SFCError Distribute( SFXEventConstRef event , BoolPtr result = null ) (inherits from SFYResponder)
Distribute the specified event.
SFXRGBColorConstRef GetBackgroundColor( Void ) (inherits from SFYWidget)
Get the background color.
SFYResponderSmp GetChildBack( Void ) (inherits from SFYResponder)
Get the backmost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildBack( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the backmost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildBack( UInt32 id ) (inherits from SFYResponder)
Get the backmost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildBack( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the backmost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildBackward( SInt32 index ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side, which matches the specified search condition.
SFYResponderSmp GetChildBackward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side, which matches the specified search condition.
SFYResponderSmp GetChildBackward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side, which matches the specified search condition.
SFYResponderSmp GetChildBackward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side, which matches the specified search condition.
SInt32 GetChildCount( Void ) (inherits from SFYResponder)
Get the number of child responders of this responder, which match the specified search condition.
SInt32 GetChildCount( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the number of child responders of this responder, which match the specified search condition.
SInt32 GetChildCount( UInt32 id ) (inherits from SFYResponder)
Get the number of child responders of this responder, which match the specified search condition.
SInt32 GetChildCount( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the number of child responders of this responder, which match the specified search condition.
SFYResponderSmp GetChildForward( SInt32 index ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side, which matches the specified search condition.
SFYResponderSmp GetChildForward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side, which matches the specified search condition.
SFYResponderSmp GetChildForward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side, which matches the specified search condition.
SFYResponderSmp GetChildForward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side, which matches the specified search condition.
SFYResponderSmp GetChildFront( Void ) (inherits from SFYResponder)
Get the foremost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildFront( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the foremost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildFront( UInt32 id ) (inherits from SFYResponder)
Get the foremost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildFront( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the foremost child responder of this responder, which matches the specified search condition.
SFYDistributerPtr GetDistributer( Void ) (inherits from SFYResponder)
Get the distributer bound with this responder.
SFYResponderSmp GetFrame( Void ) (inherits from SFYResponder)
Get the frame which has been attached to this responder.
SFXRectangle GetGlobalBound( Void ) (inherits from SFYResponder)
Get the globle region of this responder.
UInt32 GetID( Void ) (inherits from SFYResponder)
Get the ID of this responder instance.
SFXRectangle GetLocalBound( Void ) (inherits from SFYResponder)
Get the local region of this responder.
SInt32 GetNthBackward( Void ) (inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthBackward( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthBackward( UInt32 id ) (inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthBackward( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthForward( Void ) (inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthForward( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthForward( UInt32 id ) (inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthForward( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders, which match the specified search condition.
SFYResponderSmp GetParent( Void ) (inherits from SFYResponder)
Get the parent responder of this responder.
Bool GetPropertyTransparent( Void ) (inherits from SFYResponder)
Get the transparency attribute of this responder.
SFXRectangleConstRef GetRealBound( Void ) (inherits from SFYResponder)
Get the real region of this responder.
VoidPtr GetReference( Void ) (inherits from SFYResponder)
Get the reference of this responder.
SFYRendererPtr GetRenderer( Void ) (inherits from SFYResponder)
Get the renderer bound with this responder.
SFYResponderSmp GetRoot( Void ) (inherits from SFYResponder)
Get the root responder.
Bool GetStateActive( Bool inherit = false ) (inherits from SFYResponder)
Get the active state of this responder.
Bool GetStateEnable( Bool inherit = false ) (inherits from SFYResponder)
Get the enable state of this responder.
Bool GetStateFocus( Bool inherit = false ) (inherits from SFYResponder)
Get the focus state of this responder.
Bool GetStateValid( Bool inherit = false ) (inherits from SFYResponder)
Get the valid state of this responder.
Bool GetStateVisible( Bool inherit = false ) (inherits from SFYResponder)
Get the visible state of this responder.
SFXRectangle GetSuitableBound( Void ) (inherits from SFYResponder)
Get the suitable region of this responder.
SFXRectangle GetSuitableBound( SFXRectangleConstRef rectangle ) (inherits from SFYResponder)
Get the suitable region of this responder.
SFXRectangle GetSuitableBound( SFXRectangleConstRef param , HorizontalEnum horizontal , VerticalEnum vertical ) (inherits from SFYResponder)
Get the suitable region of this responder.
SFXMargin GetSuitableMargin( Void ) (inherits from SFYResponder)
Get the suitable frame margin region of this responder.
SFCType GetType( Void ) (inherits from SFYResponder)
Get the type of this responder class.
SFXRectangleConstRef GetVirtualBound( Void ) (inherits from SFYResponder)
Get the virtual region of this responder.
Bool HasFrame( Void ) (inherits from SFYResponder)
Check whether or not this responder is a content-responder.
Void Initialize( Void ) (inherits from SFYResponder)
Initialize this responder.
Bool IsBack( Void ) (inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders which match the specified search condition.
Bool IsBack( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders which match the specified search condition.
Bool IsBack( UInt32 id ) (inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders which match the specified search condition.
Bool IsBack( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders which match the specified search condition.
Bool IsFrame( Void ) (inherits from SFYResponder)
Check whether or not this responder is an attachment-frame.
Bool IsFront( Void ) (inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders which match the specified search condition.
Bool IsFront( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders which match the specified search condition.
Bool IsFront( UInt32 id ) (inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders which match the specified search condition.
Bool IsFront( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders which match the specified search condition.
Bool IsNthBackward( SInt32 index ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders which match the specified search condition.
Bool IsNthBackward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders which match the specified search condition.
Bool IsNthBackward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders which match the specified search condition.
Bool IsNthBackward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders which match the specified search condition.
Bool IsNthForward( SInt32 index ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders which match the specified search condition.
Bool IsNthForward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders which match the specified search condition.
Bool IsNthForward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders which match the specified search condition.
Bool IsNthForward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders which match the specified search condition.
Bool IsRoot( Void ) (inherits from SFYResponder)
Check whether or not this responder is the root responder.
SFCError Recover( Void ) (inherits from SFYResponder)
Recover the intersection region between this responder and the responder space by using the saved bitmap to restore the device bitmap.
SFCError RegisterHandler( SFXEventRangeConstRef range , SFYHandler::RuleRecConstRef rule ) (inherits from SFYResponder)
Register specified handlers into this responder.
SFCError RegisterHandler( SFXEventRangeConstRef range , SFYHandler::HandlerSPP spp , VoidPtr reference ) (inherits from SFYResponder)
Register specified handlers into this responder.
SFCError RegisterHandler( SFXEventRangeConstPtr range , SFYHandler::RuleRecConstPtr rule , SInt32 length ) (inherits from SFYResponder)
Register specified handlers into this responder.
SFCError RegisterHandler( SFXEventRangeConstPtr range , SFYHandler::HandlerSPPConstPtr spp , VoidPtrConstPtr reference , SInt32 length ) (inherits from SFYResponder)
Register specified handlers into this responder.
SFCError RegisterTracer( SFXEventRangeConstRef range , SFYTracer::RuleRecConstRef rule ) (inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
SFCError RegisterTracer( SFXEventRangeConstRef range , SFYTracer::OrderEnum order , SFYTracer::StateEnum state , Bool overload ) (inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
SFCError RegisterTracer( SFXEventRangeConstPtr range , SFYTracer::RuleRecConstPtr rule , SInt32 length ) (inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
SFCError RegisterTracer( SFXEventRangeConstPtr range , SFYTracer::OrderEnumConstPtr order , SFYTracer::StateEnumConstPtr state , BoolConstPtr overload , SInt32 length ) (inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
SFCError Render( Bool force = false ) (inherits from SFYResponder)
Boot up the renderer for redrawing this responder and its descendant responders.
Void SetBackgroundColor( SFXRGBColorConstRef param ) (inherits from SFYWidget)
Set the background color to the specified value.
Void SetDistributer( SFYDistributerPtr param ) (inherits from SFYResponder)
Bind this responder with the specified distributer.
SFCError SetFrame( SFYResponderSmpConstRef param ) (inherits from SFYResponder)
Attach the specified frame to this frame.
Void SetID( UInt32 param ) (inherits from SFYResponder)
Set the ID value of this responder to the specified value.
SFCError SetParent( SFYResponderSmpConstRef param ) (inherits from SFYResponder)
Set the parent responder of this responder to the specified responder.
Void SetProperty( Bool transparent ) (inherits from SFYResponder)
Set the property of this responder to the specified value.
Void SetPropertyTransparent( Bool param ) (inherits from SFYResponder)
Set the transparency attribute of this responder to the specified value.
Void SetRealBound( SFXRectangleConstRef param ) (inherits from SFYResponder)
Set the real region of this responder to the specified region.
Void SetReference( VoidPtr param ) (inherits from SFYResponder)
Set the reference value of this responder to the specified value.
Void SetRenderer( SFYRendererPtr param ) (inherits from SFYResponder)
Bind this responder with the specified renderer.
Void SetState( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Set all states of this responder to specified values together.
Void SetStateActive( Bool param ) (inherits from SFYResponder)
Set the active state of this responder to the specified value.
Void SetStateEnable( Bool param ) (inherits from SFYResponder)
Set the enable state of this responder to the specified value.
Void SetStateFocus( Bool param ) (inherits from SFYResponder)
Set the focus state of this responder to the specified value.
Void SetStateVisible( Bool param ) (inherits from SFYResponder)
Set the visible state of this responder to the specified value.
Void SetVirtualBound( SFXRectangleConstRef param ) (inherits from SFYResponder)
Set the virtual region of this responder to the specified value.
SFCError Snapshot( SFBBitmapSmpConstRef bitmap ) (inherits from SFYResponder)
Get a snapshot image of the intersection region between this responder and the responder space by using the saved bitmap.
Void Terminate( Void ) (inherits from SFYResponder)
Terminate this responder.
Void ToBack( Void ) (inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders which match the specified search condition.
Void ToBack( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders which match the specified search condition.
Void ToBack( UInt32 id ) (inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders which match the specified search condition.
Void ToBack( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders which match the specified search condition.
Void ToFront( Void ) (inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders which match the specified search condition.
Void ToFront( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders which match the specified search condition.
Void ToFront( UInt32 id ) (inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders which match the specified search condition.
Void ToFront( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders which match the specified search condition.
Void ToNthBackward( SInt32 index ) (inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders which match the specified search condition.
Void ToNthBackward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders which match the specified search condition.
Void ToNthBackward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders which match the specified search condition.
Void ToNthBackward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders which match the specified search condition.
Void ToNthForward( SInt32 index ) (inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders which match the specified search condition.
Void ToNthForward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders which match the specified search condition.
Void ToNthForward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders which match the specified search condition.
Void ToNthForward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders which match the specified search condition.
Void UnregisterHandler( SFXEventRangeConstRef range , SFYHandler::RuleRecConstRef rule ) (inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
Void UnregisterHandler( SFXEventRangeConstRef range , SFYHandler::HandlerSPP spp , VoidPtr reference ) (inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
Void UnregisterHandler( SFXEventRangeConstPtr range , SFYHandler::RuleRecConstPtr rule , SInt32 length ) (inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
Void UnregisterHandler( SFXEventRangeConstPtr range , SFYHandler::HandlerSPPConstPtr spp , VoidPtrConstPtr reference , SInt32 length ) (inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
Void UnregisterTracer( SFXEventRangeConstRef range ) (inherits from SFYResponder)
Unregister the dispatching rule from the tracer of this responder which matches the specified condition.
Void UnregisterTracer( SFXEventRangeConstPtr range , SInt32 length ) (inherits from SFYResponder)
Unregister the dispatching rule from the tracer of this responder which matches the specified condition.
T const & static_catch( Void ) (inherits from static_exception)
Get the current exception.
Protected Functions
Void DrawText( SFXGraphicsPtr graphics , SFXGridConstRef grid )
Draw the single text.
SInt16 GetScrollOffset( Void )
Get the scroll-offset.
SFXGridConstRef GetTextOrigin( Void )
Get the origin of the text region.
Void HandleBoundOptimize( SFXRectanglePtr rectangle )
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_OPTIMIZE) event is received. [Calculate the suitable rectangle size of this responder within the specified hint rectangle.]
Void HandleBoundReal( Void )
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_REAL) event is received. [Perform the processing when the real region is changed.]
Void HandleBoundRequest( SFXRectanglePtr rectangle )
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_REQUEST) event is received. [Calculate the suitable rectangle size of this responder.]
Void HandleBoundVirtual( Void )
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event is received. [Perform the processing when the virtual region is changed.]
Void HandleRenderRequest( SFXGraphicsPtr graphics )
This function will be called when the (SFEVT_RESPONDER_RENDER, SFP16_RENDER_REQUEST) event is received. [Draw this responder.]
static
SFYResponderSmp
Factory( SFYResponderPtr responder , SFCErrorPtr exception = null ) (inherits from SFYResponder)
This function is used to implement the NewInstance function.
SFYResponderSmp GetThis( Void ) (inherits from SFYResponder)
Get the smart pointer of this responder.
Void HandleBoundGlobal( SFXRectangleConstRef rectangle ) (inherits from SFYWidget)
This function will be called when the global region is changed.
Void Invalidate( Void ) (inherits from SFYResponder)
Register the specified redraw region of this responder.
Void Invalidate( SFXRectangleConstRef param ) (inherits from SFYResponder)
Register the specified redraw region of this responder.
Void InvokeBackward( SFXEventConstRef event , Bool overload , BoolPtr result = null ) (inherits from SFYResponder)
Call the handlers for the specified event from the end of the handler list registered into this responder.
Void InvokeForward( SFXEventConstRef event , Bool overload , BoolPtr result = null ) (inherits from SFYResponder)
Call the handlers for the specified event from the head of the handler list registered into this responder.
Void SetType( SFCType param ) (inherits from SFYResponder)
Set the Type value of this responder to the specified 4-character value.
Void static_throw( static_exception< T > const & param ) (inherits from static_exception)
Set an exception.
Void static_throw( T const & param ) (inherits from static_exception)
Set an exception.
Bool static_try( Void ) (inherits from static_exception)
Confirm whether or not the exception is retained.
Types
CodeEnum
Constant that represents the SFYSingleTextWidget class.
DefaultEnum
Constants that represent the default value for various parameters.
DirectionEnum
Constants that represent the scroll direction.
HorizontalEnum
Constants that represent the horizontal alignment.
VerticalEnum
Constants that represent the vertical alignment.

SFYSingleTextWidget::SFYSingleTextWidget
Constructor of the SFYSingleTextWidget class.
[ protected, explicit ]
SFYSingleTextWidget(Void);

Description

This constructor performs the initializations as follows:

  1. Set the type of this responder to "+stx".
  2. Set the transparency attribute of this responder to "true".
  3. Set the text to ""[null string].
  4. Set the color of the text to SFXRGBColor(0x00, 0x00, 0x00, 0x00)[black color]
  5. Set the text font to AEE_FONT_NORMAL.
  6. Set the horizontal alignment of the text to SFYSingleTextWidget::DEFAULT_HORIZONTAL.
  7. Set the vertical alignment of the text to SFYSingleTextWidget::DEFAULT_VERTICAL.
  8. Set the waiting time to start to scroll the text to SFYSingleTextWidget::DEFAULT_WAIT [milliseconds].
  9. Set the scroll direction of the text to SFYSingleTextWidget::DEFAULT_DIRECTION.
  10. Set the scroll-interval of the text to SFYSingleTextWidget::DEFAULT_SCROLL [milliseconds].
  11. Set the scroll-step of the text to SFYSingleTextWidget::DEFAULT_STEP [pixels].
  12. Register the event handlers in the table below into this responder.

Table 217. Event handler

Event Content of the handler
Applet-suspend event[SFEVT_APP_SUSPEND] Cancel the timer processing to scroll text.
Applet-resume event[SFEVT_APP_RESUME] Restart the timer processing to scroll text.
[Note] Note
In a responder inheriting from SFYSingleTextWidget, the corresponding handler will be called when one of the above events occurs.

Reference

SFYResponder::SetType | SFYResponder::SetPropertyTransparent | SFYSingleTextWidget::CodeEnum | SFYSingleTextWidget::SetFont | SFYSingleTextWidget::SetText | SFYSingleTextWidget::SetTextColor | SFYSingleTextWidget::SetHorizontalAlign | SFYSingleTextWidget::SetScrollDirection | SFYSingleTextWidget::SetScrollInterval | SFYSingleTextWidget::SetScrollStep | SFYSingleTextWidget::SetTextColor | SFYSingleTextWidget::SetVerticalAlign | SFYSingleTextWidget::SetWaitInterval | SFYSingleTextWidget::HorizontalEnum | SFYSingleTextWidget::VerticalEnum | SFYSingleTextWidget::DirectionEnum | SFYSingleTextWidget::DefaultEnum | SFXRGBColor | Type | Attribute | Event | Applet-Suspend Event[SFEVT_APP_SUSPEND] | Applet-Resume Event[SFEVT_APP_RESUME]


SFYSingleTextWidget::~SFYSingleTextWidget
Destructor of the SFYSingleTextWidget class.
[ protected, virtual ]
virtual ~SFYSingleTextWidget(Void);

Description

This destructor stops to scroll the text.

Reference

SFYSingleTextWidget::StopScroll


SFYSingleTextWidget::DrawText
Draw the single text.
[ protected, const ]
Void DrawText(
    SFXGraphicsPtr graphics   // graphics object
    SFXGridConstRef grid      // coordinate of left-top
);

Description

This function draws the single text.

In case you want to perform your own processing, override this function.

[Note] Note
This function is called in the SFYSingleTextWidget::HandleRenderRequest function

Internal Implementation

Internal implementation of the SFYSingleTextWidget::DrawText function is as follows:

/*protected */Void SFYSingleTextWidget::DrawText(SFXGraphicsPtr graphics, SFXGridConstRef grid) const
{
    SFXGrid                                     origin;
    SFXRGBColor                                 rgb;

    origin.Set(grid);
    origin.AddX(_offset);
    rgb.Set(_color.text);
    if (!GetStateActive(true)) {
        if (rgb.GetBrightness() > 0x7F) {
            rgb.SubRGB(0x44);
        }
        else {
            rgb.AddRGB(0x44);
        }
    }
    graphics->SetFont(_font);
    graphics->DrawSingleText(_text, origin, rgb);
    return;
}// SFYSingleTextWidget::DrawText //

Reference

SFYSingleTextWidget::HandleRenderRequest


SFYSingleTextWidget::GetFont
Get the font.
[ public, const ]
AEEFont GetFont(Void);

Description

This function gets the font.

Reference

SFYSingleTextWidget::SetFont


SFYSingleTextWidget::GetFontSize
Get the font size.
[ public, const ]
SFXSizeConstRef GetFontSize(Void);

Description

This function gets the size of one character of the current font(the ' ' character is used).

Reference

SFYSingleTextWidget::SetFont


SFYSingleTextWidget::GetHorizontalAlign
Get the horizontal alignment.
[ public, const ]
HorizontalEnum GetHorizontalAlign(Void);

Return value

Value of the horizontal alignment.

Reference

SFYSingleTextWidget::SetHorizontalAlign | SFYSingleTextWidget::HorizontalEnum


SFYSingleTextWidget::GetScrollDirection
Get the scroll direction.
[ public, const ]
DirectionEnum GetScrollDirection(Void);

Return value

Scroll direction set with the SFYSingleTextWidget::SetScrollDirection function.

Reference

SFYSingleTextWidget::SetScrollDirection


SFYSingleTextWidget::GetScrollInterval
Get the scroll-interval. [milliseconds]
[ public, const ]
UInt32 GetScrollInterval(Void);

Return value

Scroll-interval set with the SFYSingleTextWidget::SetScrollInterval function. [milliseconds]

Reference

SFYSingleTextWidget::SetScrollInterval


SFYSingleTextWidget::GetScrollOffset
Get the scroll-offset.
[ protected, const ]
SInt16 GetScrollOffset(Void);

Return value

Value of the scroll-offset.

Description

This function gets the offset from the origin as a result of scroll.


SFYSingleTextWidget::GetScrollStep
Get the scroll-step. [pixels]
[ public, const ]
SInt16 GetScrollStep(Void);

Return value

Scroll-step set with the SFYSingleTextWidget::SetScrollStep function. [pixels]

Reference

SFYSingleTextWidget::SetScrollStep


SFYSingleTextWidget::GetText
Get the text.
[ public, const ]
SFXWideStringConstRef GetText(Void);

Reference

SFYSingleTextWidget::SetText


SFYSingleTextWidget::GetTextColor
Get the color of text.
[ public, const ]
SFXRGBColorConstRef GetTextColor(Void);

Reference

SFYSingleTextWidget::SetTextColor | SFXRGBColor


SFYSingleTextWidget::GetTextOrigin
Get the origin of the text region.
[ protected, const ]
SFXGridConstRef GetTextOrigin(Void);

SFYSingleTextWidget::GetTextSize
Get the size of the text.
[ public, const ]
SFXSizeConstRef GetTextSize(Void);

Description

This function gets the size of the text when it will be drawn with the current font.

Reference

SFYSingleTextWidget::SetFont


SFYSingleTextWidget::GetVerticalAlign
Get the vertical alignment.
[ public, const ]
VerticalEnum GetVerticalAlign(Void);

Return value

Value of the vertical alignment.

Reference

SFYSingleTextWidget::SetVerticalAlign | SFYSingleTextWidget::VerticalEnum


SFYSingleTextWidget::GetWaitInterval
Get the waiting time to start to scroll. [milliseconds]
[ public, const ]
UInt32 GetWaitInterval(Void);

Return value

Waiting time to start the scroll set with the SFYSingleTextWidget::SetWaitInterval function. [milliseconds]

Reference

SFYSingleTextWidget::SetWaitInterval


SFYSingleTextWidget::HandleBoundOptimize
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_OPTIMIZE) event is received. [Calculate the suitable rectangle size of this responder within the specified hint rectangle.]
[ protected, virtual, const ]
Void HandleBoundOptimize(
    SFXRectanglePtr rectangle   // hint region and calculated region
);

Description

This function will be called when the region event [SFXEvent(SFEVT_RESPONDER_BOUND, SFP16_BOUND_OPTIMIZE, rectangle)] is received.

This function calculates the suitable rectangle size of this responder within the specified hint rectangle[i.e., rectangle element (P32 parameter) of the region event].

The suitable rectangle size is stored into the size element of the rectangle argument as a result of calculation. It is recommended not to change the origin of the rectangle argument in this function.

[Note] Region event[(SFEVT_RESPONDER_BOUND, SFP16_BOUND_OPTIMIZE) event]

If the rectangle argument of the hint region is specified, the SFYResponder::GetSuitableBound function will send the region event [SFXEvent(SFEVT_RESPONDER_BOUND, SFP16_BOUND_OPTIMIZE, rectangle)] to this responder.

Then, the SFYWidget::HandleBoundOptimize virtual function will be called.

The rectangle element (P32 parameter) of the region event is set to the hint region as an initial value.

Internal Implementation

Internal implementation of the SFYSingleTextWidget::HandleBoundOptimize function is as follows:

/*protected virtual */Void SFYSingleTextWidget::HandleBoundOptimize(SFXRectanglePtr rectangle) const
{
    if (rectangle->GetWidth() > _bound.GetWidth()) {
        rectangle->SetWidth(_bound.GetWidth());
    }
    else if (rectangle->GetWidth() > _size.GetWidth()) {
        rectangle->DivWidth(_size.GetWidth());
        rectangle->MulWidth(_size.GetWidth());
    }
    if (rectangle->GetHeight() > _bound.GetHeight()) {
        rectangle->SetHeight(_bound.GetHeight());
    }
    else if (rectangle->GetHeight() > _size.GetHeight()) {
        rectangle->DivHeight(_size.GetHeight());
        rectangle->MulHeight(_size.GetHeight());
    }
    return;
}// SFYSingleTextWidget::HandleBoundOptimize //

Reference

SFYResponder::GetSuitableBound | SFYSingleTextWidget::SetText | SFYSingleTextWidget::SetFont | SFXGraphics::MeasureSingleText | SFXEvent | Region Event[SFEVT_RESPONDER_BOUND] | Handler for the Region Event[XANDLER_DECLARE_VOIDBOUND]


SFYSingleTextWidget::HandleBoundReal
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_REAL) event is received. [Perform the processing when the real region is changed.]
[ protected, virtual ]
Void HandleBoundReal(Void);

Description

This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_REAL) event is received.

In case you want to perform your own processing when the real region is updated, override this function.

The default implementation is to equalize the virtual region with the real region.

[Caution] About the virtual region

In this class, it is recommended to equalize the virtual region with the real region for the intuitive text alignment or scroll.

For instance, though all the text is not displayed, the text will not start to scroll even if the SFYSingleTextWidget::StartScroll function is called when the following relation stands up.

[Width of virtual region] ≧ [Width of text] > [Width of real region]

[Note] Sending the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_REAL) event

The (SFEVT_RESPONDER_BOUND, SFP16_BOUND_REAL) event will occur when the real region is changed by calling the SFYResponder::SetRealBound function.

[Note] Processing when the real region is changed

Other than overriding this virtual function, there is another method to define and implement the handler for the region event[XANDLER_DECLARE_VOIDBOUND], and register it into the responder.

In the processing when the real region is updated, this virtual function is executed first, and next the handlers for the region event are executed in the registered order.

Internal Implementation

Internal implementation of the SFYSingleTextWidget::HandleBoundReal function is as follows:

/*protected virtual */Void SFYSingleTextWidget::HandleBoundReal(Void)
{
    SetVirtualBound(SFXRectangle(SFXGrid::ZeroInstance(), GetRealBound().GetSize()));
    return;
}// SFYSingleTextWidget::HandleBoundReal //

Reference

SFYResponder::SetRealBound | Region Event[SFEVT_RESPONDER_BOUND] | Handler for the Region Event[XANDLER_DECLARE_VOIDBOUND] | Real Region | Virtual Region | Local Region


SFYSingleTextWidget::HandleBoundRequest
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_REQUEST) event is received. [Calculate the suitable rectangle size of this responder.]
[ protected, virtual, const ]
Void HandleBoundRequest(
    SFXRectanglePtr rectangle   // calculated region
);

Description

This function will be called when the region event [SFXEvent(SFEVT_RESPONDER_BOUND, SFP16_BOUND_REQUEST, rectangle)] is received.

This function calculates the suitable rectangle size of this responder.

The suitable rectangle size is stored into the size element of the rectangle argument as a result of calculation. It is recommended not to change the origin element of the rectangle argument within this function.

[Note] Region event[(SFEVT_RESPONDER_BOUND, SFP16_BOUND_REQUEST) event]

If the rectangle argument of the hint region is not specified, the SFYResponder::GetSuitableBound function will send the region event [SFXEvent(SFEVT_RESPONDER_BOUND, SFP16_BOUND_REQUEST, rectangle)] to this responder.

Then, the SFYWidget::HandleBoundRequest virtual function will be called.

The rectangle element (P32 parameter) of the region event is set to the real region as an initial value.

[Tip] Tip
Default value of the real region: SFXRectangle(0, 0, 0, 0)

Internal Implementation

Internal implementation of the SFYSingleTextWidget::HandleBoundRequest function is as follows:

/*protected virtual */Void SFYSingleTextWidget::HandleBoundRequest(SFXRectanglePtr rectangle) const
{
    rectangle->SetSize(_bound.GetSize());
    return;
}// SFYSingleTextWidget::HandleBoundRequest //

/*private */SInt16 SFYSingleTextWidget::Measure(Void)
{
    _bound.SetSize(SFXSize::ZeroInstance());
    _size.Set(SFXGraphics::MeasureSingleText(_font, " "), SFXGraphics::GetFontHeight(_font));
    if (!_text.IsEmpty()) {
        _bound.SetSize(SFXGraphics::MeasureSingleText(_font, _text), _size.GetHeight());
    }
    return _size.GetWidth();
}// SFYSingleTextWidget::Measure //

Reference

SFYResponder::GetSuitableBound | SFYSingleTextWidget::SetText | SFYSingleTextWidget::SetFont | SFXGraphics::MeasureSingleText | SFXEvent | Real Region Region Event[SFEVT_RESPONDER_BOUND] | Handler for the Region Event[XANDLER_DECLARE_VOIDBOUND]


SFYSingleTextWidget::HandleBoundVirtual
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event is received. [Perform the processing when the virtual region is changed.]
[ protected, virtual ]
Void HandleBoundVirtual(Void);

Description

This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event is received.

In case you want to perform your own processing when the virtual region is changed, override this virtual function.

The default implementation is to equalize the real region with the new local region and relocate this responder to fit into the new virtual region.

[Caution] About the virtual region

In this class, it is recommended to equalize the virtual region with the real region for the intuitive text alignment or scroll.

For instance, though all the text is not displayed, the text will not start to scroll even if the SFYSingleTextWidget::StartScroll function is called when the following relation stands up.

[Width of virtual region] ≧ [Width of text] > [Width of real region]

[Note] Sending the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event

The (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event will occur when the virtual region is changed by calling the SFYResponder::SetRealBound or SFYResponder::SetVirtualBound function.

[Note] Another method when the virtual region is changed

Other than overriding this virtual function, it is possible to define and implement the handler for region event[XANDLER_DECLARE_VOIDBOUND], and register it into the responder.

In the processing when the virtual region is updated, this virtual function is executed first, and next the handlers for region event are executed in the registered order.

In almost all cases, the method to override this virtual function is adopted since defining, implementing and registering the handler for region event can be omitted.

Internal Implementation

Internal implementation of the SFYSingleTextWidget::HandleBoundVirtual function is as follows:

/*protected virtual */Void SFYSingleTextWidget::HandleBoundVirtual(Void)
{
    StateEnum                                   state;

    state = _state;
    StopScroll();
    Relocate();
    if (state != STATE_IDLE) {
 StartScroll();
    }
    return;
}// SFYSingleTextWidget::HandleBoundVirtual //

/*private */Void SFYSingleTextWidget::Relocate(Void)
{
    SFXRectangle                                lx;

    lx.Set(GetLocalBound());
    _bound.SetOrigin(lx.GetOrigin());
    _offset = 0;
    if (lx.GetWidth() > _bound.GetWidth()) {
        switch (_align.horizontal) {
            case HORIZONTAL_LEFT:
                _bound.AddX(0);
                break;
            case HORIZONTAL_RIGHT:
                _bound.AddX(lx.GetWidth() - _bound.GetWidth());
                break;
            case HORIZONTAL_CENTER:
            default:
                _bound.AddX((lx.GetWidth() - _bound.GetWidth()) / 2);
                break;
        }
    }
    else {
        switch (_align.horizontal) {
            case HORIZONTAL_LEFT:
                _offset += 0;
                break;
            case HORIZONTAL_RIGHT:
                _offset += lx.GetWidth() - _bound.GetWidth();
                break;
            case HORIZONTAL_CENTER:
            default:
                _offset += (lx.GetWidth() - _bound.GetWidth()) / 2;
                break;
        }
    }
    switch (_align.vertical) {
        case VERTICAL_TOP:
            _bound.AddY(0);
            break;
        case VERTICAL_BOTTOM:
            _bound.AddY(lx.GetHeight() - _bound.GetHeight());
            break;
        case VERTICAL_MIDDLE:
        default:
            _bound.AddY((lx.GetHeight() - _bound.GetHeight()) / 2);
            break;
    }
    _bound.AddY(SFXGraphics::GetFontDescent(_font) / 2);
    return;
}// SFYSingleTextWidget::Relocate //

Reference

SFYSingleTextWidget::SetHorizontalAlign | SFYSingleTextWidget::SetVerticalAlign | SFYResponder::SetRealBound | SFYResponder::SetVirtualBound | Region Event[SFEVT_RESPONDER_BOUND] | Handler for the Region Event[XANDLER_DECLARE_VOIDBOUND] | Virtual Region | Real Region | Local Region


SFYSingleTextWidget::HandleRenderRequest
This function will be called when the (SFEVT_RESPONDER_RENDER, SFP16_RENDER_REQUEST) event is received. [Draw this responder.]
[ protected, virtual, const ]
Void HandleRenderRequest(
    SFXGraphicsPtr graphics   // graphics object
);

Description

This function will be called when the (SFEVT_RESPONDER_RENDER, SFP16_RENDER_REQUEST) event is received.

In case you want to perform your own drawing of this responder, override this function.

The default implementation is to draw this responder.

[Note] The method to darw a responder

In addition to overriding this virtual function, it is possible to define and implement the handler for drawing event(drawing handler)[XANDLER_DECLARE_VOIDRENDER], and register it into the responder.

Then, the overridden virtual function will be called first, and next the drawing handlers registered into the responder will be booted up in the registered order.

In almost all cases, the method to override this function is used to draw the responder since there is no need to declare and register the drawing handler.

[Note] Procedure of drawing a responder

The drawing handler will be booted up when the drawing event(SFEVT_RESPONDER_RENDER) occurs. And then the drawing handler draw the responder actually.

The drawing event will be sent to only the responders including the region to be redrawn out of the redraw regions registered into the renderer using the SFYResponder::InvokeBackward function after the SFYResponder::Render function boots up the renderer.

Here, the SFYResponder::Render function will be called at the following situations:

  1. At the end of the event loop
  2. At the applet start / resume or the end of a highest priority event handler
  3. In the callback, which is outside the event loop.

If calling the SFYResponder::Render function with specifying "true" as an argument, the drawing event will be sent to all the responders to be actually displayed on the screen which are located below the responder in the responder tree, regardless of the registration of redraw region.

Internal Implementation

Internal implementation of the SFYSingleTextWidget::HandleRenderRequest function is as follows:

/*protected virtual */Void SFYSingleTextWidget::HandleRenderRequest(SFXGraphicsPtr graphics) const
{
    DrawText(graphics, _bound.GetOrigin());
    return;
}// SFYSingleTextWidget::HandleRenderRequest //

Reference

SFYSingleTextWidget::SetText | SFYSingleTextWidget::SetHorizontalAlign | SFYSingleTextWidget::SetVerticalAlign | SFYSingleTextWidget::SetTextColor | SFYSingleTextWidget::SetFont | SFYResponder::Invalidate | SFYResponder::Render | SFYResponder::InvokeBackward | Drawing Event[SFEVT_RESPONDER_RENDER] | Handler for the Drawing Event[XANDLER_DECLARE_VOIDRENDER] | Rendering | Event Loop | Responder Tree | Virtual Region | Real Region | Local Region


SFYSingleTextWidget::NewInstance
Create a new instance of this responder class.
[ public, static ]
SFYSingleTextWidgetSmp NewInstance(
    SFCErrorPtr exception = null   // error value
);

Argument

exception

Return the error value generated inside the function.

Return value

  • If succeeds: not null pointer
  • Otherwise: null pointer

Description

This function creates a new instance of this responder class.

If succeeds, a not null pointer will be returned, and the "exception" argument is SFERR_NO_ERROR. If fails such as insufficient memory, a null pointer will be returned, and the "exception" argument holds the error value.

Example

The code to create a new instance of this responder class is as follows:

SFYSingleTextWidgetSmp _singletextwidget;
SFCError error;

if ((_singletextwidget = SFYSingleTextWidget::NewInstance(&error)) != null) {

    ...
}

SFYSingleTextWidget::SetFont
Set the font to the specified value .
[ public ]
Void SetFont(
    AEEFont param   // value to set
);

Description

Default: AEE_FONT_NORMAL

Reference

SFYSingleTextWidget::GetFont


SFYSingleTextWidget::SetHorizontalAlign
Set the horizontal alignment to the specified value.
[ public ]
Void SetHorizontalAlign(
    HorizontalEnum param   // value to set
);

Description

This function sets the horizontal alignment to the specified value.

Default: SFYSingleTextWidget::DEFAULT_HORIZONTAL

For the value of SFYSingleTextWidget::DEFAULT_HORIZONTAL, refer to SFYSingleTextWidget::HorizontalEnum.

Reference

SFYSingleTextWidget::GetHorizontalAlign | SFYSingleTextWidget::HorizontalEnum


SFYSingleTextWidget::SetScrollDirection
Set the scroll direction to the specified value.
[ public ]
Void SetScrollDirection(
    DirectionEnum param   // value to set
);

Description

This function sets the scroll direction to the specified value.

Default: SFYSingleTextWidget::DEFAULT_DIRECTION

For the value of SFYSingleTextWidget::DEFAULT_DIRECTION, refer to SFYSingleTextWidget::DirectionEnum.

Reference

SFYSingleTextWidget::GetScrollDirection | SFYSingleTextWidget::DirectionEnum


SFYSingleTextWidget::SetScrollInterval
Set the scroll-interval to the specified value. [milliseconds]
[ public ]
Void SetScrollInterval(
    UInt32 param   // value to set
);

Description

Default: SFYSingleTextWidget::DEFAULT_SCROLL [milliseconds]

For the value of SFYSingleTextWidget::DEFAULT_SCROLL, refer to SFYSingleTextWidget::DefaultEnum.

Reference

SFYSingleTextWidget::GetScrollInterval | SFYSingleTextWidget::DefaultEnum


SFYSingleTextWidget::SetScrollStep
Set the scroll-step to the specified value. [pixels]
[ public ]
Void SetScrollStep(
    SInt16 param   // value to set
);

Description

This function sets the number of pixels of each scroll. If "-1"(this is default value) is set, the scroll-step will be set to the width of the " " character of the currently used font.

Default: SFYSingleTextWidget::DEFAULT_STEP [pixels]

For the value of SFYSingleTextWidget::DEFAULT_STEP, refer to SFYSingleTextWidget::DefaultEnum.

Reference

SFYSingleTextWidget::GetScrollStep | SFYSingleTextWidget::DefaultEnum


SFYSingleTextWidget::SetText
Set the text to the specified value.
[ public ]
SFCError SetText(
    SFXPathConstRef path   // path of resource file
    UInt16 id              // resource ID
);
[ public ]
SFCError SetText(
    SFXWideStringConstRef param   // text
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If insufficient memory: SFERR_NO_MEMORY
  • Otherwise: SFERR_FAILED

Description

This function sets the text to be displayed to the specified value.

The value of string is set directly in the argument, or read from the resource file.

Reference

SFYSingleTextWidget::GetText | SFYSingleTextWidget::SetHorizontalAlign | SFYSingleTextWidget::SetVerticalAlign | SFYSingleTextWidget::SetTextColor | SFYSingleTextWidget::SetFont


SFYSingleTextWidget::SetTextColor
Set the color of text to the specified value.
[ public ]
Void SetTextColor(
    SFXRGBColorConstRef param   // value to set
);

Description

Default: SFXRGBColor(0x00, 0x00, 0x00, 0x00)[black color]

In the "inactive" state, the text will be drawn in the color of which each RGB value is subtracted 0x44 from the color set with this function if the brightness of this color is greater than 0x7F. Otherwise it will be drawn in the color of which each RGB value is added 0x44 on the color set with this function.

The brightness of color can be obtained by calling the SFXRGBColor::GetBrightness function.

Reference

SFYSingleTextWidget::GetTextColor | SFXRGBColor::GetBrightness | SFXRGBColor | State


SFYSingleTextWidget::SetVerticalAlign
Set the vertical alignment to the specified value.
[ public ]
Void SetVerticalAlign(
    VerticalEnum param   // value to set
);

Description

This function sets the vertical alignment to the specified value.

Default: SFYSingleTextWidget::DEFAULT_VERTICAL

For the value of SFYSingleTextWidget::DEFAULT_VERTICAL, refer to SFYSingleTextWidget::VerticalEnum.

Reference

SFYSingleTextWidget::GetVerticalAlign | SFYSingleTextWidget::VerticalEnum


SFYSingleTextWidget::SetWaitInterval
Set the waiting time to start the scroll to the specified value. [milliseconds]
[ public ]
Void SetWaitInterval(
    UInt32 param   // value to set
);

Description

Default: SFYSingleTextWidget::DEFAULT_SCROLL [milliseconds]

For the value of SFYSingleTextWidget::DEFAULT_SCROLL, refer to SFYSingleTextWidget::DefaultEnum.

Reference

SFYSingleTextWidget::GetWaitInterval | SFYSingleTextWidget::DefaultEnum


SFYSingleTextWidget::StartScroll
Start to scroll the text.
[ public ]
Void StartScroll(Void);

Description

If the width of the text is greater than that of the virtual region, the text will start to scroll.

Otherwise, the text will not scroll.

Though the SFEVT_APP_SUSPEND event and the SFEVT_APP_RESUME event will be automatically handled, the behaviour of this function is not defined when called between the SFEVT_APP_SUSPEND event and the SFEVT_APP_RESUME event.

Reference

SFYSingleTextWidget::StopScroll | Virtual Region


SFYSingleTextWidget::StopScroll
Stop to scroll the text.
[ public ]
Void StopScroll(Void);

Reference

SFYSingleTextWidget::StartScroll


SFYSingleTextWidget::CodeEnum
Constant that represents the SFYSingleTextWidget class.
enum CodeEnum {
    CODE_TYPE = four_char_code('+', 's', 't', 'x')
};
SFMTYPEDEFTYPE(CodeEnum)

Reference

SFYResponder::GetType | SFYResponder::SetType


SFYSingleTextWidget::DefaultEnum
Constants that represent the default value for various parameters.
enum DefaultEnum {
    DEFAULT_WAIT   = 1000,    // waiting time to start the scroll [milliseconds]
    DEFAULT_SCROLL = 100,     // scroll-interval [milliseconds]
    DEFAULT_STEP   = -1       // scroll-step [pixels]; in case of "-1", the width of the " " character of the currently used font
};
SFMTYPEDEFTYPE(DefaultEnum)

Description

DEFAULT_STEP is the number of pixels of each scroll-step. If "-1"(this is the default value) is set, the scroll-step will be set to the width of the " " character of the currently used font.


SFYSingleTextWidget::DirectionEnum
Constants that represent the scroll direction.
enum DirectionEnum {
    DIRECTION_LEFT    = 0,                // scroll left
    DIRECTION_RIGHT,                      // scroll right
    DEFAULT_DIRECTION = DIRECTION_LEFT    // Default: scroll left
};
SFMTYPEDEFTYPE(DirectionEnum)

SFYSingleTextWidget::HorizontalEnum
Constants that represent the horizontal alignment.
enum HorizontalEnum {
    HORIZONTAL_LEFT     = 0,                 // left-aligned
    HORIZONTAL_CENTER,                       // center-aligned
    HORIZONTAL_RIGHT,                        // right-aligned
    DEFAULT_HORIZONTAL  = HORIZONTAL_CENTER  // default: center-aligned
};
SFMTYPEDEFTYPE(HorizontalEnum)

Description

For the horizontal alignment:

  1. In case of left-aligned: equalize the left-edge of the rectangular region of this text with that of the local region.
  2. In case of center-aligned: equalize the vertical center-line of the rectangular region of this text with that of the local region.
  3. In case of right-aligned: equalize the right-edge of the rectangular region of this text with that of the local region.

Reference

SFYSingleTextWidget::SetHorizontalAlign | Local Region


SFYSingleTextWidget::VerticalEnum
Constants that represent the vertical alignment.
enum VerticalEnum {
    VERTICAL_TOP      = 0,               // top-aligned
    VERTICAL_MIDDLE,                     // center-aligned
    VERTICAL_BOTTOM,                     // bottom-aligned
    DEFAULT_VERTICAL  = VERTICAL_MIDDLE  // default: center-aligned
};
SFMTYPEDEFTYPE(VerticalEnum)

Description

For the vertical alignment:

  1. In case of top-aligned: equalize the top-edge of the rectangular region of this text with that of the local region.
  2. In case of center-aligned: equalize the horizontal center-line of the rectangular region of this text with that of the local region.
  3. In case of bottom-aligned: equalize the bottom-edge of the rectangular region of this text with that of the local region.

Reference

SFYSingleTextWidget::SetVerticalAlign | Local Region