前のページ次のページ上に戻るホーム SophiaFramework UNIVERSE 5.0
SFZTextMenu
テキストメニューです。
#include <SFZTextMenu.h.hpp>
class SFZTextMenu : public SFYMenu;
SFMTYPEDEFRESPONDER(SFZTextMenu)

継承図

SFZTextMenu クラスの継承図

協調図

SFZTextMenu クラスの協調図

解説

SFZTextMenu クラスはテキスト形式のメニュー(テキストメニュー)を生成、制御、更新、破棄するためのクラスです。

テキストメニューには、ページ形式(デフォルト)とスクロール形式の 2 種類があります。

テキストメニューのデザインは、用意された様々な関数で変更可能です。

テキストや、絵文字、イメージをメニュー項目に設定できます。

以下は、テキストメニューを生成するためのコードです。

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

     // ウインドウを生成する
     _window = SFZWindow::NewInstance();
     _window->SetParent(GetThis());
     _window->SetRealBound(GetLocalBound());
     _window->SetVirtualBound(SFXRectangle(_window->GetVirtualBound()).SetHeight(640));
     _window->SetState(true, true, true, true);
     _window->SetBackgroundColor(SFXRGBColor(0xDD, 0xFF, 0xDD, 0x00));

     // テキストメニューを生成する
     SFZTextMenuSmp _textmenu = SFZTextMenu::NewInstance(&error);
     _textmenu->SetState(true, true, true, true);
     _textmenu->SetParent(_window);
     _textmenu->SetTitle("Text Menu");
     _textmenu->ToFront();

     SFXRectangle menuRect(30,95,165,135);  
     menuRect.SetHeight(_textmenu->GetTitleHeight() + 3 * _textmenu->GetItemHeight());
     _textmenu->SetRealBound(menuRect);

     _textmenu->AppendItem("Menu item 1"); 
     _textmenu->AppendItem("Menu item 2"); 
     _textmenu->AppendItem("Menu item 3"); 
	 
     // 3 番目のメニュー項目を無効にする
     _textmenu->SetItemEnable(2, false);

     // イベントハンドラに登録する	
     _textmenu->RegisterHandler(SFXEventRange(SFEVT_RESPONDER_RESULT, SFEVT_RESPONDER_RESULT, SFP16_BEGIN, SFP16_END), XANDLER_INTERNAL(OnTextMenu));
	 
     return;
}

XANDLER_IMPLEMENT_VOIDRESULT(newworld, OnTextMenu, invoker, reason, result)
{
     invoker->Terminate();
     if (reason == SFP16_RESULT_OK) {
          if (result == 0) {
          // 最初のメニュー項目が押されたときの処理
          }
          else if (result == 1) {
          // 2 番目のメニュー項目が押されたときの処理
          }
          else if (result == 2) {
          // 3 番目のメニュー項目が押されたときの処理
          }
     }

     return;
}

実行結果:

参照

テキストメニュー [SFZTextMenu] | SFYMenu | SFZGridMenu | SFZListBoxControl

メンバ

コンストラクタ/デストラクタ
SFZTextMenu( Void )
SFZTextMenu クラスのコンストラクタです。
~SFZTextMenu( Void )
SFZTextMenu クラスのデストラクタです。
パブリック関数
SFCError AppendItem( SFXPathConstRef path , UInt16 id )
AppendItem( SFXWideStringConstRef text , AVKType key , WChar keyIcon = 0 )
AppendItem( SFXWideStringConstRef text )
AppendItem( SFXPathConstRef path , UInt16 id , AVKType key , WChar keyIcon = 0 )
項目を追加します。
Void Clear( Void )
メニューからすべての項目を削除します。
SFXBevelColorConstRef GetBevelColor( Void )
メニューのベベルカラーを取得します。
SFXRGBColorConstRef GetDefaultItemBackColor( Void )
メニュー項目のデフォルトの背景色を取得します。
SFXRGBColorConstRef GetDefaultItemForeColor( Void )
メニュー項目のデフォルトの前景色を取得します。
AEEFont GetFont( Void )
フォントを取得します。
AVKType GetItemAccessKey( SInt32 index )
指定されたメニュー項目のアクセスキーを取得します。
SFXRGBColorConstRef GetItemBackColor( SInt32 index )
指定されたメニュー項目の背景色を設定します。
SInt32 GetItemCount( Void )
メニュー項目数を取得します。
Bool GetItemEnable( SInt32 index )
指定されたメニュー項目の有効状態を取得します。
SFXRGBColorConstRef GetItemForeColor( SInt32 index )
指定されたメニュー項目の前景色を取得します。
SInt16 GetItemHeight( Void )
メニュー項目の高さを取得します。
SFBImageSmpConstRef GetItemImage( SInt32 index )
指定されたメニュー項目の画像を取得します。
SFXMarginConstRef GetItemMargin( Void )
メニュー項目内のマージンを取得します。
SFZTextMenuSmp GetItemSubMenu( SInt32 index )
指定されたメニュー項目のサブメニューを取得します。
SFXWideStringConstRef GetItemText( SInt32 index )
指定されたメニュー項目のテキストを取得します。
MenuStyleEnum GetMenuStyle( Void )
メニュースタイルを取得します。
SFXRGBColorConstRef GetSelBackColor( Void )
選択されたメニュー項目の背景色を取得します。
SFXRGBColorConstRef GetSelForeColor( Void )
選択されたメニュー項目の前景色を取得します。
SInt32 GetSelect( Void )
選択されたメニュー項目の ID を取得します。
SFXWideStringConstRef GetTitle( Void )
メニュータイトルを取得します。
SFXRGBColorConstRef GetTitleBackColor( Void )
メニュータイトルの背景色を取得します。
SFXRGBColorConstRef GetTitleForeColor( Void )
メニュータイトルの前景色を取得します。
SInt16 GetTitleHeight( Void )
メニュータイトルの高さを取得します。
static
SFZTextMenuSmp
NewInstance( SFCErrorPtr exception = null )
新しいインスタンスを作成します。
Void RemoveItem( SInt32 index )
メニューから指定した項目を削除します。
Void SetBevelColor( SFXBevelColorConstRef param )
メニューのベベルカラーを設定します。
Void SetDefaultItemBackColor( SFXRGBColorConstRef param )
メニュー項目のデフォルトの背景色を設定します。
Void SetDefaultItemForeColor( SFXRGBColorConstRef param )
メニュー項目のデフォルトの前景色を設定します。
Void SetFont( AEEFont param )
フォントを設定します。
Void SetItemAccessKey( SInt32 index , AVKType key , WChar keyIcon = 0 )
指定されたメニュー項目にアクセスキーとキーアイコンを設定します。
SFCError SetItemBackColor( SInt32 index , SFXRGBColorConstRef param )
指定されたメニュー項目の背景色を設定します。
Void SetItemEnable( SInt32 index , Bool param )
指定されたメニュー項目の有効状態を設定します。
SFCError SetItemForeColor( SInt32 index , SFXRGBColorConstRef param )
指定されたメニュー項目の前景色を設定します。
Void SetItemHeight( SInt16 param )
メニュー項目の高さを設定します。
SFCError SetItemImage( SInt32 index , SFXPathConstRef path )
SetItemImage( SInt32 index , SFBImageSmpConstRef param )
SetItemImage( SInt32 index , SFXPathConstRef path , UInt16 id )
指定されたメニュー項目の画像を設定します。
Void SetItemMargin( SFXMarginConstRef param )
メニュー項目内のマージンを設定します。
Void SetItemSubMenu( SInt32 index , SFZTextMenuSmp subMenu )
指定されたメニュー項目にサブメニューを設定します。
SFCError SetItemText( SInt32 index , SFXPathConstRef index , UInt16 id )
SetItemText( SInt32 index , SFXWideStringConstRef param )
指定されたメニュー項目のテキストを設定します。
Void SetMenuStyle( MenuStyleEnum param )
メニュースタイルを設定します。
Void SetSelBackColor( SFXRGBColorConstRef param )
選択されたメニュー項目の背景色を設定します。
Void SetSelForeColor( SFXRGBColorConstRef param )
選択されたメニュー項目の前景色を設定します。
Void SetSelect( SInt32 param )
指定したメニュー項目を選択された状態に設定します。
SFCError SetTitle( SFXPathConstRef path , UInt16 id )
SetTitle( SFXWideStringConstRef param )
メニュータイトルを設定します。
Void SetTitleBackColor( SFXRGBColorConstRef param )
メニュータイトルの背景色を設定します。
Void SetTitleForeColor( SFXRGBColorConstRef param )
メニュータイトルの前景色を設定します。
Void SetTitleHeight( SInt16 param )
メニュータイトルの高さを設定します。
Void CancelTimer( Void ) (SFYMenu から継承)
メニューのタイマーをキャンセルします。
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 から継承)
最前面に位置する子レスポンダを取得します。
SFYDistributerPtr GetDistributer( Void ) (SFYResponder から継承)
配信エンジンを取得します。
AVKType GetEscapeKey( Void ) (SFYMenu から継承)
ESCAPE キーを取得します。
SFXRectangle GetGlobalBound( Void ) (SFYResponder から継承)
グローバル領域を取得します。
UInt32 GetID( Void ) (SFYResponder から継承)
ID を取得します。
SFXRectangle GetLocalBound( Void ) (SFYResponder から継承)
ローカル領域を取得します。
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 から継承)
自レスポンダが前面から数えて何番目に位置するかを取得します。
AVKType GetOperateKey( Void ) (SFYMenu から継承)
操作キーを取得します。
SFYResponderSmp GetParent( Void ) (SFYResponder から継承)
親レスポンダを取得します。
Bool GetPropertyTransparent( Void ) (SFYResponder から継承)
透過属性を取得します。
SFXRectangleConstRef GetRealBound( Void ) (SFYResponder から継承)
実領域を取得します。
VoidPtr GetReference( Void ) (SFYResponder から継承)
リファレンス値を取得します。
SFYRendererPtr GetRenderer( Void ) (SFYResponder から継承)
描画エンジンを取得します。
SFYResponderSmp GetRoot( Void ) (SFYResponder から継承)
ルートレスポンダを取得します。
AVKType GetSelectDownKey( Void ) (SFYMenu から継承)
DOWN キーを取得します。
AVKType GetSelectLeftKey( Void ) (SFYMenu から継承)
LEFT キーを取得します。
AVKType GetSelectRightKey( Void ) (SFYMenu から継承)
RIGHT キーを取得します。
AVKType GetSelectUpKey( Void ) (SFYMenu から継承)
UP キーを取得します。
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 RewindTimer( Void ) (SFYMenu から継承)
メニューが自動的に閉じるまでの時間を再設定します。
Void ScheduleTimer( UInt32 param ) (SFYMenu から継承)
指定した時間が経過すればメニューが自動的に閉じるようにスケジュールします。
Void SetBackgroundColor( SFXRGBColorConstRef param ) (SFYWidget から継承)
背景の色を設定します。
Void SetDistributer( SFYDistributerPtr param ) (SFYResponder から継承)
配信エンジンを設定します。
Void SetEscapeKey( AVKType param ) (SFYMenu から継承)
ESCAPE キーを設定します。
Void SetID( UInt32 param ) (SFYResponder から継承)
ID を設定します。
Void SetOperateKey( AVKType param ) (SFYMenu から継承)
操作キーを設定します。
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 SetSelectDownKey( AVKType param ) (SFYMenu から継承)
DOWN キーを設定します。
Void SetSelectLeftKey( AVKType param ) (SFYMenu から継承)
LEFT キーを設定します。
Void SetSelectRightKey( AVKType param ) (SFYMenu から継承)
RIGHT キーを設定します。
Void SetSelectUpKey( AVKType param ) (SFYMenu から継承)
UP キーを設定します。
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 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 HandleEscapeKey( Void )
ESCAPE キーが押されたときに実行される処理です。
Void HandleOperateKey( Void )
操作キーが押されたときに実行される処理です。
Void HandleRenderRequest( SFXGraphicsPtr graphics )
テキストメニューを描画します。
Void HandleSelectDownKey( Void )
DOWN キーが押されたときに実行される処理です。
Void HandleSelectLeftKey( Void )
LEFT キーが押されたときに実行される処理です。
Void HandleSelectRightKey( Void )
RIGHT キーが押されたときに実行される処理です。
Void HandleSelectUpKey( Void )
UP キーが押されたときに実行される処理です。
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 HandleBoundRequest( SFXRectanglePtr rectangle ) (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
SFZTextMenu クラスを表す定数です。
MenuStyleEnum
テキストメニューのスタイルを表す定数です。

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

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

SFZTextMenu::AppendItem
項目を追加します。
[ public ]
SFCError AppendItem(
    SFXPathConstRef path   // リソースファイルのパス
    UInt16 id              // テキスト オブジェクト ID
);
[ public ]
SFCError AppendItem(
    SFXPathConstRef path   // リソースファイルのパス
    UInt16 id              // テキスト オブジェクト ID
    AVKType key            // ダイレクトアクセスキー
    WChar keyIcon = 0      // キーアイコン
);
[ public ]
SFCError AppendItem(
    SFXWideStringConstRef text   // テキスト
);
[ public ]
SFCError AppendItem(
    SFXWideStringConstRef text   // テキスト
    AVKType key                  // ダイレクトアクセスキー
    WChar keyIcon = 0            // キーアイコン
);

解説

テキストメニューに項目を追加します。追加された項目はメニューの最後の項目となります。

参照

SFZTextMenu::RemoveItem | SFZTextMenu::Clear


SFZTextMenu::Clear
メニューからすべての項目を削除します。
[ public ]
Void Clear(Void);

解説

テキストメニューからすべての項目を削除します。

参照

SFZTextMenu::RemoveItem | SFZTextMenu::AppendItem


SFZTextMenu::GetBevelColor
メニューのベベルカラーを取得します。
[ public, const ]
SFXBevelColorConstRef GetBevelColor(Void);

戻り値

テキストメニューのベベルカラー(SFXBevelColor)。

参照

SFZTextMenu::SetBevelColor | SFXBevelColor


SFZTextMenu::GetDefaultItemBackColor
メニュー項目のデフォルトの背景色を取得します。
[ public, const ]
SFXRGBColorConstRef GetDefaultItemBackColor(Void);

参照

SFZTextMenu::SetDefaultItemBackColor


SFZTextMenu::GetDefaultItemForeColor
メニュー項目のデフォルトの前景色を取得します。
[ public, const ]
SFXRGBColorConstRef GetDefaultItemForeColor(Void);

参照

SFZTextMenu::SetDefaultItemForeColor


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

戻り値

テキストメニューのタイトルと項目のフォント。

参照

SFZTextMenu::SetFont


SFZTextMenu::GetItemAccessKey
指定されたメニュー項目のアクセスキーを取得します。
[ public, const ]
AVKType GetItemAccessKey(
    SInt32 index   // メニュー項目のインデックス
);

戻り値

指定されたメニュー項目のアクセスキー。アクセスキーが設定されていない場合、AVK_UNDEFINED。

参照

SFZTextMenu::SetItemAccessKey


SFZTextMenu::GetItemBackColor
指定されたメニュー項目の背景色を設定します。
[ public, const ]
SFXRGBColorConstRef GetItemBackColor(
    SInt32 index   // メニュー項目のインデックス
);

戻り値

メニュー項目の背景色 (SFXRGBColor)。

参照

SFZTextMenu::SetItemBackColor | SFXRGBColor


SFZTextMenu::GetItemCount
メニュー項目数を取得します。
[ public, const ]
SInt32 GetItemCount(Void);

戻り値

メニュー項目数。


SFZTextMenu::GetItemEnable
指定されたメニュー項目の有効状態を取得します。
[ public, const ]
Bool GetItemEnable(
    SInt32 index   // メニュー項目 ID
);

戻り値

  • true: 有効
  • false: 無効

参照

SFZTextMenu::SetItemEnable


SFZTextMenu::GetItemForeColor
指定されたメニュー項目の前景色を取得します。
[ public, const ]
SFXRGBColorConstRef GetItemForeColor(
    SInt32 index   // メニュー項目のインデックス
);

戻り値

SFZTextMenu::SetItemForeColor 関数によって設定されたメニュー項目のテキストを描画する前景色(SFXRGBColor)。

解説

[Caution] メニュー項目が無効に設定されていたときの前景色

SFZTextMenu::SetItemEnable 関数を使用してメニュー項目が無効に設定されているときは、 この関数によって取得される色でメニュー項目のテキストは描画されません。

このときは、 SFZTextMenu::SetItemBackColor 関数で設定された背景色の明度が 0x7E より大きい場合は背景色の明度を 0x33 だけ減算した色、 0x7E 以下の場合は背景色の明度を 0x33 を加算した色がメニュー項目の前景色になります。

色の明度とは、SFXRGBColor::GetBrightness 関数によって得られる値です。

参照

SFZTextMenu::SetItemForeColor | SFZTextMenu::SetItemEnable | SFXRGBColor::GetBrightness | SFXRGBColor


SFZTextMenu::GetItemHeight
メニュー項目の高さを取得します。
[ public, const ]
SInt16 GetItemHeight(Void);

戻り値

メニュー項目の高さ。

参照

SFZTextMenu::SetItemHeight


SFZTextMenu::GetItemImage
指定されたメニュー項目の画像を取得します。
[ public, const ]
SFBImageSmpConstRef GetItemImage(
    SInt32 index   // メニュー項目 ID
);

戻り値

指定したメニュー項目の画像。

参照

SFZTextMenu::SetItemImage


SFZTextMenu::GetItemMargin
メニュー項目内のマージンを取得します。
[ public, const ]
SFXMarginConstRef GetItemMargin(Void);

戻り値

メニュー項目内のマージン。

解説

メニュー項目とテキスト表示領域間のマージンを取得します。

テキストメニュー領域の中でこのマージン領域は SFZTextMenu::SetBevelColor 関数で設定されたベベルカラーで塗りつぶされます。

参照

SFZTextMenu::SetItemMargin | SFZTextMenu::GetBevelColor | SFXMargin | SFXBevelColor


SFZTextMenu::GetItemSubMenu
指定されたメニュー項目のサブメニューを取得します。
[ public ]
SFZTextMenuSmp GetItemSubMenu(
    SInt32 index   // メニュー項目 ID
);

戻り値

指定したメニュー項目のサブメニュー。サブメニューが設定されていない場合、null。

参照

SFZTextMenu::SetItemSubMenu


SFZTextMenu::GetItemText
指定されたメニュー項目のテキストを取得します。
[ public, const ]
SFXWideStringConstRef GetItemText(
    SInt32 index   // メニュー項目 ID
);

戻り値

指定したメニュー項目のテキスト。

参照

SFZTextMenu::SetItemText


SFZTextMenu::GetMenuStyle
メニュースタイルを取得します。
[ public, const ]
MenuStyleEnum GetMenuStyle(Void);

戻り値

  • PAGE_STYLE: ページング スタイル
  • SCROLLABLE_STYLE: スクロールスタイル

参照

SFZTextMenu::SetMenuStyle | SFZTextMenu::MenuStyleEnum


SFZTextMenu::GetSelBackColor
選択されたメニュー項目の背景色を取得します。
[ public, const ]
SFXRGBColorConstRef GetSelBackColor(Void);

戻り値

選択された項目の背景色(SFXRGBColor)。

参照

SFZTextMenu::SetSelBackColor | SFXRGBColor


SFZTextMenu::GetSelForeColor
選択されたメニュー項目の前景色を取得します。
[ public, const ]
SFXRGBColorConstRef GetSelForeColor(Void);

戻り値

選択された項目のテキストを描画する前景色(SFXRGBColor)。

参照

SFZTextMenu::SetSelForeColor | SFXRGBColor


SFZTextMenu::GetSelect
選択されたメニュー項目の ID を取得します。
[ public, const ]
SInt32 GetSelect(Void);

戻り値

選択されたメニュー項目の ID。

参照

SFZTextMenu::SetSelect


SFZTextMenu::GetTitle
メニュータイトルを取得します。
[ public, const ]
SFXWideStringConstRef GetTitle(Void);

戻り値

メニュータイトル。

参照

SFZTextMenu::SetTitle


SFZTextMenu::GetTitleBackColor
メニュータイトルの背景色を取得します。
[ public, const ]
SFXRGBColorConstRef GetTitleBackColor(Void);

戻り値

テキストメニューのタイトルの矩形領域を塗り潰す背景色(SFXRGBColor)。

参照

SFZTextMenu::SetTitleBackColor | SFXRGBColor


SFZTextMenu::GetTitleForeColor
メニュータイトルの前景色を取得します。
[ public, const ]
SFXRGBColorConstRef GetTitleForeColor(Void);

戻り値

テキストメニューのタイトルのテキストを描画する前景色(SFXRGBColor)。

参照

SFZTextMenu::SetTitleForeColor | SFXRGBColor


SFZTextMenu::GetTitleHeight
メニュータイトルの高さを取得します。
[ public, const ]
SInt16 GetTitleHeight(Void);

戻り値

Height of the menu title.

参照

SFZTextMenu::SetTitleHeight


SFZTextMenu::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]


SFZTextMenu::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]


SFZTextMenu::HandleEscapeKey
ESCAPE キーが押されたときに実行される処理です。
[ protected, virtual ]
Void HandleEscapeKey(Void);

解説

この関数は、SFYMenu::SetEscapeKey 関数によって設定された ESCAPE キーを受信したときに呼び出されます。

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

デフォルトの実装では、現在のメニューを終了し、もしあれば親メニューに復帰します。