前のページ次のページ上に戻るホーム SophiaFramework UNIVERSE 5.0
SFZTabControl
タブを表すコントロールです。
#include <SFZTabControl.h.hpp>
class SFZTabControl : public SFYTabControl;
SFMTYPEDEFRESPONDER(SFZTabControl)

継承図

SFZTabControl クラスの継承図

協調図

SFZTabControl クラスの協調図

解説

タブコントロールは、タブ形式での入出力を可能にしてくれるコントロールです。

タブコントロール内のそれぞれのタブは、タブページ (SFZTabPage) によって管理されます。

タブ領域のサイズは、SFYResponder::SetRealBound 関数によって設定可能です。

タブページ領域のサイズは SFYResponder::SetParent 関数でタブコントロールが設定されたときに、タブコントロールの領域に基づき自動的に計算されます。

タブのデザインのために様々な関数が用意されています。

テキストや画像をタブのラベルとして表示できます。

タブはタブページの一番優先度の高い状態に基づき表示や動作が異なります。

タブページが不可視 状態の時、そのページはタブ内に表示されません。

タブページが不活性 状態の時、そのページはタブ内に表示されますが選択できません。

タブページが操作不可能 状態の時、そのページはタブ内に表示され選択できますが、ページ自体は操作不可能状態となります。

タブページが可視・活性・操作可能 状態の時、そのページはタブ内に表示され選択でき、ページの操作も可能となります。

タブコントロールの子レスポンダに、SFZTabPage クラスかそれを継承するクラス以外のレスポンダを登録した時の動作は未定義です。

※タブページ以外のレスポンダを子レスポンダとして登録しないでください。

タブコントロールの最小値は常に0です。

タブコントロールの最大値は項目数を表します。

タブコントロールの現在値は選択されているページのインデックスを表します。

タブコントロールのフィールド値は画面に表示されるタブの数を表します。

タブコントロールのトップ値は画面に表示されるタブの一番左側のページのインデックスを表します。

SetMinimumValue, SetMaximumValue, SetCurrentValue, SetTopValue 関数で最小値、最大値、現在値、トップ値を変更してはいけません。

以下は、5つのタブページを持つタブコントロールを生成するためのコードです。

Void UserAppClass::Main(Void)
{
     SFCError error;

     // ウインドウを生成する
     _window = SFZWindow::NewInstance();
     _window->SetParent(GetThis());                 // UserAppClass を親にする
     _window->SetRealBound(GetLocalBound());        // UserAppClass のローカル領域を実領域にする
     _window->SetState(true, true, true, true);     // 可視・活性・操作可能・フォーカス状態

     //タブコントロールを生成する
     SFZTabControlSmp tab = SFZTabControl::NewInstance(&error);
     tab->SetParent(_window);                       // ウィンドウを親にする
     tab->SetRealBound(_window->GetLocalBound());   // ウィンドウのローカル領域を実領域にする
     tab->SetBackgroundColor(SFXRGBColor(0xDD, 0xFF, 0xDD, 0x00));// タブの背景色[薄緑色]
     tab->SetState(true, true, true, true);         // 可視・活性・操作可能 状態

     SFBShellSmp  shell = SFBShell::GetInstance();
     SFBImageSmp  image;

     // 最初のタブページを生成する
     SFZTabPageSmp page1 = SFZTabPage::NewInstance(&error);
     page1->SetTitle("A");                          // ページタイトルを設定する
     page1->SetHint("Page 1");                      // ページヒントを設定する
     image = shell->LoadResImage(TAB_RES_FILE, IDI_OBJECT_5001);// タブ画像を読み込む
     page1->SetImage(image);                        // タブ画像を設定する
     page1->SetState(true, true, true, true);       // 可視・活性・操作可能・フォーカス状態

     // 2 番目のタブページを生成する
     SFZTabPageSmp page2 = SFZTabPage::NewInstance(&error);
     page2->SetTitle("B");
     page2->SetHint("Page 2");
     image = shell->LoadResImage(TAB_RES_FILE, IDI_OBJECT_5002);
     page2->SetImage(image);
     page2->SetState(true, true, false, false);     // 可視・活性・操作不可能・非フォーカス状態

     // 3 番目のタブページを生成する
     SFZTabPageSmp page3 = SFZTabPage::NewInstance(&error);
     page3->SetTitle("C");
     page3->SetHint("Page 3");
     image = shell->LoadResImage(TAB_RES_FILE, IDI_OBJECT_5003);
     page3->SetImage(image);
     page3->SetState(true, false, false, false);    // 可視・不活性・操作不可能・非フォーカス状態

     // 4 番目のタブページを生成する
     SFZTabPageSmp page4 = SFZTabPage::NewInstance(&error);
     page4->SetTitle("D");
     page4->SetHint("Page 4");
     image = shell->LoadResImage(TAB_RES_FILE, IDI_OBJECT_4004);
     page4->SetImage(image);
     page4->SetState(false, false, false, false);   // 不可視・不活性・操作不可能・非フォーカス状態

     // 5 番目のタブページを生成する
     SFZTabPageSmp page5 = SFZTabPage::NewInstance(&error);
     page5->SetTitle("E");
     page5->SetHint("Page 5");
     page5->SetState(true, true, true, false);       // 可視・活性・操作可能・非フォーカス状態

     // タブページの親をタブコントロールにする
     page1->SetParent(tab);
     page2->SetParent(tab);
     page3->SetParent(tab);
     page4->SetParent(tab);
     page5->SetParent(tab);

     // タブコントロール領域に 3 つのタブページが表示されるように設定する
     tab->SetFieldValue(3);

     // 最初のタブページ page1 を最前面に移動する
     page1->ToFront(); // この場合、tab->FocusPage(0); でも同じ動作をする
}

実行結果:

[Caution] 実領域と仮想領域

タブコントロールでは、常に実領域と仮想領域が一致するように内部的な処理がなされています。

参照

タブコントロールとタブページ [SFZTabControl] | SFZTabPage | SFYResponder::SetRealBound

メンバ

コンストラクタ/デストラクタ
SFZTabControl( Void )
SFZTabControl クラスのコンストラクタです。
~SFZTabControl( Void )
SFZTabControl クラスのデストラクタです。
パブリック関数
SFXRGBColorConstRef GetArrowColor( Void )
タブの左右にある矢印の色を取得します。
AEEFont GetFont( Void )
フォントを取得します。
SFXBevelColorConstRef GetHintBevelColor( Void )
ヒントのベベルカラーを取得します。
SInt16 GetHintHeight( Void )
ヒントの高さを取得します。
SInt16 GetPadding( Void )
パディングサイズを取得します。
SFZTabPageSmp GetPage( SInt16 index )
指定のインデックスを持つタブページを取得します。
SFXBevelColorConstRef GetTabBevelColor( Void )
タブのベベルカラーを取得します。
SInt16 GetTabHeight( Void )
タブの高さを取得します。
static
SFZTabControlSmp
NewInstance( SFCErrorPtr exception = null )
新しいインスタンスを作成します。
Void SetArrowColor( SFXRGBColorConstRef param )
タブの左右にある矢印の色を設定します。
Void SetDrawBorder( Bool param )
タブコントロールの境界線を描画するかどうかを設定します。
Void SetFont( AEEFont param )
フォントを設定します。
Void SetHintBevelColor( SFXBevelColorConstRef param )
ヒントのベベルカラーを設定します。
Void SetHintHeight( SInt16 param )
ヒントの高さを設定します。
Void SetPadding( SInt16 param )
パディングサイズを設定します。
Void SetTabBevelColor( SFXBevelColorConstRef param )
タブのベベルカラーを設定します。
Void SetTabHeight( SInt16 param )
タブの高さを設定します。
Void ClearHandler( Void ) (SFYResponder から継承)
ハンドラの登録をすべて解除します。
Void ClearTracer( Void ) (SFYResponder から継承)
トレーサの登録をすべて解除します。
SFCError Distribute( SFXEventConstRef event , BoolPtr result = null ) (SFYResponder から継承)
配信エンジンを起動してイベントを配信します。
SInt32 FirstIndexOf( Bool visible , Bool active , Bool enable ) (SFYTabControl から継承)
条件で指定したページ(コンテナ)の中で最初のインデックスを取得します。
Void FocusLeft( Void ) (SFYTabControl から継承)
フォーカスを左のタブページに移動します。
SFCError FocusPage( SInt32 index ) (SFYTabControl から継承)
指定のインデックスのページ(コンテナ)にフォーカスを移動させます。
Void FocusRight( Void ) (SFYTabControl から継承)
フォーカスを右のタブページ(コンテナ)に移動します。
SFXRGBColorConstRef GetBackgroundColor( Void ) (SFYWidget から継承)
背景の色を取得します。
SInt32 GetBottomValue( Void ) (SFYTabControl から継承)
現在表示されているタブの右側境界のインデックスを取得します。
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 から継承)
配信エンジンを取得します。
SInt32 GetFieldValue( Void ) (SFYTabControl から継承)
画面に表示するタブの数を取得します。
AVKType GetFocusLeftKey( Void ) (SFYTabControl から継承)
左のタブページ(コンテナ)にフォーカスを移動させるキーを取得します。
AVKType GetFocusRightKey( Void ) (SFYTabControl から継承)
右のタブページ(コンテナ)にフォーカスを移動させるキーを取得します。
SFXRectangle GetGlobalBound( Void ) (SFYResponder から継承)
グローバル領域を取得します。
UInt32 GetID( Void ) (SFYResponder から継承)
ID を取得します。
SInt32 GetIndex( SFYContainerSmpConstRef tabpage ) (SFYTabControl から継承)
指定のタブページ(コンテナ)のインデックスを取得します。
SFXRectangle GetLocalBound( Void ) (SFYResponder から継承)
ローカル領域を取得します。
SInt32 GetMaximumValue( Void ) (SFYTabControl から継承)
全ページ(コンテナ)数を取得します。
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 から継承)
自レスポンダが前面から数えて何番目に位置するかを取得します。
SInt32 GetPageCount( Bool visible , Bool active , Bool enable ) (SFYTabControl から継承)
検索条件に一致するページ(コンテナ)の数を取得します。
SFYResponderSmp GetParent( Void ) (SFYResponder から継承)
親レスポンダを取得します。
Bool GetPropertyTransparent( Void ) (SFYResponder から継承)
透過属性を取得します。
SFXRectangleConstRef GetRealBound( Void ) (SFYResponder から継承)
実領域を取得します。
VoidPtr GetReference( Void ) (SFYResponder から継承)
リファレンス値を取得します。
SFYRendererPtr GetRenderer( Void ) (SFYResponder から継承)
描画エンジンを取得します。
SFYResponderSmp GetRoot( Void ) (SFYResponder から継承)
ルートレスポンダを取得します。
SFZScrollBarControlSmp GetScrollBar( Void ) (SFYTabControl から継承)
タブコントロールで使用するスクロールバーのスマートポインタを取得します。
SInt16 GetScrollBarWidth( Void ) (SFYTabControl から継承)
タブコントロールで使用するスクロールバーの幅を取得します。
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 から継承)
最適な余白を取得します。
Bool GetTabLoop( Void ) (SFYTabControl から継承)
タブの境界を超えて逆側にフォーカスを移動させるかを取得します。
SInt32 GetTopValue( Void ) (SFYTabControl から継承)
現在表示されているタブの左側境界のインデックスを取得します。
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 から継承)
自レスポンダがルートレスポンダかどうかを判定します。
SInt32 LastIndexOf( Bool visible , Bool active , Bool enable ) (SFYTabControl から継承)
条件で指定したページ(コンテナ)の中で最後のインデックスを取得します。
SInt32 NextIndexOf( SInt32 index , Bool visible , Bool active , Bool enable ) (SFYTabControl から継承)
条件で指定したページ中で次のページのインデックスを取得します。
SInt32 PrevIndexOf( SInt32 index , Bool visible , Bool active , Bool enable ) (SFYTabControl から継承)
条件で指定したページ中で前のページのインデックスを取得します。
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 SetFieldValue( SInt32 param ) (SFYTabControl から継承)
画面に表示するタブの数を設定します。
Void SetFocusLeftKey( AVKType param ) (SFYTabControl から継承)
左のページ(コンテナ)にフォーカスを移動させるキーを設定します。
Void SetFocusRightKey( AVKType param ) (SFYTabControl から継承)
右のページ(コンテナ)にフォーカスを移動させるキーを設定します。
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 から継承)
描画エンジンを設定します。
SFCError SetScrollBar( SFZScrollBarControlSmpConstRef param ) (SFYTabControl から継承)
タブコントロールで使用するスクロールバーのスマートポインタを設定します。
Void SetScrollBarWidth( SInt16 param ) (SFYTabControl から継承)
タブコントロールで使用するスクロールバーの幅を設定します。
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 SetTabLoop( Bool param ) (SFYTabControl から継承)
タブの境界を超えて逆側にフォーカスを移動させるかを設定します。
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 HandleBoundReal( Void )
実領域が変化した時の処理です。
Void HandleBoundVirtual( Void )
仮想領域の変更処理を行います。
Void HandleRenderRequest( SFXGraphicsPtr graphics )
タブコントロールを描画します。
Void AdjustPages( Void ) (SFYTabControl から継承)
すべてのコンテナ(ページ)の実領域と仮想領域を調整します。
static
SFYResponderSmp
Factory( SFYResponderPtr responder , SFCErrorPtr exception = null ) (SFYResponder から継承)
NewInstance 関数の実装を補助します。
SFXRectangleConstRef GetContentBound( Void ) (SFYTabControl から継承)
タブコントロールに設定されるページ(コンテナ)の実領域を取得します。
SFYResponderSmp GetThis( Void ) (SFYResponder から継承)
スマートポインタで保持された this を取得します。
Void HandleBoundGlobal( SFXRectangleConstRef rectangle ) (SFYWidget から継承)
グローバル領域の変更処理を行います。
Void HandleBoundOptimize( SFXRectanglePtr rectangle ) (SFYWidget から継承)
指定した矩形に収まる範囲内で最適なサイズを計算します。
Void HandleBoundRequest( SFXRectanglePtr rectangle ) (SFYWidget から継承)
最適な矩形を計算します。
Void SetContentBound( SFXRectangleConstRef rectangle ) (SFYTabControl から継承)
タブコントロールに設定されるページ(コンテナ)の実領域を設定します。
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
SFZTabControl クラスを表す定数です。

SFZTabControl::SFZTabControl
SFZTabControl クラスのコンストラクタです。
[ protected, explicit ]
SFZTabControl(Void);

SFZTabControl::~SFZTabControl
SFZTabControl クラスのデストラクタです。
[ protected, virtual ]
virtual ~SFZTabControl(Void);

SFZTabControl::GetArrowColor
タブの左右にある矢印の色を取得します。
[ public, const ]
SFXRGBColorConstRef GetArrowColor(Void);

解説

タブの左右にある矢印(三角形)の色(SFXRGBColor)を取得します。

デフォルト値: SFXRGBColor(0x00, 0xBF, 0xF3, 0x00)

参照

SFZTabControl::SetArrowColor | SFXRGBColor


SFZTabControl::GetFont
フォントを取得します。
[ public, const ]
AEEFont GetFont(Void);

戻り値

タブページのタイトルとヒントテキストを描画するフォント。

参照

SFZTabControl::SetFont


SFZTabControl::GetHintBevelColor
ヒントのベベルカラーを取得します。
[ public, const ]
SFXBevelColorConstRef GetHintBevelColor(Void);

戻り値

ヒント(ヒントテキストの矩形)のベベルカラー(SFXBevelColor)。

参照

SFZTabControl::SetHintBevelColor | SFXBevelColor


SFZTabControl::GetHintHeight
ヒントの高さを取得します。
[ public, const ]
SInt16 GetHintHeight(Void);

戻り値

ヒント(ヒントテキストの矩形)の高さ。

参照

SFZTabControl::SetHintHeight


SFZTabControl::GetPadding
パディングサイズを取得します。
[ public, const ]
SInt16 GetPadding(Void);

戻り値

タブコントロールのパディング(連続するタブ間のスペース)の量。

このパディング領域は、SFYWidget::SetBackgroundColor 関数によって設定されたタブコントロールの背景色で塗り潰されます。

参照

SFZTabControl::SetPadding


SFZTabControl::GetPage
指定のインデックスを持つタブページを取得します。
[ public, const ]
SFZTabPageSmp GetPage(
    SInt16 index   // インデックス
);

戻り値

タブページのスマートポインタ

指定のインデックスを持つタブページが存在しない場合は、SFZTabPage::EmptyInstance()

参照

SFYTabControl::GetIndex


SFZTabControl::GetTabBevelColor
タブのベベルカラーを取得します。
[ public, const ]
SFXBevelColorConstRef GetTabBevelColor(Void);

戻り値

活性化されたタブのベベルカラー(SFXBevelColor)。

参照

SFZTabControl::SetTabBevelColor | SFXBevelColor


SFZTabControl::GetTabHeight
タブの高さを取得します。
[ public, const ]
SInt16 GetTabHeight(Void);

戻り値

タブの高さ。

参照

SFZTabControl::SetTabHeight


SFZTabControl::HandleBoundReal
実領域が変化した時の処理です。
[ protected, virtual ]
Void HandleBoundReal(Void);

解説

この関数は、「SFEVT_RESPONDER_BOUND/SFP16_BOUND_REAL」イベントを受信したときに呼び出されます。

開発者は、独自の処理のためにこの関数をオーバーライドできます。

デフォルトの実装では、タブコントロールのすべてのコンポーネントの位置とサイズを再計算し、スクロールバーも再計算します。 また仮想領域を実領域に一致させます。 そして再描画領域に登録します。

[Note] (SFEVT_RESPONDER_BOUND, SFP16_BOUND_REAL) イベントの送信

(SFEVT_RESPONDER_BOUND, SFP16_BOUND_REAL) イベントは SFYResponder::SetRealBound 関数を呼び出したときなどに発生します。

[Note] 実領域の変更処理

この仮想関数をオーバーライドする以外に、 領域イベント専用ハンドラ[XANDLER_DECLARE_VOIDBOUND]を定義・実装し レスポンダに登録して行うことも可能です。

実領域の変更処理は、最初に仮想関数を実行し、次に領域イベント専用ハンドラを登録した順に実行して行われます。

領域イベント専用ハンドラを宣言し登録する手間が省けるので、通常はこの仮想関数をオーバーライドだけして実領域の変更処理を行います。

参照

SFYResponder::SetRealBound | 領域イベント(SFEVT_RESPONDER_BOUND) | 領域イベント専用ハンドラ[XANDLER_DECLARE_VOIDBOUND]


SFZTabControl::HandleBoundVirtual
仮想領域の変更処理を行います。
[ protected, virtual ]
Void HandleBoundVirtual(Void);

解説

(SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) イベントを受信したときに呼び出される関数です。

仮想領域の変更時に追加の処理を行いたい場合は、この関数をオーバーライドします。

デフォルトの実装は、仮想領域を実領域に一致させます。

[Note] (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) イベントの送信

(SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) イベントは SFYResponder::SetRealBound または SFYResponder::SetVirtualBound 関数を呼び出したときなどに発生します。

[Note] 仮想領域の変更処理

この仮想関数をオーバーライドする以外に、 領域イベント専用ハンドラ[XANDLER_DECLARE_VOIDBOUND]を定義・実装し レスポンダに登録して行うことも可能です。

仮想領域の変更処理は、最初に仮想関数を実行し、次に領域イベント専用ハンドラを登録した順に実行して行われます。

領域イベント専用ハンドラを宣言し登録する手間が省けるので、通常はこの仮想関数をオーバーライドだけして仮想領域の変更処理を行います。

参照

SFYResponder::SetRealBound | SFYResponder::SetVirtualBound | 領域イベント(SFEVT_RESPONDER_BOUND) | 領域イベント専用ハンドラ[XANDLER_DECLARE_VOIDBOUND]


SFZTabControl::HandleRenderRequest
タブコントロールを描画します。
[ protected, virtual, const ]
Void HandleRenderRequest(
    SFXGraphicsPtr graphics   // グラフィックスオブジェクト
);

解説

この関数は、「SFEVT_RESPONDER_RENDER/SFP16_RENDER_REQUEST」イベントを受信したときに呼び出されます。

開発者は、独自の処理のためにこの関数をオーバーライドできます。

デフォルトの実装は、タブコントロールを描画します。

[Note] 描画処理の方法

この仮想関数をオーバーライドする以外に、 描画イベント専用ハンドラ[XANDLER_DECLARE_VOIDRENDER]を定義・実装し レスポンダに登録して行うことも可能です。

描画処理は、最初に仮想関数を実行し、次に描画イベント専用ハンドラを登録した順に実行して行われます。

描画イベント専用ハンドラを宣言し登録する手間が省けるので、通常はこの仮想関数をオーバーライドだけして描画を行います。

[Note] 描画処理の手順

描画ハンドラは描画イベント(SFEVT_RESPONDER_RENDER)の発生によって起動されます。 そして実際の描画は描画ハンドラによって行われます。

描画イベント(SFEVT_RESPONDER_RENDER)自体は、 SFYResponder::Render 関数によって描画エンジンが起動してから 描画エンジンが登録された再描画領域のなかから再描画が必要な領域を含むレスポンダだけに SFYResponder::InvokeBackward 関数を使って送信します。

なお、SFYResponder::Render 関数は イベントループの最後で自動的に呼び出されるか、 コールバックなどの処理なかから明示的に呼び出されるかのどちらかです。

また、SFYResponder::Render 関数の引数を true にして呼び出すと、 再描画領域の登録に関係無くレスポンダツリーの自レスポンダ以下の枝部分で実際に携帯電話の画面に描画されるすべてのレスポンダに描画イベントが送信されます。

参照

SFYResponder::Invalidate | SFYResponder::Render | SFYResponder::InvokeBackward | 描画イベント(SFEVT_RESPONDER_RENDER) | 描画イベント専用ハンドラ[XANDLER_DECLARE_VOIDRENDER] | 描画処理


SFZTabControl::NewInstance
新しいインスタンスを作成します。
[ public, static ]
SFZTabControlSmp NewInstance(
    SFCErrorPtr exception = null   // エラー値
);

引数

exception

関数内部で発生したエラー値を返します。

戻り値

  • 成功したとき : null 以外のポインタ
  • 失敗したとき : null ポインタ

解説

SFZTabControl クラスの新しいインスタンスを作成します。

作成に成功した場合は null 以外のポインタを返し、exception 引数は常に SFERR_NO_ERROR になります。メモリ不足などで作成に失敗した場合は null ポインタを返し、exception 引数にエラー値が返ります。

使用例

以下は、タブコントロールのインスタンスを生成するためのコードです。

SFZTabControlSmp _tab;
SFCError error;

if ((_tab = SFZTabControl::NewInstance(&error)) != null) {
    ...
}

SFZTabControl::SetArrowColor
タブの左右にある矢印の色を設定します。
[ public ]
Void SetArrowColor(
    SFXRGBColorConstRef param   // 設定する色
);

解説

タブの左右にある矢印(三角形)の色(SFXRGBColor)を設定します。

デフォルト値: SFXRGBColor(0x00, 0xBF, 0xF3, 0x00)

参照

SFZTabControl::GetArrowColor | SFXRGBColor


SFZTabControl::SetDrawBorder
タブコントロールの境界線を描画するかどうかを設定します。
[ public ]
Void SetDrawBorder(
    Bool param   // 設定する値
);

解説

タブコントロールの境界線を描画する場合は true、描画しない場合は false を設定します。

デフォルト値: false (境界線は描画されません)


SFZTabControl::SetFont
フォントを設定します。
[ public ]
Void SetFont(
    AEEFont param   // 設定するフォント
);

解説

タブページのタイトルとヒントテキストを描画するフォントを設定します。

値が変更されるとスタイルイベント [SFXEvent(SFEVT_RESPONDER_STYLE, SFP16_STYLE_FONT, 0)] を送信します。

デフォルト値: AEE_FONT_NORMAL

参照

SFZTabControl::GetFont


SFZTabControl::SetHintBevelColor
ヒントのベベルカラーを設定します。
[ public ]
Void SetHintBevelColor(
    SFXBevelColorConstRef param   // 設定するベベルカラー
);

解説

ヒント(ヒントテキストの矩形)のベベルカラー(SFXBevelColor)を設定します。

デフォルト値: SFXBevelColor(SFXRGBColor(0x9F, 0x9F, 0x9F, 0x00), SFXRGBColor(0xC0, 0xC0, 0xC0, 0x00), SFXRGBColor(0x6C, 0x6C, 0x6C, 0x00))

参照

SFZTabControl::GetHintBevelColor | SFXBevelColor | SFXRGBColor


SFZTabControl::SetHintHeight
ヒントの高さを設定します。
[ public ]
Void SetHintHeight(
    SInt16 param   // value to set
);

解説

ヒント(ヒントテキストの矩形)の高さを設定します。ヒントを表示しない場合は、0 を設定します。

デフォルト値: AEE_FONT_NORMAL フォントの高さ + 2

参照

SFZTabControl::GetHintHeight


SFZTabControl::SetPadding
パディングサイズを設定します。
[ public ]
Void SetPadding(
    SInt16 param   // 設定する値
);

解説

タブコントロールのパディング(連続するタブ間のスペース)の量を設定します。

このパディング領域は、SFYWidget::SetBackgroundColor 関数によって設定されたタブコントロールの背景色で塗り潰されます。

デフォルト値: 2

参照

SFZTabControl::GetPadding


SFZTabControl::SetTabBevelColor
タブのベベルカラーを設定します。
[ public ]
Void SetTabBevelColor(
    SFXBevelColorConstRef param   // 設定するベベルカラー
);

解説

活性化されたタブのベベルカラー(SFXBevelColor)を設定します。 非活性化状態のタブのベベルカラー(SFXBevelColor)は活性化されたタブのベベルカラー(SFXBevelColor)に基づいて自動的に設定されます。

デフォルト値: SFXBevelColor(SFXRGBColor(0x9F, 0x9F, 0x9F, 0x00), SFXRGBColor(0xC0, 0xC0, 0xC0, 0x00), SFXRGBColor(0x6C, 0x6C, 0x6C, 0x00))

参照

SFZTabControl::GetTabBevelColor | SFXBevelColor | SFXRGBColor


SFZTabControl::SetTabHeight
タブの高さを設定します。
[ public ]
Void SetTabHeight(
    SInt16 param   // 設定する値
);

解説

タブの高さを設定します。

デフォルト値: AEE_FONT_NORMAL フォントの高さ + 8

参照

SFZTabControl::GetTabHeight


SFZTabControl::CodeEnum
SFZTabControl クラスを表す定数です。
enum CodeEnum {
     CODE_TYPE = four_char_code('c', 't', 'a', 'b')
};
SFMTYPEDEFTYPE(CodeEnum)

参照

SFYResponder::GetType | SFYResponder::SetType