PrevNextUpHome BREW C++ Class Library & GUI Framework & XML Middleware : SophiaFramework 4.1
SFRResponder
Base class of responder.
#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 112. 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 SFRResponder class.
~SFRResponder( Void )
Destructor of 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 with a 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 with a 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 with a 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 with a 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 with a 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 with a 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 with a 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 with a 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 with a 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 with a 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 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 )
InvalidateBase( SFXRectangleConstRef rect )
Register an area in the base region to be redrawn.
Void InvalidateContent( Void )
InvalidateContent( SFXRectangleConstRef rect )
Register an area in the content region to be redrawn.
Void InvalidateVirtual( 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)
RegisterHandler( SFCEventEnum btype , SFCEventEnum etype , UInt16 bp16 , UInt16 ep16 , HandlerEnum timing , SFRHandlerSPP spp , VoidPtr ref ) (inherits from SFRHandler)
RegisterHandler( SFCEventEnum btype , SFCEventEnum endType , UInt16 p16 , HandlerEnum timing , SFRHandlerSPP spp , VoidPtr ref ) (inherits from SFRHandler)
RegisterHandler( SFCEventEnum btype , SFCEventEnum etype , HandlerEnum timing , SFRHandlerSPP spp , VoidPtr ref ) (inherits from SFRHandler)
RegisterHandler( SFCEventEnum type , UInt16 bp16 , UInt16 ep16 , HandlerEnum timing , SFRHandlerSPP spp , VoidPtr ref ) (inherits from SFRHandler)
RegisterHandler( SFCEventEnum type , UInt16 p16 , HandlerEnum timing , SFRHandlerSPP spp , VoidPtr ref ) (inherits from SFRHandler)
RegisterHandler( SFCEventEnum type , HandlerEnum timing , SFRHandlerSPP spp , VoidPtr ref ) (inherits from SFRHandler)
Register a handler.
SFCError RegisterTracer( BehaviorType behavior , TracerEnum trace ) (inherits from SFRTracer)
RegisterTracer( SFCEventEnum bgnType , SFCEventEnum endType , UInt16 bgnP16 , UInt16 endP16 , BehaviorType behavior , TracerEnum trace ) (inherits from SFRTracer)
RegisterTracer( SFCEventEnum bgnType , SFCEventEnum endType , UInt16 p16 , BehaviorType behavior , TracerEnum trace ) (inherits from SFRTracer)
RegisterTracer( SFCEventEnum bgnType , SFCEventEnum endType , BehaviorType behavior , TracerEnum trace ) (inherits from SFRTracer)
RegisterTracer( SFCEventEnum type , UInt16 bgnP16 , UInt16 endP16 , BehaviorType behavior , TracerEnum trace ) (inherits from SFRTracer)
RegisterTracer( SFCEventEnum type , UInt16 p16 , BehaviorType behavior , TracerEnum trace ) (inherits from SFRTracer)
RegisterTracer( SFCEventEnum type , BehaviorType behavior , TracerEnum trace ) (inherits from SFRTracer)
Register the tracer.
Void UnregisterHandler( HandlerEnum timing ) (inherits from SFRHandler)
UnregisterHandler( SFCEventEnum bgnType , SFCEventEnum endType , UInt16 bgnP16 , UInt16 endP16 , HandlerEnum timing ) (inherits from SFRHandler)
UnregisterHandler( SFCEventEnum bgnType , SFCEventEnum endType , UInt16 p16 , HandlerEnum timing ) (inherits from SFRHandler)
UnregisterHandler( SFCEventEnum bgnType , SFCEventEnum endType , HandlerEnum timing ) (inherits from SFRHandler)
UnregisterHandler( SFCEventEnum type , UInt16 bgnP16 , UInt16 endP16 , HandlerEnum timing ) (inherits from SFRHandler)
UnregisterHandler( SFCEventEnum type , UInt16 p16 , HandlerEnum timing ) (inherits from SFRHandler)
UnregisterHandler( SFCEventEnum type , HandlerEnum timing ) (inherits from SFRHandler)
Unregister the registered handler.
Void UnregisterTracer( Void ) (inherits from SFRTracer)
UnregisterTracer( SFCEventEnum bgnType , SFCEventEnum endType , UInt16 bgnP16 , UInt16 endP16 ) (inherits from SFRTracer)
UnregisterTracer( SFCEventEnum bgnType , SFCEventEnum endType , UInt16 p16 ) (inherits from SFRTracer)
UnregisterTracer( SFCEventEnum bgnType , SFCEventEnum endType ) (inherits from SFRTracer)
UnregisterTracer( SFCEventEnum type , UInt16 bgnP16 , UInt16 endP16 ) (inherits from SFRTracer)
UnregisterTracer( SFCEventEnum type , UInt16 p16 ) (inherits from SFRTracer)
UnregisterTracer( SFCEventEnum type ) (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 with a specified event.
TracerRecConstPtr SearchTracer( SFXEventConstRef event ) (inherits from SFRTracer)
Search for the tracer that matches with a 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 callback function.
TracerEnum (inherits from SFRTracer)
Constant that represents the trace order.
TracerTraceMPP (inherits from SFRTracer)
Type of callback function.

SFRResponder::SFRResponder
Constructor of 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 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

  • Success : 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

  • Success : 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

  • Success : 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

  • Success : 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

  • Success : 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

  • Success : 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 with a 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 with.

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

attribute

Specify the "Attribute" of responder to match with.

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

compare

Specify the "Behavior" of responder to match with.

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 with a specified condition, searching from background to foremost. If no child responder to match with a 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-upper 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 with a 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 with.

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

attribute

Specify the "Attribute" of responder to match with.

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

compare

Specify the "Behavior" of responder to match with.

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 with a specified condition, searching from foremost to background. If no child responder to match with a 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 with a 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 with.

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

attribute

Specify the "Attribute" of responder to match with.

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

compare

Specify the "Behavior" of responder to match with.

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 the sibling responders to match with a 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 with a 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 with.

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

attribute

Specify the "Attribute" of responder to match with.

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

compare

Specify the "Behavior" of responder to match with.

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 the sibling responders to match with a 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