![]() ![]() ![]()
|
BREW C++ ライブラリ & GUI フレームワーク & XML ミドルウェア : SophiaFramework UNIVERSE 5.0 |
#include <SFYButtonControl.h.hpp>
class SFYButtonControl : public SFYControl;
SFMTYPEDEFRESPONDER(SFYButtonControl)


SFYButtonControl は各種ボタンコントロールを実装するための起点となるクラスです。
このクラスは、ボタンと影の描画機能と操作キーの管理を実装し、いくつかの仮想関数のデフォルトの動作も実装します。
表 181. 仮想関数名とデフォルトの動作
| 仮想関数名 | デフォルトの動作 | オーバーライト |
|---|---|---|
| SFYButtonControl::HandleOperateKey | − | 任意 |
| SFYButtonControl::HandleOperateKeyPress | − | 任意 |
| SFYButtonControl::HandleOperateKeyRelease | イベントを送信※1 | 任意 |
| SFYWidget::HandleBoundRequest | − | 推奨 |
| SFYWidget::HandleBoundOptimize | − | 推奨 |
| SFYControl::HandleBoundReal | 仮想領域を調整※2 | 任意 |
| SFYWidget::HandleBoundVirtual | − | 任意 |
| SFYWidget::HandleBoundGlobal | − | 任意 |
| SFYWidget::HandleRenderRequest | − | 必須 |
![]() |
注釈 |
|---|---|
|
※1.InvokeForward(SFXEvent(SFEVT_RESPONDER_RESULT, SFP16_RESULT_OK, GetCurrentValue()), false) を実行します。 ※2.SetVirtualBound(SFXRectangle(SFXGrid::ZeroInstance(), GetRealBound().GetSize())) を実行します。 | |
| コンストラクタ/デストラクタ |
|---|
|
SFYButtonControl( Void ) SFYButtonControl クラスのコンストラクタです。
|
|
~SFYButtonControl( Void ) SFYButtonControl クラスのデストラクタです。
|
| パブリック関数 | |
|---|---|
| SFXBevelColorConstRef |
GetButtonColor( Void ) フォーカス以外の状態にあるときのボタンコントロールを描画するベベルカラーを取得します。
|
| SFXBevelColorConstRef |
GetFocusColor( Void ) フォーカス状態にあるときのボタンコントロールを描画するベベルカラーを取得します。
|
| AVKType |
GetOperateKey( Void ) ボタンの操作キーを取得します。
|
| SFXRGBColorConstRef |
GetShadowColor( Void ) 影の色を取得します。
|
| Bool |
GetStatePress( Void ) ボタンの押下状態を取得します。
|
| Void |
SetButtonColor(
SFXBevelColorConstRef param
) フォーカス以外の状態にあるときのボタンコントロールを描画するベベルカラーを設定します。
|
| Void |
SetFocusColor(
SFXBevelColorConstRef param
) フォーカス状態にあるときのボタンコントロールを描画するベベルカラーを設定します。
|
| Void |
SetOperateKey(
AVKType param
) ボタンの操作キーを設定します。
|
| Void |
SetShadowColor(
SFXRGBColorConstRef param
) 影の色を設定します。
|
| Void |
SetStatePress(
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 |
GetMaximumValue( Void )
(SFYControl から継承)
コントロールの最大値を取得します。
|
| 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 |
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 |
DrawButton(
SFXGraphicsPtr graphics
, SFXRectangleConstRef rectangle
) ボタンを描画します。
|
| SFXRectangle |
DrawShadow(
SFXGraphicsPtr graphics
, SFXRectangleConstRef rectangle
) 影を描画します。
|
| static SFXMarginConstRef |
GetButtonMargin( Void ) ボタンコントロールのマージンを取得します。
|
| static SFXGridConstRef |
GetPressOffset( Void ) プレス オフセットを取得します。
|
| static SFXMarginConstRef |
GetShadowMargin( Void ) ボタンコントロールの影部分のマージンを取得します。
|
| Void |
HandleOperateKey( Void ) キーイベントを処理します。
|
| Void |
HandleOperateKeyPress( Void ) キー押下イベントを処理します。
|
| Void |
HandleOperateKeyRelease( Void ) キー解放イベントを処理します。
|
| 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 SFYButtonControl クラスを表す定数です。
|
[ protected, explicit ] SFYButtonControl(Void);
[ protected, virtual ] virtual ~SFYButtonControl(Void);
[ protected, const ] Void DrawButton( SFXGraphicsPtr graphics // グラフィックスオブジェクト SFXRectangleConstRef rectangle // 描画する座標 );
独自の描画処理を行う場合に、ボタンを描画するために利用します。
[ protected, const ] SFXRectangle DrawShadow( SFXGraphicsPtr graphics // グラフィックスオブジェクト SFXRectangleConstRef rectangle // 描画する座標 );
独自の描画処理を行う場合に、影を描画するために利用します。
[ public, const ] SFXBevelColorConstRef GetButtonColor(Void);
SFYButtonControl::SetButtonColor | SFYButtonControl::SetFocusColor | SFXRGBColor::GetBrightness | SFXBevelColor | SFXRGBColor
[ protected, static ] SFXMarginConstRef GetButtonMargin(Void);
ボタンコントロールのマージン。
ボタンコントロールのマージンは、ボタンコントロールの影部分を除いたボタンコントロール領域の左端から 2 ピクセル、上端から 2 ピクセル、右端から 2 ピクセル、下端から 2 ピクセルのマージン領域です。
具体的には、ボタンコントロールに描画されるテキストや画像の領域を囲む余白部分です。
![]() |
ボタンコントロールの影部分 |
|---|---|
|
SFYButtonControl::GetShadowMargin 関数で取得できるボタンコントロールのマージン領域です。 ボタンコントロールの影部分は、ボタンコントロール領域の左端から 0 ピクセル、上端から 0 ピクセル、右端から 1 ピクセル、下端から 1 ピクセルのマージン領域です。 具体的には、ボタンコントロールの影が描画される部分です。ボタンコントロールを押していないときは、 ボタンコントロール領域の右端の 1 ピクセルの直線と下端の 1 ピクセルの直線が影部分となります。 逆にボタンコントロール押下時は、ボタンコントロール領域の左端の 1 ピクセルの直線と上端の 1 ピクセルの直線が影部分となります。 | |
[ public, const ] SFXBevelColorConstRef GetFocusColor(Void);
[ public, const ] AVKType GetOperateKey(Void);
[ protected, static ] SFXGridConstRef GetPressOffset(Void);
ボタンコントロールのプレス オフセットの値。
プレス オフセットとは、ボタンコントロール押下時に影を除いたボタンコントロールの領域が移動するオフセット値です。オフセット値は X 座標方向に 1 ピクセル、 Y 座標方向に 1 ピクセルです。
逆にボタンコントロール リリース時は、影を除いたボタンコントロール領域がこのオフセット値も分だけ元に戻ります。X 座標方向に -1 ピクセル、 Y 座標方向に -1 ピクセルだけ移動します。
[ public, const ] SFXRGBColorConstRef GetShadowColor(Void);
[ protected, static ] SFXMarginConstRef GetShadowMargin(Void);
ボタンコントロールの影部分のマージン。
ボタンコントロールの影部分は、ボタンコントロール領域の左端から 0 ピクセル、上端から 0 ピクセル、右端から 1 ピクセル、下端から 1 ピクセルのマージン領域です。
具体的には、ボタンコントロールの影が描画される部分です。ボタンコントロールを押していないときは、 ボタンコントロール領域の右端の 1 ピクセルの直線と下端の 1 ピクセルの直線が影部分となります。
逆にボタンコントロール押下時は、ボタンコントロール領域の左端の 1 ピクセルの直線と上端の 1 ピクセルの直線が影部分となります。
[ public, const ] Bool GetStatePress(Void);
[ protected, virtual ] Void HandleOperateKey(Void);
SFEVT_KEY イベントを受信し、SFYButtonControl::SetOperateKey 関数で設定したキーと一致したときに呼び出される関数です。
独自のキーイベント処理を行いたい場合は、この関数をオーバーライドします。
デフォルトの実装は何もしません。
[ protected, virtual ] Void HandleOperateKeyPress(Void);
SFEVT_KEY_PRESS イベントを受信し、SFYButtonControl::SetOperateKey 関数で設定したキーと一致したときに呼び出される関数です。
独自のキー押下イベント処理を行いたい場合は、この関数をオーバーライドします。
デフォルトの実装は何もしません。
[ protected, virtual ] Void HandleOperateKeyRelease(Void);
SFEVT_KEY_RELEASE イベントを受信し、SFYButtonControl::SetOperateKey 関数で設定したキーと一致したときに呼び出される関数です。
独自のキー解放イベント処理を行いたい場合は、この関数をオーバーライドします。
デフォルトの実装は、(SFEVT_RESPONDER_RESULT, SFP16_RESULT_OK) イベントを送信します。
[ public ] Void SetButtonColor( SFXBevelColorConstRef param // 設定する値 );
フォーカス以外の状態にあるときのボタンコントロールを描画するベベルカラー(SFXBevelColor)を設定します。
デフォルト値: SFXBevelColor(SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00), SFXRGBColor(0xDD, 0xDD, 0xDD, 0x00), SFXRGBColor(0x88, 0x88, 0x88, 0x00))
ボタンコントロールが非活性状態にあるとき、ライト部分とダーク部分はベベルカラー(SFXBevelColor)のベース部分の色になります。 このとき、ボタンコントロールは平面的に描画されます。
![]() |
フォーカス状態にあるときのボタンコントロールの描画 |
|---|---|
ボタンコントロールは、フォーカス状態にあるときは SFYButtonControl::SetFocusColor 関数で設定したベベルカラーで描画されます。 | |
SFYButtonControl::GetButtonColor | SFYButtonControl::SetFocusColor | SFXRGBColor::GetBrightness | SFXBevelColor | SFXRGBColor
[ public ] Void SetFocusColor( SFXBevelColorConstRef param // 設定する値 );
フォーカス状態にあるときのボタンコントロールを描画するベベルカラー(SFXBevelColor)を設定します。
デフォルト値: SFXBevelColor(SFXRGBColor(0xCC, 0xCC, 0xCC, 0x00), SFXRGBColor(0xAA, 0xAA, 0xAA, 0x00), SFXRGBColor(0x55, 0x55, 0x55, 0x00))
フォーカス状態にあるときのボタンコントロールを描画するベベルカラー(SFXBevelColor)のベース部分の色は、 ボタンコントロールが SFYButtonControl::SetOperateKey 関数で設定される操作キーによって押下されている時、 ベース部分の色の明度の値に応じて以下のように変化します。
ベース部分の色の明度が 0x7E より大きい場合はベース部分の色のの RGB 値からそれぞれ 0x11 を減算した色、 0x7E 以下の場合はベース部分の色の RGB 値にそれぞれ 0x11 を加算した色ではベース部分は描画されます。
色の明度とは、SFXRGBColor::GetBrightness 関数によって得られる値です。
![]() |
フォーカス以外の状態にあるときのボタンコントロールの描画 |
|---|---|
ボタンコントロールは、フォーカス以外の状態にあるときは SFYButtonControl::SetButtonColor 関数で設定したベベルカラーで描画されます。 | |
SFYButtonControl::GetFocusColor | SFYButtonControl::SetButtonColor | SFYButtonControl::SetOperateKey | SFXRGBColor::GetBrightness | SFXBevelColor | SFXRGBColor
キーイベント受信時にどのキーでボタンの操作を行うかを設定します。
デフォルトの値は AVK_SELECT です。
[ public ] Void SetShadowColor( SFXRGBColorConstRef param // 設定する値 );
ボタンコントロールの影を描画する色(SFXRGBColor)を設定します。
デフォルト値: SFXRGBColor(0x00, 0x00, 0x00, 0x00)
ボタンコントロールが非活性状態にあるとき、 影の色の明度が 0x7E より大きい場合は影の色の RGB 値からそれぞれ 0x44 を減算した色、 0x7E 以下の場合は影の色の RGB 値にそれぞれ 0x44 を加算した色で影は描画されます。
色の明度とは、SFXRGBColor::GetBrightness 関数によって得られる値です。
ボタンコントロールがフォーカス状態にあり、 SFYButtonControl::SetOperateKey 関数で設定される操作キーによって押下されている時は上辺と左辺、 押下されていない時は下辺と右辺にそれぞれ影が描画されます。
true: ドロップダウンの状態(押されたとき) false: それ以外の状態
enum CodeEnum {
CODE_TYPE = four_char_code('.', 'b', 't', 'n')
};
SFMTYPEDEFTYPE(CodeEnum)
|
Copyright (C) 2002 - 2009 Sophia Cradle Incorporated All Rights Reserved. |
![]() ![]() ![]()
|