SophiaFramework UNIVERSE 5.3 |
#include <SFYTabControl.h.hpp>
class SFYTabControl : public SFYControl;
SFMTYPEDEFRESPONDER(SFYTabControl)
How to use
SFYTabControl is the abstract base class for all tab controls.
Tab control is the control to manage a container(SFYContainer), which is called "tab page" hereafter, in the tabular format.
The size of the tab control region is set with the SFYResponder::SetRealBound function.
A tab page can be appended by setting the tab control to the parent responder of the tab page with the SFYResponder::SetParent function.
Immediately after appending the tab page, its real region is automatically set to the return value of the SFYTabControl::GetContentBound function.
Real region of the tab page | |
---|---|
The real region of the tab page is set to the value obtained by the SFYTabControl::GetContentBound function. In the implementation of the concrete class, it is necessary to set the value of above region using the SFYTabControl::SetContentBound function. |
The drawing or behaviour of the tab page in the tab control differs depending on its state as follows:
Note | |
---|---|
The above label is a label which corresponds to the tab page displayed in the tab region inside the tab control. |
Implementation of the drawing or behaviour on focus of the tab page depending on its state | |
---|---|
The above behaviour of the tab page depending on its state is implemented in the SFYTabControl class. However, drawing of the tab label needs to be implemented in the concrete class inheriting from the SFYTabControl class. |
Meaning of the control values and their limitations | |
---|---|
The minimum value obtained by the SFYControl::GetMinimumValue function is always "0". The current value obtained by the SFYControl::GetCurrentValue function represents the index of currently selected tab page. If the page does not exist, it will be "-1". To set the current value, not the SFYControl::SetCurrentValue function but the SFYTabControl::FocusPage function must be used. The maximum value obtained by the SFYControl::GetMaximumValue function represents the number of tab pages in the tab control. [* This function is to be discontinued in the future. To obtain the number of tab pages, call the SFYTabControl::GetPageCount function.] The field value obtained by the SFYTabControl::GetFieldValue function represents the number of tab labels which are displayed on the screen. It needs to be set with an integer value more than 0 using the SFYTabControl::SetFieldValue function. The top value obtained by the SFYTabControl::GetTopValue function represents the index of tab page which is displayed in the most left side on the screen. |
Displaying the tab page(SFZTabPage) and its prohibit functions | |
---|---|
To display the tab page, call the SFYTabControl::FocusPage function with its index as argument when the "focus" state of the tab control is "ON". Since there is a possibility that the selected tab may not match with the currently displayed tab page, it is not prohibited to call tab page's function such as SFYResponder::ToFront or SFYResponder::SetStateFocus which may chage the order relation of the tab pages. |
Deleting the tab page from the tab control | |
---|---|
The method to delete the tab page from the tab control dynamically is as follows:
The code to delete the tab page from the tab control is as follows:
// CASE 1. Preserve the tab page (set tab page's parent to the empty instance): page->SetParent(SFYResponder::EmptyInstance()); // CASE 2. Use tab page for another tab control (set tab page's parent to another tab control): SFYTabControlSmp othertab; page->SetParent(othertab); // CASE 3. Destroy tab page: page->Terminate();
|
SFYContainer | SFYResponder::SetRealBound | Real Region | State
Constructor/Destructor |
---|
SFYTabControl( Void ) Constructor of the SFYTabControl class.
|
~SFYTabControl( Void ) Destructor of the SFYTabControl class.
|
Public Functions | |
---|---|
SInt32 |
FirstIndexOf(
Bool visible
, Bool active
, Bool enable
)
Get the first index among the pages(or containers) of this tab control, which match the specified condition.
|
Void |
FocusLeft( Void )
Move the focus to the tab page next left to the currently focused page of this tab control.
|
SFCError |
FocusPage(
SInt32 index
)
Move the focus to the specified tab page(or container) of this tab control.
|
Void |
FocusRight( Void )
Move the focus to the tab page next right to the currently focused page of this tab control.
|
SInt32 |
GetBottomValue( Void )
Get the index of the last page on the right side which is currently displayed on this tab control.
|
SFXRectangleConstRef |
GetContentBound( Void )
Get the real region of page(or container) which will be set for this tab control.
|
SInt32 |
GetFieldValue( Void )
Get the number of tab pages which is displayed at the same time in this tab control.
|
AVKType |
GetFocusLeftKey( Void )
Get the key with which the focus is moved to the page(or container) left
next to the currently focused page(or container) of this tab control.
|
AVKType |
GetFocusRightKey( Void )
Get the key with which the focus is moved to the page(or container) right
next to the currently focused page(or container) of this tab control.
|
SInt32 |
GetIndex(
SFYContainerSmpConstRef tabpage
)
Get the index of the specified page(or container) of this tab control.
|
SInt32 |
GetMaximumValue( Void )
[DEPRECATED]Get the number of all pages(or containers) of this tab control.
[Discontinued in the near future. Use the GetPageCount function instead.]
|
SFYContainerSmp |
GetPage(
SInt32 index
)
Get the page(or container) of this tab control whose index is specified in the argument.
|
SInt32 |
GetPageCount( Void )
Get the number of pages(or containers) of this tab control which match the specified condition.
|
SInt32 |
GetPageCount(
Bool visible
, Bool active
, Bool enable
)
Get the number of pages(or containers) of this tab control which match the specified condition.
|
SFXRGBColorConstRef |
GetSafePageBackgroundColor( Void )
Get the background color of
the safe page of this tab control,
which will be displayed when the specified page does not exist or is invalid.
|
SFYScrollBarControlSmpConstRef |
GetScrollBarControl( Void )
Get the scroll bar control which is internally used by this tab control.
|
SInt16 |
GetScrollBarWidth( Void )
Get the width of the scroll bar control which is internally used by this tab control. [pixels]
|
Bool |
GetTabLoop( Void )
Get the value of tab-loop flag
indicating whether or not the focus at the first or last page can be moved to the last or first page respectively.
|
SInt32 |
GetTopValue( Void )
Get the index of the first page on the left side which is currently displayed on this tab control.
|
SInt32 |
LastIndexOf(
Bool visible
, Bool active
, Bool enable
)
Get the last index among the pages(or containers) of this tab control
which match the specified condition.
|
SInt32 |
NextIndexOf(
SInt32 index
, Bool visible
, Bool active
, Bool enable
)
Get the next index of the specified index among the pages of this tab control
which match the specified condition.
|
SInt32 |
PrevIndexOf(
SInt32 index
, Bool visible
, Bool active
, Bool enable
)
Get the previous index of the specified index among the pages of this tab control
which match the specified condition.
|
Void |
SetFieldValue(
SInt32 param
)
Set the number of the tab pages which is displayed at the same time in this tab control to the specified value.
|
Void |
SetFocusLeftKey(
AVKType param
)
Set the key with which the focus is moved to the page(or container) left
next to the currently focused page(or container) of this tab control to the specified value.
|
Void |
SetFocusRightKey(
AVKType param
)
Set the key with which the focus is moved to the page(or container) right
next to the currently focused page(or container) of this tab control to the specified value.
|
Void |
SetSafePageBackgroundColor(
SFXRGBColorConstRef param
)
Set the background color of
the safe page of this tab control to the specified value,
which will be displayed when the specified page does not exist or is invalid.
|
SFCError |
SetScrollBarControl(
SFYScrollBarControlSmpConstRef param
)
Set the scroll bar control which is internally used by this tab control to the specified value.
|
Void |
SetScrollBarWidth(
SInt16 param
)
Set the width of the scroll bar control to the specified value, which is internally used by this tab control. [pixels]
|
Void |
SetTabLoop(
Bool param
)
Set the tab-loop flag showing
whether or not the focus at the first or last page can be moved to the last or first page respectively to the specified value.
|
Void |
ClearHandler( Void )
(inherits from SFYResponder)
Unregister all handlers from this responder.
|
Void |
ClearTracer( Void )
(inherits from SFYResponder)
Unregister all dispatching rules from the tracer of this responder.
|
SFCError |
Distribute(
SFXEventConstRef event
, BoolPtr result = null
)
(inherits from SFYResponder)
Distribute the specified event.
|
SFXRGBColorConstRef |
GetBackgroundColor( Void )
(inherits from SFYWidget)
Get the background color.
|
SFYResponderSmp |
GetChildBack( Void )
(inherits from SFYResponder)
Get the backmost child responder of this responder,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildBack(
Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the backmost child responder of this responder,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildBack(
UInt32 id
)
(inherits from SFYResponder)
Get the backmost child responder of this responder,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildBack(
UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the backmost child responder of this responder,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildBackward(
SInt32 index
)
(inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildBackward(
SInt32 index
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildBackward(
SInt32 index
, UInt32 id
)
(inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildBackward(
SInt32 index
, UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side,
which matches the specified search condition.
|
SInt32 |
GetChildCount( Void )
(inherits from SFYResponder)
Get the number of child responders of this responder,
which match the specified search condition.
|
SInt32 |
GetChildCount(
Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the number of child responders of this responder,
which match the specified search condition.
|
SInt32 |
GetChildCount(
UInt32 id
)
(inherits from SFYResponder)
Get the number of child responders of this responder,
which match the specified search condition.
|
SInt32 |
GetChildCount(
UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the number of child responders of this responder,
which match the specified search condition.
|
SFYResponderSmp |
GetChildForward(
SInt32 index
)
(inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildForward(
SInt32 index
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildForward(
SInt32 index
, UInt32 id
)
(inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildForward(
SInt32 index
, UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildFront( Void )
(inherits from SFYResponder)
Get the foremost child responder of this responder,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildFront(
Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the foremost child responder of this responder,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildFront(
UInt32 id
)
(inherits from SFYResponder)
Get the foremost child responder of this responder,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildFront(
UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the foremost child responder of this responder,
which matches the specified search condition.
|
SInt32 |
GetCurrentValue( Void )
(inherits from SFYControl)
Get the current value of this control.
|
SFYDistributerPtr |
GetDistributer( Void )
(inherits from SFYResponder)
Get the distributer bound with this responder.
|
SFYResponderSmp |
GetFrame( Void )
(inherits from SFYResponder)
Get the frame which has been attached to this responder.
|
SFXRectangle |
GetGlobalBound( Void )
(inherits from SFYResponder)
Get the globle region of this responder.
|
UInt32 |
GetID( Void )
(inherits from SFYResponder)
Get the ID of this responder instance.
|
SFXRectangle |
GetLocalBound( Void )
(inherits from SFYResponder)
Get the local region of this responder.
|
SInt32 |
GetMinimumValue( Void )
(inherits from SFYControl)
Get the minimum value of this control.
|
SInt32 |
GetNthBackward( Void )
(inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders,
which match the specified search condition.
|
SInt32 |
GetNthBackward(
Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders,
which match the specified search condition.
|
SInt32 |
GetNthBackward(
UInt32 id
)
(inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders,
which match the specified search condition.
|
SInt32 |
GetNthBackward(
UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders,
which match the specified search condition.
|
SInt32 |
GetNthForward( Void )
(inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders,
which match the specified search condition.
|
SInt32 |
GetNthForward(
Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders,
which match the specified search condition.
|
SInt32 |
GetNthForward(
UInt32 id
)
(inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders,
which match the specified search condition.
|
SInt32 |
GetNthForward(
UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders,
which match the specified search condition.
|
SFYResponderSmp |
GetParent( Void )
(inherits from SFYResponder)
Get the parent responder of this responder.
|
Bool |
GetPropertyTransparent( Void )
(inherits from SFYResponder)
Get the transparency attribute of this responder.
|
SFXRectangleConstRef |
GetRealBound( Void )
(inherits from SFYResponder)
Get the real region of this responder.
|
VoidPtr |
GetReference( Void )
(inherits from SFYResponder)
Get the reference of this responder.
|
SFYRendererPtr |
GetRenderer( Void )
(inherits from SFYResponder)
Get the renderer bound with this responder.
|
SFYResponderSmp |
GetRoot( Void )
(inherits from SFYResponder)
Get the root responder.
|
Bool |
GetStateActive(
Bool inherit = false
)
(inherits from SFYResponder)
Get the active state of this responder.
|
Bool |
GetStateEnable(
Bool inherit = false
)
(inherits from SFYResponder)
Get the enable state of this responder.
|
Bool |
GetStateFocus(
Bool inherit = false
)
(inherits from SFYResponder)
Get the focus state of this responder.
|
Bool |
GetStateValid(
Bool inherit = false
)
(inherits from SFYResponder)
Get the valid state of this responder.
|
Bool |
GetStateVisible(
Bool inherit = false
)
(inherits from SFYResponder)
Get the visible state of this responder.
|
SFXRectangle |
GetSuitableBound( Void )
(inherits from SFYResponder)
Get the suitable region of this responder.
|
SFXRectangle |
GetSuitableBound(
SFXRectangleConstRef rectangle
)
(inherits from SFYResponder)
Get the suitable region of this responder.
|
SFXRectangle |
GetSuitableBound(
SFXRectangleConstRef param
, HorizontalEnum horizontal
, VerticalEnum vertical
)
(inherits from SFYResponder)
Get the suitable region of this responder.
|
SFXMargin |
GetSuitableMargin( Void )
(inherits from SFYResponder)
Get the suitable frame margin region of this responder.
|
SFCType |
GetType( Void )
(inherits from SFYResponder)
Get the type of this responder class.
|
SFXRectangleConstRef |
GetVirtualBound( Void )
(inherits from SFYResponder)
Get the virtual region of this responder.
|
Bool |
HasFrame( Void )
(inherits from SFYResponder)
Check whether or not this responder is a content-responder.
|
Void |
Initialize( Void )
(inherits from SFYResponder)
Initialize this responder.
|
Bool |
IsBack( Void )
(inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsBack(
Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsBack(
UInt32 id
)
(inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsBack(
UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsFrame( Void )
(inherits from SFYResponder)
Check whether or not this responder is an attachment-frame.
|
Bool |
IsFront( Void )
(inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsFront(
Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsFront(
UInt32 id
)
(inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsFront(
UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsNthBackward(
SInt32 index
)
(inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsNthBackward(
SInt32 index
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsNthBackward(
SInt32 index
, UInt32 id
)
(inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsNthBackward(
SInt32 index
, UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsNthForward(
SInt32 index
)
(inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsNthForward(
SInt32 index
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsNthForward(
SInt32 index
, UInt32 id
)
(inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsNthForward(
SInt32 index
, UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsRoot( Void )
(inherits from SFYResponder)
Check whether or not this responder is the root responder.
|
SFCError |
Recover( Void )
(inherits from SFYResponder)
Recover the intersection region between this responder and the responder space by using the saved bitmap to restore the device bitmap.
|
SFCError |
RegisterHandler(
SFXEventRangeConstRef range
, SFYHandler::RuleRecConstRef rule
)
(inherits from SFYResponder)
Register specified handlers into this responder.
|
SFCError |
RegisterHandler(
SFXEventRangeConstRef range
, SFYHandler::HandlerSPP spp
, VoidPtr reference
)
(inherits from SFYResponder)
Register specified handlers into this responder.
|
SFCError |
RegisterHandler(
SFXEventRangeConstPtr range
, SFYHandler::RuleRecConstPtr rule
, SInt32 length
)
(inherits from SFYResponder)
Register specified handlers into this responder.
|
SFCError |
RegisterHandler(
SFXEventRangeConstPtr range
, SFYHandler::HandlerSPPConstPtr spp
, VoidPtrConstPtr reference
, SInt32 length
)
(inherits from SFYResponder)
Register specified handlers into this responder.
|
SFCError |
RegisterTracer(
SFXEventRangeConstRef range
, SFYTracer::RuleRecConstRef rule
)
(inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
|
SFCError |
RegisterTracer(
SFXEventRangeConstRef range
, SFYTracer::OrderEnum order
, SFYTracer::StateEnum state
, Bool overload
)
(inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
|
SFCError |
RegisterTracer(
SFXEventRangeConstPtr range
, SFYTracer::RuleRecConstPtr rule
, SInt32 length
)
(inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
|
SFCError |
RegisterTracer(
SFXEventRangeConstPtr range
, SFYTracer::OrderEnumConstPtr order
, SFYTracer::StateEnumConstPtr state
, BoolConstPtr overload
, SInt32 length
)
(inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
|
SFCError |
Render(
Bool force = false
)
(inherits from SFYResponder)
Boot up the renderer for redrawing this responder and its descendant responders.
|
Void |
SetBackgroundColor(
SFXRGBColorConstRef param
)
(inherits from SFYWidget)
Set the background color to the specified value.
|
Void |
SetCurrentValue(
SInt32 param
)
(inherits from SFYControl)
Set the current value of this control to the specified value.
|
Void |
SetDistributer(
SFYDistributerPtr param
)
(inherits from SFYResponder)
Bind this responder with the specified distributer.
|
SFCError |
SetFrame(
SFYResponderSmpConstRef param
)
(inherits from SFYResponder)
Attach the specified frame to this frame.
|
Void |
SetID(
UInt32 param
)
(inherits from SFYResponder)
Set the ID value of this responder to the specified value.
|
Void |
SetMaximumValue(
SInt32 param
)
(inherits from SFYControl)
Set the maximum value of the control to the specified value.
|
Void |
SetMinimumValue(
SInt32 param
)
(inherits from SFYControl)
Set the minimum value of the control to the specified value.
|
SFCError |
SetParent(
SFYResponderSmpConstRef param
)
(inherits from SFYResponder)
Set the parent responder of this responder to the specified responder.
|
Void |
SetProperty(
Bool transparent
)
(inherits from SFYResponder)
Set the property of this responder to the specified value.
|
Void |
SetPropertyTransparent(
Bool param
)
(inherits from SFYResponder)
Set the transparency attribute of this responder to the specified value.
|
Void |
SetRealBound(
SFXRectangleConstRef param
)
(inherits from SFYResponder)
Set the real region of this responder to the specified region.
|
Void |
SetReference(
VoidPtr param
)
(inherits from SFYResponder)
Set the reference value of this responder to the specified value.
|
Void |
SetRenderer(
SFYRendererPtr param
)
(inherits from SFYResponder)
Bind this responder with the specified renderer.
|
Void |
SetState(
Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Set all states of this responder to specified values together.
|
Void |
SetStateActive(
Bool param
)
(inherits from SFYResponder)
Set the active state of this responder to the specified value.
|
Void |
SetStateEnable(
Bool param
)
(inherits from SFYResponder)
Set the enable state of this responder to the specified value.
|
Void |
SetStateFocus(
Bool param
)
(inherits from SFYResponder)
Set the focus state of this responder to the specified value.
|
Void |
SetStateVisible(
Bool param
)
(inherits from SFYResponder)
Set the visible state of this responder to the specified value.
|
Void |
SetVirtualBound(
SFXRectangleConstRef param
)
(inherits from SFYResponder)
Set the virtual region of this responder to the specified value.
|
SFCError |
Snapshot(
SFBBitmapSmpConstRef bitmap
)
(inherits from SFYResponder)
Get a snapshot image of the intersection region between this responder and the responder space by using the saved bitmap.
|
Void |
Terminate( Void )
(inherits from SFYResponder)
Terminate this responder.
|
Void |
ToBack( Void )
(inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders
which match the specified search condition.
|
Void |
ToBack(
Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders
which match the specified search condition.
|
Void |
ToBack(
UInt32 id
)
(inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders
which match the specified search condition.
|
Void |
ToBack(
UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders
which match the specified search condition.
|
Void |
ToFront( Void )
(inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders
which match the specified search condition.
|
Void |
ToFront(
Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders
which match the specified search condition.
|
Void |
ToFront(
UInt32 id
)
(inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders
which match the specified search condition.
|
Void |
ToFront(
UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders
which match the specified search condition.
|
Void |
ToNthBackward(
SInt32 index
)
(inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders
which match the specified search condition.
|
Void |
ToNthBackward(
SInt32 index
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders
which match the specified search condition.
|
Void |
ToNthBackward(
SInt32 index
, UInt32 id
)
(inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders
which match the specified search condition.
|
Void |
ToNthBackward(
SInt32 index
, UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders
which match the specified search condition.
|
Void |
ToNthForward(
SInt32 index
)
(inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders
which match the specified search condition.
|
Void |
ToNthForward(
SInt32 index
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders
which match the specified search condition.
|
Void |
ToNthForward(
SInt32 index
, UInt32 id
)
(inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders
which match the specified search condition.
|
Void |
ToNthForward(
SInt32 index
, UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders
which match the specified search condition.
|
Void |
UnregisterHandler(
SFXEventRangeConstRef range
, SFYHandler::RuleRecConstRef rule
)
(inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
|
Void |
UnregisterHandler(
SFXEventRangeConstRef range
, SFYHandler::HandlerSPP spp
, VoidPtr reference
)
(inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
|
Void |
UnregisterHandler(
SFXEventRangeConstPtr range
, SFYHandler::RuleRecConstPtr rule
, SInt32 length
)
(inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
|
Void |
UnregisterHandler(
SFXEventRangeConstPtr range
, SFYHandler::HandlerSPPConstPtr spp
, VoidPtrConstPtr reference
, SInt32 length
)
(inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
|
Void |
UnregisterTracer(
SFXEventRangeConstRef range
)
(inherits from SFYResponder)
Unregister the dispatching rule from the tracer of this responder which matches the specified condition.
|
Void |
UnregisterTracer(
SFXEventRangeConstPtr range
, SInt32 length
)
(inherits from SFYResponder)
Unregister the dispatching rule from the tracer of this responder which matches the specified condition.
|
T const & |
static_catch(
Void
)
(inherits from static_exception)
Get the current exception.
|
Protected Functions | |
---|---|
Void |
AdjustPages( Void )
Adjust the real region and the virtual region of all the pages of this tab control.
|
SFYContainerSmpConstRef |
GetSafePage( Void )
Get the safe page of this tab control
which will be displayed when the specified page does not exist or is invalid.
|
Void |
SetContentBound(
SFXRectangleConstRef rectangle
)
Set the real region of page(or container) which will be set for this tab control to the specified value.
|
static SFYResponderSmp |
Factory(
SFYResponderPtr responder
, SFCErrorPtr exception = null
)
(inherits from SFYResponder)
This function is used to implement the NewInstance function.
|
SFYResponderSmp |
GetThis( Void )
(inherits from SFYResponder)
Get the smart pointer of this responder.
|
Void |
HandleBoundGlobal(
SFXRectangleConstRef rectangle
)
(inherits from SFYWidget)
This function will be called when the global region is changed.
|
Void |
HandleBoundOptimize(
SFXRectanglePtr rectangle
)
(inherits from SFYWidget)
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_OPTIMIZE) event is received.
[Calculate the suitable rectangle size of this responder within the specified hint rectangle.]
|
Void |
HandleBoundReal( Void )
(inherits from SFYControl)
This function will be called when the real region is changed.
|
Void |
HandleBoundRequest(
SFXRectanglePtr rectangle
)
(inherits from SFYWidget)
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_REQUEST) event is received.
[Calculate the suitable rectangle size of this responder.]
|
Void |
HandleBoundVirtual( Void )
(inherits from SFYWidget)
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event is received.
[Perform the processing when the virtual region is changed.]
|
Void |
HandleRenderRequest(
SFXGraphicsPtr graphics
)
(inherits from SFYWidget)
This function will be called when the (SFEVT_RESPONDER_RENDER, SFP16_RENDER_REQUEST) event is received.
[Draw this responder.]
|
Void |
Invalidate( Void )
(inherits from SFYResponder)
Register the specified redraw region of this responder.
|
Void |
Invalidate(
SFXRectangleConstRef param
)
(inherits from SFYResponder)
Register the specified redraw region of this responder.
|
Void |
InvokeBackward(
SFXEventConstRef event
, Bool overload
, BoolPtr result = null
)
(inherits from SFYResponder)
Call the handlers for the specified event from the end of the handler list registered into this responder.
|
Void |
InvokeForward(
SFXEventConstRef event
, Bool overload
, BoolPtr result = null
)
(inherits from SFYResponder)
Call the handlers for the specified event from the head of the handler list registered into this responder.
|
Void |
SetType(
SFCType param
)
(inherits from SFYResponder)
Set the Type value of this responder to the specified 4-character value.
|
Void |
static_throw(
static_exception< T > const & param
)
(inherits from static_exception)
Set an exception.
|
Void |
static_throw(
T const & param
)
(inherits from static_exception)
Set an exception.
|
Bool |
static_try(
Void
)
(inherits from static_exception)
Confirm whether or not the exception is retained.
|
Types |
---|
CodeEnum Constant that represents the SFYTabControl class.
|
HorizontalEnum
(inherits from SFYResponder)
Constants that represent the horizontal alignment.
|
VerticalEnum
(inherits from SFYResponder)
Constants that represent the vertical alignment.
|
[ protected, explicit ] SFYTabControl(Void);
This constructor performs the initializations as follows:
Table 218. Event handler
Event | Content of the handler |
---|---|
SFEVT_KEY event of the key set with SFYTabControl::SetFocusLeftKey, with which the focus is moved to the page(or container) left next to the currently focused page(or container) | Call the SFYTabControl::FocusLeft function. |
SFEVT_KEY event of the key set with SFYTabControl::SetFocusRightKey, with which the focus is moved to the page(or container) right next to the currently focused page(or container) | Call the SFYTabControl::FocusRight function. |
Note | |
---|---|
In a responder inheriting from SFYTabControl, the corresponding handler will be called when one of the above events occurs. |
SFYResponder::SetType | SFYTabControl::CodeEnum | SFYResponder::SetParent | SFYResponder::SetState | SFZScrollBarControl::NewInstance | SFYTabControl::GetScrollBarControl | SFYScrollBarControl::SetOrientation | SFYScrollBarControl::SetOrientation | SFYTabControl::SetScrollBarWidth | SFYScrollBarControl::OrientationEnum | SFYControl::SetMaximumValue | SFYControl::SetCurrentValue | SFYTabControl::SetFieldValue | SFYTabControl::GetTabLoop | SFYTabControl::SetFocusLeftKey | SFYTabControl::SetFocusRightKey | SFZScrollBarControl | SFXEvent | SFXRGBColor | Type | State | Event | Key Event[SFEVT_KEY]
[ protected, virtual ] virtual ~SFYTabControl(Void);
This destructor does nothing.
[ protected, const ] Void AdjustPages(Void);
This function adjusts the real region and the virtual region of all the pages of this tab control.
Note | |
---|---|
SFYTabControl::AdjustPages() is the function which is called in the implementation of HandleBoundReal or HandleBoundVirtual function. |
When the real region of tab control is changed, the corresponding pages need to be adjusted as below.
Void CustomTabControl::HandleBoundReal(Void) { SetVirtualBound(SFXRectangle(SFXGrid::ZeroInstance(), GetRealBound().GetSize())); AdjustPages(); Invalidate(); return; }
[ public, const ] SInt32 FirstIndexOf( Bool visible // visible state Bool active // active state Bool enable // enable state );
Index of the first among the pages(or containers) of this tab control, which match the specified condition.
If there is no page which matches the specified condition, "-1" will be returned.
This function gets the first index among the pages(or containers) of this tab control, which match the specified condition on the visible, active, and enable states.
The index of the returned value is for all the pages(or containers) which belong to this tab control.
There are four methods to use this function as below.
// since SFYTabControl is abstract class, // it is necessary to instantiate the tab control using the concrete class which inherits from SFYTabControl SFYTabControlSmp tab; SInt32 index; // suppose each container instance has already been created SFYContainerSmp a; a->SetState(false, false, false, false); SFYContainerSmp b; b->SetState(true, false, false, false); SFYContainerSmp c; c->SetState(true, true, false, false); SFYContainerSmp d; d->SetState(true, true, true, false); a->SetParent(tab); b->SetParent(tab); c->SetParent(tab); d->SetParent(tab); // get the first index among all the pages index = tab->FirstIndexOf(false, false, false); // index = 0 // get the first index among all the "visible" pages index = tab->FirstIndexOf(true, false, false); // index = 1 // get the first index among all the "active" pages index = tab->FirstIndexOf(true, true, false); // index = 2 // get the first index among all the "enable" pages index = tab->FirstIndexOf(true, true, true); // index = 3
[ public ] Void FocusLeft(Void);
This function moves the focus to the tab page left next to the currently focused page of this tab control.
In case the currently focused page is the first tab page, the result depends on the value of SFYTabControl::GetTabLoop().
If the value is "true", the focus will be moved to the last tab page.
If the value is "false", the focus will remain at the first tab page.
This function moves the focus(*) to the specified tab page(or container) of this tab control.
* This function needs to be called only when the tab control is also in the "focus" state.
[ public ] Void FocusRight(Void);
This function moves the focus to the tab page right next to the currently focused page of this tab control.
In case the currently focused page is the last tab page, the result depends on the value of SFYTabControl::GetTabLoop().
If the value is "true", the focus will be moved to the first tab page.
If the value is "false", the focus will remain at the last tab page.
[ public, const ] SInt32 GetBottomValue(Void);
This function gets the index of the last page on the right side which is currently displayed on this tab control.
[ public, const ] SFXRectangleConstRef GetContentBound(Void);
This function gets the real region of the page(or container) which will be set for this tab control.
When the SFYTabControl::AdjustPages function is called, the real region of page will be set using this function.
[ public ] SInt32 GetFieldValue(Void);
This function gets the number of tab pages which is displayed at the same time in this tab control.
[ public, const ] AVKType GetFocusLeftKey(Void);
Key of AVKType with which the focus is moved to the page(or container) left next to the currently focused page(or container) of this tab control.
This function gets the key with which the focus is moved to the page(or container) left next to the currently focused page(or container) of this tab control.
[ public, const ] AVKType GetFocusRightKey(Void);
Key of AVKType with which the focus is moved to the page(or container) right next to the currently focused page(or container) of this tab control.
This function gets the key with which the focus is moved to the page(or container) right next to the currently focused page(or container) of this tab control.
[ public, const ] SInt32 GetIndex( SFYContainerSmpConstRef tabpage // page(or container) );
Index of the specified page(or container) of this tab control.
If the specified page(or container) does not exist, "-1" will be returned.
This function gets the index of the specified page(or container) of this tab control.
[ public, const ] SInt32 GetMaximumValue(Void);
This function gets the number of all pages(or containers) of this tab control.
Caution | |
---|---|
Since this function is deprecated, use the SFYTabControl::GetPageCount function instead. |
[ public, const ] SFYContainerSmp GetPage( SInt32 index // index of page );
Page(or container) of this tab control, of which index is specified in the argument.
If such a page does not exist, SFYContainerSmp::EmptyInstance() will be returned.
This function gets the page(or container) of this tab control whose index is specified in the argument.
[ public, const ] SInt32 GetPageCount(Void);
[ public, const ] SInt32 GetPageCount( Bool visible // visible state Bool active // active state Bool enable // enable state );
This function gets the number of the pages(or containers) of this tab control which match the specified condition on the visible, active, and enable states. If no condition is specified, the number of all pages will be returned.
There are four methods to use this function as below.
// since SFYTabControl is abstract class, // it is necessary to instantiate the tab control using the concrete class which inherits from SFYTabControl SFYTabControlSmp tab; SInt32 num; // suppose each container instance has already been created SFYContainerSmp a; a->SetState(false, false, false, false); SFYContainerSmp b; b->SetState(true, false, false, false); SFYContainerSmp c; c->SetState(true, true, false, false); SFYContainerSmp d; d->SetState(true, true, true, false); a->SetParent(tab); b->SetParent(tab); c->SetParent(tab); d->SetParent(tab); // get the number of all the pages num = tab->GetPageCount(); // num = 4 // get the number of all the pages(performance is bad with this method) num = tab->GetPageCount(false, false, false); // num = 4 // get the number of all the "visible" pages num = tab->GetPageCount(true, false, false); // num = 3 // get the number of all the "active" pages num = tab->GetPageCount(true, true, false); // num = 2 // get the number of all the "enable" pages num = tab->GetPageCount(true, true, true); // num = 1
[ protected, const ] SFYContainerSmpConstRef GetSafePage(Void);
This function gets the safe page of this tab control which will be displayed when the specified page does not exist or is invalid.
[ public, const ] SFXRGBColorConstRef GetSafePageBackgroundColor(Void);
This function gets the background color(SFXRGBColor) of the safe page(or default page) of this tab control, which will be displayed when the specified page does not exist or is invalid.
[ public, const ] SFYScrollBarControlSmpConstRef GetScrollBarControl(Void);
This function gets the scroll bar control which is internally used by this tab control.
[ public, const ] SInt16 GetScrollBarWidth(Void);
Width of the scroll bar control which is internally used by this tab control. [pixels]
This function gets the width of the scroll bar control which is internally used by this tab control. [pixels]
[ public, const ] Bool GetTabLoop(Void);
This function gets the value of tab-loop flag indicating whether or not the focus at the first or last page can be moved to the last or first page respectively.
[ public, const ] SInt32 GetTopValue(Void);
This function gets the index of the first page on the left side which is currently displayed on this tab control.
[ public, const ] SInt32 LastIndexOf( Bool visible // visible state Bool active // active state Bool enable // enable state );
Index of the last among the pages(or containers) of this tab control which match the specified condition.
If there is no page which matches the specified condition, "-1" will be returned.
This function gets the last index among the pages(or containers) of this tab control which match the specified condition on the visible, active, and enable states.
The index of the returned value is for all the pages(or containers) which belong to this tab control.
There are four methods to use this function as below.
// since SFYTabControl is abstract class, // it is necessary to instantiate the tab control using the concrete class which inherits from SFYTabControl SFYTabControlSmp tab; SInt32 index; // suppose each container instance has already been created SFYContainerSmp a; a->SetState(false, false, false, false); SFYContainerSmp b; b->SetState(true, false, false, false); SFYContainerSmp c; c->SetState(true, true, false, false); SFYContainerSmp d; d->SetState(true, true, true, false); a->SetParent(tab); b->SetParent(tab); c->SetParent(tab); d->SetParent(tab); // get the last index among all the pages index = tab->LastIndexOf(false, false, false); // index = 3 // get the last index among all the "visible" pages index = tab->LastIndexOf(true, false, false); // index = 3 // get the last index among all the "active" pages index = tab->LastIndexOf(true, true, false); // index = 3 // get the last index among all the "enable" pages index = tab->LastIndexOf(true, true, true); // index = 3
[ public, const ] SInt32 NextIndexOf( SInt32 index // beginning index Bool visible // visible state Bool active // active state Bool enable // enable state );
Next index of the specified index among the pages(or containers) of this tab control which match the specified condition.
If there is no page which matches the specified condition, "-1" will be returned.
This function gets the next index of the specified index among the pages(or containers) of this tab control which match the specified condition on the visible, active, and enable states.
The index of the returned value is for all the pages(or containers) which belong to this tab control.
There are four methods to use this function as below.
// since SFYTabControl is abstract class, // it is necessary to instantiate the tab control using the concrete class which inherits from SFYTabControl SFYTabControlSmp tab; SInt32 index; // suppose each container instance has already been created SFYContainerSmp a; a->SetState(true, true, true, false); SFYContainerSmp b; b->SetState(false, false, false, false); SFYContainerSmp c; c->SetState(true, false, false, false); SFYContainerSmp d; d->SetState(true, true, false, false); SFYContainerSmp e; e->SetState(true, true, true, false); a->SetParent(tab); // page of the index "0" b->SetParent(tab); c->SetParent(tab); d->SetParent(tab); e->SetParent(tab); // get the next index starting at the index "0" among all the pages index = tab->NextIndexOf(0, false, false, false); // index = 1 // get the next index starting at the index "0" among all the "visible" pages index = tab->NextIndexOf(0, true, false, false); // index = 2 // get the next index starting at the index "0" among all the "active" pages index = tab->NextIndexOf(0, true, true, false); // index = 3 // get the next index starting at the index "0" among all the "enable" pages index = tab->NextIndexOf(0, true, true, true); // index = 4
[ public, const ] SInt32 PrevIndexOf( SInt32 index // beginning index Bool visible // visible state Bool active // active state Bool enable // enable state );
Previous index of the specified index among the pages(or containers) of this tab control which match the specified condition.
If there is no page which matches the specified condition, "-1" will be returned.
This function gets the previous index of the specified index among the pages(or containers) of this tab control which match the specified condition on the visible, active, and enable states.
The index of the returned value is for all the pages(or containers) which belong to this tab control.
There are four methods to use this function as below.
// since SFYTabControl is abstract class, // it is necessary to instantiate the tab control using the concrete class which inherits from SFYTabControl SFYTabControlSmp tab; SInt32 index; // suppose each container instance has already been created SFYContainerSmp a; a->SetState(true, true, true, false); SFYContainerSmp b; b->SetState(false, false, false, false); SFYContainerSmp c; c->SetState(true, false, false, false); SFYContainerSmp d; d->SetState(true, true, false, false); SFYContainerSmp e; e->SetState(true, true, true, false); a->SetParent(tab); b->SetParent(tab); c->SetParent(tab); d->SetParent(tab); // page of index "3" e->SetParent(tab); // get the previous index starting at the index "3" among all the pages index = tab->PrevIndexOf(3, false, false, false); // index = 2 // get the previous index starting at the index "3" index among all the "visible" pages index = tab->PrevIndexOf(3, true, false, false); // index = 2 // get the previous index starting at the index "3" among all the "active" pages index = tab->PrevIndexOf(3, true, true, false); // index = 0 // get the previous index starting at the index "3" index among all the "enable" pages index = tab->PrevIndexOf(3, true, true, true); // index = 0
[ protected ] Void SetContentBound( SFXRectangleConstRef rectangle // value to set );
This function sets the real region of page(or container) which will be set for this tab control to the specified value.
This function is called when recalculation of the real region of page is necessary since the real region of this tab control is changed.
To reflect the value set with this function to all the pages of this tab control, call the SFYTabControl::AdjustPages function.
This function sets the number of the tab pages which is displayed at the same time in this tab control to the specified value.
Default: 2
This function sets the key with which the focus is moved to the page(or container) left next to the currently focused page(or container) of this tab control to the specified value.
Default: AVK_LEFT
This function sets the key with which the focus is moved to the page(or container) right next to the currently focused page(or container) of this tab control to the specified value.
Default: AVK_RIGHT
[ public ] Void SetSafePageBackgroundColor( SFXRGBColorConstRef param // value to set );
This function sets the background color of the safe page of this tab control to the specified value, which will be displayed when the specified page does not exist or is invalid.
Default: SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00) [white color]
[ public ] SFCError SetScrollBarControl( SFYScrollBarControlSmpConstRef param // value to set );
This function sets the scroll bar control which is internally used by this tab control to the specified value.
Default: SFZScrollBarControl
The code below is to switch the standard scroll bar control with the custom scroll bar.
// create instance of scroll bar control USRScrollBar bar = USRScrollBar::NewInstance(); // set its state to "visible" + "active" + "disable" + "unfocus" bar->SetState(true, true, false, false); // set custom scroll bar control _tab->SetScrollBarControl(bar);
This function sets the width of the scroll bar control to the specified value, which is internally used by this tab control. [pixels]
Default: 5 pixels
This function sets the tab-loop flag showing whether or not the focus at the first or last page can be moved to the last or first page respectively to the specified value.
If "true" is set, the focus at the first or last page can be moved to the last or first page respectively.
If "false" is set, the focus at the first or last page cannot be moved to the last or first page respectively.
Default: true
enum CodeEnum { CODE_TYPE = four_char_code('.', 't', 'a', 'b') }; SFMTYPEDEFTYPE(CodeEnum)
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |