![]() ![]() ![]()
|
BREW C++ Class Library & GUI Framework & XML Middleware : SophiaFramework 4.1 |


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.
![]() |
What is responder |
|---|---|
In SophiaFramework, UI component is called as "responder" | |
SFRApplication | SFRWindow | SFRDialog | SFRControl | SFRPane | SFRMenu | Responder
| 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.
|
[ 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
);[ protected, virtual ] ~SFRResponder(Void);
[ public ] Bool ClearHandler(Void);
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
RegisterHandler(SFEVT_KEY,
AVK_CLR,
HANDLER_AFTER,
HANDLER_FUNCTION(ClearHandler)));
[ public, const ] Bool Compare( SFCType type // type SFCType attribute // attribute BehaviorType behavior // behavior );
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.
![]() |
About "Visible" and "Enable for response" |
|---|---|
For details : Behavior | |
![]() |
About Focus |
|---|---|
For details : Focus | |
SFRResponder::FocusUp | SFRResponder::FocusLeft | SFRResponder::FocusRight | SFRResponder::FocusNext | SFRResponder::FocusPrevious
[ public ] Bool FocusDownHandler(Void);
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.
![]() |
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.
RegisterHandler(SFEVT_KEY,
AVK_DOWN,
HANDLER_AFTER,
HANDLER_FUNCTION(FocusDownHandler));
SFRResponder::FocusUpHandler | SFRResponder::FocusLeftHandler | SFRResponder::FocusRightHandler | SFRResponder::FocusNextHandler | SFRResponder::FocusPreviousHandler
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.
![]() |
About "Visible" and "Enable for response" |
|---|---|
For details : Behavior | |
![]() |
About Focus |
|---|---|
For details : Focus | |
SFRResponder::FocusUp | SFRResponder::FocusDown | SFRResponder::FocusRight | SFRResponder::FocusNext | SFRResponder::FocusPrevious
[ public ] Bool FocusLeftHandler(Void);
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.
![]() |
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.
RegisterHandler(SFEVT_KEY,
AVK_LEFT,
HANDLER_AFTER,
HANDLER_FUNCTION(FocusLeftHandler));
SFRResponder::FocusUpHandler | SFRResponder::FocusDownHandler | SFRResponder::FocusRightHandler | SFRResponder::FocusNextHandler | SFRResponder::FocusPreviousHandler
[ public, const ] Bool FocusNext( Bool repeat = true // if not found, search from the beginning again );
[Prerequisite] The responder status should be "Visible" and "Enable for response" to be focused.
![]() |
About "Visible" and "Enable for response" |
|---|---|
For details : Behavior | |
![]() |
About Focus |
|---|---|
For details : Focus | |
If there is not next sibling responder, the first sibling responder is focused.
SFRResponder::FocusPrevious | SFRResponder::FocusUp | SFRResponder::FocusDown | SFRResponder::FocusLeft | SFRResponder::FocusRight
[ public ] Bool FocusNextHandler(Void);
[Prerequisite] The responder status should be "Visible" and "Enable for response" to be focused.
![]() |
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.
RegisterHandler(SFEVT_KEY,
AVK_UP,
HANDLER_AFTER,
HANDLER_FUNCTION(FocusNextHandler));
SFRResponder::FocusPreviousHandler | SFRResponder::FocusUpHandler | SFRResponder::FocusDownHandler | SFRResponder::FocusLeftHandler | SFRResponder::FocusRightHandler
[ public, const ] Bool FocusPrevious( Bool repeat = true // if not found, search from the end again );
[Prerequisite] The responder status should be "Visible" and "Enable for response" to be focused.
![]() |
About "Visible" and "Enable for response" |
|---|---|
For details : Behavior | |
![]() |
About Focus |
|---|---|
For details : Focus | |
If there is not previous sibling responder, the last sibling responder is focused.
SFRResponder::FocusNext | SFRResponder::FocusUp | SFRResponder::FocusDown | SFRResponder::FocusLeft | SFRResponder::FocusRight
[ public ] Bool FocusPreviousHandler(Void);
[Prerequisite] The responder status should be "Visible" and "Enable for response" to be focused.
![]() |
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.
RegisterHandler(SFEVT_KEY,
AVK_DOWN,
HANDLER_AFTER,
HANDLER_FUNCTION(FocusPreviousHandler));
SFRResponder::FocusNextHandler | SFRResponder::FocusUpHandler | SFRResponder::FocusDownHandler | SFRResponder::FocusLeftHandler | SFRResponder::FocusRightHandler
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.
![]() |
About "Visible" and "Enable for response" |
|---|---|
For details : Behavior | |
![]() |
About Focus |
|---|---|
For details : Focus | |
SFRResponder::FocusUp | SFRResponder::FocusDown | SFRResponder::FocusLeft | SFRResponder::FocusNext | SFRResponder::FocusPrevious
[ public ] Bool FocusRightHandler(Void);
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.
![]() |
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.
RegisterHandler(SFEVT_KEY,
AVK_RIGHT,
HANDLER_AFTER,
HANDLER_FUNCTION(FocusRightHandler));
SFRResponder::FocusUpHandler | SFRResponder::FocusDownHandler | SFRResponder::FocusLeftHandler | SFRResponder::FocusNextHandler | SFRResponder::FocusPreviousHandler
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.
![]() |
About "Visible" and "Enable for response" |
|---|---|
For details : Behavior | |
![]() |
About Focus |
|---|---|
For details : Focus | |
SFRResponder::FocusDown | SFRResponder::FocusLeft | SFRResponder::FocusRight | SFRResponder::FocusNext | SFRResponder::FocusPrevious
[ public ] Bool FocusUpHandler(Void);
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.
![]() |
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.
RegisterHandler(SFEVT_KEY,
AVK_UP,
HANDLER_AFTER,
HANDLER_FUNCTION(FocusUpHandler));
SFRResponder::FocusDownHandler | SFRResponder::FocusLeftHandler | SFRResponder::FocusRightHandler | SFRResponder::FocusNextHandler | SFRResponder::FocusPreviousHandler
[ protected, const ] Bool GetAppearanceTransparent(Void);
[ public, const ] SFCType GetAttribute(Void);
// 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 ... }
[ public, const ] SFRResponderPtr GetBack( SFCType type = TYPE_WILDCARD // type SFCType attribute = ATTRIBUTE_WILDCARD // attribute BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE // behavior );
Specify the "Type" of responder to match with.
TYPE_WILDCARD, which means arbitrary "Type", is the default value.
Specify the "Attribute" of responder to match with.
ATTRIBUTE_WILDCARD, which means arbitrary "Attribute", is the default value.
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 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.
The code to get the most background responder regardless of "Type", "Attribute", nor "Behavior" is as below:
SFRResponderPtr r; SFRResponderPtr w; w = r->GetBack();
SFRResponder::GetFront | SFRResponder::GetNthForward | SFRResponder::GetNthBackward | SFRResponder::GetIndexForward | SFRResponder::GetIndexBackward
[ public, const ] SFXRectangleConstRef GetBaseBound(Void);
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);
SFRResponder::SetBaseBound | SFRResponder::GetContentBound | SFRResponder::GetVirtualBound | SFRResponder::GetBaseWorld
[ public, const ] SFXRectangle GetBaseWorld(Void);
The SFRResponder::GetBaseWorld function returns the rectangle of base region. The coordinate of left-up corner is always ( 0, 0 ).
SFRResponder::GetContentWorld | SFRResponder::GetVirtualWorld | SFRResponder::SetBaseBound | SFRResponder::GetBaseBound
[ public, const ] SFXRectangleConstRef GetContentBound(Void);
SFRResponder::SetContentBound | SFRResponder::GetBaseBound | SFRResponder::GetVirtualBound | SFRResponder::GetContentWorld
[ public, const ] SFXRectangle GetContentWorld(Void);
The SFRResponder::GetContentWorld function returns the rectangle of content region. The coordinate of left-upper corner is always ( 0, 0 ).
SFRResponder::GetBaseWorld | SFRResponder::GetVirtualWorld | SFRResponder::SetContentBound | SFRResponder::GetContentBound
[ public, const ] SFRResponderPtr GetDirector(Void);
[ public, const ] SFRResponderPtr GetFocus(Void);
If there is no responder being focused, null is returned.
[ public, const ] SFXMargin GetFrameMargin(Void);
[ public, const ] SFRResponderPtr GetFront( SFCType type = TYPE_WILDCARD // type SFCType attribute = ATTRIBUTE_WILDCARD // attribute BehaviorType compare = STATUS_VISIBLE | STATUS_ENABLE // behavior );
Specify the "Type" of responder to match with.
TYPE_WILDCARD, which means arbitrary "Type", is the default value.
Specify the "Attribute" of responder to match with.
ATTRIBUTE_WILDCARD, which means arbitrary "Attribute", is the default value.
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 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.
The code to get the most foreground responder regardless of "Type", "Attribute", nor "Behavior", is as below:
SFRResponderPtr r; SFRResponderPtr w; w = r->GetFront();
SFRResponder::GetBack | SFRResponder::GetNthForward | SFRResponder::GetNthBackward | SFRResponder::GetIndexForward | SFRResponder::GetIndexBackward
[ public, const ] SInt16 GetIndexBackward( SFCType type = TYPE_WILDCARD // type SFCType attribute = ATTRIBUTE_WILDCARD // attribute BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE // behavior );
Specify the "Type" of responder to match with.
TYPE_WILDCARD, which means arbitrary "Type", is the default value.
Specify the "Attribute" of responder to match with.
ATTRIBUTE_WILDCARD, which means arbitrary "Attribute", is the default value.
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 the index number from background among the sibling responders to match with a specified condition. The index starts from 0.
SFRResponder::GetIndexForward | SFRResponder::GetNthForward | SFRResponder::GetNthBackward | SFRResponder::GetFront | SFRResponder::GetBack
[ public, const ] SInt16 GetIndexForward( SFCType type = TYPE_WILDCARD // type SFCType attribute = ATTRIBUTE_WILDCARD // attribute BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE // behavior );
Specify the "Type" of responder to match with.
TYPE_WILDCARD, which means arbitrary "Type", is the default value.
Specify the "Attribute" of responder to match with.
ATTRIBUTE_WILDCARD, which means arbitrary "Attribute", is the default value.
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 the index number from foreground among the sibling responders to match with a specified condition. The index starts from 0.
SFRResponder::GetIndexBackward | SFRResponder::GetNthForward | SFRResponder::GetNthBackward | SFRResponder::GetFront | SFRResponder::GetBack
[ public, const ] Bool GetInheritEnable(Void);
If a parent responder in the ownership hierarchy is disabled for response, the GetInheritEnable function returns the " Disable " status.
![]() |
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. | |
SFRResponder::GroupStatusEnable | SFRResponder::SetStatusEnable | SFRResponder::GetStatusEnable
[ public, const ] Bool GetInheritFocus(Void);
If a parent responder in the ownership hierarchy is unfocused, the SFRResponder::GetInheritFocus function returns the " Unfocused " status.
![]() |
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. | |
[ public, const ] Bool GetInheritTarget(Void);
If a parent responder in the ownership hierarchy is non-target, the SFRResponder::GetInheritTarget function returns the " Not-Target " status.
![]() |
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. | |
[ public, const ] Bool GetInheritVisible(Void);
If a parent responder in the ownership hierarchy is invisible, the SFRResponder::GetInheritVisible function returns the " Invisible " status.
![]() |
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. | |
SFRResponder::GroupStatusVisible | SFRResponder::SetStatusVisible | SFRResponder::GetStatusVisible