SophiaFramework UNIVERSE 5.3 |
SFZGridMenu is a responder to create, control, update, and destroy a menu(grid menu) in matrix format.
Each cell of a grid menu has the same size, which is automatically set based on the size of real region and the number of rows and colums.
The design of a grid menu can be customized using its various APIs.
A text or an image can be set to grid menu's item.
To append an item, call the SFZGridMenu::AppendItem function. To delete an item, call the SFZGridMenu::RemoveItem function. When the SFZGridMenu::Clear function is called, all items will be removed.
The selection key is set with the SFYMenu::SetSelectUpKey / SFYMenu::SetSelectDownKey / SFYMenu::SetSelectRightKey / SFYMenu::SetSelectLeftKey functions. By default, selection keys are set to the UP key, the DOWN key, the RIGHT key, the LEFT key respectively.
In the default implementation, the grid menu[SFZGridMenu] will receive the following result events[SFEVT_RESPONDER_RESULT].
The developer can register handlers for these events.
If no handler is registered, the default handler will be booted up when one of the above result events is received. The default handler only closes the menu.
The operation key of the menu is set with the SFYMenu::SetOperateKey function. By default, the operation key is set to the SELECT key.
The access key is set with the SFZGridMenu::SetItemAccessKey function.
The ESCAPE key is set with the SFYMenu::SetEscapeKey function. By default, the ESCAPE key is set to the CLEAR key.
Note | |
---|---|
The timer processing callback scheduled with the SFYMenu::ScheduleTimer function will be canceled automatically when the operation key of the menu or the ESCAPE key is pressed. |
Reference: Result Event[SFEVT_RESPONDER_RESULT] | SFZGridMenu::HandleOperateKey | SFZGridMenu::HandleSelectUpKey | SFZGridMenu::HandleSelectDownKey | SFZGridMenu::HandleSelectRightKey | SFZGridMenu::HandleSelectLeftKey
The code to use a grid menu is as follows:
Note | |
---|---|
To simplify the code, error handling is omitted here. |
Void USRApplication::Main(Void) { SFCError error; // create the window _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)); // create grid menu SFZGridMenuSmp _gridmenu = SFZGridMenu::NewInstance(&error); // register the result handler which means that item is selected _gridmenu->RegisterHandler(SFXEventRange(SFEVT_RESPONDER_RESULT, SFEVT_RESPONDER_RESULT, SFP16_BEGIN, SFP16_END), XANDLER_INTERNAL(OnGridMenu)); _gridmenu->SetRealBound(GetLocalBound()); _gridmenu->SetState(true, true, true, true); _gridmenu->SetParent(_window); _gridmenu->SetRowCol(4, 3); _gridmenu->SetTitle("Grid Menu"); _gridmenu->SetTitleForeColor(SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00)); _gridmenu->SetTitleBackColor(SFXRGBColor(0x00, 0xBF, 0xF3, 0x00)); _gridmenu->SetBackgroundColor(SFXRGBColor(0x00, 0x00, 0x00, 0x00)); SFBShellSmp shell; SFBImageSmp image; SFBImageSmp image1; shell = SFBShell::GetInstance(); SInt16 i; for (i = 0; i < 12; ++i) { image = shell->LoadResImage(NEWWORLD_RES_FILE, IDI_OBJECT_5001 + i); image1 = shell->LoadResImage(MENU_RES_FILE, IDI_OBJECT_5001 + i); _gridmenu->AppendItem(SFXWideString::Format("%d", i), image, image1); } _gridmenu->ShowItemName(true); return; } XANDLER_IMPLEMENT_VOIDRESULT(USRApplication, OnGridMenu, invoker, reason, result) { // grid menu will be passed via invoker // P16 value of result event will be passed via reason switch (reason) { case SFP16_RESULT_OK: // when the operation key is pressed // the index of the selected item will be passed via the result argument if (result == 0) { // when 1st item is selected ... } else if (result == 1) { // when 2nd item is selected ... } else if (result == 2) { // when 3rd item is selected ... } ... break; case SFP16_RESULT_ESCAPE: // when the ESCAPE key is pressed or the time scheduled with ScheduleTimer() elapses // 0 will be passed via the result argument // close grid menu invoker->Terminate(); // or "_gridmenu->Terminate();" break; } return; }
Execution result:
Grid Menu [SFZGridMenu] | SFYMenu | SFZTextMenu | SFZFlexListMenu
Constructor/Destructor |
---|
SFZGridMenu( Void ) Constructor of the SFZGridMenu class.
|
~SFZGridMenu( Void ) Distructor of SFZGridMenu class.
|
Public Functions | |
---|---|
SFCError |
AppendItem(
SFXPathConstRef path
, UInt16 textId
) [DEPRECATED]Append an item to this grid menu. Use the InsertLast() function.
|
SFCError |
AppendItem(
SFXPathConstRef path
, UInt16 textId
, AVKType key
) [DEPRECATED]Append an item to this grid menu. Use the InsertLast() function.
|
SFCError |
AppendItem(
SFXPathConstRef path
, UInt16 textId
, UInt16 imageId
, UInt16 selImageId
) [DEPRECATED]Append an item to this grid menu. Use the InsertLast() function.
|
SFCError |
AppendItem(
SFXPathConstRef path
, UInt16 textId
, UInt16 imageId
, UInt16 selImageId
, AVKType key
) [DEPRECATED]Append an item to this grid menu. Use the InsertLast() function.
|
SFCError |
AppendItem(
SFXWideStringConstRef text
) [DEPRECATED]Append an item to this grid menu. Use the InsertLast() function.
|
SFCError |
AppendItem(
SFXWideStringConstRef text
, AVKType key
) [DEPRECATED]Append an item to this grid menu. Use the InsertLast() function.
|
SFCError |
AppendItem(
SFXWideStringConstRef text
, SFBImageSmpConstRef image
, SFBImageSmpConstRef selectedImage
) [DEPRECATED]Append an item to this grid menu. Use the InsertLast() function.
|
SFCError |
AppendItem(
SFXWideStringConstRef text
, SFBImageSmpConstRef image
, SFBImageSmpConstRef selectedImage
, AVKType key
) [DEPRECATED]Append an item to this grid menu. Use the InsertLast() function.
|
Void |
Clear( Void ) Delete all items from this grid menu.
|
SInt16 |
GetColNumber( Void ) Get the number of columns of this grid menu.
|
SFXRGBColorConstRef |
GetDefaultItemBackColor( Void ) Get the default background color of unselected item of this grid menu.
|
SFXRGBColorConstRef |
GetDefaultItemForeColor( Void ) Get the default foreground color of unselected item of this grid menu.
|
AEEFont |
GetFont( Void ) Get the font of this grid menu.
|
AVKType |
GetItemAccessKey(
SInt16 index
) Get the access key of the specified item of this grid menu.
|
SFXRGBColorConstRef |
GetItemBackColor(
SInt16 index
) Get the background color of the specified unselected item of this grid menu.
|
SInt16 |
GetItemCount( Void ) Get the number of items of this grid menu.
|
SFXRGBColorConstRef |
GetItemForeColor(
SInt16 index
) Get the foreground color of unselected item of this grid menu.
|
SFBImageSmpConstRef |
GetItemImage(
SInt16 index
) Get the grid item image.
|
SFBImageSmpConstRef |
GetItemSelImage(
SInt16 index
) Get the grid item selected image.
|
SFXWideStringConstRef |
GetItemText(
SInt16 index
) Get the grid item text.
|
SInt16 |
GetPadding( Void ) Get the padding size of this grid menu.
|
SInt16 |
GetRowNumber( Void ) Get the number of rows of this grid menu.
|
SFXRGBColorConstRef |
GetSelBackColor( Void ) Get the background color of selected item of this grid menu.
|
SFXRGBColorConstRef |
GetSelBorderColor( Void ) Get the border color of currently selected item of this grid menu.
|
SFXRGBColorConstRef |
GetSelForeColor( Void ) Get the foreground color of selected item of this grid menu.
|
SInt16 |
GetSelect( Void ) Get the index of currently selected item of this grid menu.
|
SFXWideStringConstRef |
GetTitle( Void ) Get the menu title of this grid menu.
|
SFXRGBColorConstRef |
GetTitleBackColor( Void ) Get the background color of menu title of this grid menu.
|
SFXRGBColorConstRef |
GetTitleForeColor( Void ) Get the foreground color of menu title of this grid menu.
|
SInt16 |
GetTitleHeight( Void ) Get the height of menu title of this grid menu.
|
SFCError |
Insert(
SInt32 index
, SFXPathConstRef path
, UInt16 textId
) Insert the specified item before the specified index.
|
SFCError |
Insert(
SInt32 index
, SFXPathConstRef path
, UInt16 textId
, AVKType key
) Insert the specified item before the specified index.
|
SFCError |
Insert(
SInt32 index
, SFXPathConstRef path
, UInt16 textId
, UInt16 imageId
, UInt16 selImageId
) Insert the specified item before the specified index.
|
SFCError |
Insert(
SInt32 index
, SFXPathConstRef path
, UInt16 textId
, UInt16 imageId
, UInt16 selImageId
, AVKType key
) Insert the specified item before the specified index.
|
SFCError |
Insert(
SInt32 index
, SFXWideStringConstRef text
) Insert the specified item before the specified index.
|
SFCError |
Insert(
SInt32 index
, SFXWideStringConstRef text
, AVKType key
) Insert the specified item before the specified index.
|
SFCError |
Insert(
SInt32 index
, SFXWideStringConstRef text
, SFBImageSmpConstRef image
, SFBImageSmpConstRef selectedImage
) Insert the specified item before the specified index.
|
SFCError |
Insert(
SInt32 index
, SFXWideStringConstRef text
, SFBImageSmpConstRef image
, SFBImageSmpConstRef selectedImage
, AVKType key
) Insert the specified item before the specified index.
|
SFCError |
InsertFirst(
SFXPathConstRef path
, UInt16 textId
) Insert the specified item at the head.
|
SFCError |
InsertFirst(
SFXPathConstRef path
, UInt16 textId
, AVKType key
) Insert the specified item at the head.
|
SFCError |
InsertFirst(
SFXPathConstRef path
, UInt16 textId
, UInt16 imageId
, UInt16 selImageId
) Insert the specified item at the head.
|
SFCError |
InsertFirst(
SFXPathConstRef path
, UInt16 textId
, UInt16 imageId
, UInt16 selImageId
, AVKType key
) Insert the specified item at the head.
|
SFCError |
InsertFirst(
SFXWideStringConstRef text
) Insert the specified item at the head.
|
SFCError |
InsertFirst(
SFXWideStringConstRef text
, AVKType key
) Insert the specified item at the head.
|
SFCError |
InsertFirst(
SFXWideStringConstRef text
, SFBImageSmpConstRef image
, SFBImageSmpConstRef selectedImage
) Insert the specified item at the head.
|
SFCError |
InsertFirst(
SFXWideStringConstRef text
, SFBImageSmpConstRef image
, SFBImageSmpConstRef selectedImage
, AVKType key
) Insert the specified item at the head.
|
SFCError |
InsertLast(
SFXPathConstRef path
, UInt16 textId
) Insert the specified item at the tail.
|
SFCError |
InsertLast(
SFXPathConstRef path
, UInt16 textId
, AVKType key
) Insert the specified item at the tail.
|
SFCError |
InsertLast(
SFXPathConstRef path
, UInt16 textId
, UInt16 imageId
, UInt16 selImageId
) Insert the specified item at the tail.
|
SFCError |
InsertLast(
SFXPathConstRef path
, UInt16 textId
, UInt16 imageId
, UInt16 selImageId
, AVKType key
) Insert the specified item at the tail.
|
SFCError |
InsertLast(
SFXWideStringConstRef text
) Insert the specified item at the tail.
|
SFCError |
InsertLast(
SFXWideStringConstRef text
, AVKType key
) Insert the specified item at the tail.
|
SFCError |
InsertLast(
SFXWideStringConstRef text
, SFBImageSmpConstRef image
, SFBImageSmpConstRef selectedImage
) Insert the specified item at the tail.
|
SFCError |
InsertLast(
SFXWideStringConstRef text
, SFBImageSmpConstRef image
, SFBImageSmpConstRef selectedImage
, AVKType key
) Insert the specified item at the tail.
|
static SFZGridMenuSmp |
NewInstance(
SFCErrorPtr exception = null
) Create a new instance of this responder class.
|
Void |
Remove(
SInt32 index
) Remove specified items from this grid menu.
|
Void |
Remove(
SInt32 begin
, SInt32 end
) Remove specified items from this grid menu.
|
Void |
RemoveFirst( Void ) Remove the first item from this grid menu.
|
Void |
RemoveItem(
SInt16 index
) [DEPRECATED]Remove the specified item from this grid menu. Use the Remove() function.
|
Void |
RemoveLast( Void ) Remove the last item from this grid menu.
|
Void |
SetDefaultItemBackColor(
SFXRGBColorConstRef param
) Set the default background color of unselected item of this grid menu to the specified value.
|
Void |
SetDefaultItemForeColor(
SFXRGBColorConstRef param
) Set the default foreground color of unselected item of this grid menu to the specified value.
|
Void |
SetDrawItemText(
Bool param
)
Set the "draw-item" flag indicating whether or not to draw the text of item of this grid menu to the specified value.
|
Void |
SetDrawSelBorder(
Bool param
)
Set the "draw-border" flag indicating whether or not to draw the border of selected item of this grid menu to the specified value.
|
Void |
SetFont(
AEEFont param
) Set the font of this grid menu to the specified value.
|
SFCError |
SetItemAccessKey(
SInt16 index
, AVKType key
) Set the access key of the specified item of this grid menu to the specified value.
|
SFCError |
SetItemBackColor(
SInt16 index
, SFXRGBColorConstRef param
) Set the background color of the specified unselected item of this grid menu to the specified value.
|
SFCError |
SetItemForeColor(
SInt16 index
, SFXRGBColorConstRef param
)
Set the foreground color of the specified unselected item of this grid menu to the specified value.
|
SFCError |
SetItemImage(
SInt16 index
, SFXPathConstRef path
) Set the image of the specified grid item to the specified value.
|
SFCError |
SetItemImage(
SInt16 index
, SFXPathConstRef path
, UInt16 id
) Set the image of the specified grid item to the specified value.
|
SFCError |
SetItemImage(
SInt16 index
, SFBImageSmpConstRef param
) Set the image of the specified grid item to the specified value.
|
SFCError |
SetItemSelImage(
SInt16 index
, SFXPathConstRef path
) Set the image of the specified selected grid item to the specified value.
|
SFCError |
SetItemSelImage(
SInt16 index
, SFXPathConstRef path
, UInt16 id
) Set the image of the specified selected grid item to the specified value.
|
SFCError |
SetItemSelImage(
SInt16 index
, SFBImageSmpConstRef param
) Set the image of the specified selected grid item to the specified value.
|
SFCError |
SetItemText(
SInt16 index
, SFXPathConstRef path
, UInt16 id
) Set the text of the specified grid item to the specified value.
|
SFCError |
SetItemText(
SInt16 index
, SFXWideStringConstRef param
) Set the text of the specified grid item to the specified value.
|
Void |
SetPadding(
SInt16 param
) Set the padding size of this grid menu to the specified value. [pixels]
|
Void |
SetRowCol(
SInt16 row
, SInt16 col
) Set the numbers of rows and columns of this grid menu to specified values.
|
Void |
SetSelBackColor(
SFXRGBColorConstRef param
) Set the background color of selected item of this grid menu to the specified value.
|
Void |
SetSelBorderColor(
SFXRGBColorConstRef param
) Set the border color of currently selected item of this grid menu to the specified value.
|
Void |
SetSelForeColor(
SFXRGBColorConstRef param
) Set the foreground color of selected item of this grid menu to the specified value.
|
Void |
SetSelect(
SInt16 param
) Set the index of currently selected item of this grid menu to the specified value.
|
SFCError |
SetTitle(
SFXPathConstRef path
, UInt16 id
) Set the menu title of this grid menu to the specified value.
|
SFCError |
SetTitle(
SFXWideStringConstRef param
) Set the menu title of this grid menu to the specified value.
|
Void |
SetTitleBackColor(
SFXRGBColorConstRef param
) Set the background color of menu title of this grid menu to the specified value.
|
Void |
SetTitleForeColor(
SFXRGBColorConstRef param
) Set the foreground color of menu title of this grid menu to the specified value.
|
Void |
SetTitleHeight(
SInt16 param
) Set the height of menu title of this grid menu to the specified value. [pixels]
|
Void |
CancelTimer( Void )
(inherits from SFYMenu)
Cancel the timer of this menu.
|
Void |
ClearHandler( Void )
(inherits from SFYResponder)
Unregister all handlers from this responder.
|
Void |
ClearTracer( Void )
(inherits from SFYResponder)
Unregister all dispatching rules from the tracer of this responder.
|
SFCError |
Distribute(
SFXEventConstRef event
, BoolPtr result = null
)
(inherits from SFYResponder)
Distribute the specified event.
|
SFXRGBColorConstRef |
GetBackgroundColor( Void )
(inherits from SFYWidget)
Get the background color.
|
SFYResponderSmp |
GetChildBack( Void )
(inherits from SFYResponder)
Get the backmost child responder of this responder,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildBack(
Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the backmost child responder of this responder,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildBack(
UInt32 id
)
(inherits from SFYResponder)
Get the backmost child responder of this responder,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildBack(
UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the backmost child responder of this responder,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildBackward(
SInt32 index
)
(inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildBackward(
SInt32 index
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildBackward(
SInt32 index
, UInt32 id
)
(inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildBackward(
SInt32 index
, UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side,
which matches the specified search condition.
|
SInt32 |
GetChildCount( Void )
(inherits from SFYResponder)
Get the number of child responders of this responder,
which match the specified search condition.
|
SInt32 |
GetChildCount(
Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the number of child responders of this responder,
which match the specified search condition.
|
SInt32 |
GetChildCount(
UInt32 id
)
(inherits from SFYResponder)
Get the number of child responders of this responder,
which match the specified search condition.
|
SInt32 |
GetChildCount(
UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the number of child responders of this responder,
which match the specified search condition.
|
SFYResponderSmp |
GetChildForward(
SInt32 index
)
(inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildForward(
SInt32 index
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildForward(
SInt32 index
, UInt32 id
)
(inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildForward(
SInt32 index
, UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildFront( Void )
(inherits from SFYResponder)
Get the foremost child responder of this responder,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildFront(
Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the foremost child responder of this responder,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildFront(
UInt32 id
)
(inherits from SFYResponder)
Get the foremost child responder of this responder,
which matches the specified search condition.
|
SFYResponderSmp |
GetChildFront(
UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the foremost child responder of this responder,
which matches the specified search condition.
|
SFYDistributerPtr |
GetDistributer( Void )
(inherits from SFYResponder)
Get the distributer bound with this responder.
|
AVKType |
GetEscapeKey( Void )
(inherits from SFYMenu)
Get the ESCAPE key of this menu.
|
SFYResponderSmp |
GetFrame( Void )
(inherits from SFYResponder)
Get the frame which has been attached to this responder.
|
SFXRectangle |
GetGlobalBound( Void )
(inherits from SFYResponder)
Get the globle region of this responder.
|
UInt32 |
GetID( Void )
(inherits from SFYResponder)
Get the ID of this responder instance.
|
SFXRectangle |
GetLocalBound( Void )
(inherits from SFYResponder)
Get the local region of this responder.
|
SInt32 |
GetNthBackward( Void )
(inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders,
which match the specified search condition.
|
SInt32 |
GetNthBackward(
Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders,
which match the specified search condition.
|
SInt32 |
GetNthBackward(
UInt32 id
)
(inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders,
which match the specified search condition.
|
SInt32 |
GetNthBackward(
UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders,
which match the specified search condition.
|
SInt32 |
GetNthForward( Void )
(inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders,
which match the specified search condition.
|
SInt32 |
GetNthForward(
Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders,
which match the specified search condition.
|
SInt32 |
GetNthForward(
UInt32 id
)
(inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders,
which match the specified search condition.
|
SInt32 |
GetNthForward(
UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders,
which match the specified search condition.
|
AVKType |
GetOperateKey( Void )
(inherits from SFYMenu)
Get the operation key of this menu.
|
SFYResponderSmp |
GetParent( Void )
(inherits from SFYResponder)
Get the parent responder of this responder.
|
Bool |
GetPropertyTransparent( Void )
(inherits from SFYResponder)
Get the transparency attribute of this responder.
|
SFXRectangleConstRef |
GetRealBound( Void )
(inherits from SFYResponder)
Get the real region of this responder.
|
VoidPtr |
GetReference( Void )
(inherits from SFYResponder)
Get the reference of this responder.
|
SFYRendererPtr |
GetRenderer( Void )
(inherits from SFYResponder)
Get the renderer bound with this responder.
|
SFYResponderSmp |
GetRoot( Void )
(inherits from SFYResponder)
Get the root responder.
|
AVKType |
GetSelectDownKey( Void )
(inherits from SFYMenu)
Get the DOWN key of this menu.
|
AVKType |
GetSelectLeftKey( Void )
(inherits from SFYMenu)
Get the LEFT key of this menu.
|
AVKType |
GetSelectRightKey( Void )
(inherits from SFYMenu)
Get the RIGHT key of this menu.
|
AVKType |
GetSelectUpKey( Void )
(inherits from SFYMenu)
Get the UP key of this menu.
|
Bool |
GetStateActive(
Bool inherit = false
)
(inherits from SFYResponder)
Get the active state of this responder.
|
Bool |
GetStateEnable(
Bool inherit = false
)
(inherits from SFYResponder)
Get the enable state of this responder.
|
Bool |
GetStateFocus(
Bool inherit = false
)
(inherits from SFYResponder)
Get the focus state of this responder.
|
Bool |
GetStateValid(
Bool inherit = false
)
(inherits from SFYResponder)
Get the valid state of this responder.
|
Bool |
GetStateVisible(
Bool inherit = false
)
(inherits from SFYResponder)
Get the visible state of this responder.
|
SFXRectangle |
GetSuitableBound( Void )
(inherits from SFYResponder)
Get the suitable region of this responder.
|
SFXRectangle |
GetSuitableBound(
SFXRectangleConstRef rectangle
)
(inherits from SFYResponder)
Get the suitable region of this responder.
|
SFXRectangle |
GetSuitableBound(
SFXRectangleConstRef param
, HorizontalEnum horizontal
, VerticalEnum vertical
)
(inherits from SFYResponder)
Get the suitable region of this responder.
|
SFXMargin |
GetSuitableMargin( Void )
(inherits from SFYResponder)
Get the suitable frame margin region of this responder.
|
SFCType |
GetType( Void )
(inherits from SFYResponder)
Get the type of this responder class.
|
SFXRectangleConstRef |
GetVirtualBound( Void )
(inherits from SFYResponder)
Get the virtual region of this responder.
|
Bool |
HasFrame( Void )
(inherits from SFYResponder)
Check whether or not this responder is a content-responder.
|
Void |
Initialize( Void )
(inherits from SFYResponder)
Initialize this responder.
|
Bool |
IsBack( Void )
(inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsBack(
Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsBack(
UInt32 id
)
(inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsBack(
UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsFrame( Void )
(inherits from SFYResponder)
Check whether or not this responder is an attachment-frame.
|
Bool |
IsFront( Void )
(inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsFront(
Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsFront(
UInt32 id
)
(inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsFront(
UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsNthBackward(
SInt32 index
)
(inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsNthBackward(
SInt32 index
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsNthBackward(
SInt32 index
, UInt32 id
)
(inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsNthBackward(
SInt32 index
, UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsNthForward(
SInt32 index
)
(inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsNthForward(
SInt32 index
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsNthForward(
SInt32 index
, UInt32 id
)
(inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsNthForward(
SInt32 index
, UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders
which match the specified search condition.
|
Bool |
IsRoot( Void )
(inherits from SFYResponder)
Check whether or not this responder is the root responder.
|
SFCError |
Recover( Void )
(inherits from SFYResponder)
Recover the intersection region between this responder and the responder space by using the saved bitmap to restore the device bitmap.
|
SFCError |
RegisterHandler(
SFXEventRangeConstRef range
, SFYHandler::RuleRecConstRef rule
)
(inherits from SFYResponder)
Register specified handlers into this responder.
|
SFCError |
RegisterHandler(
SFXEventRangeConstRef range
, SFYHandler::HandlerSPP spp
, VoidPtr reference
)
(inherits from SFYResponder)
Register specified handlers into this responder.
|
SFCError |
RegisterHandler(
SFXEventRangeConstPtr range
, SFYHandler::RuleRecConstPtr rule
, SInt32 length
)
(inherits from SFYResponder)
Register specified handlers into this responder.
|
SFCError |
RegisterHandler(
SFXEventRangeConstPtr range
, SFYHandler::HandlerSPPConstPtr spp
, VoidPtrConstPtr reference
, SInt32 length
)
(inherits from SFYResponder)
Register specified handlers into this responder.
|
SFCError |
RegisterTracer(
SFXEventRangeConstRef range
, SFYTracer::RuleRecConstRef rule
)
(inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
|
SFCError |
RegisterTracer(
SFXEventRangeConstRef range
, SFYTracer::OrderEnum order
, SFYTracer::StateEnum state
, Bool overload
)
(inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
|
SFCError |
RegisterTracer(
SFXEventRangeConstPtr range
, SFYTracer::RuleRecConstPtr rule
, SInt32 length
)
(inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
|
SFCError |
RegisterTracer(
SFXEventRangeConstPtr range
, SFYTracer::OrderEnumConstPtr order
, SFYTracer::StateEnumConstPtr state
, BoolConstPtr overload
, SInt32 length
)
(inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
|
SFCError |
Render(
Bool force = false
)
(inherits from SFYResponder)
Boot up the renderer for redrawing this responder and its descendant responders.
|
Void |
RewindTimer( Void )
(inherits from SFYMenu)
Reset the time until this menu is automatically closed.
|
Void |
ScheduleTimer(
UInt32 param
)
(inherits from SFYMenu)
Schedule the timer that HandleEscapeKey() will be called after the specified time elapses. [milliseconds]
|
Void |
SetBackgroundColor(
SFXRGBColorConstRef param
)
(inherits from SFYWidget)
Set the background color to the specified value.
|
Void |
SetDistributer(
SFYDistributerPtr param
)
(inherits from SFYResponder)
Bind this responder with the specified distributer.
|
Void |
SetEscapeKey(
AVKType param
)
(inherits from SFYMenu)
Set the ESCAPE key of this menu to the specified value.
|
SFCError |
SetFrame(
SFYResponderSmpConstRef param
)
(inherits from SFYResponder)
Attach the specified frame to this frame.
|
Void |
SetID(
UInt32 param
)
(inherits from SFYResponder)
Set the ID value of this responder to the specified value.
|
Void |
SetOperateKey(
AVKType param
)
(inherits from SFYMenu)
Set the operation key of this menu to the specified value.
|
SFCError |
SetParent(
SFYResponderSmpConstRef param
)
(inherits from SFYResponder)
Set the parent responder of this responder to the specified responder.
|
Void |
SetProperty(
Bool transparent
)
(inherits from SFYResponder)
Set the property of this responder to the specified value.
|
Void |
SetPropertyTransparent(
Bool param
)
(inherits from SFYResponder)
Set the transparency attribute of this responder to the specified value.
|
Void |
SetRealBound(
SFXRectangleConstRef param
)
(inherits from SFYResponder)
Set the real region of this responder to the specified region.
|
Void |
SetReference(
VoidPtr param
)
(inherits from SFYResponder)
Set the reference value of this responder to the specified value.
|
Void |
SetRenderer(
SFYRendererPtr param
)
(inherits from SFYResponder)
Bind this responder with the specified renderer.
|
Void |
SetSelectDownKey(
AVKType param
)
(inherits from SFYMenu)
Set the DOWN key of this menu to the specified value.
|
Void |
SetSelectLeftKey(
AVKType param
)
(inherits from SFYMenu)
Set the LEFT key of this menu to the specified value.
|
Void |
SetSelectRightKey(
AVKType param
)
(inherits from SFYMenu)
Set the RIGHT key of this menu to the specified value.
|
Void |
SetSelectUpKey(
AVKType param
)
(inherits from SFYMenu)
Set the UP key of this menu to the specified value.
|
Void |
SetState(
Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Set all states of this responder to specified values together.
|
Void |
SetStateActive(
Bool param
)
(inherits from SFYResponder)
Set the active state of this responder to the specified value.
|
Void |
SetStateEnable(
Bool param
)
(inherits from SFYResponder)
Set the enable state of this responder to the specified value.
|
Void |
SetStateFocus(
Bool param
)
(inherits from SFYResponder)
Set the focus state of this responder to the specified value.
|
Void |
SetStateVisible(
Bool param
)
(inherits from SFYResponder)
Set the visible state of this responder to the specified value.
|
Void |
SetVirtualBound(
SFXRectangleConstRef param
)
(inherits from SFYResponder)
Set the virtual region of this responder to the specified value.
|
SFCError |
Snapshot(
SFBBitmapSmpConstRef bitmap
)
(inherits from SFYResponder)
Get a snapshot image of the intersection region between this responder and the responder space by using the saved bitmap.
|
Void |
Terminate( Void )
(inherits from SFYResponder)
Terminate this responder.
|
Void |
ToBack( Void )
(inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders
which match the specified search condition.
|
Void |
ToBack(
Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders
which match the specified search condition.
|
Void |
ToBack(
UInt32 id
)
(inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders
which match the specified search condition.
|
Void |
ToBack(
UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders
which match the specified search condition.
|
Void |
ToFront( Void )
(inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders
which match the specified search condition.
|
Void |
ToFront(
Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders
which match the specified search condition.
|
Void |
ToFront(
UInt32 id
)
(inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders
which match the specified search condition.
|
Void |
ToFront(
UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders
which match the specified search condition.
|
Void |
ToNthBackward(
SInt32 index
)
(inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders
which match the specified search condition.
|
Void |
ToNthBackward(
SInt32 index
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders
which match the specified search condition.
|
Void |
ToNthBackward(
SInt32 index
, UInt32 id
)
(inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders
which match the specified search condition.
|
Void |
ToNthBackward(
SInt32 index
, UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders
which match the specified search condition.
|
Void |
ToNthForward(
SInt32 index
)
(inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders
which match the specified search condition.
|
Void |
ToNthForward(
SInt32 index
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders
which match the specified search condition.
|
Void |
ToNthForward(
SInt32 index
, UInt32 id
)
(inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders
which match the specified search condition.
|
Void |
ToNthForward(
SInt32 index
, UInt32 id
, Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders
which match the specified search condition.
|
Void |
UnregisterHandler(
SFXEventRangeConstRef range
, SFYHandler::RuleRecConstRef rule
)
(inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
|
Void |
UnregisterHandler(
SFXEventRangeConstRef range
, SFYHandler::HandlerSPP spp
, VoidPtr reference
)
(inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
|
Void |
UnregisterHandler(
SFXEventRangeConstPtr range
, SFYHandler::RuleRecConstPtr rule
, SInt32 length
)
(inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
|
Void |
UnregisterHandler(
SFXEventRangeConstPtr range
, SFYHandler::HandlerSPPConstPtr spp
, VoidPtrConstPtr reference
, SInt32 length
)
(inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
|
Void |
UnregisterTracer(
SFXEventRangeConstRef range
)
(inherits from SFYResponder)
Unregister the dispatching rule from the tracer of this responder which matches the specified condition.
|
Void |
UnregisterTracer(
SFXEventRangeConstPtr range
, SInt32 length
)
(inherits from SFYResponder)
Unregister the dispatching rule from the tracer of this responder which matches the specified condition.
|
T const & |
static_catch(
Void
)
(inherits from static_exception)
Get the current exception.
|
Protected Functions | |
---|---|
Void |
HandleBoundVirtual( Void )
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event is received.
[Perform the processing when the virtual region is changed.]
|
Void |
HandleOperateKey( Void ) This function will be called when the SFEVT_KEY event of the operation key is received.
|
Void |
HandleRenderRequest(
SFXGraphicsPtr graphics
)
This function will be called when the (SFEVT_RESPONDER_RENDER, SFP16_RENDER_REQUEST) event is received.
[Draw this grid menu.]
|
Void |
HandleSelectDownKey( Void ) This function will be called when the DOWN key is pressed.
|
Void |
HandleSelectLeftKey( Void ) This function will be called when the LEFT key is pressed.
|
Void |
HandleSelectRightKey( Void ) This function will be called when the RIGHT key is pressed.
|
Void |
HandleSelectUpKey( Void ) This function will be called when the UP key is pressed.
|
static SFYResponderSmp |
Factory(
SFYResponderPtr responder
, SFCErrorPtr exception = null
)
(inherits from SFYResponder)
This function is used to implement the NewInstance function.
|
SFYResponderSmp |
GetThis( Void )
(inherits from SFYResponder)
Get the smart pointer of this responder.
|
Void |
HandleBoundGlobal(
SFXRectangleConstRef rectangle
)
(inherits from SFYWidget)
This function will be called when the global region is changed.
|
Void |
HandleBoundOptimize(
SFXRectanglePtr rectangle
)
(inherits from SFYWidget)
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_OPTIMIZE) event is received.
[Calculate the suitable rectangle size of this responder within the specified hint rectangle.]
|
Void |
HandleBoundReal( Void )
(inherits from SFYMenu)
This function will be called when the real region is changed.
|
Void |
HandleBoundRequest(
SFXRectanglePtr rectangle
)
(inherits from SFYWidget)
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_REQUEST) event is received.
[Calculate the suitable rectangle size of this responder.]
|
Void |
HandleEscapeKey( Void )
(inherits from SFYMenu)
This function will be called
when the SFEVT_KEY event of the ESCAPE key is received or
the time scheduled by ScheduleTimer() elapses.
|
Void |
Invalidate( Void )
(inherits from SFYResponder)
Register the specified redraw region of this responder.
|
Void |
Invalidate(
SFXRectangleConstRef param
)
(inherits from SFYResponder)
Register the specified redraw region of this responder.
|
Void |
InvokeBackward(
SFXEventConstRef event
, Bool overload
, BoolPtr result = null
)
(inherits from SFYResponder)
Call the handlers for the specified event from the end of the handler list registered into this responder.
|
Void |
InvokeForward(
SFXEventConstRef event
, Bool overload
, BoolPtr result = null
)
(inherits from SFYResponder)
Call the handlers for the specified event from the head of the handler list registered into this responder.
|
Void |
SetType(
SFCType param
)
(inherits from SFYResponder)
Set the Type value of this responder to the specified 4-character value.
|
Void |
static_throw(
static_exception< T > const & param
)
(inherits from static_exception)
Set an exception.
|
Void |
static_throw(
T const & param
)
(inherits from static_exception)
Set an exception.
|
Bool |
static_try(
Void
)
(inherits from static_exception)
Confirm whether or not the exception is retained.
|
Types |
---|
CodeEnum Constant that represents the SFZGridMenu class.
|
HorizontalEnum
(inherits from SFYResponder)
Constants that represent the horizontal alignment.
|
VerticalEnum
(inherits from SFYResponder)
Constants that represent the vertical alignment.
|
[ protected, explicit ] SFZGridMenu(Void);
This constructor performs the initializations as follows:
Table 231. Event handler
Event | Content of the handler |
---|---|
SFEVT_KEY event of the access key set with SFZGridMenu::SetItemAccessKey | Call the SFYMenu::HandleOperateKey function. |
Note | |
---|---|
In a responder inheriting from SFZGridMenu the corresponding handler will be called when the above event occurs. |
SFYResponder::SetType | SFZGridMenu::CodeEnum | SFZGridMenu::SetFont | SFZGridMenu::SetTitleBackColor | SFZGridMenu::SetTitleForeColor | SFZGridMenu::SetDefaultItemBackColor | SFZGridMenu::SetDefaultItemForeColor | SFZGridMenu::SetSelBackColor | SFZGridMenu::SetSelForeColor | SFZGridMenu::SetSelBorderColor | SFZGridMenu::SetTitle | SFZGridMenu::SetTitleHeight | SFZGridMenu::SetSelect | SFZGridMenu::SetRowCol | SFZGridMenu::SetPadding | SFZGridMenu::SetDrawItemText | SFZGridMenu::SetDrawSelBorder | SFZGridMenu::SetItemAccessKey | SFYMenu::HandleOperateKey | SFXRGBColor | Type | Event | Key Event[SFEVT_KEY]
[ protected, virtual ] virtual ~SFZGridMenu(Void);
Delete all items from this grid menu.
[ public ] SFCError AppendItem( SFXPathConstRef path // path to resource file UInt16 textId // text object id );
[ public ] SFCError AppendItem( SFXPathConstRef path // path to resource file UInt16 textId // text object id AVKType key // access key );
[ public ] SFCError AppendItem( SFXPathConstRef path // path to resource file UInt16 textId // text object id UInt16 imageId // text object id UInt16 selImageId // image object id when selected );
[ public ] SFCError AppendItem( SFXPathConstRef path // path to resource file UInt16 textId // text object id UInt16 imageId // text object id UInt16 selImageId // image object id when selected AVKType key // access key );
[ public ] SFCError AppendItem( SFXWideStringConstRef text // text );
[ public ] SFCError AppendItem( SFXWideStringConstRef text // text AVKType key // access key );
[ public ] SFCError AppendItem( SFXWideStringConstRef text // text SFBImageSmpConstRef image // image SFBImageSmpConstRef selectedImage // image when selected );
[ public ] SFCError AppendItem( SFXWideStringConstRef text // text SFBImageSmpConstRef image // image SFBImageSmpConstRef selectedImage // image when selected AVKType key // access key );
This function appends an item to this grid menu. The appended item becomes the last item of this grid menu.
Caution | |
---|---|
Since this function is deprecated, use the SFZGridMenu::InsertLast function instead. |
[ public ] Void Clear(Void);
This function deletes all items from this grid menu.
[ public, const ] SInt16 GetColNumber(Void);
Number of columns.
[ public, const ] SFXRGBColorConstRef GetDefaultItemBackColor(Void);
This function gets the default background color(SFXRGBColor) of unselected item of this grid menu.
[ public, const ] SFXRGBColorConstRef GetDefaultItemForeColor(Void);
This function gets the default foreground color(SFXRGBColor) to draw the text of unselected item of this grid menu.
[ public, const ] AEEFont GetFont(Void);
This function gets the font to draw the item and the title of this grid menu.
This function gets the access key of the specified item of this grid menu. AVK_UNDEFINED will be returned if the access key is not set. *** Description ***
[ public, const ] SFXRGBColorConstRef GetItemBackColor( SInt16 index // index of item );
This function gets the background color(SFXRGBColor) of unselected item of this grid menu.
[ public, const ] SInt16 GetItemCount(Void);
This function gets the number of items of this grid menu.
[ public, const ] SFXRGBColorConstRef GetItemForeColor( SInt16 index // index of item );
This function gets the foreground color(SFXRGBColor) to draw the text of unselected item of this grid menu.
[ public, const ] SFBImageSmpConstRef GetItemImage( SInt16 index // index of item );
Pointer to the image (SFBImageSmp) of the grid item. This image is displayed when the item is not selected.
[ public, const ] SFBImageSmpConstRef GetItemSelImage( SInt16 index // index of item );
Pointer to the image (SFBImageSmp) which is displayed when the item is selected of the grid item.
[ public, const ] SFXWideStringConstRef GetItemText( SInt16 index // index of item );
Text (SFXWideString) of the grid item.
[ public, const ] SInt16 GetPadding(Void);
Amount of space (padding) between two neighbouring items of this grid menu.
This function gets the padding size of this grid menu.
This padding region is filled in the background color of this grid menu set with the SFYWidget::SetBackgroundColor function.
[ public, const ] SInt16 GetRowNumber(Void);
Number of rows.
[ public, const ] SFXRGBColorConstRef GetSelBackColor(Void);
Background color(SFXRGBColor) of selected item of this grid menu.
This function gets the background color(SFXRGBColor) of selected item of this grid menu.
[ public, const ] SFXRGBColorConstRef GetSelBorderColor(Void);
Color (SFXRGBColor) to draw the border of currently selected grid item.
This function gets the border color of currently selected item of this grid menu.
[ public, const ] SFXRGBColorConstRef GetSelForeColor(Void);
This function gets the background color(SFXRGBColor) of selected item of this grid menu.
[ public, const ] SInt16 GetSelect(Void);
Index of selected item.
This function gets the index of currently selected item of this grid menu.
[ public, const ] SFXWideStringConstRef GetTitle(Void);
This function gets the menu title of this grid menu.
[ public, const ] SFXRGBColorConstRef GetTitleBackColor(Void);
Background color (SFXRGBColor) to fill the rectangle containing the menu title.
This function gets the background color(SFXRGBColor) of menu title of this grid menu, in which the rectangle containing the menu title is filled.
[ public, const ] SFXRGBColorConstRef GetTitleForeColor(Void);
Foreground color (SFXRGBColor) to draw the menu title.
This function gets the foreground color(SFXRGBColor) of menu title of this grid menu, in which the menu title is drawn.
[ public, const ] SInt16 GetTitleHeight(Void);
Height of the menu title.
This function gets the height of menu title of this grid menu.
[ protected, virtual ] Void HandleBoundVirtual(Void);
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event is received.
In case you want to perform your own processing when the virtual region is changed, override this virtual function.
The default implementation is to equalize the virtual region with the real region.
Sending the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event | |
---|---|
The (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event will occur when the virtual region is changed by calling the SFYResponder::SetRealBound or SFYResponder::SetVirtualBound function. |
Another method when the virtual region is changed | |
---|---|
Other than overriding this virtual function, it is possible to define and implement the handler for region event[XANDLER_DECLARE_VOIDBOUND], and register it into the responder. In the processing when the virtual region is updated, this virtual function is executed first, and next the handlers for region event are executed in the registered order. In almost all cases, the method to override this virtual function is adopted since defining, implementing and registering the handler for region event can be omitted. |
Internal implementation of the SFZGridMenu::HandleBoundVirtual function is as follows:
/*protected virtual */Void SFZGridMenu::HandleBoundVirtual(Void) { SetVirtualBound(SFXRectangle(SFXGrid::ZeroInstance(), GetRealBound().GetSize())); return; }// SFZGridMenu::HandleBoundVirtual //
SFYResponder::SetRealBound | SFXEvent | Real Region | Virtual Region | Region Event[SFEVT_RESPONDER_BOUND] | Handler for the Region Event[XANDLER_DECLARE_VOIDBOUND]
[ protected, virtual ] Void HandleOperateKey(Void);
This function will be called when the SFEVT_KEY event(key event[SFEVT_KEY]) of the operaion key set with the SFYMenu::SetOperateKey function is received.
In case you want to perform your own processing, override this function.
The default implementation is to send the result event of SFXEvent(SFEVT_RESPONDER_RESULT, SFP16_RESULT_OK, index of item).
Internal implementation of the SFZGridMenu::HandleOperateKey function is as follows:
/*protected virtual */Void SFZGridMenu::HandleOperateKey(Void) { InvokeForward(SFXEvent(SFEVT_RESPONDER_RESULT, SFP16_RESULT_OK, GetSelect()), false); return; }// SFZGridMenu::HandleOperateKey //
SFYMenu::SetOperateKey | SFXEvent | Result Event[SFEVT_RESPONDER_RESULT] | Key Event[SFEVT_KEY]
[ protected, virtual, const ] Void HandleRenderRequest( SFXGraphicsPtr graphics // graphic object );
This function will be called when the (SFEVT_RESPONDER_RENDER, SFP16_RENDER_REQUEST) event is received.
In case you want to perform your own drawing of this responder, override this function.
The default implementation is to draw this grid menu.
The method to darw a responder | |
---|---|
In addition to overriding this virtual function, it is possible to define and implement the handler for drawing event(drawing handler)[XANDLER_DECLARE_VOIDRENDER], and register it into the responder. Then, the overridden virtual function will be called first, and next the drawing handlers registered into the responder will be booted up in the registered order. In almost all cases, the method to override this function is used to draw the responder since there is no need to declare and register the drawing handler. |
Procedure of drawing a responder | |
---|---|
The drawing handler will be booted up when the drawing event(SFEVT_RESPONDER_RENDER) occurs. And then the drawing handler draw the responder actually. The drawing event will be sent to only the responders including the region to be redrawn out of the redraw regions registered into the renderer using the SFYResponder::InvokeBackward function after the SFYResponder::Render function boots up the renderer. Here, the SFYResponder::Render function will be called at the following situations:
If calling the SFYResponder::Render function with specifying "true" as an argument, the drawing event will be sent to all the responders to be actually displayed on the screen which are located below the responder in the responder tree, regardless of the registration of redraw region. |
Internal implementation of the SFZGridMenu::HandleRenderRequest function is as follows:
/*protected virtual */Void SFZGridMenu::HandleRenderRequest(SFXGraphicsPtr graphics) const { DrawMenu(graphics); return; }// SFZGridMenu::HandleRenderRequest // /*private */Void SFZGridMenu::DrawMenu(SFXGraphicsPtr graphics) const { MenuItemPtr item; SFXRectangle menuRect; SFXRectangle titleRect; SFXRectangle itemRect; SFXGrid firstItemOffset; SInt32 row; SInt32 col; menuRect = GetLocalBound(); titleRect = menuRect; titleRect.SetHeight(_titleHeight); menuRect.AddTop(_titleHeight); itemRect = menuRect; graphics->FillRectangle(titleRect, _color.titleBack); graphics->SetFont(_font); graphics->DrawSingleText(_title, titleRect.GetOrigin() + SFXGrid(2, 2), titleRect, _color.titleFore); if (_rownum == 0 || _colnum == 0) { return; } itemRect.SetSize( static_cast<SInt16>((menuRect.GetWidth() - (_colnum + 1) * _padding) / _colnum), static_cast<SInt16>((menuRect.GetHeight() - (_rownum + 1) * _padding) / _rownum) ); firstItemOffset.Set(_padding + menuRect.GetX(), _padding + menuRect.GetY()); itemRect.SetOrigin(firstItemOffset); for (row = 0; row < _rownum; ++row) { for (col = 0; col < _colnum; ++col) { if ((item = GetMenuItem(ToIndex(row, col))) == null) { break; } DrawItem(graphics, itemRect, item); itemRect.AddX(itemRect.GetWidth() + _padding); } itemRect.SnapLeft(firstItemOffset.GetX()); itemRect.AddY(itemRect.GetHeight() + _padding); } return; }// SFZGridMenu::DrawMenu // /*private */Void SFZGridMenu::DrawItem(SFXGraphicsPtr graphics, SFXRectangleConstRef rect, MenuItemPtr item) const { SFBImageSmp image(item->image); SFXRectangle imageRect(rect); SFXRectangle textRect; SInt16 textHeight; SFXRGBColor backColor(item->backColor); SFXRGBColor foreColor(item->foreColor); if (item == GetMenuItem(_selectedItem)) { backColor.Set(_color.selBack); foreColor.Set(_color.selFore); image = item->selectedImage; if (_selBorder) { graphics->DrawRectangle(imageRect, _color.selBorder); imageRect.Deflate(1, 1); graphics->DrawRectangle(imageRect, _color.selBorder); imageRect.Deflate(1, 1); } } graphics->FillRectangle(imageRect, backColor); textRect = imageRect; if ((_drawText) && (item->text !="")) { textHeight = SFXGraphics::GetFontHeight(_font); } else { textHeight = 0; } if (image != null) { imageRect.SetHeight(imageRect.GetHeight() - textHeight); textRect.AddTop(imageRect.GetHeight()); } if (image != null) { AEEImageInfo info; SInt16 dx; SInt16 dy; image->GetInfo(&info); if (info.cx > 0 && info.cy > 0) { dx = (imageRect.GetWidth() - info.cx) / 2; dy = (imageRect.GetHeight() - info.cy) / 2; imageRect.SetSize(info.cx, info.cy); graphics->DrawImage(image, imageRect.GetOrigin() + SFXGrid(dx, dy)); } } graphics->SetFont(_font); graphics->DrawSingleText(item->text, textRect.AddOrigin(1, 1), foreColor, IDF_ALIGN_CENTER); return; }// SFZGridMenu::DrawItem //
SFYResponder::Invalidate | SFYResponder::Render | SFYResponder::InvokeBackward | SFXEvent | Drawing Event[SFEVT_RESPONDER_RENDER] | Handler for the Drawing Event[XANDLER_DECLARE_VOIDRENDER] | Rendering | Event Loop | Responder Tree
[ protected, virtual ] Void HandleSelectDownKey(Void);
This function will be called when the SFEVT_KEY event(key event[SFEVT_KEY]) of the DOWN key set with the SFYMenu::SetSelectDownKey function is received.
In case you want to perform your own processing, override this function.
The default implementation is as follows:
Internal implementation of the SFZGridMenu::HandleSelectDownKey function is as follows:
/*protected virtual */Void SFZGridMenu::HandleSelectDownKey(Void) { SInt32 row; SInt32 maxrow; SInt32 col; row = ToRow(_selectedItem); col = ToCol(_selectedItem, row); maxrow = ToRow(GetItemCount() - 1); ++row; if ((ToIndex(row, col) > GetItemCount() - 1) && (row >= maxrow)) { row = 0; ++col; if (col > _colnum - 1) { col = 0; } } else if ((ToIndex(row, col) > GetItemCount() - 1) && (col == _colnum)) { row = 0; col = 0; } SetSelect(ToIndex(row, col)); return; }// SFZGridMenu::HandleSelectDownKey // /*public */inline SInt32 SFZGridMenu::ToIndex(SInt32 row, SInt32 col) const { return row * _colnum + col; }// SFZGridMenu::ToIndex // /*public */inline SInt32 SFZGridMenu::ToRow(SInt32 index) const { return index / _colnum; }// SFZGridMenu::ToRow // /*public */inline SInt32 SFZGridMenu::ToCol(SInt32 index) const { return index - ToRow(index) * _colnum; }// SFZGridMenu::ToCol // /*public */inline SInt32 SFZGridMenu::ToCol(SInt32 index, SInt32 row) const { return index - row * _colnum; }// SFZGridMenu::ToCol //
[ protected, virtual ] Void HandleSelectLeftKey(Void);
This function will be called when the SFEVT_KEY event(key event[SFEVT_KEY]) of the LEFT key set with the SFYMenu::SetSelectLeftKey function is received.
In case you want to perform your own processing, override this function.
The default implementation is as follows:
Internal implementation of the SFZGridMenu::HandleSelectLeftKey function is as follows:
/*protected virtual */Void SFZGridMenu::HandleSelectLeftKey(Void) { if (_selectedItem > 0) { --_selectedItem; } else if (_selectedItem == 0) { _selectedItem = GetItemCount() - 1; } Invalidate(); return; }// SFZGridMenu::HandleSelectLeftKey //
[ protected, virtual ] Void HandleSelectRightKey(Void);
This function will be called when the SFEVT_KEY event(key event[SFEVT_KEY]) of the RIGHT key set with the SFYMenu::SetSelectRightKey function is received.
In case you want to perform your own processing, override this function.
The default implementation is as follows:
Internal implementation of the SFZGridMenu::HandleSelectRightKey function is as follows:
/*protected virtual */Void SFZGridMenu::HandleSelectRightKey(Void) { if (_selectedItem < GetItemCount() - 1) { ++_selectedItem; } else if (_selectedItem == GetItemCount() - 1) { _selectedItem = 0; } Invalidate(); return; }// SFZGridMenu::HandleSelectRightKey //
SFYMenu::SetSelectRightKey | SFXEvent | Key Event[SFEVT_KEY]
[ protected, virtual ] Void HandleSelectUpKey(Void);
This function will be called when the SFEVT_KEY event(key event[SFEVT_KEY]) of the UP key set with the SFYMenu::SetSelectUpKey function is received.
In case you want to perform your own processing, override this function.
The default implementation is as follows:
Internal implementation of the SFZGridMenu::HandleSelectUpKey function is as follows:
/*protected virtual */Void SFZGridMenu::HandleSelectUpKey(Void) { SInt32 row; SInt32 maxrow; SInt32 col; row = ToRow(_selectedItem); col = ToCol(_selectedItem, row); maxrow = ToRow(GetItemCount() - 1); --row; if (row < 0) { row = maxrow; col = col - 1; if (col < 0) { col = _colnum - 1; } if (ToIndex(row, col) > GetItemCount() - 1) { row = (row - 1); } } SetSelect(ToIndex(row, col)); return; }// SFZGridMenu::HandleSelectUpKey // /*public */inline SInt32 SFZGridMenu::ToIndex(SInt32 row, SInt32 col) const { return row * _colnum + col; }// SFZGridMenu::ToIndex // /*public */inline SInt32 SFZGridMenu::ToRow(SInt32 index) const { return index / _colnum; }// SFZGridMenu::ToRow // /*public */inline SInt32 SFZGridMenu::ToCol(SInt32 index) const { return index - ToRow(index) * _colnum; }// SFZGridMenu::ToCol // /*public */inline SInt32 SFZGridMenu::ToCol(SInt32 index, SInt32 row) const { return index - row * _colnum; }// SFZGridMenu::ToCol //
[ public ] SFCError Insert( SInt32 index // index of item SFXPathConstRef path // path to resource file UInt16 textId // text object id );
[ public ] SFCError Insert( SInt32 index // index of item SFXPathConstRef path // path to resource file UInt16 textId // text object id AVKType key // access key );
[ public ] SFCError Insert( SInt32 index // index of item SFXPathConstRef path // path to resource file UInt16 textId // text object id UInt16 imageId // image object id UInt16 selImageId // image object id when selected );
[ public ] SFCError Insert( SInt32 index // index of item SFXPathConstRef path // path to resource file UInt16 textId // text object id UInt16 imageId // image object id UInt16 selImageId // image object id when selected AVKType key // access key );
[ public ] SFCError Insert( SInt32 index // index of item SFXWideStringConstRef text // text );
[ public ] SFCError Insert( SInt32 index // index of item SFXWideStringConstRef text // text AVKType key // access key );
[ public ] SFCError Insert( SInt32 index // index of item SFXWideStringConstRef text // text SFBImageSmpConstRef image // image SFBImageSmpConstRef selectedImage // image when selected );
[ public ] SFCError Insert( SInt32 index // index of item SFXWideStringConstRef text // text SFBImageSmpConstRef image // image SFBImageSmpConstRef selectedImage // image when selected AVKType key // access key );
This function inserts the specified item before the specified index.
If the value of the specified index is less than or equals 0, the item will be inserted at the head.
If the value of the specified index is greater than or equals the number of items, the item will be inserted at the tail.
[ public ] SFCError InsertFirst( SFXPathConstRef path // path to resource file UInt16 textId // text object id );
[ public ] SFCError InsertFirst( SFXPathConstRef path // path to resource file UInt16 textId // text object id AVKType key // access key );
[ public ] SFCError InsertFirst( SFXPathConstRef path // path to resource file UInt16 textId // text object id UInt16 imageId // image object id UInt16 selImageId // image object id when selected );
[ public ] SFCError InsertFirst( SFXPathConstRef path // path to resource file UInt16 textId // text object id UInt16 imageId // image object id UInt16 selImageId // image object id when selected AVKType key // access key );
[ public ] SFCError InsertFirst( SFXWideStringConstRef text // text );
[ public ] SFCError InsertFirst( SFXWideStringConstRef text // text AVKType key // access key );
[ public ] SFCError InsertFirst( SFXWideStringConstRef text // text SFBImageSmpConstRef image // image SFBImageSmpConstRef selectedImage // image when selected );
[ public ] SFCError InsertFirst( SFXWideStringConstRef text // text SFBImageSmpConstRef image // image SFBImageSmpConstRef selectedImage // image when selected AVKType key // access key );
This function inserts the specified item at the head.
[ public ] SFCError InsertLast( SFXPathConstRef path // path to resource file UInt16 textId // text object id );
[ public ] SFCError InsertLast( SFXPathConstRef path // path to resource file UInt16 textId // text object id AVKType key // access key );
[ public ] SFCError InsertLast( SFXPathConstRef path // path to resource file UInt16 textId // text object id UInt16 imageId // image object id UInt16 selImageId // image object id when selected );
[ public ] SFCError InsertLast( SFXPathConstRef path // path to resource file UInt16 textId // text object id UInt16 imageId // image object id UInt16 selImageId // image object id when selected AVKType key // access key );
[ public ] SFCError InsertLast( SFXWideStringConstRef text // text );
[ public ] SFCError InsertLast( SFXWideStringConstRef text // text AVKType key // access key );
[ public ] SFCError InsertLast( SFXWideStringConstRef text // text SFBImageSmpConstRef image // image SFBImageSmpConstRef selectedImage // image when selected );
[ public ] SFCError InsertLast( SFXWideStringConstRef text // text SFBImageSmpConstRef image // image SFBImageSmpConstRef selectedImage // image when selected AVKType key // access key );
This function inserts the specified item at the tail.
[ public, static ] SFZGridMenuSmp NewInstance( SFCErrorPtr exception = null // error value );
Return the error value generated inside the function.
This function creates a new instance of this responder class.
If succeeds, a not null pointer will be returned, and the "exception" argument is SFERR_NO_ERROR. If fails such as insufficient memory, a null pointer will be returned, and the "exception" argument holds the error value.
The code to create a new instance of this responder class is as follows:
SFZGridMenuSmp _gridmenu;
SFCError error;
if ((_gridmenu = SFZGridMenu::NewInstance(&error)) != null) {
...
}
[ public ] Void Remove( SInt32 index // index of item to delete );
[ public ] Void Remove( SInt32 begin // beginning index to remove(this index is included) SInt32 end // ending index to remove(this index is not included) );
This function removes the item at the specified index or the items in the specified index range from this grid menu.
If the specified index is less than 0 or greater than or equals the number of items, no item will be removed
If the beginning index to remove is greater than or equals the number of items or the ending index to remove is less than or equals 0, no item will be removed
If the beginning index to remove is less than or equals 0, it will be reset to 0.
If the ending index to remove is greater than the number of items, it will be reset to the number of items.
[ public ] Void RemoveFirst(Void);
This function removes the first item from this grid menu.
SFZGridMenu::Clear | SFZGridMenu::Remove | SFZGridMenu::RemoveLast | SFZGridMenu::InsertFirst
This function removes the item at the specified index from this grid menu.
If the specified index is less than 0 or greater than or equals the number of items, no item will be removed
Caution | |
---|---|
Since this function is deprecated, use the SFZGridMenu::Remove function instead. |
[ public ] Void RemoveLast(Void);
This function removes the last item from this grid menu.
SFZGridMenu::Clear | SFZGridMenu::Remove | SFZGridMenu::RemoveFirst | SFZGridMenu::InsertLast
[ public ] Void SetDefaultItemBackColor( SFXRGBColorConstRef param // default background color to set );
This function sets the default background color(SFXRGBColor) of unselected item of this grid menu to the specified value.
Default: SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00)[white color]
Default background color of unselected item | |
---|---|
The default background color of unselected item can be changed using the SFZGridMenu::SetItemBackColor function. If you want to make the background color of unselected items be the same one, the background color needs to be set using this function. The SFZGridMenu::SetItemBackColor function to set it individually is not recommended. However, the background color of selected item is always the one set with the SFZGridMenu::SetSelBackColor function. |
SFZGridMenu::GetDefaultItemBackColor | SFZGridMenu::SetDefaultItemForeColor | SFZGridMenu::SetItemBackColor | SFZGridMenu::SetSelBackColor | SFXRGBColor
[ public ] Void SetDefaultItemForeColor( SFXRGBColorConstRef param // default foreground color to set );
This function sets the default foreground color(SFXRGBColor) to draw the text of unselected item of this grid menu to the specified value.
Default: SFXRGBColor(0x00, 0x00, 0x00, 0x00)[black color]
Default foreground color of unselected item | |
---|---|
The default foreground color of unselected item can be changed using the SFZGridMenu::SetItemForeColor function. If you want to make the foreground color of all unselected items be the same one, the foreground color needs to be set using this function. The SFZGridMenu::SetItemForeColor function to set it individually is not recommended. However, the foreground color of selected item is always the one set with the SFZGridMenu::SetSelForeColor function. |
SFZGridMenu::GetDefaultItemForeColor | SFZGridMenu::SetDefaultItemBackColor | SFZGridMenu::SetItemForeColor | SFZGridMenu::SetSelForeColor | SFXRGBColor
This function sets the "draw-item" flag indicating whether or not to draw the text of item of this grid menu to the specified value. If you want to draw the text of item of this grid menu, set "true" to the "draw-item" flag. Otherwise, set "false".
Default: "true"(The text of the item is drawn.)
This function sets the "draw-border" flag indicating whether or not to draw the border of selected item of this grid menu to the specified value. If you want to draw the text of item of this grid menu, set "true" to the "draw-item" flag. Otherwise, set "false".
Default: "true"(The border of selected item is drawn.)
This function sets the font of this grid menu to the specified value, which is used to draw the item and the title of this grid menu.
Default: AEE_FONT_NORMAL.
This function sets the access key of the specified item of this grid menu to the specified value.
[ public ] SFCError SetItemBackColor( SInt16 index // index of item SFXRGBColorConstRef param // background color to set );
This function sets the background color(SFXRGBColor) of the specified unselected item of this grid menu to the specified value.
Default: The default background color set with the SFZGridMenu::SetDefaultItemBackColor function. SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00)[white color] if the default background color is not set.
Foreground color of unselected item | |
---|---|
For the foreground color of unselected item, refer to SFZGridMenu::SetItemForeColor. |
Foreground color of selected item | |
---|---|
For the foreground color of selected item, refer to SFZGridMenu::SetSelForeColor. |
Background color of selected item | |
---|---|
For the background color of selected item, refer to SFZGridMenu::SetSelBackColor. |
SFZGridMenu::SetDefaultItemBackColor | SFZGridMenu::GetItemBackColor | SFZGridMenu::SetItemForeColor | SFZGridMenu::SetSelForeColor | SFZGridMenu::SetSelBackColor | SFXRGBColor
[ public ] SFCError SetItemForeColor( SInt16 index // index of item SFXRGBColorConstRef param // foreground color to set );
This function sets the foreground color(SFXRGBColor) to draw the text of the specified unselected item of this grid menu to the specified value.
Default: The default foreground color set with the SFZGridMenu::SetDefaultItemForeColor function. SFXRGBColor(0x00, 0x00, 0x00, 0x00)[black color] if the default background color is not set.
Background color of unselected item | |
---|---|
For the background color of unselected item, refer to SFZGridMenu::SetItemBackColor. |
Foreground color of selected item | |
---|---|
For the foreground color of selected item, refer to SFZGridMenu::SetSelForeColor. |
Background color of selected item | |
---|---|
For the background color of selected item, refer to SFZGridMenu::SetSelBackColor. |
SFZGridMenu::SetDefaultItemForeColor | SFZGridMenu::GetItemForeColor | SFZGridMenu::SetItemBackColor | SFZGridMenu::SetSelForeColor | SFZGridMenu::SetSelBackColor | SFXRGBColor
[ public ] SFCError SetItemImage( SInt16 index // index of item SFXPathConstRef path // path to resource file );
[ public ] SFCError SetItemImage( SInt16 index // index of item SFXPathConstRef path // path to resource file UInt16 id // image text object id );
[ public ] SFCError SetItemImage( SInt16 index // index of item SFBImageSmpConstRef param // image );
This function sets the image of the specified grid item to the specified value. This image is displayed when the item is not selected.
[ public ] SFCError SetItemSelImage( SInt16 index // index of item SFXPathConstRef path // path to resource file );
[ public ] SFCError SetItemSelImage( SInt16 index // index of item SFXPathConstRef path // path to resource file UInt16 id // );
[ public ] SFCError SetItemSelImage( SInt16 index // image text object id SFBImageSmpConstRef param // image );
This function sets the image of the specified selected grid item to the specified value.
[ public ] SFCError SetItemText( SInt16 index // index of item SFXPathConstRef path // path to the resource filw UInt16 id // text object id );
[ public ] SFCError SetItemText( SInt16 index // index of item SFXWideStringConstRef param // text );
This function sets the text of the specified grid item to the specified value.
This function sets the padding size of this grid menu to the specified value, which is the amount of space (padding) between two neighbouring items of this grid menu. [pixels]
If this value is greater than 0, the grid lines are drawn in the same color with the background color of this grid menu.
Default: 0 pixel.
[ public ] Void SetRowCol( SInt16 row // number of row to set SInt16 col // number of column to set );
This function sets the numbers of rows and columns of this grid menu to specified values. The size of each item is calculated based on the real region of this grid menu and those two values.
Default: 4 for the number of rows and 3 for the number of columns
SFZGridMenu::GetRowNumber | SFZGridMenu::GetColNumber | Real Region
[ public ] Void SetSelBackColor( SFXRGBColorConstRef param // background color to set );
This function sets the background color(SFXRGBColor) of selected item of this grid menu to the specified value.
Default: SFXRGBColor(0x11, 0x22, 0xBB, 0x00)[blue color]
Foreground color of selected item | |
---|---|
For the foreground color of selected item, refer to SFZGridMenu::SetSelForeColor. |
Foreground color of unselected item | |
---|---|
For the foreground color of unselected item, refer to SFZGridMenu::SetItemForeColor. |
Background color of unselected item | |
---|---|
For the background color of unselected item, refer to SFZGridMenu::SetItemBackColor. |
[ public ] Void SetSelBorderColor( SFXRGBColorConstRef param // value to set );
This function sets the border color(SFXRGBColor) of this grid menu to the specified value, in which color the border of currently selected item is drawn.
Default: SFXRGBColor(0x11, 0x22, 0xBB, 0x00)[blue color]
[ public ] Void SetSelForeColor( SFXRGBColorConstRef param // foreground color to set );
This function sets the foreground color(SFXRGBColor) of selected item of this grid menu to the specified value.
Default: SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00)[white color]
Background color of selected item | |
---|---|
For the background color of selected item, refer to SFZGridMenu::SetSelBackColor. |
Foreground color of unselected item | |
---|---|
For the foreground color of unselected item, refer to SFZGridMenu::SetItemForeColor. |
Background color of unselected item | |
---|---|
For the background color of unselected item, refer to SFZGridMenu::SetItemBackColor. |
SFZGridMenu::GetSelForeColor | SFZGridMenu::SetItemForeColor | SFZGridMenu::SetItemBackColor | SFZGridMenu::SetSelBackColor | SFXRGBColor
This function sets the index of currently selected item of this grid menu to the specified value.
[ public ] SFCError SetTitle( SFXPathConstRef path // path to resource file UInt16 id // text object id );
[ public ] SFCError SetTitle( SFXWideStringConstRef param // text to set );
This function sets the menu title of this grid menu to the specified value.
The menu title is set by specifying the string as an argument directly, or by reading from the resource file.
[ public ] Void SetTitleBackColor( SFXRGBColorConstRef param // value to set );
This function sets the background color(SFXRGBColor) of menu title of this grid menu to the specified value, in which the rectangle containing the menu title is filled.
Default: SFXRGBColor(0xDD, 0xDD, 0xDD, 0x00)[gray color]
[ public ] Void SetTitleForeColor( SFXRGBColorConstRef param // value to set );
This function sets the foreground color(SFXRGBColor) of menu title of this grid menu to the specified value, in which the menu title is drawn.
Default: SFXRGBColor(0x00, 0x00, 0x00, 0x00)[black color]
This function sets the height of menu title of this grid menu to the specified value. If this value is set to "0", the menu title will be hidden and never drawn.
Default: font height + 4 [pixels]
enum CodeEnum { CODE_TYPE = four_char_code('m', 'g', 'm', 'n') }; SFMTYPEDEFTYPE(CodeEnum)
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |