![]() ![]() ![]()
|
SophiaFramework UNIVERSE 5.0 |
#include <SFYTabControl.h.hpp>
class SFYTabControl : public SFYBandControl;
SFMTYPEDEFRESPONDER(SFYTabControl)


SFYTabControl はタブコントロールを実装するための起点となるクラスです。
タブコントロールは、タブ形式での入出力を可能にしてくれるコントロールです。
タブコントロール内のそれぞれのタブは、コンテナ (SFYContainer) (以降ページと呼びます) によって管理されます。
タブ領域のサイズは、SFYResponder::SetRealBound 関数によって設定します。
ページの仮想領域は SFYResponder::SetParent 関数でタブコントロールを設定したときにページ内の子レスポンダに基づき自動的に計算されます。(※1)
タブはページの一番優先度の高い状態に基づき表示や動作が異なります。
ページが不可視 状態の時、そのページはタブ内に表示されません。
ページが不活性 状態の時、そのページはタブ内に表示されますが選択できません。
ページが操作不可能 状態の時、そのページはタブ内に表示され選択できますが、ページ自体は操作不可能状態となります。
ページが可視・活性・操作可能 状態の時、そのページはタブ内に表示され選択でき、ページの操作も可能となります。
タブコントロールの子レスポンダに、SFYContainer クラスかそれを継承するクラスを登録します。
(※1) ページの実領域は SFYTabControl::SetContentBound で得られる値に設定されます。あらかじめ、SFYTabControl::SetContentBound で領域を設定しておく必要があります。
タブコントロールの最小値は常に0です。
タブコントロールの最大値は項目数を表します。
タブコントロールの現在値は選択されているページのインデックスを表します。
タブコントロールのフィールド値は画面に表示されるタブの数を表します。
タブコントロールのトップ値は画面に表示されるタブの一番左側のページのインデックスを表します。
![]() |
実領域と仮想領域 |
|---|---|
タブコントロールでは、常に実領域と仮想領域が一致するように内部的な処理がなされています。 | |
| コンストラクタ/デストラクタ |
|---|
|
SFYTabControl( Void ) SFYTabControl クラスのコンストラクタです。
|
|
~SFYTabControl( Void ) SFYTabControl クラスのデストラクタです。
|
| パブリック関数 | |
|---|---|
| SInt32 |
FirstIndexOf(
Bool visible
, Bool active
, Bool enable
) 条件で指定したページ(コンテナ)の中で最初のインデックスを取得します。
|
| Void |
FocusLeft( Void ) フォーカスを左のタブページに移動します。
|
| SFCError |
FocusPage(
SInt32 index
) 指定のインデックスのページ(コンテナ)にフォーカスを移動させます。
|
| Void |
FocusRight( Void ) フォーカスを右のタブページ(コンテナ)に移動します。
|
| SInt32 |
GetBottomValue( Void ) 現在表示されているタブの右側境界のインデックスを取得します。
|
| SInt32 |
GetFieldValue( Void ) 画面に表示するタブの数を取得します。
|
| AVKType |
GetFocusLeftKey( Void ) 左のタブページ(コンテナ)にフォーカスを移動させるキーを取得します。
|
| AVKType |
GetFocusRightKey( Void ) 右のタブページ(コンテナ)にフォーカスを移動させるキーを取得します。
|
| SInt32 |
GetIndex(
SFYContainerSmpConstRef tabpage
) 指定のタブページ(コンテナ)のインデックスを取得します。
|
| SInt32 |
GetMaximumValue( Void ) 全ページ(コンテナ)数を取得します。
|
| SFYContainerSmp |
GetPage(
SInt32 index
) 指定のインデックスを持つタブページ(コンテナ)を取得します。
|
| SInt32 |
GetPageCount(
Bool visible
, Bool active
, Bool enable
) 検索条件に一致するページ(コンテナ)の数を取得します。
|
| SFZScrollBarControlSmp |
GetScrollBar( Void ) タブコントロールで使用するスクロールバーのスマートポインタを取得します。
|
| SInt16 |
GetScrollBarWidth( Void ) タブコントロールで使用するスクロールバーの幅を取得します。
|
| Bool |
GetTabLoop( Void ) タブの境界を超えて逆側にフォーカスを移動させるかを取得します。
|
| SInt32 |
GetTopValue( Void ) 現在表示されているタブの左側境界のインデックスを取得します。
|
| SInt32 |
LastIndexOf(
Bool visible
, Bool active
, Bool enable
) 条件で指定したページ(コンテナ)の中で最後のインデックスを取得します。
|
| SInt32 |
NextIndexOf(
SInt32 index
, Bool visible
, Bool active
, Bool enable
) 条件で指定したページ中で次のページのインデックスを取得します。
|
| SInt32 |
PrevIndexOf(
SInt32 index
, Bool visible
, Bool active
, Bool enable
) 条件で指定したページ中で前のページのインデックスを取得します。
|
| Void |
SetFieldValue(
SInt32 param
) 画面に表示するタブの数を設定します。
|
| Void |
SetFocusLeftKey(
AVKType param
) 左のページ(コンテナ)にフォーカスを移動させるキーを設定します。
|
| Void |
SetFocusRightKey(
AVKType param
) 右のページ(コンテナ)にフォーカスを移動させるキーを設定します。
|
| SFCError |
SetScrollBar(
SFZScrollBarControlSmpConstRef param
) タブコントロールで使用するスクロールバーのスマートポインタを設定します。
|
| Void |
SetScrollBarWidth(
SInt16 param
) タブコントロールで使用するスクロールバーの幅を設定します。
|
| Void |
SetTabLoop(
Bool param
) タブの境界を超えて逆側にフォーカスを移動させるかを設定します。
|
| Void |
ClearHandler( Void )
(SFYResponder から継承)
ハンドラの登録をすべて解除します。
|
| Void |
ClearTracer( Void )
(SFYResponder から継承)
トレーサの登録をすべて解除します。
|
| SFCError |
Distribute(
SFXEventConstRef event
, BoolPtr result = null
)
(SFYResponder から継承)
配信エンジンを起動してイベントを配信します。
|
| SFXRGBColorConstRef |
GetBackgroundColor( Void )
(SFYWidget から継承)
背景の色を取得します。
|
| SFYResponderSmp |
GetChildBack( Void )
(SFYResponder から継承)
GetChildBack( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) GetChildBack( UInt32 id ) (SFYResponder から継承) GetChildBack( Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) 最背面に位置する子レスポンダを取得します。
|
| SFYResponderSmp |
GetChildBackward(
SInt32 index
)
(SFYResponder から継承)
GetChildBackward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) GetChildBackward( SInt32 index , UInt32 id ) (SFYResponder から継承) GetChildBackward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) 背面から数えて指定された順番に位置する子レスポンダを取得します。
|
| SInt32 |
GetChildCount( Void )
(SFYResponder から継承)
GetChildCount( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) GetChildCount( UInt32 id ) (SFYResponder から継承) GetChildCount( Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) 子レスポンダの数を取得します。
|
| SFYResponderSmp |
GetChildForward(
SInt32 index
)
(SFYResponder から継承)
GetChildForward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) GetChildForward( SInt32 index , UInt32 id ) (SFYResponder から継承) GetChildForward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) 前面から数えて指定された順番に位置する子レスポンダを取得します。
|
| SFYResponderSmp |
GetChildFront( Void )
(SFYResponder から継承)
GetChildFront( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) GetChildFront( UInt32 id ) (SFYResponder から継承) GetChildFront( Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) 最前面に位置する子レスポンダを取得します。
|
| SInt32 |
GetCurrentValue( Void )
(SFYControl から継承)
コントロールの現在値を取得します。
|
| SFYDistributerPtr |
GetDistributer( Void )
(SFYResponder から継承)
配信エンジンを取得します。
|
| SFXRectangle |
GetGlobalBound( Void )
(SFYResponder から継承)
グローバル領域を取得します。
|
| UInt32 |
GetID( Void )
(SFYResponder から継承)
ID を取得します。
|
| SFXRectangle |
GetLocalBound( Void )
(SFYResponder から継承)
ローカル領域を取得します。
|
| SInt32 |
GetMinimumValue( Void )
(SFYControl から継承)
コントロールの最小値を取得します。
|
| SInt32 |
GetNthBackward( Void )
(SFYResponder から継承)
GetNthBackward( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) GetNthBackward( UInt32 id ) (SFYResponder から継承) GetNthBackward( Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) 自レスポンダが背面から数えて何番目に位置するかを取得します。
|
| SInt32 |
GetNthForward( Void )
(SFYResponder から継承)
GetNthForward( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) GetNthForward( UInt32 id ) (SFYResponder から継承) GetNthForward( Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) 自レスポンダが前面から数えて何番目に位置するかを取得します。
|
| SFYResponderSmp |
GetParent( Void )
(SFYResponder から継承)
親レスポンダを取得します。
|
| Bool |
GetPropertyTransparent( Void )
(SFYResponder から継承)
透過属性を取得します。
|
| SFXRectangleConstRef |
GetRealBound( Void )
(SFYResponder から継承)
実領域を取得します。
|
| VoidPtr |
GetReference( Void )
(SFYResponder から継承)
リファレンス値を取得します。
|
| SFYRendererPtr |
GetRenderer( Void )
(SFYResponder から継承)
描画エンジンを取得します。
|
| SFYResponderSmp |
GetRoot( Void )
(SFYResponder から継承)
ルートレスポンダを取得します。
|
| Bool |
GetStateActive(
Bool inherit = false
)
(SFYResponder から継承)
活性状態を取得します。
|
| Bool |
GetStateEnable(
Bool inherit = false
)
(SFYResponder から継承)
操作可能状態を取得します。
|
| Bool |
GetStateFocus(
Bool inherit = false
)
(SFYResponder から継承)
フォーカス状態を取得します。
|
| Bool |
GetStateVisible(
Bool inherit = false
)
(SFYResponder から継承)
可視状態を取得します。
|
| SFXRectangle |
GetSuitableBound( Void )
(SFYResponder から継承)
GetSuitableBound( SFXRectangleConstRef param ) (SFYResponder から継承) 最適な大きさを取得します。
|
| SFXMargin |
GetSuitableMargin( Void )
(SFYResponder から継承)
最適な余白を取得します。
|
| SFCType |
GetType( Void )
(SFYResponder から継承)
タイプを取得します。
|
| SFXRectangleConstRef |
GetVirtualBound( Void )
(SFYResponder から継承)
仮想領域を取得します。
|
| Void |
Initialize( Void )
(SFYResponder から継承)
レスポンダを初期化します。
|
| Void |
Invalidate( Void )
(SFYResponder から継承)
Invalidate( SFXRectangleConstRef param ) (SFYResponder から継承) 再描画領域を登録します。
|
| Void |
InvokeBackward(
SFXEventConstRef event
, Bool overload
, BoolPtr result = null
)
(SFYResponder から継承)
レスポンダにイベントを送信します。ハンドラ関数はハンドラリストに登録された順序で呼び出されます。
|
| Void |
InvokeForward(
SFXEventConstRef event
, Bool overload
, BoolPtr result = null
)
(SFYResponder から継承)
レスポンダにイベントを送信します。ハンドラ関数はハンドラリストに登録された逆順で呼び出されます。
|
| Bool |
IsBack( Void )
(SFYResponder から継承)
IsBack( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) IsBack( UInt32 id ) (SFYResponder から継承) IsBack( Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) 自レスポンダが最背面に位置するかどうかを判定します。
|
| Bool |
IsFront( Void )
(SFYResponder から継承)
IsFront( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) IsFront( UInt32 id ) (SFYResponder から継承) IsFront( Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) 自レスポンダが最前面に位置するかどうかを判定します。
|
| Bool |
IsNthBackward(
SInt32 index
)
(SFYResponder から継承)
IsNthBackward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) IsNthBackward( SInt32 index , UInt32 id ) (SFYResponder から継承) IsNthBackward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) 自レスポンダが背面から数えて指定された順番に位置するかどうかを判定します。
|
| Bool |
IsNthForward(
SInt32 index
)
(SFYResponder から継承)
IsNthForward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) IsNthForward( SInt32 index , UInt32 id ) (SFYResponder から継承) IsNthForward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) 自レスポンダが前面から数えて指定された順番に位置するかどうかを判定します。
|
| Bool |
IsRoot( Void )
(SFYResponder から継承)
自レスポンダがルートレスポンダかどうかを判定します。
|
| SFCError |
RegisterHandler(
SFXEventRangeConstRef range
, SFYHandler::RuleRecConstRef rule
)
(SFYResponder から継承)
RegisterHandler( SFXEventRangeConstPtr range , SFYHandler::HandlerSPPConstPtr spp , VoidPtrConstPtr reference , SInt32 length ) (SFYResponder から継承) RegisterHandler( SFXEventRangeConstPtr range , SFYHandler::RuleRecConstPtr rule , SInt32 length ) (SFYResponder から継承) RegisterHandler( SFXEventRangeConstRef range , SFYHandler::HandlerSPP spp , VoidPtr reference ) (SFYResponder から継承) ハンドラを登録します。
|
| SFCError |
RegisterTracer(
SFXEventRangeConstRef range
, SFYTracer::RuleRecConstRef rule
)
(SFYResponder から継承)
RegisterTracer( SFXEventRangeConstPtr range , SFYTracer::OrderEnumConstPtr order , SFYTracer::StateEnumConstPtr state , BoolConstPtr overload , SInt32 length ) (SFYResponder から継承) RegisterTracer( SFXEventRangeConstPtr range , SFYTracer::RuleRecConstPtr rule , SInt32 length ) (SFYResponder から継承) RegisterTracer( SFXEventRangeConstRef range , SFYTracer::OrderEnum order , SFYTracer::StateEnum state , Bool overload ) (SFYResponder から継承) トレーサを登録します。
|
| SFCError |
Render(
Bool force = false
)
(SFYResponder から継承)
描画エンジンを起動して再描画します。
|
| Void |
SetBackgroundColor(
SFXRGBColorConstRef param
)
(SFYWidget から継承)
背景の色を設定します。
|
| Void |
SetCurrentValue(
SInt32 param
)
(SFYControl から継承)
コントロールの現在値を設定します。
|
| Void |
SetDistributer(
SFYDistributerPtr param
)
(SFYResponder から継承)
配信エンジンを設定します。
|
| Void |
SetID(
UInt32 param
)
(SFYResponder から継承)
ID を設定します。
|
| Void |
SetMaximumValue(
SInt32 param
)
(SFYControl から継承)
コントロールの最大値を設定します。
|
| Void |
SetMinimumValue(
SInt32 param
)
(SFYControl から継承)
コントロールの最小値を設定します。
|
| SFCError |
SetParent(
SFYResponderSmpConstRef param
)
(SFYResponder から継承)
親レスポンダを設定します。
|
| Void |
SetProperty(
Bool transparent
)
(SFYResponder から継承)
属性をまとめて設定します。
|
| Void |
SetPropertyTransparent(
Bool param
)
(SFYResponder から継承)
透過属性を設定します。
|
| Void |
SetRealBound(
SFXRectangleConstRef param
)
(SFYResponder から継承)
実領域を設定します。
|
| Void |
SetReference(
VoidPtr param
)
(SFYResponder から継承)
リファレンス値を設定します。
|
| Void |
SetRenderer(
SFYRendererPtr param
)
(SFYResponder から継承)
描画エンジンを設定します。
|
| Void |
SetState(
Bool visible
, Bool active
, Bool enable
, Bool focus
)
(SFYResponder から継承)
状態をまとめて設定します。
|
| Void |
SetStateActive(
Bool param
)
(SFYResponder から継承)
活性状態を設定します。
|
| Void |
SetStateEnable(
Bool param
)
(SFYResponder から継承)
操作可能状態を設定します。
|
| Void |
SetStateFocus(
Bool param
)
(SFYResponder から継承)
フォーカス状態を設定します。
|
| Void |
SetStateVisible(
Bool param
)
(SFYResponder から継承)
可視状態を設定します。
|
| Void |
SetTopValue(
SInt32 param
)
(SFYBandControl から継承)
コントロールのトップ値を設定します。
|
| Void |
SetVirtualBound(
SFXRectangleConstRef param
)
(SFYResponder から継承)
仮想領域を設定します。
|
| Void |
Terminate( Void )
(SFYResponder から継承)
レスポンダの終了処理をします。
|
| Void |
ToBack( Void )
(SFYResponder から継承)
ToBack( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) ToBack( UInt32 id ) (SFYResponder から継承) ToBack( Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) 自レスポンダを姉妹レスポンダのなかで最背面に移動します。
|
| Void |
ToFront( Void )
(SFYResponder から継承)
ToFront( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) ToFront( UInt32 id ) (SFYResponder から継承) ToFront( Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) 自レスポンダを姉妹レスポンダのなかで最前面に移動します。
|
| Void |
ToNthBackward(
SInt32 index
)
(SFYResponder から継承)
ToNthBackward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) ToNthBackward( SInt32 index , UInt32 id ) (SFYResponder から継承) ToNthBackward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) 自レスポンダを背面から数えて指定された順番に移動します。
|
| Void |
ToNthForward(
SInt32 index
)
(SFYResponder から継承)
ToNthForward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) ToNthForward( SInt32 index , UInt32 id ) (SFYResponder から継承) ToNthForward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (SFYResponder から継承) 自レスポンダを前面から数えて指定された順番に移動します。
|
| Void |
UnregisterHandler(
SFXEventRangeConstRef range
, SFYHandler::RuleRecConstRef rule
)
(SFYResponder から継承)
UnregisterHandler( SFXEventRangeConstPtr range , SFYHandler::HandlerSPPConstPtr spp , VoidPtrConstPtr reference , SInt32 length ) (SFYResponder から継承) UnregisterHandler( SFXEventRangeConstPtr range , SFYHandler::RuleRecConstPtr rule , SInt32 length ) (SFYResponder から継承) UnregisterHandler( SFXEventRangeConstRef range , SFYHandler::HandlerSPP spp , VoidPtr reference ) (SFYResponder から継承) ハンドラの登録を解除します。
|
| Void |
UnregisterTracer(
SFXEventRangeConstRef range
)
(SFYResponder から継承)
UnregisterTracer( SFXEventRangeConstPtr range , SInt32 length ) (SFYResponder から継承) トレーサの登録を解除します。
|
| T const & |
static_catch(
Void
)
(static_exception から継承)
現在保持している例外を取得します。
|
| プロテクト関数 | |
|---|---|
| Void |
AdjustPages( Void ) すべてのコンテナ(ページ)の実領域と仮想領域を調整します。
|
| SFXRectangleConstRef |
GetContentBound( Void ) タブコントロールに設定されるページ(コンテナ)の実領域を取得します。
|
| Void |
SetContentBound(
SFXRectangleConstRef rectangle
) タブコントロールに設定されるページ(コンテナ)の実領域を設定します。
|
| static SFYResponderSmp |
Factory(
SFYResponderPtr responder
, SFCErrorPtr exception = null
)
(SFYResponder から継承)
NewInstance 関数の実装を補助します。
|
| SFYResponderSmp |
GetThis( Void )
(SFYResponder から継承)
スマートポインタで保持された this を取得します。
|
| Void |
HandleBoundGlobal(
SFXRectangleConstRef rectangle
)
(SFYWidget から継承)
グローバル領域の変更処理を行います。
|
| Void |
HandleBoundOptimize(
SFXRectanglePtr rectangle
)
(SFYWidget から継承)
指定した矩形に収まる範囲内で最適なサイズを計算します。
|
| Void |
HandleBoundReal( Void )
(SFYControl から継承)
実領域の変更処理を行います。
|
| Void |
HandleBoundRequest(
SFXRectanglePtr rectangle
)
(SFYWidget から継承)
最適な矩形を計算します。
|
| Void |
HandleBoundVirtual( Void )
(SFYWidget から継承)
仮想領域の変更処理を行います。
|
| Void |
HandleRenderRequest(
SFXGraphicsPtr graphics
)
(SFYWidget から継承)
レスポンダを描画します。
|
| Void |
SetType(
SFCType param
)
(SFYResponder から継承)
タイプを設定します。
|
| Void |
static_throw(
static_exception< T > const & param
)
(static_exception から継承)
static_throw( T const & param ) (static_exception から継承) 例外を設定します。
|
| Bool |
static_try(
Void
)
(static_exception から継承)
例外が保持されているかどうかを確かめます。
|
| 型 |
|---|
|
CodeEnum SFYTabControl クラスを表す定数です。
|
[ protected, explicit ] SFYTabControl(Void);
[ protected, virtual ] virtual ~SFYTabControl(Void);
[ protected, const ] Void AdjustPages(Void);
タブコントロールに挿入されているすべてのページの実領域と仮想領域を調整します。
タブコントロールの実領域が変更されたときにページの領域も調整します。
Void CustomTabControl::HandleBoundReal(Void)
{
SetVirtualBound(SFXRectangle(SFXGrid::ZeroInstance(), GetRealBound().GetSize()));
AdjustPages();
Invalidate();
return;
}
[ public, const ] SInt32 FirstIndexOf( Bool visible // 可視状態 Bool active // 活性状態 Bool enable // 操作可能状態 );
条件で指定したページの中で最初のインデックス
条件にマッチするページがなければ -1
検索に含めるページを可視、活性、操作可能状態で制限できます。
戻り値のインデックスはすべてのページを含んだ形でのインデックスとなります。
以下の4通りの指定方法があります。
// SFYTabControl クラス自体はインスタンス化できない。具象クラスでインスタンス化する必要がある SFYTabControlSmp tab; SInt32 index; // 各コンテナのインスタンスは作成されているものとする 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); // すべてのページ中で最初のインデックスを取得する index = tab->FirstIndexOf(false, false, false); // index = 0 // 可視状態のページ中で最初のインデックスを取得する index = tab->FirstIndexOf(true, false, false); // index = 1 // 活性状態のページ中で最初のインデックスを取得する index = tab->FirstIndexOf(true, true, false); // index = 2 // 操作可能状態のページ中で最初のインデックスを取得する index = tab->FirstIndexOf(true, true, true); // index = 3
[ public ] Void FocusLeft(Void);
フォーカスを左のタブページに移動します。
現在フォーカスを持つページが最初のタブページの場合、GetTabLoop() の値より動作が異なります。
値が true なら、フォーカスは最後のタブページに移動します。
値が false なら、フォーカスは最初のページのままです。
指定のインデックスのページにフォーカス(※)を移動させます。
(※)ここでいうフォーカスはレスポンダのフォーカス状態とは若干意味合いが異なります。
レスポンダが活性かつ操作不可能状態のとき、レスポンダにフォーカスを当てることはできませんが、
タブページはフォーカス状態ではなくても、「タブ」にはフォーカスを当てることができます。
この場合ページを開くことは可能となります。ただし、タブページ自体にフォーカスが当たっているわけではないので操作することはできません。
[ public ] Void FocusRight(Void);
フォーカスを右のタブページに移動します。
現在フォーカスを持つページが最後のタブページの場合、GetTabLoop() の値により動作が異なります。
値が true なら、フォーカスは最初のタブページに移動します。
値が false なら、フォーカスは最後のタブページのままです。
[ public, const ] SInt32 GetBottomValue(Void);
現在表示されているタブの右側境界のインデックスを取得します。
[ protected, const ] SFXRectangleConstRef GetContentBound(Void);
SFYTabControl::AdjustPages 関数を呼び出したときに、設定されるページの実領域です。
[ public ] SInt32 GetFieldValue(Void);
同時に画面に表示するタブの数を取得します。
デフォルト値: 2
[ public, const ] AVKType GetFocusLeftKey(Void);
右のタブページにフォーカスを移動させるキー(AVKType)。
[ public, const ] AVKType GetFocusRightKey(Void);
右のタブページにフォーカスを移動させるキー(AVKType)。
[ public, const ] SInt32 GetIndex( SFYContainerSmpConstRef tabpage // タブページ(コンテナ) );
タブページのインデックス
指定のタブページが存在しない場合は -1
[ public, const ] SInt32 GetMaximumValue(Void);
[ public, const ] SFYContainerSmp GetPage( SInt32 index // インデックス );
タブページのスマートポインタ
指定のインデックスを持つタブページが存在しない場合は、SFYTabPage::EmptyInstance()
[ public, const ] SInt32 GetPageCount( Bool visible // 可視状態 Bool active // 活性化状態 Bool enable // 操作可能状態 );
検索に含めるページを可視、活性、操作可能状態で制限できます。
以下の4通りの指定方法があります。
// SFYTabControl クラス自体はインスタンス化できない。具象クラスでインスタンス化する必要がある SFYTabControlSmp tab; SInt32 num; // 各コンテナのインスタンスは作成されているものとする 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); // すべてのページ数を取得する (GetAllPageCount と同じ値を返すが、効率はよくない。) num = tab->GetPageCount(false, false, false); // num = 4 // 可視状態のページ数を取得する num = tab->GetPageCount(true, false, false); // num = 3 // 活性状態のページ数を取得する num = tab->GetPageCount(true, true, false); // num = 2 // 操作可能状態のページ数を取得する num = tab->GetPageCount(true, true, true); // num = 1
[ public, const ] SFZScrollBarControlSmp GetScrollBar(Void);
[ public, const ] SInt16 GetScrollBarWidth(Void);
[ public, const ] Bool GetTabLoop(Void);
デフォルト値: true
[ public, const ] SInt32 GetTopValue(Void);
[ public, const ] SInt32 LastIndexOf( Bool visible // 可視状態 Bool active // 活性状態 Bool enable // 操作可能状態 );
条件で指定したページの中で最後のインデックス
条件にマッチするページがなければ -1
検索に含めるページを可視、活性、操作可能状態で制限できます。
戻り値のインデックスはすべてのページを含んだ形でのインデックスとなります。
以下の4通りの指定方法があります。
// SFYTabControl クラス自体はインスタンス化できない。具象クラスでインスタンス化する必要がある SFYTabControlSmp tab; SInt32 index; // 各コンテナのインスタンスは作成されているものとする 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); // すべてのページ中で最後のインデックスを取得する index = tab->LastIndexOf(false, false, false); // index = 3 // 可視状態のページ中で最後のインデックスを取得する index = tab->LastIndexOf(true, false, false); // index = 3 // 活性状態のページ中で最後のインデックスを取得する index = tab->LastIndexOf(true, true, false); // index = 3 // 操作可能状態のページ中で最後のインデックスを取得する index = tab->LastIndexOf(true, true, true); // index = 3
[ public, const ] SInt32 NextIndexOf( SInt32 index // 起点となるインデックス Bool visible // 可視状態 Bool active // 活性化状態 Bool enable // 操作可能状態 );
条件で指定したページの中で次頁のインデックス
条件にマッチするページがなければ -1
検索に含めるページを可視、活性、操作可能状態で制限できます。
戻り値のインデックスはすべてのページを含んだ形でのインデックスとなります。
以下の4通りの指定方法があります。
// SFYTabControl クラス自体はインスタンス化できない。具象クラスでインスタンス化する必要がある SFYTabControlSmp tab; SInt32 index; // 各コンテナのインスタンスは作成されているものとする 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); // インデックス 0 のページ b->SetParent(tab); c->SetParent(tab); d->SetParent(tab); e->SetParent(tab); // インデックス 0 から数えて次のページのインデックスを取得する index = tab->NextIndexOf(0, false, false, false); // index = 1 // インデックス 0 から数えて次の可視状態ページのインデックスを取得する index = tab->NextIndexOf(0, true, false, false); // index = 2 // インデックス 0 から数えて次の活性状態ページのインデックスを取得する index = tab->NextIndexOf(0, true, true, false); // index = 3 // インデックス 0 から数えて次の操作可能状態ページのインデックスを取得する index = tab->NextIndexOf(0, true, true, true); // index = 4
[ public, const ] SInt32 PrevIndexOf( SInt32 index // 起点となるインデックス Bool visible // 可視状態 Bool active // 活性化状態 Bool enable // 操作可能状態 );
条件で指定したページの中で前頁のインデックス
条件にマッチするページがなければ -1
検索に含めるページを可視、活性、操作可能状態で制限できます。
戻り値のインデックスはすべてのページを含んだ形でのインデックスとなります。
以下の4通りの指定方法があります。
// SFYTabControl クラス自体はインスタンス化できない。具象クラスでインスタンス化する必要がある SFYTabControlSmp tab; SInt32 index; // 各コンテナのインスタンスは作成されているものとする 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); // インデックス 3 のページ e->SetParent(tab); // インデックス 3 から数えて前のページのインデックスを取得する index = tab->PrevIndexOf(3, false, false, false); // index = 2 // インデックス 3 から数えて前の可視状態ページのインデックスを取得する index = tab->PrevIndexOf(3, true, false, false); // index = 2 // インデックス 3 から数えて前の活性状態ページのインデックスを取得する index = tab->PrevIndexOf(3, true, true, false); // index = 0 // インデックス 3 から数えて前の操作可能状態ページのインデックスを取得する index = tab->PrevIndexOf(3, true, true, true); // index = 0
[ protected ] Void SetContentBound( SFXRectangleConstRef rectangle // ページの実領域 );
タブコントロールの実領域が変化したときなど、ページの実領域を再計算しなおす必要があるときに呼び出して設定します。
すべてのページに設定した値を反映させるには、SFYTabControl::AdjustPages 関数を呼び出します。
同時に画面に表示するタブの数を設定します。
デフォルト値: 2
左のタブページにフォーカスを移動させるキーを設定します。
デフォルト値: AVK_LEFT
右のタブページにフォーカスを移動させるキーを設定します。
デフォルト値: AVK_RIGHT
[ public ] SFCError SetScrollBar( SFZScrollBarControlSmpConstRef param // スクロールバーのスマートポインタ );
標準のスクロールバーからカスタムスクロールバーに変更します。
// スクロールバーのインスタンス作成 USRScrollBar bar = USRScrollBar::NewInstance(); // 常にスクロールバーを表示する bar->SetAlwaysVisible(true); // 可視/活性状態にする bar->SetState(true, true, false, false); // カスタムスクロールバーを設定する _tab->SetScrollBar(bar);
true に設定するとタブの境界を超えて逆側にフォーカスを移動します。
false に設定するとタブの境界でフォーカスの移動は止まります。
デフォルト値: true
enum CodeEnum {
CODE_TYPE = four_char_code('.', 't', 'a', 'b')
};
SFMTYPEDEFTYPE(CodeEnum)
|
Copyright(c) 2002 - 2009 Sophia Cradle Incorporated All Rights Reserved. |
![]() ![]() ![]()
|