PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFRResponder
Base class for all responders.
#include <SFRResponder.hpp>
class SFRResponder : public SFRHandler;
SFMTYPEDEFCLASS(SFRResponder)

Inheritance diagram

 Inheritance diagram of SFRResponderClass

Collaboration diagram

 Collaboration diagram of SFRResponderClass

Description

The SFRResponder class automates GUI-related processes such as event handling and rendering, and offers standard GUI components including window, dialog, menu, button, label, checkbox, etc.

All the UI components such as window and control inherit from the SFRResponder class.

[Note] What is responder

In SophiaFramework, UI component is called as "responder"

Figure 265. Inheritance Relationship

Inheritance Relationship

Reference

SFRApplication | SFRWindow | SFRDialog | SFRControl | SFRPane | SFRMenu | Responder

Member

Constructor/Destructor
SFRResponder( SFRResponderPtr parent , SFXRectangleConstRef rect , SFXMarginConstRef margin , SFCType type , SFCType attribute , BehaviorType behavior )
Constructor of the SFRResponder class.
~SFRResponder( Void )
Destructor of the SFRResponder class.
Public Functions
Bool ClearHandler( Void )
[Handler] Clear the " Targeted " status of responder, or destroy the responder.
Bool Compare( SFCType type , SFCType attribute , BehaviorType behavior )
Compare with type, attribute and behavior.
Bool FocusDown( Bool repeat = true )
Focus down to the next responder.
Bool FocusDownHandler( Void )
[Handler] Focus down to the next responder.
Bool FocusLeft( Bool repeat = true )
Focus left to the next responder.
Bool FocusLeftHandler( Void )
[Handler] Focus left to the next responder.
Bool FocusNext( Bool repeat = true )
Focus to the next sibling responder.
Bool FocusNextHandler( Void )
[Handler] Focus to the next sibling responder.
Bool FocusPrevious( Bool repeat = true )
Focus to the previous sibling responder.
Bool FocusPreviousHandler( Void )
[Handler] Focus to the previous sibling responder.
Bool FocusRight( Bool repeat = true )
Focus right to the next responder.
Bool FocusRightHandler( Void )
[Handler] Focus right to the next responder.
Bool FocusUp( Bool repeat = true )
Focus up to the next responder.
Bool FocusUpHandler( Void )
[Handler] Focus up to the next responder.
SFCType GetAttribute( Void )
Get the attribute.
SFRResponderPtr GetBack( SFCType type = TYPE_WILDCARD , SFCType attribute = ATTRIBUTE_WILDCARD , BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE )
Get the child responder at the most background that matches the specified search condition.
SFXRectangleConstRef GetBaseBound( Void )
Get the base region with the coordinate of content region of parent responder.
SFXRectangle GetBaseWorld( Void )
Get the base region.
SFXRectangleConstRef GetContentBound( Void )
Get the content region with the coordinate of base region.
SFXRectangle GetContentWorld( Void )
Get the content region.
SFRResponderPtr GetDirector( Void )
Get the parent responder.
SFRResponderPtr GetFocus( Void )
Get the responder with focus in its ownership hierarchy.
SFXMargin GetFrameMargin( Void )
Get the margin between base and content region(in pixels).
SFRResponderPtr GetFront( SFCType type = TYPE_WILDCARD , SFCType attribute = ATTRIBUTE_WILDCARD , BehaviorType compare = STATUS_VISIBLE | STATUS_ENABLE )
Get the child responder at the most foreground that matches the specified search condition.
SInt16 GetIndexBackward( SFCType type = TYPE_WILDCARD , SFCType attribute = ATTRIBUTE_WILDCARD , BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE )
Get the index number from the most background of responder that matches the specified search condition.
SInt16 GetIndexForward( SFCType type = TYPE_WILDCARD , SFCType attribute = ATTRIBUTE_WILDCARD , BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE )
Get the index number from the most foreground of responder that matches the specified search condition.
Bool GetInheritEnable( Void )
Get the " Enable / Disable " status of responder including its parent responders.
Bool GetInheritFocus( Void )
Get the " Focused / Unfocused " status of responder including its parent responders.
Bool GetInheritTarget( Void )
Get the " Target / Not-Target " status of responder including its parent responders.
Bool GetInheritVisible( Void )
Get the " Visible / Invisible " status of responder including its parent responders.
SFRResponderPtr GetLeft( SFCType type = TYPE_WILDCARD , SFCType attribute = ATTRIBUTE_WILDCARD , BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE )
Get the previous responder among the grouped responders that matches the specified search condition.
SInt16 GetMoveInterval( Void )
Get the move interval in pixels.
SInt16 GetMoveMargin( Void )
Get the margin pixels of content region ( or virtual region if set with the parent responder ) where the child responder cannot move.
SFRResponderPtr GetNext( SFCType type = TYPE_WILDCARD , SFCType attribute = ATTRIBUTE_WILDCARD , BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE , Bool repeat = true )
Get the next sibling responder that matches the specified search condition.
SFRResponderPtr GetNthBackward( SInt16 index , SFCType type = TYPE_WILDCARD , SFCType attribute = ATTRIBUTE_WILDCARD , BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE )
Get the Nth child responder from the most background that matches the specified search condition.
SFRResponderPtr GetNthForward( SInt16 index , SFCType type = TYPE_WILDCARD , SFCType attribute = ATTRIBUTE_WILDCARD , BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE )
Get the Nth child responder from the most foreground that matches the specified search condition.
SFRResponderPtr GetPrevious( SFCType type = TYPE_WILDCARD , SFCType attribute = ATTRIBUTE_WILDCARD , BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE , Bool repeat = true )
Get the previous sibling responder that matches the specified search condition.
VoidPtr GetReference( Void )
Get the reference value.
SFRResponderPtr GetRight( SFCType type = TYPE_WILDCARD , SFCType attribute = ATTRIBUTE_WILDCARD , BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE )
Get the next responder among the grouped responders that matches the specified search condition.
SInt16 GetScrollInterval( Void )
Get the scroll interval in pixels.
Bool GetStatusEnable( Void )
Get the value of " Enable / Disable " flag.
Bool GetStatusFocus( Void )
Get the value of " Focused / Unfocused " flag.
Bool GetStatusTarget( Void )
Get the value of " Target / Non-target " flag.
Bool GetStatusVisible( Void )
Get the value of " Visible / Invisible " flag.
SFXGrid GetTranslate( Void )
Get the origin coordinate of virtual region with the coordinate of content region.
SInt16 GetTravelMargin( Void )
Get the margin pixels of content region inside which the rectangle in the virtual region but outside the content region should be automatically scrolled by using the SFRResponder::Travel function.
SFCType GetType( Void )
Get the responder type.
SFXRectangleConstRef GetVirtualBound( Void )
Get the virtual region with the coordinate of content region.
SFXRectangle GetVirtualWorld( Void )
Get the virtual region
Void Group( SFRResponderPtr with )
Group the responder with the group of which representative responder is specified as an argument.
Void GroupMove( SFXSizeConstRef size )
Move all the responders grouped together.
Void GroupScroll( SFXSizeConstRef size )
Scroll all the virtual regions of responders grouped together.
Void GroupSelect( Void )
Select all the responders grouped together. ( move all of them to the most foreground )
Void GroupStatusEnable( Bool enable )
Set the " Enable / Disable " status of all the responders grouped together.
Void GroupStatusVisible( Bool visible )
Set the " Visible / Invisible " status of all the responders grouped together.
Void InvalidateBase( Void )
Register an area in the base region to be redrawn.
Void InvalidateBase( SFXRectangleConstRef rect )
Register an area in the base region to be redrawn.
Void InvalidateContent( Void )
Register an area in the content region to be redrawn.
Void InvalidateContent( SFXRectangleConstRef rect )
Register an area in the content region to be redrawn.
Void InvalidateVirtual( Void )
Register an area in the virtual region to be redrawn.
Void InvalidateVirtual( SFXRectangleConstRef rect )
Register an area in the virtual region to be redrawn.
Bool Invoke( SFXEventConstRef event )
Send the specified event.
Void Move( SFXSizeConstRef size )
Move the responder.
Bool MoveDownHandler( Void )
[Handler] Move the responder down.
Bool MoveLeftHandler( Void )
[Handler] Move the responder left.
Bool MoveRightHandler( Void )
[Handler] Move the responder right.
Bool MoveUpHandler( Void )
[Handler] Move the responder up.
Void Scroll( SFXSizeConstRef size )
Scroll the virtual region.
Bool ScrollDownHandler( Void )
[Handler] Scroll the virtual region down.
Bool ScrollLeftHandler( Void )
[Handler] Scroll the virtual region left.
Bool ScrollRightHandler( Void )
[Handler] Scroll the virtual region right.
Bool ScrollUpHandler( Void )
[Handler] Scroll the virtual region up.
Void Select( Void )
Select the responder and move it to the most foreground.
Bool SelectHandler( Void )
[Handler] Set the target status of a responder to true.
Void SetBaseBound( SFXRectangleConstRef rect )
Set the base region with the coordinate of virtual region of parent responder.
Void SetContentBound( SFXRectangleConstRef rect )
Set the content region with the coordinate of base region.
Void SetFrameMargin( SFXMarginConstRef param )
Set the margin between base and content region(in pixels).
Void SetMoveInterval( SInt16 interval )
Set the move interval in pixels.
Void SetMoveMargin( SInt16 margin )
Set the margin pixels of content region ( or virtual region if set with the parent responder ) where the child responder cannot move.
Void SetReference( VoidPtr ref )
Set the reference value.
Void SetScrollInterval( SInt16 interval )
Set the scroll interval in pixels.
Void SetStatusEnable( Bool enable )
Set the value of " Enable / Disable " flag.
Void SetStatusFocus( Bool focus )
Set the value of " Focused / Unfocused " flag.
Void SetStatusTarget( Bool target )
Set the value of " Target / Not-Target " flag.
Void SetStatusVisible( Bool visible )
Set the value of " Visible / Invisible " flag.
Void SetTranslate( SFXGridConstRef point )
Set the origin coordinate of virtual region with the coordinate of content region.
Void SetTravelMargin( SInt16 margin )
Set the margin pixels of content region inside which the rectangle in the virtual region but outside the content region should be automatically scrolled by using the SFRResponder::Travel function.
Void SetVirtualBound( SFXRectangleConstRef rect )
Set the virtual region with the coordinate of content region.
Void Travel( SFXRectangleConstRef rect )
Scroll the virtual region of responder so that the specified rectangle can get into the content region.
Void Ungroup( Void )
Ungroup the responders which are grouped together.
SFCError RegisterHandler( HandlerEnum timing , SFRHandlerSPP spp , VoidPtr ref ) (inherits from SFRHandler)
Register a handler.
SFCError RegisterHandler( SFCEventEnum type , HandlerEnum timing , SFRHandlerSPP spp , VoidPtr ref ) (inherits from SFRHandler)
Register a handler.
SFCError RegisterHandler( SFCEventEnum type , UInt16 p16 , HandlerEnum timing , SFRHandlerSPP spp , VoidPtr ref ) (inherits from SFRHandler)
Register a handler.
SFCError RegisterHandler( SFCEventEnum type , UInt16 bp16 , UInt16 ep16 , HandlerEnum timing , SFRHandlerSPP spp , VoidPtr ref ) (inherits from SFRHandler)
Register a handler.
SFCError RegisterHandler( SFCEventEnum btype , SFCEventEnum etype , HandlerEnum timing , SFRHandlerSPP spp , VoidPtr ref ) (inherits from SFRHandler)
Register a handler.
SFCError RegisterHandler( SFCEventEnum btype , SFCEventEnum endType , UInt16 p16 , HandlerEnum timing , SFRHandlerSPP spp , VoidPtr ref ) (inherits from SFRHandler)
Register a handler.
SFCError RegisterHandler( SFCEventEnum btype , SFCEventEnum etype , UInt16 bp16 , UInt16 ep16 , HandlerEnum timing , SFRHandlerSPP spp , VoidPtr ref ) (inherits from SFRHandler)
Register a handler.
SFCError RegisterTracer( BehaviorType behavior , TracerEnum trace ) (inherits from SFRTracer)
Register the tracer.
SFCError RegisterTracer( SFCEventEnum type , BehaviorType behavior , TracerEnum trace ) (inherits from SFRTracer)
Register the tracer.
SFCError RegisterTracer( SFCEventEnum type , UInt16 p16 , BehaviorType behavior , TracerEnum trace ) (inherits from SFRTracer)
Register the tracer.
SFCError RegisterTracer( SFCEventEnum type , UInt16 bgnP16 , UInt16 endP16 , BehaviorType behavior , TracerEnum trace ) (inherits from SFRTracer)
Register the tracer.
SFCError RegisterTracer( SFCEventEnum bgnType , SFCEventEnum endType , BehaviorType behavior , TracerEnum trace ) (inherits from SFRTracer)
Register the tracer.
SFCError RegisterTracer( SFCEventEnum bgnType , SFCEventEnum endType , UInt16 p16 , BehaviorType behavior , TracerEnum trace ) (inherits from SFRTracer)
Register the tracer.
SFCError RegisterTracer( SFCEventEnum bgnType , SFCEventEnum endType , UInt16 bgnP16 , UInt16 endP16 , BehaviorType behavior , TracerEnum trace ) (inherits from SFRTracer)
Register the tracer.
Void UnregisterHandler( HandlerEnum timing ) (inherits from SFRHandler)
Unregister the registered handler.
Void UnregisterHandler( SFCEventEnum type , HandlerEnum timing ) (inherits from SFRHandler)
Unregister the registered handler.
Void UnregisterHandler( SFCEventEnum type , UInt16 p16 , HandlerEnum timing ) (inherits from SFRHandler)
Unregister the registered handler.
Void UnregisterHandler( SFCEventEnum type , UInt16 bgnP16 , UInt16 endP16 , HandlerEnum timing ) (inherits from SFRHandler)
Unregister the registered handler.
Void UnregisterHandler( SFCEventEnum bgnType , SFCEventEnum endType , HandlerEnum timing ) (inherits from SFRHandler)
Unregister the registered handler.
Void UnregisterHandler( SFCEventEnum bgnType , SFCEventEnum endType , UInt16 p16 , HandlerEnum timing ) (inherits from SFRHandler)
Unregister the registered handler.
Void UnregisterHandler( SFCEventEnum bgnType , SFCEventEnum endType , UInt16 bgnP16 , UInt16 endP16 , HandlerEnum timing ) (inherits from SFRHandler)
Unregister the registered handler.
Void UnregisterTracer( Void ) (inherits from SFRTracer)
Unregister the tracer.
Void UnregisterTracer( SFCEventEnum type ) (inherits from SFRTracer)
Unregister the tracer.
Void UnregisterTracer( SFCEventEnum type , UInt16 p16 ) (inherits from SFRTracer)
Unregister the tracer.
Void UnregisterTracer( SFCEventEnum type , UInt16 bgnP16 , UInt16 endP16 ) (inherits from SFRTracer)
Unregister the tracer.
Void UnregisterTracer( SFCEventEnum bgnType , SFCEventEnum endType ) (inherits from SFRTracer)
Unregister the tracer.
Void UnregisterTracer( SFCEventEnum bgnType , SFCEventEnum endType , UInt16 p16 ) (inherits from SFRTracer)
Unregister the tracer.
Void UnregisterTracer( SFCEventEnum bgnType , SFCEventEnum endType , UInt16 bgnP16 , UInt16 endP16 ) (inherits from SFRTracer)
Unregister the tracer.
Protected Functions
Bool GetAppearanceTransparent( Void )
Get the value of APPEARANCE_TRANSPARENT flag.
Bool GetPropertyClosable( Void )
Get the value of PROPERTY_CLOSABLE flag.
Bool GetPropertyDirect( Void )
Get the value of PROPERTY_DIRECT flag.
Bool GetPropertyMovable( Void )
Get the value of PROPERTY_MOVABLE flag.
Bool GetPropertyScrollable( Void )
Get the value of PROPERTY_SCROLLABLE flag.
Bool GetPropertySelect( Void )
Get the value of PROPERTY_SELECT flag.
Bool GetPropertyTravel( Void )
Get the value of PROPERTY_TRAVEL flag.
HandlerRecConstPtr SearchHandler( SFXEventConstRef event , HandlerEnum timing ) (inherits from SFRHandler)
Search for the handler that matches the specified event.
TracerRecConstPtr SearchTracer( SFXEventConstRef event ) (inherits from SFRTracer)
Search for the tracer that matches the specified event.
Types
BehaviorEnum
Constant that represents the behavior of responder.
HandlerEnum (inherits from SFRHandler)
Constant that represents the timing to call the handler.
SFRHandlerSPP (inherits from SFRHandler)
Type of the callback function.
TracerEnum (inherits from SFRTracer)
Constant that represents the trace order.
TracerTraceMPP (inherits from SFRTracer)
Type of the callback function.

SFRResponder::SFRResponder
Constructor of the SFRResponder class.
[ protected ]
SFRResponder(
    SFRResponderPtr parent      // pointer to parent responder
    SFXRectangleConstRef rect   // position of parent responder
    SFXMarginConstRef margin    // margin between base and content region
    SFCType type                // type
    SFCType attribute           // attribute
    BehaviorType behavior       // behavior
);

Reference

SFRResponder::~SFRResponder | SFRResponder::BehaviorEnum


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

Reference

SFRResponder::SFRResponder


SFRResponder::ClearHandler
[Handler] Clear the " Targeted " status of responder, or destroy the responder.
[ public ]
Bool ClearHandler(Void);

Description

The " Targeted " status of responder with the PROPERTY_DIRECT flag set on is cleared if it is targeted.

The responder with the PROPERTY_CLOSABLE flag set on is destroyed if it is not targeted, or focused with the PROPERTY_DIRECT flag set on.

It is necessary to associate a responder with the CLEAR key event and so on by using RegisterHandler function.

For details : Behavior

Example

RegisterHandler(SFEVT_KEY,
                AVK_CLR,
                HANDLER_AFTER,
                HANDLER_FUNCTION(ClearHandler)));

Reference

SFRResponder::SelectHandler


SFRResponder::Compare
Compare with type, attribute and behavior.
[ public, const ]
Bool Compare(
    SFCType type            // type
    SFCType attribute       // attribute
    BehaviorType behavior   // behavior
);

Return value

  • If matched: true
  • Otherwise: false

SFRResponder::FocusDown
Focus down to the next responder.
[ public, const ]
Bool FocusDown(
    Bool repeat = true   // if not found, search from up again
);

Return value

  • If succeeds: true
  • If failed: false

Description

Focus down to the next responder which shares some of the X axis values with the currently-focused responder.

[Prerequisite] The responder status should be "Visible" and "Enable for response" to be focused.

[Note] About "Visible" and "Enable for response"

For details : Behavior

[Note] About Focus

For details : Focus

Reference

SFRResponder::FocusUp | SFRResponder::FocusLeft | SFRResponder::FocusRight | SFRResponder::FocusNext | SFRResponder::FocusPrevious


SFRResponder::FocusDownHandler
[Handler] Focus down to the next responder.
[ public ]
Bool FocusDownHandler(Void);

Description

Focus down to the next responder which shares some of the X axis values with the currently-focused responder.

[Prerequisite] The responder status should be "Visible" and "Enable for response" to be focused.

[Note] About "Visible" and "Enable for response"

For details : Behavior

It is necessary to associate the DOWN_ARROW key event and so on with the SFRHandler::RegisterHandler function.

Example

RegisterHandler(SFEVT_KEY, 
                AVK_DOWN, 
                HANDLER_AFTER, 
                HANDLER_FUNCTION(FocusDownHandler));

Reference

SFRResponder::FocusUpHandler | SFRResponder::FocusLeftHandler | SFRResponder::FocusRightHandler | SFRResponder::FocusNextHandler | SFRResponder::FocusPreviousHandler


SFRResponder::FocusLeft
Focus left to the next responder.
[ public, const ]
Bool FocusLeft(
    Bool repeat = true   // if not found, search from right again
);

Return value

  • If succeeds: true
  • If failed: false

Description

Focus left to the next responder which shares some of the Y axis values with the currently-focused responder.

[Prerequisite] The responder status should be "Visible" and "Enable for response" to be focused.

[Note] About "Visible" and "Enable for response"

For details : Behavior

[Note] About Focus

For details : Focus

Reference

SFRResponder::FocusUp | SFRResponder::FocusDown | SFRResponder::FocusRight | SFRResponder::FocusNext | SFRResponder::FocusPrevious


SFRResponder::FocusLeftHandler
[Handler] Focus left to the next responder.
[ public ]
Bool FocusLeftHandler(Void);

Description

Focus left to the next responder which shares some of the Y axis values with the currently-focused responder.

[Prerequisite] The responder status should be "Visible" and "Enable for response" to be focused.

[Note] About "Visible" and "Enable for response"

For details : Behavior

It is necessary to associate the LEFT_ARROW key event and so on with the SFRHandler::RegisterHandler function.

Example

RegisterHandler(SFEVT_KEY, 
                AVK_LEFT, 
                HANDLER_AFTER, 
                HANDLER_FUNCTION(FocusLeftHandler));

Reference

SFRResponder::FocusUpHandler | SFRResponder::FocusDownHandler | SFRResponder::FocusRightHandler | SFRResponder::FocusNextHandler | SFRResponder::FocusPreviousHandler


SFRResponder::FocusNext
Focus to the next sibling responder.
[ public, const ]
Bool FocusNext(
    Bool repeat = true   // if not found, search from the beginning again
);

Return value

  • If succeeds: true
  • If failed: false

Description

[Prerequisite] The responder status should be "Visible" and "Enable for response" to be focused.

[Note] About "Visible" and "Enable for response"

For details : Behavior

[Note] About Focus

For details : Focus

If there is not next sibling responder, the first sibling responder is focused.

Reference

SFRResponder::FocusPrevious | SFRResponder::FocusUp | SFRResponder::FocusDown | SFRResponder::FocusLeft | SFRResponder::FocusRight


SFRResponder::FocusNextHandler
[Handler] Focus to the next sibling responder.
[ public ]
Bool FocusNextHandler(Void);

Description

[Prerequisite] The responder status should be "Visible" and "Enable for response" to be focused.

[Note] About "Visible" and "Enable for response"

For details : Behavior

If there is not next sibling responder, the first sibling responder is focused.

It is necessary to associate the UP_ARROW event and so on with the SFRHandler::RegisterHandler function.

Example

RegisterHandler(SFEVT_KEY, 
                AVK_UP, 
                HANDLER_AFTER, 
                HANDLER_FUNCTION(FocusNextHandler));

Reference

SFRResponder::FocusPreviousHandler | SFRResponder::FocusUpHandler | SFRResponder::FocusDownHandler | SFRResponder::FocusLeftHandler | SFRResponder::FocusRightHandler


SFRResponder::FocusPrevious
Focus to the previous sibling responder.
[ public, const ]
Bool FocusPrevious(
    Bool repeat = true   // if not found, search from the end again
);

Return value

  • If succeeds: true
  • If failed: false

Description

[Prerequisite] The responder status should be "Visible" and "Enable for response" to be focused.

[Note] About "Visible" and "Enable for response"

For details : Behavior

[Note] About Focus

For details : Focus

If there is not previous sibling responder, the last sibling responder is focused.

Reference

SFRResponder::FocusNext | SFRResponder::FocusUp | SFRResponder::FocusDown | SFRResponder::FocusLeft | SFRResponder::FocusRight


SFRResponder::FocusPreviousHandler
[Handler] Focus to the previous sibling responder.
[ public ]
Bool FocusPreviousHandler(Void);

Description

[Prerequisite] The responder status should be "Visible" and "Enable for response" to be focused.

[Note] About "Visible" and "Enable for response"

For details : Behavior

If there is not previous sibling responder, the last sibling responder is focused.

It is necessary to associate the DOWN_ARROW key event and so on with the SFRHandler::RegisterHandler function.

Example

RegisterHandler(SFEVT_KEY, 
                AVK_DOWN, 
                HANDLER_AFTER, 
                HANDLER_FUNCTION(FocusPreviousHandler));

Reference

SFRResponder::FocusNextHandler | SFRResponder::FocusUpHandler | SFRResponder::FocusDownHandler | SFRResponder::FocusLeftHandler | SFRResponder::FocusRightHandler


SFRResponder::FocusRight
Focus right to the next responder.
[ public, const ]
Bool FocusRight(
    Bool repeat = true   // if not found, search from left again
);

Return value

  • If succeeds: true
  • If failed: false

Description

Focus right to the next responder which shares some of the Y axis values with the currently-focused responder.

[Prerequisite] The responder status should be "Visible" and "Enable for response" to be focused.

[Note] About "Visible" and "Enable for response"

For details : Behavior

[Note] About Focus

For details : Focus

Reference

SFRResponder::FocusUp | SFRResponder::FocusDown | SFRResponder::FocusLeft | SFRResponder::FocusNext | SFRResponder::FocusPrevious


SFRResponder::FocusRightHandler
[Handler] Focus right to the next responder.
[ public ]
Bool FocusRightHandler(Void);

Description

Focus right to the next responder which shares some of the Y axis values with the currently-focused responder.

[Prerequisite] The responder status should be "Visible" and "Enable for response" to be focused.

[Note] About "Visible" and "Enable for response"

For details : Behavior

It is necessary to associate the RIGHT_ARROW key event and so on with the SFRHandler::RegisterHandler function.

Example

RegisterHandler(SFEVT_KEY, 
                AVK_RIGHT, 
                HANDLER_AFTER, 
                HANDLER_FUNCTION(FocusRightHandler));  

Reference

SFRResponder::FocusUpHandler | SFRResponder::FocusDownHandler | SFRResponder::FocusLeftHandler | SFRResponder::FocusNextHandler | SFRResponder::FocusPreviousHandler


SFRResponder::FocusUp
Focus up to the next responder.
[ public, const ]
Bool FocusUp(
    Bool repeat = true   // if not found, search from down again
);

Return value

  • If succeeds: true
  • If failed: false

Description

Focus up to the next responder which shares some of the X axis values with the currently-focused responder.

[Prerequisite] The responder status should be "Visible" and "Enable for response" to be focused.

[Note] About "Visible" and "Enable for response"

For details : Behavior

[Note] About Focus

For details : Focus

Reference

SFRResponder::FocusDown | SFRResponder::FocusLeft | SFRResponder::FocusRight | SFRResponder::FocusNext | SFRResponder::FocusPrevious


SFRResponder::FocusUpHandler
[Handler] Focus up to the next responder.
[ public ]
Bool FocusUpHandler(Void);

Description

Focus up to the next responder which shares some of the X axis values with the currently-focused responder.

[Prerequisite] The responder status should be "Visible" and "Enable for response" to be focused.

[Note] About "Visible" and "Enable for response"

For details : Behavior

It is necessary to associate the UP_ARROW key event and so on with the SFRHandler::RegisterHandler function.

Example

RegisterHandler(SFEVT_KEY, 
                AVK_UP, 
                HANDLER_AFTER, 
                HANDLER_FUNCTION(FocusUpHandler));

Reference

SFRResponder::FocusDownHandler | SFRResponder::FocusLeftHandler | SFRResponder::FocusRightHandler | SFRResponder::FocusNextHandler | SFRResponder::FocusPreviousHandler


SFRResponder::GetAppearanceTransparent
Get the value of APPEARANCE_TRANSPARENT flag.
[ protected, const ]
Bool GetAppearanceTransparent(Void);

Reference

SFRResponder::BehaviorEnum


SFRResponder::GetAttribute
Get the attribute.
[ public, const ]
SFCType GetAttribute(Void);

Example

// when there is an unknown kind of responder

// branch processing by the attribute of responder
switch (responder->GetAttribute()) {
    case ATTRIBUTE_SFRTITLEWINDOW:        // window
        ...
    case ATTRIBUTE_SFRBUTTONCONTROL:      // button
        ...
    case ATTRIBUTE_SFRRADIOBUTTONCONTROL: // radiobutton
        ...
}

Reference

SFRResponder::GetType


SFRResponder::GetBack
Get the child responder at the most background that matches the specified search condition.
[ public, const ]
SFRResponderPtr GetBack(
    SFCType type = TYPE_WILDCARD                          // type
    SFCType attribute = ATTRIBUTE_WILDCARD                // attribute
    BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE   // behavior
);

Argument

type

Specify the "Type" of responder to match.

TYPE_WILDCARD, which means arbitrary "Type", is the default value.

attribute

Specify the "Attribute" of responder to match.

ATTRIBUTE_WILDCARD, which means arbitrary "Attribute", is the default value.

compare

Specify the "Behavior" of responder to match.

Visible | Enable for responder (STATUS_VISIBLE|STATUS_ENABLE) is the default value.

BEHAVIOR_NONE, which means arbitrary "Behavior", can be specified.

Return value

Return the first child responder to match the specified condition, searching from background to foremost. If no child responder to match the specified condition is found, a null will be returned.

Example

The code to get the most background responder regardless of "Type", "Attribute", nor "Behavior" is as below:

SFRResponderPtr r;
SFRResponderPtr w;

w = r->GetBack();

Reference

SFRResponder::GetFront | SFRResponder::GetNthForward | SFRResponder::GetNthBackward | SFRResponder::GetIndexForward | SFRResponder::GetIndexBackward


SFRResponder::GetBaseBound
Get the base region with the coordinate of content region of parent responder.
[ public, const ]
SFXRectangleConstRef GetBaseBound(Void);

Example

The code to move the responder 10 pixels right and 10 pixels down is as below:

SFRResponderPtr   r;
SFXRectangle      u;

u = r->GetBaseBound();
u.Offset(10,10);
r->SetBaseBound(u);

Reference

SFRResponder::SetBaseBound | SFRResponder::GetContentBound | SFRResponder::GetVirtualBound | SFRResponder::GetBaseWorld


SFRResponder::GetBaseWorld
Get the base region.
[ public, const ]
SFXRectangle GetBaseWorld(Void);

Description

The SFRResponder::GetBaseWorld function returns the rectangle of base region. The coordinate of left-up corner is always ( 0, 0 ).

Reference

SFRResponder::GetContentWorld | SFRResponder::GetVirtualWorld | SFRResponder::SetBaseBound | SFRResponder::GetBaseBound


SFRResponder::GetContentBound
Get the content region with the coordinate of base region.
[ public, const ]
SFXRectangleConstRef GetContentBound(Void);

Reference

SFRResponder::SetContentBound | SFRResponder::GetBaseBound | SFRResponder::GetVirtualBound | SFRResponder::GetContentWorld


SFRResponder::GetContentWorld
Get the content region.
[ public, const ]
SFXRectangle GetContentWorld(Void);

Description

The SFRResponder::GetContentWorld function returns the rectangle of content region. The coordinate of left-top corner is always ( 0, 0 ).

Reference

SFRResponder::GetBaseWorld | SFRResponder::GetVirtualWorld | SFRResponder::SetContentBound | SFRResponder::GetContentBound


SFRResponder::GetDirector
Get the parent responder.
[ public, const ]
SFRResponderPtr GetDirector(Void);

SFRResponder::GetFocus
Get the responder with focus in its ownership hierarchy.
[ public, const ]
SFRResponderPtr GetFocus(Void);

Description

If there is no responder being focused, null is returned.


SFRResponder::GetFrameMargin
Get the margin between base and content region(in pixels).
[ public, const ]
SFXMargin GetFrameMargin(Void);

Reference

SFRResponder::SetFrameMargin


SFRResponder::GetFront
Get the child responder at the most foreground that matches the specified search condition.
[ public, const ]
SFRResponderPtr GetFront(
    SFCType type = TYPE_WILDCARD                            // type
    SFCType attribute = ATTRIBUTE_WILDCARD                  // attribute
    BehaviorType compare = STATUS_VISIBLE | STATUS_ENABLE   // behavior
);

Argument

type

Specify the "Type" of responder to match.

TYPE_WILDCARD, which means arbitrary "Type", is the default value.

attribute

Specify the "Attribute" of responder to match.

ATTRIBUTE_WILDCARD, which means arbitrary "Attribute", is the default value.

compare

Specify the "Behavior" of responder to match.

Visible | Enable for responder (STATUS_VISIBLE|STATUS_ENABLE) is the default value.

BEHAVIOR_NONE, which means arbitrary "Behavior", can be specified.

Return value

Return the first child responder to match the specified condition, searching from foremost to background. If no child responder to match the specified condition is found, a null will be returned.

Example

The code to get the most foreground responder regardless of "Type", "Attribute", nor "Behavior", is as below:

SFRResponderPtr r;
SFRResponderPtr w;

w = r->GetFront();

Reference

SFRResponder::GetBack | SFRResponder::GetNthForward | SFRResponder::GetNthBackward | SFRResponder::GetIndexForward | SFRResponder::GetIndexBackward


SFRResponder::GetIndexBackward
Get the index number from the most background of responder that matches the specified search condition.
[ public, const ]
SInt16 GetIndexBackward(
    SFCType type = TYPE_WILDCARD                          // type
    SFCType attribute = ATTRIBUTE_WILDCARD                // attribute
    BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE   // behavior
);

Argument

type

Specify the "Type" of responder to match.

TYPE_WILDCARD, which means arbitrary "Type", is the default value.

attribute

Specify the "Attribute" of responder to match.

ATTRIBUTE_WILDCARD, which means arbitrary "Attribute", is the default value.

compare

Specify the "Behavior" of responder to match.

Visible | Enable for responder (STATUS_VISIBLE|STATUS_ENABLE) is the default value.

BEHAVIOR_NONE, which means arbitrary "Behavior", can be specified.

Return value

Return the index number from background among sibling responders to match the specified condition. The index starts from 0.

Reference

SFRResponder::GetIndexForward | SFRResponder::GetNthForward | SFRResponder::GetNthBackward | SFRResponder::GetFront | SFRResponder::GetBack


SFRResponder::GetIndexForward
Get the index number from the most foreground of responder that matches the specified search condition.
[ public, const ]
SInt16 GetIndexForward(
    SFCType type = TYPE_WILDCARD                          // type
    SFCType attribute = ATTRIBUTE_WILDCARD                // attribute
    BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE   // behavior
);

Argument

type

Specify the "Type" of responder to match.

TYPE_WILDCARD, which means arbitrary "Type", is the default value.

attribute

Specify the "Attribute" of responder to match.

ATTRIBUTE_WILDCARD, which means arbitrary "Attribute", is the default value.

compare

Specify the "Behavior" of responder to match.

Visible | Enable for responder (STATUS_VISIBLE|STATUS_ENABLE) is the default value.

BEHAVIOR_NONE, which means arbitrary "Behavior", can be specified.

Return value

Return the index number from foreground among sibling responders to match the specified condition. The index starts from 0.

Reference

SFRResponder::GetIndexBackward | SFRResponder::GetNthForward | SFRResponder::GetNthBackward | SFRResponder::GetFront | SFRResponder::GetBack


SFRResponder::GetInheritEnable
Get the " Enable / Disable " status of responder including its parent responders.
[ public, const ]
Bool GetInheritEnable(Void);

Description

If a parent responder in the ownership hierarchy is disabled for response, the GetInheritEnable function returns the " Disable " status.

[Note] Usage

Since the " Enable / Disable " status of a responder including its parent responders can be gotten by using the SFRResponder::GetInheritEnable function, this function is used to draw the responder and so on.

Reference

SFRResponder::GroupStatusEnable | SFRResponder::SetStatusEnable | SFRResponder::GetStatusEnable


SFRResponder::GetInheritFocus
Get the " Focused / Unfocused " status of responder including its parent responders.
[ public, const ]
Bool GetInheritFocus(Void);

Description

If a parent responder in the ownership hierarchy is unfocused, the SFRResponder::GetInheritFocus function returns the " Unfocused " status.

[Note] Usage

Since the " Focused / Unfocused " status of a responder including its parent responders can be gotten by using the SFRResponder::GetInheritFocus function, this function is used to draw the responder and so on.

Reference

SFRResponder::SetStatusFocus | SFRResponder::GetStatusFocus


SFRResponder::GetInheritTarget
Get the " Target / Not-Target " status of responder including its parent responders.
[ public, const ]
Bool GetInheritTarget(Void);

Description

If a parent responder in the ownership hierarchy is non-target, the SFRResponder::GetInheritTarget function returns the " Not-Target " status.

[Note] Usage

Since the " Target / Not-Target " status of a responder including its parent responders can be gotten by using the SFRResponder::GetInheritTarget function, this function is used to draw the responder and so on.

Reference

SFRResponder::SetStatusTarget | SFRResponder::GetStatusTarget


SFRResponder::GetInheritVisible
Get the " Visible / Invisible " status of responder including its parent responders.
[ public, const ]
Bool GetInheritVisible(Void);

Description

If a parent responder in the ownership hierarchy is invisible, the SFRResponder::GetInheritVisible function returns the " Invisible " status.

[Note] Usage

Since the " Visible / Invisible " status of a responder including its parent responders can be gotten by using the SFRResponder::GetInheritVisible function, this function is used to draw the responder and so on.

Reference

SFRResponder::GroupStatusVisible | SFRResponder::SetStatusVisible | SFRResponder::GetStatusVisible


SFRResponder::GetLeft
Get the previous responder among the grouped responders that matches the specified search condition.
[ public, const ]
SFRResponderPtr GetLeft(
    SFCType type = TYPE_WILDCARD                          // type
    SFCType attribute = ATTRIBUTE_WILDCARD                // attribute
    BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE   // behavior
);

Argument

type

Specify the "Type" of responder to match.

TYPE_WILDCARD, which means arbitrary "Type", is the default value.

attribute

Specify the "Attribute" of responder to match.

ATTRIBUTE_WILDCARD, which means arbitrary "Attribute", is the default value.

compare

Specify the "Behavior" of responder to match.

Visible | Enable for responder (STATUS_VISIBLE|STATUS_ENABLE) is the default value.

BEHAVIOR_NONE, which means arbitrary "Behavior", can be specified.

Return value

Return the sibling responder located at one more left-hand to match the specified search condition. If the responder is at the most left-hand, search from the most right-hand sibling responder. If no sibling responder is found, a null will be returned.

Example

Example 783.  Get the previous responder among the grouped responders regardless of type, attribute, or behavior.

responder->GetLeft();

Example 784.  Get the previous responder among the grouped responders of which type is window.

responder->GetLeft(TYPE_SFRWINDOW);

Reference

SFRResponder::GetRight | SFRResponder::Group | SFRResponder::Ungroup


SFRResponder::GetMoveInterval
Get the move interval in pixels.
[ public, const ]
SInt16 GetMoveInterval(Void);

Description

The SFRResponder::GetMoveInterval function returns the pixel number(move interval) that the responder is moved when calling the SFRResponder::MoveUpHandler, SFRResponder::MoveDownHandler, SFRResponder::MoveLeftHandler, or SFRResponder::MoveRightHandler function.

The default value of move interval is 8 pixels. To set the move interval by the above functions, use the SFRResponder::SetMoveInterval function.

Reference

SFRResponder::SetMoveInterval | SFRResponder::MoveUpHandler | SFRResponder::MoveDownHandler | SFRResponder::MoveLeftHandler | SFRResponder::MoveRightHandler


SFRResponder::GetMoveMargin
Get the margin pixels of content region ( or virtual region if set with the parent responder ) where the child responder cannot move.
[ public, const ]
SInt16 GetMoveMargin(Void);

Description

The default value of move margin is 1 pixel. To set this margin, use the SFRResponder::SetMoveMargin function.

To move the child responder, use the SFRResponder::MoveUpHandler, SFRResponder::MoveDownHandler, SFRResponder::MoveRightHandler, SFRResponder::MoveLeftHandler, or SFRResponder::Move function.

Reference

SFRResponder::SetMoveMargin | SFRResponder::MoveUpHandler | SFRResponder::MoveDownHandler | SFRResponder::MoveLeftHandler | SFRResponder::MoveRightHandler | SFRResponder::Move


SFRResponder::GetNext
Get the next sibling responder that matches the specified search condition.
[ public, const ]
SFRResponderPtr GetNext(
    SFCType type = TYPE_WILDCARD                          // type
    SFCType attribute = ATTRIBUTE_WILDCARD                // attribute
    BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE   // behavior
    Bool repeat = true                                    // if not found, search from the beginning again
);

Argument

type

Specify the "Type" of responder to match.

TYPE_WILDCARD, which means arbitrary "Type", is the default value.

attribute

Specify the "Attribute" of responder to match.

ATTRIBUTE_WILDCARD, which means arbitrary "Attribute", is the default value.

compare

Specify the "Behavior" of responder to match.

Visible | Enable for responder (STATUS_VISIBLE|STATUS_ENABLE) is the default value.

BEHAVIOR_NONE, which means arbitrary "Behavior", can be specified.

Return value

Return the sibling responder located at one more background to match the specified search condition. If the responder is at the most background, search from the most foreground sibling responder. If no sibling responder is found, a null will be returned.

Example

Example 785.  Get the next sibling responder regardless of type, attribute, or behavior.

responder->GetNext();

Example 786.  Get the next sibling responder of which type is window.

responder->GetNext(TYPE_SFRWINDOW);

Reference

SFRResponder::GetPrevious | SFRResponder::GetFront | SFRResponder::GetBack


SFRResponder::GetNthBackward
Get the Nth child responder from the most background that matches the specified search condition.
[ public, const ]
SFRResponderPtr GetNthBackward(
    SInt16 index                                          // index
    SFCType type = TYPE_WILDCARD                          // type
    SFCType attribute = ATTRIBUTE_WILDCARD                // attribute
    BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE   // behavior
);

Argument

index

The index value is 0-based. Minus value is invalid.

type

Specify the "Type" of responder to match.

TYPE_WILDCARD, which means arbitrary "Type", is the default value.

attribute

Specify the "Attribute" of responder to match.

ATTRIBUTE_WILDCARD, which means arbitrary "Attribute", is the default value.

compare

Specify the "Behavior" of responder to match.

Visible | Enable for responder (STATUS_VISIBLE|STATUS_ENABLE) is the default value.

BEHAVIOR_NONE, which means arbitrary "Behavior", can be specified.

Return value

Return the Nth child responder from the most background that matches the specified search condition. If no child responder is found, a null will be returned.

Example

Example 787.  Get the 3rd responder from background, of which status is " Visible and Enable ".

SFRResponderPtr r;
SFRResponderPtr w;

w = r->GetNthBackward(2);

Reference

SFRResponder::GetNthForward | SFRResponder::GetIndexForward | SFRResponder::GetIndexBackward | SFRResponder::GetFront | SFRResponder::GetBack


SFRResponder::GetNthForward
Get the Nth child responder from the most foreground that matches the specified search condition.
[ public, const ]
SFRResponderPtr GetNthForward(
    SInt16 index                                          // index
    SFCType type = TYPE_WILDCARD                          // type
    SFCType attribute = ATTRIBUTE_WILDCARD                // attribute
    BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE   // behavior
);

Argument

index

The index value is 0-based. Minus value is invalid.

type

Specify the "Type" of responder to match.

TYPE_WILDCARD, which means arbitrary "Type", is the default value.

attribute

Specify the "Attribute" of responder to match.

ATTRIBUTE_WILDCARD, which means arbitrary "Attribute", is the default value.

compare

Specify the "Behavior" of responder to match.

Visible | Enable for responder (STATUS_VISIBLE|STATUS_ENABLE) is the default value.

BEHAVIOR_NONE, which means arbitrary "Behavior", can be specified.

Return value

Return the Nth child responder from the most foreground that matches the specified search condition. If no child responder is found, a null will be returned.

Example

Example 788.  Get the 3rd responder from foreground, of which status is " Visible and Enable ".

SFRResponderPtr r;
SFRResponderPtr w;

w = r->GetNthForward(2);

Reference

SFRResponder::GetNthBackward | SFRResponder::GetIndexForward | SFRResponder::GetIndexBackward | SFRResponder::GetFront | SFRResponder::GetBack


SFRResponder::GetPrevious
Get the previous sibling responder that matches the specified search condition.
[ public, const ]
SFRResponderPtr GetPrevious(
    SFCType type = TYPE_WILDCARD                          // type
    SFCType attribute = ATTRIBUTE_WILDCARD                // attribute
    BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE   // behavior
    Bool repeat = true                                    // if not found, search from the beginning again
);

Argument

type

Specify the "Type" of responder to match.

TYPE_WILDCARD, which means arbitrary "Type", is the default value.

attribute

Specify the "Attribute" of responder to match.

ATTRIBUTE_WILDCARD, which means arbitrary "Attribute", is the default value.

compare

Specify the "Behavior" of responder to match.

Visible | Enable for responder (STATUS_VISIBLE|STATUS_ENABLE) is the default value.

BEHAVIOR_NONE, which means arbitrary "Behavior", can be specified.

Return value

Return the sibling responder located at one more foreground to match the specified search condition. If the responder is at the most foreground, search from the most background sibling responder. If no sibling responder is found, a null will be returned.

Example

Example 789.  Get the previous sibling responder regardless of type, attribute, or behavior.

responder->GetRight();

Example 790.  Get the previous sibling responder of which type is window.

responder->GetRight(TYPE_SFRWINDOW);

Reference

SFRResponder::GetNext | SFRResponder::GetFront | SFRResponder::GetBack


SFRResponder::GetPropertyClosable
Get the value of PROPERTY_CLOSABLE flag.
[ protected, const ]
Bool GetPropertyClosable(Void);

Reference

SFRResponder::BehaviorEnum


SFRResponder::GetPropertyDirect
Get the value of PROPERTY_DIRECT flag.
[ protected, const ]
Bool GetPropertyDirect(Void);

Reference

SFRResponder::BehaviorEnum


SFRResponder::GetPropertyMovable
Get the value of PROPERTY_MOVABLE flag.
[ protected, const ]
Bool GetPropertyMovable(Void);

Reference

SFRResponder::BehaviorEnum


SFRResponder::GetPropertyScrollable
Get the value of PROPERTY_SCROLLABLE flag.
[ protected, const ]
Bool GetPropertyScrollable(Void);

Reference

SFRResponder::BehaviorEnum


SFRResponder::GetPropertySelect
Get the value of PROPERTY_SELECT flag.
[ protected, const ]
Bool GetPropertySelect(Void);

Reference

SFRResponder::BehaviorEnum


SFRResponder::GetPropertyTravel
Get the value of PROPERTY_TRAVEL flag.
[ protected, const ]
Bool GetPropertyTravel(Void);

Reference

SFRResponder::BehaviorEnum


SFRResponder::GetReference
Get the reference value.
[ public, const ]
VoidPtr GetReference(Void);

Example

SFRButtonControlPtr button;
SInt32 i;

// create 10 buttons with reference value
for (i = 0; i < 10; ++i) {
    button = new SFRButtonControl(this, SFXRectangle(0, i * 30, 20, 20), ");

    // set the reference value onto the button for identification
    button->SetReference(reinterpret_cast<VoidPtr>(i));
}

...

// get the reference value
SInt32 number = reinterpret_cast<SInt32>(button->GetReference());

Reference

SFRResponder::SetReference


SFRResponder::GetRight
Get the next responder among the grouped responders that matches the specified search condition.
[ public, const ]
SFRResponderPtr GetRight(
    SFCType type = TYPE_WILDCARD                          // type
    SFCType attribute = ATTRIBUTE_WILDCARD                // attribute
    BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE   // behavior
);

Argument

type

Specify the "Type" of responder to match.

TYPE_WILDCARD, which means arbitrary "Type", is the default value.

attribute

Specify the "Attribute" of responder to match.

ATTRIBUTE_WILDCARD, which means arbitrary "Attribute", is the default value.

compare

Specify the "Behavior" of responder to match.

Visible | Enable for responder (STATUS_VISIBLE|STATUS_ENABLE) is the default value.

BEHAVIOR_NONE, which means arbitrary "Behavior", can be specified.

Return value

Return the sibling responder located at one more right-hand to match the specified search condition. If the responder is at the most right-hand, search from the most left-hand sibling responder. If no sibling responder is found, a null will be returned.

Example

Example 791.  Get the next responder among the grouped responders regardless of type, attribute, or behavior.

responder->GetRight();

Example 792.  Get the next responder among the grouped responders of which type is window.

responder->GetRight(TYPE_SFRWINDOW);

Reference

SFRResponder::GetLeft | SFRResponder::Group | SFRResponder::Ungroup


SFRResponder::GetScrollInterval
Get the scroll interval in pixels.
[ public, const ]
SInt16 GetScrollInterval(Void);

Description

The SFRResponder::GetScrollInterval function returns the pixel number(scroll interval) that the virtual region of responder is scrolled when calling the SFRResponder::ScrollUpHandler, SFRResponder::ScrollDownHandler, SFRResponder::ScrollLeftHandler, or SFRResponder::ScrollRightHandler function.

The default value of scroll interval is 8 pixels. To set the scroll interval by the above functions, use the SFRResponder::SetScrollInterval function.

Reference: Scrolling

Reference

SFRResponder::SetScrollInterval | SFRResponder::ScrollUpHandler | SFRResponder::ScrollDownHandler | SFRResponder::ScrollLeftHandler | SFRResponder::ScrollRightHandler


SFRResponder::GetStatusEnable
Get the value of " Enable / Disable " flag.
[ public, const ]
Bool GetStatusEnable(Void);

Reference

SFRResponder::GroupStatusEnable | SFRResponder::SetStatusEnable | SFRResponder::GetInheritEnable


SFRResponder::GetStatusFocus
Get the value of " Focused / Unfocused " flag.
[ public, const ]
Bool GetStatusFocus(Void);

Reference

SFRResponder::SetStatusFocus | SFRResponder::GetInheritFocus


SFRResponder::GetStatusTarget
Get the value of " Target / Non-target " flag.
[ public, const ]
Bool GetStatusTarget(Void);

Reference

SFRResponder::SetStatusTarget | SFRResponder::GetInheritTarget


SFRResponder::GetStatusVisible
Get the value of " Visible / Invisible " flag.
[ public, const ]
Bool GetStatusVisible(Void);

Reference

SFRResponder::GroupStatusVisible | SFRResponder::SetStatusVisible | SFRResponder::GetInheritVisible


SFRResponder::GetTranslate
Get the origin coordinate of virtual region with the coordinate of content region.
[ public, const ]
SFXGrid GetTranslate(Void);

Reference

SFRResponder::SetTranslate | SFRResponder::SetVirtualBound | SFRResponder::GetVirtualBound


SFRResponder::GetTravelMargin
Get the margin pixels of content region inside which the rectangle in the virtual region but outside the content region should be automatically scrolled by using the SFRResponder::Travel function.
[ public, const ]
SInt16 GetTravelMargin(Void);

Description

The default value of this margin is 4 pixels. To set this margin, use the SFRResponder::SetTravelMargin function.

To scroll the rectangle in the virtual region but outside the content region into the content region automatically, use the SFRResponder::Travel function.

Reference

SFRResponder::SetTravelMargin | SFRResponder::Travel


SFRResponder::GetType
Get the responder type.
[ public, const ]
SFCType GetType(Void);

Description

Get the type of the responder. The return value should be 1 of below:

TYPE_SFRAPPLICATION ( Application responder )
TYPE_SFRWINDOW ( Window responder )
TYPE_SFRDIALOG ( Dialog responder )
TYPE_SFRMENU ( Menu responder )
TYPE_SFRCONTROL ( Control responder )
TYPE_SFRPANE ( Pane responder )

Reference

SFRResponder::GetAttribute


SFRResponder::GetVirtualBound
Get the virtual region with the coordinate of content region.
[ public, const ]
SFXRectangleConstRef GetVirtualBound(Void);

Example

The code to move the virtual region 10 pixels left and 10 pixels up is as below:

SFRResponderPtr   r;
SFXRectangle      u;

u = r->GetVirtualBound();
u.Offset(-10,-10);
r->SetVirtualBound(u);

Reference

SFRResponder::SetVirtualBound | SFRResponder::GetBaseBound | SFRResponder::GetContentBound | SFRResponder::GetVirtualWorld


SFRResponder::GetVirtualWorld
Get the virtual region
[ public, const ]
SFXRectangle GetVirtualWorld(Void);

Description

This function retuns the rectangle of virtual world. The coordinate of left-up corner must be ( 0, 0 ).

Reference

SFRResponder::GetBaseWorld | SFRResponder::GetContentWorld | SFRResponder::SetVirtualBound | SFRResponder::GetVirtualBound


SFRResponder::Group
Group the responder with the group of which representative responder is specified as an argument.
[ public, virtual ]
Void Group(
    SFRResponderPtr with   // pointer to the representative responder of group
);

Description

To apply specific processing to all the related responders at once, group together them by using the SFRResponder::Group function.

For example, once grouping together several SFRRadiobuttonControl objects, one of SFRRadiobuttonControl objects is exclusively selected automatically.

Example

The code to group together the SFRRadiobuttonControl objects is as below:

SFRRadiobuttonControlPtr   rb0;
SFRRadiobuttonControlPtr   rb1;
SFRRadiobuttonControlPtr   rb2;

rb1->Group(rb0);
rb2->Group(rb0);

Reference

SFRResponder::Ungroup | SFRResponder::GetLeft | SFRResponder::GetRight


SFRResponder::GroupMove
Move all the responders grouped together.
[ public ]
Void GroupMove(
    SFXSizeConstRef size   // size to move
);

Reference

SFRResponder::Move | SFRResponder::Group | SFRResponder::Ungroup


SFRResponder::GroupScroll
Scroll all the virtual regions of responders grouped together.
[ public ]
Void GroupScroll(
    SFXSizeConstRef size   // size to scroll
);

Description

Reference: Scrolling

Reference

SFRResponder::Scroll | SFRResponder::Group | SFRResponder::Ungroup


SFRResponder::GroupSelect
Select all the responders grouped together. ( move all of them to the most foreground )
[ public ]
Void GroupSelect(Void);

Reference

SFRResponder::Select


SFRResponder::GroupStatusEnable
Set the " Enable / Disable " status of all the responders grouped together.
[ public ]
Void GroupStatusEnable(
    Bool enable   // value to set
);

Reference

SFRResponder::SetStatusEnable | SFRResponder::GetStatusEnable | SFRResponder::GetInheritEnable | SFRResponder::Group | SFRResponder::Ungroup


SFRResponder::GroupStatusVisible
Set the " Visible / Invisible " status of all the responders grouped together.
[ public ]
Void GroupStatusVisible(
    Bool visible   // value to set
);

Reference

SFRResponder::SetStatusVisible | SFRResponder::GetStatusVisible | SFRResponder::GetInheritVisible | SFRResponder::Group | SFRResponder::Ungroup


SFRResponder::InvalidateBase
Register an area in the base region to be redrawn.
[ public ]
Void InvalidateBase(Void);
[ public ]
Void InvalidateBase(
    SFXRectangleConstRef rect   // area in the base region to be redrawn
);

Example

The code to register all the base region as an area to be redrawn is as below:

InvalidateBase();

Reference

SFRResponder::InvalidateContent | SFRResponder::InvalidateVirtual


SFRResponder::InvalidateContent
Register an area in the content region to be redrawn.
[ public ]
Void InvalidateContent(Void);
[ public ]
Void InvalidateContent(
    SFXRectangleConstRef rect   // area in the base region to be redrawn
);

Example

The code to register all the content region as an area to be redrawn is as below:

InvalidateContent();

Reference

SFRResponder::InvalidateBase | SFRResponder::InvalidateVirtual


SFRResponder::InvalidateVirtual
Register an area in the virtual region to be redrawn.
[ public ]
Void InvalidateVirtual(Void);
[ public ]
Void InvalidateVirtual(
    SFXRectangleConstRef rect   // area in the virtual region to be redrawn
);

Example

The code to register all the virtual region as an area to be redrawn is as below:

InvalidateVirtual();

Reference

SFRResponder::InvalidateBase | SFRResponder::InvalidateContent


SFRResponder::Invoke
Send the specified event.
[ public, virtual ]
Bool Invoke(
    SFXEventConstRef event   // event to send
);

Return value

  • If the specified event is handled: true
  • Otherwise: false

Description

To change the method to handle the specified event, override the SFRResponder::Invoke function.

Reference

SFCInvoker::Invoke


SFRResponder::Move
Move the responder.
[ public ]
Void Move(
    SFXSizeConstRef size   // size to move
);

Reference

SFRResponder::GroupMove | SFRResponder::SetMoveMargin | SFRResponder::GetMoveMargin


SFRResponder::MoveDownHandler
[Handler] Move the responder down.
[ public ]
Bool MoveDownHandler(Void);

Description

[Precondition] The PROPERTY_MOVABLE flag of the responder must be set.

It is necessary to associate the DOWN_ARROW key event and so on with the SFRResponder::MoveDownHandler function by using the SFRHandler::RegisterHandler function.

The pixel number to move the responder down by the SFRResponder::MoveDownHandler function can be set by using the SFRResponder::SetMoveInterval function.

Example

Each of the following examples is the code that moves the window 10 pixel down.

Example 793. The code to move the window 10 pixel down by the SFRResponder::MoveDownHandler function

SFRWindowPtr _window;

// create the window
// set the behavior of window to PROPERTY_MOVABLE
_window = new SFRTitleWindow(this, SFXRectangle(10, 10, 100, 180), "sample", SFRTitleWindow::ALIGN_LEFT, BEHAVIOR_SFRTITLEWINDOW | PROPERTY_MOVABLE);

// register the MoveDownHandler function as an event handler
// when the DOWN_ARROW key is pressed, move this window down
RegisterHandler(SFEVT_KEY, AVK_DOWN, HANDLER_AFTER, HANDLER_FUNCTION(MoveDownHandler));

// set the pixel number to move the window down
SetMoveInterval(10);

Example 794. The code to move the window 10 pixel down by the key handler

SFRWindowPtr _window;

// create the window
// it is unnecessary to set the behavior of window to PROPERTY_MOVABLE
_window = new SFRTitleWindow(this, SFXRectangle(10, 10, 100, 180), "sample");

// register the key handler
RegisterHandler(SFEVT_KEY, HANDLER_AFTER, HANDLER_FUNCTION(OnKey));

// content of the key handler
HANDLER_IMPLEMENT_BOOLEVENT(MoveSample, OnKey, event)
{
    switch (event.GetP16()) {
        case AVK_DOWN:
            // move the window 10 pixel down
            _window->Move(SFXSize(0, 10));
            return true;
    }
    return false;
}

Reference

SFRResponder::MoveUpHandler | SFRResponder::MoveLeftHandler | SFRResponder::MoveRightHandler | SFRResponder::BehaviorEnum


SFRResponder::MoveLeftHandler
[Handler] Move the responder left.
[ public ]
Bool MoveLeftHandler(Void);

Description

[Precondition] The PROPERTY_MOVABLE flag of responder must be set.

It is necessary to associate the LEFT_ARROW key event and so on with the SFRResponder::MoveLeftHandler function by using the SFRHandler::RegisterHandler function.

The pixel number to move the responder left by the SFRResponder::MoveLeftHandler function can be set by using the SFRResponder::SetMoveInterval function.

Example

Each of the following examples is the code that moves the window 10 pixel left.

Example 795. The code to move the window 10 pixel left by the SFRResponder::MoveLeftHandler function

SFRWindowPtr _window;

// create the window
// set the behavior to PROPERTY_MOVABLE
_window = new SFRTitleWindow(this, SFXRectangle(10, 10, 100, 180), "sample", SFRTitleWindow::ALIGN_LEFT, BEHAVIOR_SFRTITLEWINDOW | PROPERTY_MOVABLE);

// register the MoveLeftHandler function as an event handler
// when the LEFT_ARROW key is pressed, move this window left
RegisterHandler(SFEVT_KEY, AVK_LEFT, HANDLER_AFTER, HANDLER_FUNCTION(MoveLeftHandler));

// set the pixel number to move the window left
SetMoveMargin(10);

Example 796. The code to move the window 10 pixel left by the key handler

SFRWindowPtr _window;

// create the window
// it is unnecessary to set the behavior of window to PROPERTY_MOVABLE
_window = new SFRTitleWindow(this, SFXRectangle(10, 10, 100, 180), "sample");

// register the key handler
RegisterHandler(SFEVT_KEY, HANDLER_AFTER, HANDLER_FUNCTION(OnKey));

// content of the key handler
HANDLER_IMPLEMENT_BOOLEVENT(MoveSample, OnKey, event)
{
    switch (event.GetP16()) {
        case AVK_LEFT:
            // move the window 10 pixel left
           _window->Move(SFXSize(-10, 0));
           return true;
    }
    return false;
}

Reference

SFRResponder::MoveUpHandler | SFRResponder::MoveDownHandler | SFRResponder::MoveRightHandler | SFRResponder::BehaviorEnum


SFRResponder::MoveRightHandler
[Handler] Move the responder right.
[ public ]
Bool MoveRightHandler(Void);

Description

[Precondition] The PROPERTY_MOVABLE flag of responder must be set.

It is necessary to associate the RIGHT_ARROW key event and so on with the SFRResponder::MoveRightHandler function by using the SFRHandler::RegisterHandler function.

The pixel number to move the responder right by the SFRResponder::MoveRightHandler function can be set by using the SFRResponder::SetMoveInterval function.

Example

Each of the following examples is the code that moves the window 10 pixel right.

Example 797. The code to move the window 10 pixel right by the SFRResponder::MoveRightHandler function

SFRWindowPtr _window;

// create the window
// set the behavior to PROPERTY_MOVABLE
_window = new SFRTitleWindow(this, SFXRectangle(10, 10, 100, 180), "sample", SFRTitleWindow::ALIGN_LEFT, BEHAVIOR_SFRTITLEWINDOW | PROPERTY_MOVABLE);

// register the MoveRightHandler function as an event handler
// when the RIGHT_ARROW key is pressed, move this window right
RegisterHandler(SFEVT_KEY, AVK_RIGHT, HANDLER_AFTER, HANDLER_FUNCTION(MoveRightHandler));

// set the pixel number to move the window right
SetMoveMargin(10);

Example 798. The code to move the window 10 pixel right by the key handler

SFRWindowPtr _window;

// create the window
// it is unnecessary to set the behavior of window to PROPERTY_MOVABLE
_window = new SFRTitleWindow(this, SFXRectangle(10, 10, 100, 180), "sample");

// register the key handler
RegisterHandler(SFEVT_KEY, HANDLER_AFTER, HANDLER_FUNCTION(OnKey));

// content of the key handler
HANDLER_IMPLEMENT_BOOLEVENT(MoveSample, OnKey, event)
{
    switch (event.GetP16()) {
        case AVK_RIGHT:
            // move the window
            _window->Move(SFXSize(10, 0));
            return true;
    }
    return false;
}

Reference

SFRResponder::MoveUpHandler | SFRResponder::MoveDownHandler | SFRResponder::MoveLeftHandler | SFRResponder::BehaviorEnum


SFRResponder::MoveUpHandler
[Handler] Move the responder up.
[ public ]
Bool MoveUpHandler(Void);

Description

[Precondition] The PROPERTY_MOVABLE flag of the responder must be set.

It is necessary to associate the UP_ARROW key event and so on with the SFRResponder::MoveUpHandler function by using the SFRHandler::RegisterHandler function.

The pixel number to move the responder up by the SFRResponder::MoveUpHandler function can be set by using the SFRResponder::SetMoveInterval function.

Example

Each of the following examples is the code that moves the window 10 pixel up.

Example 799. The code to move the window 10 pixel up by the SFRResponder::MoveUpHandler function

SFRWindowPtr _window;

// create the window
// set the behavior of window to PROPERTY_MOVABLE
_window = new SFRTitleWindow(this, SFXRectangle(10, 10, 100, 180), "sample", SFRTitleWindow::ALIGN_LEFT, BEHAVIOR_SFRTITLEWINDOW | PROPERTY_MOVABLE);

// register the MoveUpHandler function as an event handler
// when the UP_ARROW key is pressed, move this window up
RegisterHandler(SFEVT_KEY, AVK_UP, HANDLER_AFTER, HANDLER_FUNCTION(MoveUpHandler));

// set the pixel number to move the window up
SetMoveMargin(10);

Example 800. The code to move the window 10 pixel up by the key handler

SFRWindowPtr _window;

// create the window
// it is unnecessary to set the behavior of window to PROPERTY_MOVABLE
_window = new SFRTitleWindow(this, SFXRectangle(10, 10, 100, 180), "sample");

// register the key handler
RegisterHandler(SFEVT_KEY, HANDLER_AFTER, HANDLER_FUNCTION(OnKey));

// content of the key handler
HANDLER_IMPLEMENT_BOOLEVENT(MoveSample, OnKey, event)
{
    switch (event.GetP16()) {
        case AVK_UP:
            // move the window 10 pixel up
            _window->Move(SFXSize(0, -10));
            return true;
    }
    return false;
}

Reference

SFRResponder::MoveDownHandler | SFRResponder::MoveLeftHandler | SFRResponder::MoveRightHandler | SFRResponder::BehaviorEnum


SFRResponder::Scroll
Scroll the virtual region.
[ public ]
Void Scroll(
    SFXSizeConstRef size   // size to scroll
);

Description

Reference: Scrolling

Reference

SFRResponder::GroupScroll


SFRResponder::ScrollDownHandler
[Handler] Scroll the virtual region down.
[ public ]
Bool ScrollDownHandler(Void);

Description

[Precondition] The PROPERTY_SCROLLABLE flag of responder must be set.

It is necessary to associate the DOWN_ARROW key event and so on with the SFRResponder::ScrollDownHandler function by using the SFRHandler::RegisterHandler function.

The scroll interval is set by the SFRResponder::SetScrollInterval function.

Reference: Scrolling

Example

RegisterHandler(SFEVT_KEY, 
                AVK_DOWN, 
                HANDLER_AFTER, 
                HANDLER_FUNCTION(ScrollDownHandler));

Reference

SFRHandler::RegisterHandler | SFRResponder::SetScrollInterval | SFRResponder::ScrollUpHandler | SFRResponder::ScrollLeftHandler | SFRResponder::ScrollRightHandler | SFRResponder::BehaviorEnum


SFRResponder::ScrollLeftHandler
[Handler] Scroll the virtual region left.
[ public ]
Bool ScrollLeftHandler(Void);

Description

[Precondition] The PROPERTY_SCROLLABLE flag of responder must be set.

It is necessary to associate the LEFT_ARROW key event and so on with the SFRResponder::ScrollLeftHandler function by using the SFRHandler::RegisterHandler function.

The scroll interval is set by the SFRResponder::SetScrollInterval function.

Reference: Scrolling

Example

RegisterHandler(SFEVT_KEY, 
                AVK_LEFT, 
                HANDLER_AFTER, 
                HANDLER_FUNCTION(ScrollLeftHandler));

Reference

SFRHandler::RegisterHandler | SFRResponder::SetScrollInterval | SFRResponder::ScrollUpHandler | SFRResponder::ScrollDownHandler | SFRResponder::ScrollRightHandler | SFRResponder::BehaviorEnum


SFRResponder::ScrollRightHandler
[Handler] Scroll the virtual region right.
[ public ]
Bool ScrollRightHandler(Void);

Description

[Precondition] The PROPERTY_SCROLLABLE flag of responder must be set.

It is necessary to associate the RIGHT_ARROW key event and so on with the SFRResponder::ScrollRightHandler function by using the SFRHandler::RegisterHandler function.

The scroll interval is set by the SFRResponder::SetScrollInterval function.

Reference: Scrolling

Example

RegisterHandler(SFEVT_KEY, 
                AVK_RIGHT, 
                HANDLER_AFTER, 
                HANDLER_FUNCTION(ScrollRightHandler));

Reference

SFRHandler::RegisterHandler | SFRResponder::SetScrollInterval | SFRResponder::ScrollUpHandler | SFRResponder::ScrollDownHandler | SFRResponder::ScrollLeftHandler | SFRResponder::BehaviorEnum


SFRResponder::ScrollUpHandler
[Handler] Scroll the virtual region up.
[ public ]
Bool ScrollUpHandler(Void);

Description

[Precondition] The PROPERTY_SCROLLABLE flag of responder must be set.

It is necessary to associate the UP_ARROW key event and so on with the SFRResponder::ScrollUpHandler function by using the SFRHandler::RegisterHandler function.

The scroll interval is set by the SFRResponder::SetScrollInterval function.

Reference: Scrolling

Example

RegisterHandler(SFEVT_KEY, 
                AVK_UP, 
                HANDLER_AFTER, 
                HANDLER_FUNCTION(ScrollUpHandler));

Reference

SFRHandler::RegisterHandler | SFRResponder::SetScrollInterval | SFRResponder::ScrollDownHandler | SFRResponder::ScrollLeftHandler | SFRResponder::ScrollRightHandler | SFRResponder::BehaviorEnum


SFRResponder::Select
Select the responder and move it to the most foreground.
[ public, virtual ]
Void Select(Void);

Reference

SFRResponder::GroupSelect


SFRResponder::SelectHandler
[Handler] Set the target status of a responder to true.
[ public ]
Bool SelectHandler(Void);

Description

[Precondition] The precondition of target status is that the responder must be focused. Otherwise, the most foreground responder will be focused.

For details: Behavior

It is necessary to associate the SELECT key event and so on with RegisterHandler function.

Example

RegisterHandler(SFEVT_KEY, 
                AVK_SELECT, 
                HANDLER_AFTER, 
                HANDLER_FUNCTION(SelectHandler));

Reference

SFRResponder::ClearHandler


SFRResponder::SetBaseBound
Set the base region with the coordinate of virtual region of parent responder.
[ public, virtual ]
Void SetBaseBound(
    SFXRectangleConstRef rect   // value to set
);

Example

The code to move the responder 10 pixels right and 10 pixels down is as below:

SFRResponderPtr   r;
SFXRectangle      u;

u = r->GetBaseBound();
u.Offset(10,10);
r->SetBaseBound(u);

Reference

SFRResponder::GetBaseBound | SFRResponder::SetContentBound | SFRResponder::SetVirtualBound | SFRResponder::GetBaseWorld


SFRResponder::SetContentBound
Set the content region with the coordinate of base region.
[ public, virtual ]
Void SetContentBound(
    SFXRectangleConstRef rect   // value to set
);

Reference

SFRResponder::GetContentBound | SFRResponder::SetBaseBound | SFRResponder::SetVirtualBound | SFRResponder::GetContentWorld


SFRResponder::SetFrameMargin
Set the margin between base and content region(in pixels).
[ public ]
Void SetFrameMargin(
    SFXMarginConstRef param   // margin to set
);

Reference

SFRResponder::GetFrameMargin


SFRResponder::SetMoveInterval
Set the move interval in pixels.
[ public ]
Void SetMoveInterval(
    SInt16 interval   // move interval to set
);

Description

The SFRResponder::SetMoveInterval function sets the pixel number(move interval) that the responder is moved when calling the SFRResponder::MoveUpHandler, SFRResponder::MoveDownHandler, SFRResponder::MoveLeftHandler, or SFRResponder::MoveRightHandler function.

The default value of move interval is 8 pixels. To get the move interval by the above functions, use the SFRResponder::GetMoveInterval function.

Reference

SFRResponder::GetMoveInterval | SFRResponder::MoveUpHandler | SFRResponder::MoveDownHandler | SFRResponder::MoveLeftHandler | SFRResponder::MoveRightHandler


SFRResponder::SetMoveMargin
Set the margin pixels of content region ( or virtual region if set with the parent responder ) where the child responder cannot move.
[ public ]
Void SetMoveMargin(
    SInt16 margin   // value to set
);

Description

The default value of this margin is 1 pixel. To get this margin, use the SFRResponder::GetMoveMargin function.

To move the child responder, use the SFRResponder::MoveUpHandler, SFRResponder::MoveDownHandler, SFRResponder::MoveRightHandler, SFRResponder::MoveLeftHandler, or SFRResponder::Move function.

Reference

SFRResponder::GetMoveMargin | SFRResponder::MoveUpHandler | SFRResponder::MoveDownHandler | SFRResponder::MoveLeftHandler | SFRResponder::MoveRightHandler | SFRResponder::Move


SFRResponder::SetReference
Set the reference value.
[ public ]
Void SetReference(
    VoidPtr ref   //Value to set
);

Reference

SFRResponder::GetReference


SFRResponder::SetScrollInterval
Set the scroll interval in pixels.
[ public ]
Void SetScrollInterval(
    SInt16 interval   // scroll interval to set
);

Description

The SFRResponder::SetScrollInterval function sets the pixel number(scroll interval) that the virtual region of responder is scrolled when calling the SFRResponder::ScrollUpHandler, SFRResponder::ScrollDownHandler, SFRResponder::ScrollLeftHandler, or SFRResponder::ScrollRightHandler function.

The default value of scroll interval is 8 pixels. To get the scroll interval by the above functions, use the SFRResponder::GetScrollInterval function.

Reference: Scrolling

Reference

SFRResponder::GetScrollInterval | SFRResponder::ScrollUpHandler | SFRResponder::ScrollDownHandler | SFRResponder::ScrollLeftHandler | SFRResponder::ScrollRightHandler


SFRResponder::SetStatusEnable
Set the value of " Enable / Disable " flag.
[ public, virtual ]
Void SetStatusEnable(
    Bool enable   // value to set
);

Reference

SFRResponder::GroupStatusEnable | SFRResponder::GetStatusEnable | SFRResponder::GetInheritEnable


SFRResponder::SetStatusFocus
Set the value of " Focused / Unfocused " flag.
[ public, virtual ]
Void SetStatusFocus(
    Bool focus   // value to set
);

Reference

SFRResponder::GetStatusFocus | SFRResponder::GetInheritFocus


SFRResponder::SetStatusTarget
Set the value of " Target / Not-Target " flag.
[ public, virtual ]
Void SetStatusTarget(
    Bool target   // value to set
);

Reference

SFRResponder::GetStatusTarget | SFRResponder::GetInheritTarget


SFRResponder::SetStatusVisible
Set the value of " Visible / Invisible " flag.
[ public, virtual ]
Void SetStatusVisible(
    Bool visible   // value to set
);

Reference

SFRResponder::GroupStatusVisible | SFRResponder::GetStatusVisible | SFRResponder::GetInheritVisible


SFRResponder::SetTranslate
Set the origin coordinate of virtual region with the coordinate of content region.
[ public ]
Void SetTranslate(
    SFXGridConstRef point   // value to set
);

Reference

SFRResponder::GetTranslate | SFRResponder::SetVirtualBound | SFRResponder::GetVirtualBound


SFRResponder::SetTravelMargin
Set the margin pixels of content region inside which the rectangle in the virtual region but outside the content region should be automatically scrolled by using the SFRResponder::Travel function.
[ public ]
Void SetTravelMargin(
    SInt16 margin   // value to set
);

Description

The default value of this margin is 4 pixels. To get this margin, use the SFRResponder::GetTravelMargin function.

To scroll the rectangle in the virtual region but outside the content region into the content region automatically, use the SFRResponder::Travel function.

Reference

SFRResponder::GetTravelMargin | SFRResponder::Travel


SFRResponder::SetVirtualBound
Set the virtual region with the coordinate of content region.
[ public, virtual ]
Void SetVirtualBound(
    SFXRectangleConstRef rect   // value to set
);

Example

The code to move the virtual region 10 pixels left and 10 pixels up is as below:

SFRResponderPtr   r;
SFXRectangle      u;

u = r->GetVirtualBound();
u.Offset(-10,-10);
r->SetVirtualBound(u);

Reference

SFRResponder::GetVirtualBound | SFRResponder::SetBaseBound | SFRResponder::SetContentBound | SFRResponder::GetVirtualWorld


SFRResponder::Travel
Scroll the virtual region of responder so that the specified rectangle can get into the content region.
[ public ]
Void Travel(
    SFXRectangleConstRef rect   // rectangle to scroll into the content region
);

Description

If the specified rectangle is inside the content region, it will not be scrolled.

Reference

SFRResponder::SetTravelMargin | SFRResponder::GetTravelMargin


SFRResponder::Ungroup
Ungroup the responders which are grouped together.
[ public, virtual ]
Void Ungroup(Void);

Reference

SFRResponder::Group | SFRResponder::GetLeft | SFRResponder::GetRight


SFRResponder::BehaviorEnum
Constant that represents the behavior of responder.
enum BehaviorEnum;

Description

The constants that represent the behavior of responder are as below.

BEHAVIOR_NONE -
STATUS_VISIBLE Visible or Invisible
STATUS_ENABLE Enable or Unable to respond
STATUS_FOCUS Focused or Not-Focused
STATUS_TARGET Target or Not-target
APPEARANCE_TRANSPARENT Transparently drawn or not
PROPERTY_DIRECT Always targeted or not
PROPERTY_SELECT Whether or not the responder is moved at the most foreground when it is selected.
PROPERTY_TRAVEL Whether or not the virtual region is automatically scrolled so that the focused responder can be inside the content region when it is outside the content region.
PROPERTY_CLOSABLE Whether or not the responder can be destroyed by the CLEAR key.
PROPERTY_MOVABLE Whether or not the responder can be moved by the number keys.
PROPERTY_SCROLLABLE Whether or not the virtual region can be scrolled by the number keys.
TRACER_PROVIDE Whether or not the responder permits the other responders to duplicately handle the same events that it handles.

Reference

SFRResponder::SFRResponder | SFRResponder::GetStatusVisible | SFRResponder::GetStatusEnable | SFRResponder::GetStatusFocus | SFRResponder::GetStatusTarget | SFRResponder::GetAppearanceTransparent | SFRResponder::GetPropertyDirect | SFRResponder::GetPropertySelect | SFRResponder::GetPropertyTravel | SFRResponder::GetPropertyClosable | SFRResponder::GetPropertyMovable | SFRResponder::GetPropertyScrollable | SFRTracer::RegisterTracer