PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFZFlexListMenu
Responder which represents a flex list menu.
#include <SFZFlexListMenu.h.hpp>
class SFZFlexListMenu : public SFYMenu;
SFMTYPEDEFCLASS(SFZFlexListMenu)

Inheritance diagram

 Inheritance diagram of SFZFlexListMenuClass

Collaboration diagram

 Collaboration diagram of SFZFlexListMenuClass

Description

How to use

SFZFlexListMenu is an advanced menu to have a user select one item among list items.

Below is the layout of flex list menu:

Each item has three parts(header, body, and footer from left) as follows:

  1. Header: text such as key icon or item number of the SFXWideString class
  2. Body: icon image and/or text
  3. Footer: icon image
[Note] Note
  • The horizontal alignment of the header part or the footer part is always left-alighed or right-aligned respectively. However, that of the body part can be specified with the SFZFlexListMenu::SetHorizontalAlign function.
  • For the body part, it is possible to display the corresponding multiple text for the selected item or change the order of the icon image and the text by setting the toggle state.
  • The SFZFlexListMenu::SetHorizontalAlign function specifies only the horizontal alignment for the latter element of the body part(by default, text of the body part).
  • The vertical alignment for all the parts is set using the SFZFlexListMenu::SetVerticalAlign function.

Difference between SFZFlexListMenu and SFZTextMenu

Content SFZTextMenu SFZFlexListMenu
header(key icon) WChar SFXWideString
icon image only body body and footer
command id - o
height of item fixed variable (depending on the height of a text or an image)
display switching of selected item - o (some behaviour can be specified with the toggle state)
multiple text - o (only when selected)
text alignment - o
movement of selected item only by one item by one / by one page / directly to the top or bottom
paging paging style and scrolling style scrolling style with the scroll bar
appending an item using the item structure - o
appending an item using the array - o
background color of item color of i-th item can be different from of for j-th item color of odd item or even item is same
performance and memory usage good even if the number of items is more than 1000 may deteriorate if the number of items is more than several hundred
[Note] Performance and memory usage

In the SFZFlexListMenu class, each item is implemented using the widget class. Since the number of the responder increases as that of the items increases, there is possibility that the performance may deteriorate in destroying the instance of the SFZFlexListMenu class which has more than several hundred items. For the memory usage, the same can be said.

It is recommended to use the SFZTextMenu class when the number of items is more than several hundred.

Usage of the flex list menu

To insert an item, use the SFZFlexListMenu::Insert / SFZFlexListMenu::InsertFirst / SFZFlexListMenu::InsertLast function. To remove an item, use the SFZFlexListMenu::Remove / SFZFlexListMenu::RemoveFirst / SFZFlexListMenu::RemoveLast function. If the SFZFlexListMenu::Clear function is called, all items are removed.

The selected item can be moved by one item using the UP or DOWN key set with the SFYMenu::SetSelectUpKey or SFYMenu::SetSelectDownKey function respectively.

The selected item can be moved by one page using the PageUp or PageDown key set with the SFZFlexListMenu::SetPageUpKey or SFZFlexListMenu::SetPageDownKey function respectively.

The selected item can be moved to the top or bottom using the SnapUp or SnapDown key set with the SFZFlexListMenu::SetSnapUpKey or SFZFlexListMenu::SetSnapDownKey function respectively.

In the selected item, the text is drawn in the color set with the SFZFlexListMenu::SetTextColor function, and the background is filled in the color set with the SFZFlexListMenu::SetSelectListColor function.

In the unselected item, the text is drawn in the color set with the SFZFlexListMenu::SetTextColor function, the background of each item at the odd or even index is filled in the color set with the SFZFlexListMenu::SetOddListColor or SFZFlexListMenu::SetEvenListColor function respectively.

In the item whose enable flag is set to "false" using the SFZFlexListMenu::SetItemEnable function, the text is drawn in the color which is calculated for the "invalid" item using the color set with the SFZFlexListMenu::SetTextColor function, and the background of item at the odd or even index is filled in the color which is calculated for the "invalid" item using the SFZFlexListMenu::SetOddListColor or SFZFlexListMenu::SetEvenListColor function respectively. However, the background of selected item is always filled in the color set with the SFZFlexListMenu::SetSelectListColor function. And when the state of this responder is inactive, each item is drawn in the same way as its enable flag is set to "false".

The access key can be set using the SFZFlexListMenu::SetItemAccessKey function, and the grid line can be drawn using the SFZFlexListMenu::SetGridLineEnable function and the SFZFlexListMenu::SetGridLineColor function. The margin in each item is set with the SFZFlexListMenu::SetListMargin function.

In the default implementation, the flex list menu[SFZFlexListMenu] 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 of the menu is set with the SFZFlexListMenu::SetItemAccessKey function.

The ESCAPE key is set with the SFYMenu::SetEscapeKey function. By default, the ESCAPE key is set to the CLEAR key.

[Caution] Caution
The result event will not occur when the enable flag of selected item is set to "false" using the SFZFlexListMenu::SetItemEnable function.
[Note] 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] | SFZFlexListMenu::HandleOperateKey | SFZFlexListMenu::HandleAccessKey | SFZFlexListMenu::HandleEscapeKey | SFZFlexListMenu::HandleSelectUpKey | SFZFlexListMenu::HandleSelectDownKey | SFYMenu::HandleSelectRightKey | SFYMenu::HandleSelectLeftKey

Code to create a flex list menu

Void UserClass::Main(Void)
{
    SFZFlexListMenuSmp              menu;
    SFZFlexListMenu::ItemRec        item;
    SFBShellSmp                     shell(SFBShell::GetInstance());
    SFBImageSmp                     normal(shell->LoadResImage("userclass.bar", IDI_OBJECT_5001));
    SFBImageSmp                     select(shell->LoadResImage("userclass.bar", IDI_OBJECT_5002));
    SFBImageSmp                     disable(shell->LoadResImage("userclass.bar", IDI_OBJECT_5003));
    SFCError                        error(SFERR_NO_ERROR);

    // [Required] create flex list menu
    menu = SFZFlexListMenu::NewInstance(&error);

    // [Required] set flex list menu's parent responder to root
    menu->SetParent(GetThis());

    // [Required] set flex list menu's state to "visible" + "active" + "enable" + "focus" together
    menu->SetState(true, true, true, true);

    // [Optional] set background color of even item
    menu->SetEvenListColor(SFXRGBColor(0xFF, 0xFF, 0xDD, 0x00));

    // [Optional] set background color of odd item
    menu->SetOddListColor(SFXRGBColor(0xFF, 0xDD, 0xFF, 0x00));

    // [Optional] set flex list menu's bevel color
    menu->SetBevelColor(SFXBevelColor(
 SFXRGBColor(0xEE, 0xEE, 0xEE, 0x00),
 SFXRGBColor(0x77, 0x77, 0x77, 0x00),
 SFXRGBColor(0x22, 0x22, 0x22, 0x00)
    ));

    // [Optional] set horizontal alignment of unselected item to "center-aligned"
    menu->SetHorizontalAlign(SFZFlexListMenu::NORMAL, SFZFlexListMenu::HORIZONTAL_CENTER);

    // [Optional] set menu margin for outer frame of flex list menu
    menu->SetMenuMargin(SFXMargin(6, 6, 5, 6));

    // [Optional] set list margin within each item
    menu->SetListMargin(SFXMargin(2, 1, 2, 1));

    // [Optional] make grid line invalid (default)
    menu->SetGridLineEnable(false);

    // [Optional] set space size to 4
    menu->SetSpaceSize(4);

    // [Optional] set repeat-scroll flag to "true"
    menu->SetScrollRepeat(true);

    // [Optional] set width of scroll bar control to 5
    menu->SetScrollBarWidth(5);

    // [Optional] make multiple text displayed for selected item
    menu->SetToggle(SFZFlexListMenu::TOGGLE_MULTIPLE_BODY_TEXT);

    // here insert item using item structure

    // in case of using image 
    // it is easier to insert item using item structure.

    // [Required to select] set enable flag of item structure to "true"
    item.property.enable = true;

    // [Required to select] set access key and command id of item structure
    //            (unused in this example)
    item.property.key = 0;
    item.property.id = SFZFlexListMenu::INVALID_COMMAND_ID;

    // [Optional] set image of item structure
    item.normal.body.icon = normal;
    item.select.body.icon = select;

    // [Required] insert 20 items
    for (SInt32 i = 0;  i < 20 ; ++i) {

        // [Required to select] set text of item structure
        item.normal.header.text.Set(SFXWideString::Format("%02d", i));
        item.normal.body.text.Set(SFXWideString::Format("List item %02d", i));
        item.select.body.text.Set(SFXWideString::Format("The item %02d is selected.", i));

        // set icon image of footer only for 5th item
        if (i == 5) {
            item.normal.footer.icon = disable;
        }
        else {
            item.normal.footer.icon = SFBImageSmp::EmptyInstance();
        }

        // insert at tail
        menu->InsertLast(item);
    }

    // [Optional] make 5th item invalid
    menu->SetItemEnable(5, false);

    // [Required] set flex list menu's real region to suitable region
    menu->SetRealBound(menu->GetSuitableBound(GetLocalBound().Deflate(10, 10)).SnapCenterMiddle(GetLocalBound().GetCenterMiddle()));

    // [Optional] make 1st item selected(*)
    menu->SetSelect(1);

    // (*note)
    // after setting flex list box menu's state to "enable", select item
    //

    return;
}

Execution Result:

Reference

SFYMenu | SFZTextMenu | SFXEvent | Result Event[SFEVT_RESPONDER_RESULT] | State

Member

Constructor/Destructor
SFZFlexListMenu( Void )
Constructor of the SFZFlexListMenu class.
~SFZFlexListMenu( Void )
Destructor of the SFZFlexListMenu class.
Public Functions
Void Clear( Void )
Remove all items from this flex list menu.
Bool ContainsAccessKey( AVKType key )
Check whether or not the specified access key of this flex list menu is set.
SInt32 FirstIndexOfCommandId( UInt32 id )
Get the index of the first item among the items matching with the specified command ID, of which the index equals or is greater than the specified index to search from the head.
SInt32 FirstIndexOfCommandId( UInt32 id , SInt32 index )
Get the index of the first item among the items matching with the specified command ID, of which the index equals or is greater than the specified index to search from the head.
Bool GetAccessKeyEnable( Void )
Get the value of enable flag of the access key of this flex list menu.
SFXBevelColorConstRef GetBevelColor( Void )
Get the bevel color for outer frame of this menu.
SFXRGBColorConstRef GetEvenListColor( Void )
Get the background color of unselected item at the even index of this flex list menu.
AEEFont GetFont( TextEnum textEnum )
Get the font for the specified text of this flex list menu.
SFXRGBColorConstRef GetGridLineColor( Void )
Get the color of grid line of this flex list menu.
Bool GetGridLineEnable( Void )
Get the value of enable flag of the grid line of this flex list menu.
HorizontalEnum GetHorizontalAlign( Void )
Get the horizontal alignment.
ItemRec GetItem( SInt32 index , SFCErrorPtr exception = null )
Get the item structure of the specified item of this flex list menu.
AVKType GetItemAccessKey( SInt32 index )
Get the access key of the specified item of this flex list menu.
UInt32 GetItemCommandId( SInt32 index )
Get the command ID of the specified item of this flex list menu.
SInt32 GetItemCount( Void )
Get the number of items of this flex list menu.
Bool GetItemEnable( SInt32 index )
Get the value of enable flag of the specified item of this flex list menu.
SInt16 GetItemHeight( SInt32 index )
Get the item height of this flex list menu. [pixels]
SFBImageSmpConstRef GetItemIconImage( SInt32 index , IconEnum iconEnum )
Get the specified icon image of the specified item of this flex list menu.
SFXWideStringConstRef GetItemText( SInt32 index , TextEnum textEnum )
Get the specified text of the specified item of this flex list menu.
SFXMarginConstRef GetListMargin( Void )
Get the margin within each item of this flex list menu.
SFXMarginConstRef GetMenuMargin( Void )
Get the menu margin of this flex list menu.
SFXRGBColorConstRef GetOddListColor( Void )
Get the background color of unselected item at the odd index of this flex list menu.
AVKType GetPageDownKey( Void )
Get the PageDown key to move the selected item down by one page.
AVKType GetPageUpKey( Void )
Get the PageUp key to move the selected item up by one page.
SFYScrollBarControlSmpConstRef GetScrollBarControl( Void )
Get the scroll bar control of this flex list menu.
SInt16 GetScrollBarWidth( Void )
Get the width of the scroll bar control of this flex list menu. [pixels]
DirectionEnum GetScrollDirection( Void )
Get the scroll direction.
UInt32 GetScrollInterval( Void )
Get the scroll-interval. [milliseconds]
Bool GetScrollRepeat( Void )
Get the value of repeat-scroll flag of this flex list menu.
SInt16 GetScrollStep( Void )
Get the scroll-step. [pixels]
SInt32 GetSelect( Void )
Get the index of currently selected item of this flex list menu.
SFXRGBColorConstRef GetSelectListColor( Void )
Get the background color of selected item of this flex list menu.
AVKType GetSnapDownKey( Void )
Get the SnapDown key to move the selected item down to the bottom.
AVKType GetSnapUpKey( Void )
Get the SnapUp key to move the selected item up to the top.
SInt16 GetSpaceSize( Void )
Get the space size between the elements of each item of this flex list menu. [pixels]
SFXRGBColorConstRef GetTextColor( TextEnum textEnum )
Get the color of the specified text of this flex list menu.
Toggle GetToggle( Void )
Get the value of toggle state of this flex list menu.
VerticalEnum GetVerticalAlign( Void )
Get the vertical alignment.
UInt32 GetWaitInterval( Void )
Get the waiting time to start to scroll. [milliseconds]
SFCError Insert( SInt32 index , ItemRecConstRef item )
Insert the specified item before the specified index.
SFCError Insert( SInt32 index , ItemRecConstPtr item , SInt32 length )
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 , SFXWideStringConstPtr text , SInt32 length )
Insert the specified item before the specified index.
SFCError InsertFirst( ItemRecConstRef item )
Insert the specified item at the head.
SFCError InsertFirst( ItemRecConstPtr item , SInt32 length )
Insert the specified item at the head.
SFCError InsertFirst( SFXWideStringConstRef text )
Insert the specified item at the head.
SFCError InsertFirst( SFXWideStringConstPtr text , SInt32 length )
Insert the specified item at the head.
SFCError InsertLast( ItemRecConstRef item )
Insert the specified item at the tail.
SFCError InsertLast( ItemRecConstPtr item , SInt32 length )
Insert the specified item at the tail.
SFCError InsertLast( SFXWideStringConstRef text )
Insert the specified item at the tail.
SFCError InsertLast( SFXWideStringConstPtr text , SInt32 length )
Insert the specified item at the tail.
SInt32 LastIndexOfCommandId( UInt32 id )
Get the index of the first item among the items matching with the specified command ID, of which the index equals or is smaller than the specified index to search from the tail.
SInt32 LastIndexOfCommandId( UInt32 id , SInt32 index )
Get the index of the first item among the items matching with the specified command ID, of which the index equals or is smaller than the specified index to search from the tail.
static
SFZFlexListMenuSmp
NewInstance( SFCErrorPtr exception = null )
Create a new instance of this responder class.
Void Remove( SInt32 index )
Remove specified items from this flex list menu.
Void Remove( SInt32 begin , SInt32 end )
Remove specified items from this flex list menu.
Void RemoveFirst( Void )
Remove the first item from this flex list menu.
Void RemoveLast( Void )
Remove the last item from this flex list menu.
Void SetAccessKeyEnable( Bool param )
Set the enable flag of access key of this flex list menu to the specified value.
Void SetBevelColor( SFXBevelColorConstRef param )
Set the bevel color for outer frame of this flex list menu to the specified value.
Void SetEvenListColor( SFXRGBColorConstRef param )
Set the background color of unselected item at the even index of this flex list menu to the specified value.
Void SetFont( TextEnum textEnum , AEEFont param )
Set the font for the specified text of this flex list menu to the specified value.
Void SetGridLineColor( SFXRGBColorConstRef param )
Set the color of grid line of this flex list menu to the specified value.
Void SetGridLineEnable( Bool param )
Set the enable flag of the grid line of this flex list menu to the specified value.
Void SetHorizontalAlign( HorizontalEnum param )
Set the horizontal alignment to the specified value.
SFCError SetItem( SInt32 index , ItemRecConstRef item )
Set the specified item of this flex list menu to the specified value.
SFCError SetItemAccessKey( SInt32 index , AVKType key )
Set the access key of the specified item of this flex list menu to the specified value.
SFCError SetItemCommandId( SInt32 index , UInt32 id )
Set the command ID of the specified item of this flex list menu to the specified value.
SFCError SetItemEnable( SInt32 index , Bool param )
Set the enable flag of the specified item of this flex list menu to the specified value.
SFCError SetItemIconImage( SInt32 index , IconEnum iconEnum , SFXPathConstRef path )
Set the specified icon image of the specified item of this flex list menu to the specified value.
SFCError SetItemIconImage( SInt32 index , IconEnum iconEnum , SFXPathConstRef path , UInt16 id )
Set the specified icon image of the specified item of this flex list menu to the specified value.
SFCError SetItemIconImage( SInt32 index , IconEnum iconEnum , SFBImageSmpConstRef param )
Set the specified icon image of the specified item of this flex list menu to the specified value.
SFCError SetItemText( SInt32 index , TextEnum textEnum , SFXPathConstRef path , UInt16 id )
Set the specified text of the specified item of this flex list menu to the specified value.
SFCError SetItemText( SInt32 index , TextEnum textEnum , SFXWideStringConstRef param )
Set the specified text of the specified item of this flex list menu to the specified value.
Void SetListMargin( SFXMarginConstRef param )
Set the margin within each item of this flex list menu to the specified value.
Void SetMenuMargin( SFXMarginConstRef param )
Set the menu margin of this flex list menu to the specified value.
Void SetOddListColor( SFXRGBColorConstRef param )
Set the background color of unselected item at the odd index of this flex list menu to the specified value.
Void SetPageDownKey( AVKType param )
Set the PageDown key to move the selected item down by one page to the specified value.
Void SetPageUpKey( AVKType param )
Set the PageUp key to move the selected item up by one page to the specified value.
SFCError SetScrollBarControl( SFYScrollBarControlSmpConstRef param )
Set the scroll bar control of this flex list menu to the specified value.
Void SetScrollBarWidth( SInt16 param )
Set the width of the scroll bar control of this flex list menu to the specified value.
Void SetScrollDirection( DirectionEnum param )
Set the scroll direction of currently selected item to the specified value.
Void SetScrollInterval( UInt32 param )
Set the scroll-interval of currently selected item to the specified value. [milliseconds]
Void SetScrollRepeat( Bool param )
Set the repeat-scroll flag of this flex list menu to the specified value.
Void SetScrollStep( SInt16 param )
Set the scroll-step of currently selected item to the specified value. [pixels]
Void SetSelect( SInt32 param )
Set the index of currently selected item of this flex list menu to the specified value.
Void SetSelectListColor( SFXRGBColorConstRef param )
Set the background color of selected item of this flex list menu to the specified value.
Void SetSnapDownKey( AVKType param )
Set the SnapDown key to move the selected item down to the bottom to the specified value.
Void SetSnapUpKey( AVKType param )
Set the SnapUp key to move the selected item up to the top to the specified value.
Void SetSpaceSize( SInt16 param )
Set the space size between the elements of each item of this flex list menu to the specified value. [pixels]
Void SetTextColor( TextEnum textEnum , SFXRGBColorConstRef param )
Set the color of the specified text of this flex list menu to the specified value.
Void SetToggle( Toggle param )
Set the toggle state of this flex list menu to the specified value.
Void SetVerticalAlign( VerticalEnum param )
Set the vertical alignment to the specified value.
Void SetWaitInterval( UInt32 param )
Set the waiting time to start the scroll of the item to the specified value. [milliseconds]
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
Bool HandleAccessKey( AVKType key )
This function will be called when the SFEVT_KEY event of the access key is received.
Void HandleBoundOptimize( SFXRectanglePtr rectangle )
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 HandleBoundRequest( SFXRectanglePtr rectangle )
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 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 HandleEscapeKey( Void )
This function will be called when the SFEVT_KEY event of the ESCAPE key is received.
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 responder.]
Void HandleSelectDownKey( Void )
This function will be called when the SFEVT_KEY event of the DOWN key is received.
Void HandleSelectUpKey( Void )
This function will be called when the SFEVT_KEY event of the UP key is received.
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 HandleBoundReal( Void ) (inherits from SFYMenu)
This function will be called when the real region is changed.
Void HandleSelectLeftKey( Void ) (inherits from SFYMenu)
This function will be called when the SFEVT_KEY event of the LEFT key is received.
Void HandleSelectRightKey( Void ) (inherits from SFYMenu)
This function will be called when the SFEVT_KEY event of the RIGHT key is received.
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 SFZFlexListMenu class.
DefaultEnum
Constants that represent the default value for various parameters.
DirectionEnum
Constants that represent the scroll direction.
HorizontalEnum
Constants that represent the horizontal alignment.
IconEnum
Constants that is used to specify the target icon image.
ItemRec
Structure that represent the various attributes of the item, which is called "item structure".
SelectEnum
Constants that represent whether or not the item is selected.
TextEnum
Constants that is used to specify the target text.
ToggleEnum
Constants that is used to specify the toggle states.
VerticalEnum
Constants that represent the vertical alignment.

SFZFlexListMenu::SFZFlexListMenu
Constructor of the SFZFlexListMenu class.
[ protected, explicit ]
SFZFlexListMenu(Void);

Description

This constructor performs the initializations as follows:

  1. Set the type of this responder to "mfmn".
  2. Initialize the default scroll bar control.
  3. Set the width of the scroll bar control to SFZFlexListMenu::DEFAULT_BAR_WIDTH.
  4. Set the repeat-scroll flag to "false".
  5. Set the bevel color for outer frame to SFXBevelColor(SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00), SFXRGBColor(0xEE, 0xEE, 0xEE, 0x00), SFXRGBColor(0x88, 0x88, 0x88, 0x00)).
  6. Set the menu margin to SFXMargin(2, 2, 2, 2).
  7. Set the index-0th item to be displayed at the top of the real region as currently selected item.
  8. Set the background color of unselected item to SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00)[white color].
  9. Set the foreground color of unselected item to SFXRGBColor(0x00, 0x00, 0x00, 0x00)[black color].
  10. Set the background color of selected item to SFXRGBColor(0x11, 0x22, 0xBB, 0x00)[blue color]
  11. Set the foreground color of selected item to SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00)[white color].
  12. Set the color of the grid line to SFXRGBColor(0x00, 0x00, 0x00, 0x00)[black color].
  13. Set the enable flag of the grid line to "false".
  14. Set the margin within each item to SFXMargin(1, 1, 1, 1).
  15. Set the enable flag of access key to "true".
  16. Set the space size between the elements of each item to SFZFlexListMenu::DEFAULT_SPACE.
  17. Set the default horizontal alignment to SFZFlexListMenu::DEFAULT_HORIZONTAL. [about header and body at selected and unseleceted]
  18. Set the default vertical alignment to SFZFlexListMenu::DEFAULT_VERTICAL. [about header and body at selected and unseleceted]
  19. Set the default font to AEE_FONT_NORMAL. [about header and body at selected and unseleceted]
  20. Set the toggle state to 0.
  21. Set the waiting time to start the scroll of currently selected item to SFZFlexListMenu::DEFAULT_WAIT [milliseconds].
  22. Set the scroll direction of currently selected item to SFZFlexListMenu::DEFAULT_DIRECTION.
  23. Set the scroll-interval of currently selected item to SFZFlexListMenu::DEFAULT_SCROLL [milliseconds].
  24. Set the scroll-step to SFZFlexListMenu::DEFAULT_STEP [pixels].
  25. Set the operation key to AVK_SELECT.
  26. Set the ESCAPE key to AVK_CLR.
  27. Set the UP key to AVK_UP.
  28. Set the DOWN key to AVK_DOWN.
  29. Set the PageUp key to AVK_TXPGUP.
  30. Set the PageDown key to AVK_TXPGDOWN.
  31. Set the SnapUp key to AVK_TXHOME.
  32. Set the SnapDown key to AVK_TXEND.
  33. Register the event handlers in the table below into this responder.

Table 230. Event handler

Event Content of the handler
SFEVT_KEY event of the operation key set with SFYBoxControl::SetOperateKey Call the SFZFlexListMenu::HandleOperateKey function.
SFEVT_KEY event of the access key set with SFZFlexListMenu::SetItemAccessKey Call the SFZFlexListMenu::HandleOperateKey function.
SFEVT_KEY event of the ESCAPE key set with SFYMenu::SetEscapeKey Call the SFZFlexListMenu::HandleEscapeKey function.
SFEVT_KEY event of the ScrollUp key set with SFYMenu::SetSelectUpKey Call the SFZFlexListMenu::HandleSelectUpKey function. [Make the above item be currently selected item(scroll up one item if necessary).]
SFEVT_KEY event of the ScrollDown key set with SFYMenu::SetSelectDownKey Call the SFZFlexListMenu::HandleSelectDownKey function. [Make the below item be currently selected item(scroll down one item if necessary).]
SFEVT_KEY event of the PageUp key set with SFZFlexListMenu::SetPageUpKey Scroll up one page
SFEVT_KEY event of the PageDown key set with SFZFlexListMenu::SetPageDownKey Scroll down one page
SFEVT_KEY event of the SnapUp key set with SFZFlexListMenu::SetSnapUpKey Scroll up to the top
SFEVT_KEY event of the SnapDown key set with SFZFlexListMenu::SetSnapDownKey Scroll down to the bottom
Value event[SFEVT_RESPONDER_VALUE] which will occur when the currently selected item is changed Call the SFYControl::SetCurrentValue function to set the current value of this control to the index of currently selected item.
Value event[SFEVT_RESPONDER_BOUND] which will occur when the vertical element of the region size is changed Relocate this flex box control.
[Note] Note
In a responder inheriting from SFZFlexListMenu, the corresponding handler will be called when one of the above events occurs.

Reference

SFYResponder::SetType | SFZFlexListMenu::CodeEnum | SFZFlexListMenu::SetScrollBarWidth | SFYControl::GetCurrentValue | SFZFlexListMenu::SetBevelColor | SFZFlexListMenu::SetMenuMargin | SFZFlexListMenu::SetScrollRepeat | SFZFlexListMenu::SetEvenListColor | SFZFlexListMenu::SetOddListColor | SFZFlexListMenu::SetSelectListColor | SFZFlexListMenu::SetTextColor | SFZFlexListMenu::SetGridLineColor | SFZFlexListMenu::SetListMargin | SFZFlexListMenu::SetGridLineEnable | SFZFlexListMenu::SetAccessKeyEnable | SFZFlexListMenu::SetFont | SFZFlexListMenu::SetSpaceSize | SFZFlexListMenu::SetToggle | SFZFlexListMenu::SetScrollDirection | SFZFlexListMenu::SetScrollInterval | SFZFlexListMenu::SetScrollStep | SFZFlexListMenu::SetWaitInterval | SFYBoxControl::SetOperateKey | SFZFlexListMenu::SetItemAccessKey | SFZFlexListMenu::HandleOperateKey | SFYMenu::SetEscapeKey | SFZFlexListMenu::HandleEscapeKey | SFYMenu::SetSelectUpKey | SFYMenu::SetSelectDownKey | SFZFlexListMenu::SetPageUpKey | SFZFlexListMenu::SetPageDownKey | SFZFlexListMenu::SetSnapUpKey | SFZFlexListMenu::SetSnapDownKey | SFZFlexListMenu::HorizontalEnum | SFZFlexListMenu::VerticalEnum | SFZFlexListMenu::DirectionEnum | SFZFlexListMenu::DefaultEnum | SFZFlexListMenu::ToggleEnum | SFXMargin | SFXRGBColor | SFXEvent | Type | Real Region | Event | Key Event[SFEVT_KEY] | Value Event[SFEVT_RESPONDER_VALUE] | Region Event[SFEVT_RESPONDER_BOUND]


SFZFlexListMenu::~SFZFlexListMenu
Destructor of the SFZFlexListMenu class.
[ protected, virtual ]
virtual ~SFZFlexListMenu(Void);

Description

Delete all items from this flex list menu.

Reference

SFZFlexListMenu::Clear


SFZFlexListMenu::Clear
Remove all items from this flex list menu.
[ public ]
Void Clear(Void);

Reference

SFZFlexListMenu::Remove


SFZFlexListMenu::ContainsAccessKey
Check whether or not the specified access key of this flex list menu is set.
[ public, const ]
Bool ContainsAccessKey(
    AVKType key   // access key
);

Return value

  • If set: true
  • Otherwise: false

SFZFlexListMenu::FirstIndexOfCommandId
Get the index of the first item among the items matching with the specified command ID, of which the index equals or is greater than the specified index to search from the head.
[ public, const ]
SInt32 FirstIndexOfCommandId(
    UInt32 id   // command id
);
[ public, const ]
SInt32 FirstIndexOfCommandId(
    UInt32 id      // command id
    SInt32 index   // beginning index to search
);

Return value

  • If succeeds: the first item among the items which matches the specified command ID.
  • If failed: -1

Description

This function gets the index of the first item among the items matching with the specified command ID, of which the index equals or is greater than the specified index to search from the head.

[Note] Note
The beginning index of the item to search can be specified.

Reference

SFZFlexListMenu::LastIndexOfCommandId


SFZFlexListMenu::GetAccessKeyEnable
Get the value of enable flag of the access key of this flex list menu.
[ public, const ]
Bool GetAccessKeyEnable(Void);

Return value

  • If valid: true
  • Otherwise: false

Description

This function gets the value of enable flag of the access key of this flex list menu.

Reference

SFZFlexListMenu::SetAccessKeyEnable


SFZFlexListMenu::GetBevelColor
Get the bevel color for outer frame of this menu.
[ public, const ]
SFXBevelColorConstRef GetBevelColor(Void);

Return value

Bevel color (SFXBevelColor) of this flex list menu, which is the color of the outer frame to draw this flex list menu in the 3D style.

Reference

SFZFlexListMenu::SetBevelColor | SFXBevelColor


SFZFlexListMenu::GetEvenListColor
Get the background color of unselected item at the even index of this flex list menu.
[ public, const ]
SFXRGBColorConstRef GetEvenListColor(Void);

Return value

Background color(SFXRGBColor) of unselected item at the even index of this flex list menu.

Reference

SFZFlexListMenu::SetEvenListColor


SFZFlexListMenu::GetFont
Get the font for the specified text of this flex list menu.
[ public, const ]
AEEFont GetFont(
    TextEnum textEnum   // text enum
);

Return value

Font of the text of this flex list box control, which is specified by the text enum(SFZFlexListMenu::TextEnum).

Description

This function gets the font for the specified text of this flex list menu.

Reference

SFZFlexListMenu::TextEnum | SFZFlexListMenu::SetFont


SFZFlexListMenu::GetGridLineColor
Get the color of grid line of this flex list menu.
[ public, const ]
SFXRGBColorConstRef GetGridLineColor(Void);

Return value

Color(SFXRGBColor) of grid line of this flex list menu.

Reference

SFZFlexListMenu::SetGridLineColor | SFZFlexListMenu::SetGridLineEnable


SFZFlexListMenu::GetGridLineEnable
Get the value of enable flag of the grid line of this flex list menu.
[ public, const ]
Bool GetGridLineEnable(Void);

Return value

Value of the enable flag of the grid line of this flex list menu.

Reference

SFZFlexListMenu::SetGridLineEnable | SFZFlexListMenu::SetGridLineColor


SFZFlexListMenu::GetHorizontalAlign
Get the horizontal alignment.
[ public, const ]
HorizontalEnum GetHorizontalAlign(Void);

Return value

Value of horizontal alignment (SFZFlexListMenu::HorizontalEnum).

Reference

SFZFlexListMenu::SetHorizontalAlign | SFZFlexListMenu::HorizontalEnum


SFZFlexListMenu::GetItem
Get the item structure of the specified item of this flex list menu.
[ public, const ]
ItemRec GetItem(
    SInt32 index                   // index of item
    SFCErrorPtr exception = null   // error
);

Return value

Item structure(SFZFlexListBoxControl::ItemRec) of the specified item of this flex list menu.

Description

This function gets the item structure of the specified item of this flex list menu.

[Note] Item structure

For the item structure, refer to SFZFlexListMenu::ItemRec.

Reference

SFZFlexListMenu::SetItem | SFZFlexListMenu::ItemRec


SFZFlexListMenu::GetItemAccessKey
Get the access key of the specified item of this flex list menu.
[ public, const ]
AVKType GetItemAccessKey(
    SInt32 index   // index of item
);

Description

This function gets the access key of the specified item of this flex list menu. "0" will be returned if the access key is not set.

Reference

SFZFlexListMenu::SetItemAccessKey


SFZFlexListMenu::GetItemCommandId
Get the command ID of the specified item of this flex list menu.
[ public, const ]
UInt32 GetItemCommandId(
    SInt32 index   // index of item
);

Return value

Command ID of the specified item of this flex list menu.

Reference

SFZFlexListMenu::SetItemCommandId |


SFZFlexListMenu::GetItemCount
Get the number of items of this flex list menu.
[ public, const ]
SInt32 GetItemCount(Void);

Return value

Number of the items of this flex list menu.


SFZFlexListMenu::GetItemEnable
Get the value of enable flag of the specified item of this flex list menu.
[ public, const ]
Bool GetItemEnable(
    SInt32 index   // index of item
);

Return value

  • If item is valid: true
  • Otherwise: false

Description

This function gets the value of enable flag of the specified item of this flex list menu. If the item is valid, "true" will be returned. Otherwise "false" will be returned.

Reference

SFZFlexListMenu::SetItemEnable


SFZFlexListMenu::GetItemHeight
Get the item height of this flex list menu. [pixels]
[ public, const ]
SInt16 GetItemHeight(
    SInt32 index   // index of item
);

Return value

Item height of this flex list menu. [pixels]

Description

This function gets the item height of this flex list menu[pixels], which is calculated using the following values:

  1. The height of the font set with the SFZFlexListMenu::SetFont function.
  2. The height of the icon image set with the SFZFlexListMenu::SetItemIconImage function.
  3. The vertical margin set with the SFZFlexListMenu::SetListMargin function.

Reference

SFZFlexListMenu::SetFont | SFZFlexListMenu::SetItemIconImage | SFZFlexListMenu::SetListMargin


SFZFlexListMenu::GetItemIconImage
Get the specified icon image of the specified item of this flex list menu.
[ public, const ]
SFBImageSmpConstRef GetItemIconImage(
    SInt32 index        // index of item
    IconEnum iconEnum   // icon enum
);

Return value

Icon image of the specified item of this flex list menu which corresponds to the specified icon enum(SFZFlexListMenu::IconEnum).

Reference

SFZFlexListMenu::IconEnum | SFZFlexListMenu::SetItemIconImage


SFZFlexListMenu::GetItemText
Get the specified text of the specified item of this flex list menu.
[ public, const ]
SFXWideStringConstRef GetItemText(
    SInt32 index        // index of item
    TextEnum textEnum   // text enum
);

Return value

Text(SFXWideString) of the specified item of this flex list menu which corresponds to the specified text enum(SFZFlexListMenu::TextEnum).

Reference

SFZFlexListMenu::TextEnum | SFZFlexListMenu::SetItemText


SFZFlexListMenu::GetListMargin
Get the margin within each item of this flex list menu.
[ public, const ]
SFXMarginConstRef GetListMargin(Void);

Return value

Margin(SFXMargin) within each item of this flex list menu

Reference

SFZFlexListMenu::SetListMargin


SFZFlexListMenu::GetMenuMargin
Get the menu margin of this flex list menu.
[ public, const ]
SFXMarginConstRef GetMenuMargin(Void);

Return value

Margin(SFXMargin) for the outer frame of this flex list menu.

Reference

SFZFlexListMenu::SetMenuMargin


SFZFlexListMenu::GetOddListColor
Get the background color of unselected item at the odd index of this flex list menu.
[ public, const ]
SFXRGBColorConstRef GetOddListColor(Void);

Return value

Background color(SFXRGBColor) of unselected item at the odd index of this flex list menu.

Reference

SFZFlexListMenu::SetOddListColor


SFZFlexListMenu::GetPageDownKey
Get the PageDown key to move the selected item down by one page.
[ public, const ]
AVKType GetPageDownKey(Void);

Return value

PageDown key to move the selected item down by one page.

Reference

SFZFlexListMenu::SetPageDownKey


SFZFlexListMenu::GetPageUpKey
Get the PageUp key to move the selected item up by one page.
[ public, const ]
AVKType GetPageUpKey(Void);

Return value

PageUp key to move the selected item up by one page.

Reference

SFZFlexListMenu::SetPageUpKey


SFZFlexListMenu::GetScrollBarControl
Get the scroll bar control of this flex list menu.
[ public, const ]
SFYScrollBarControlSmpConstRef GetScrollBarControl(Void);

Description

This function gets the scroll bar control, which this flex list menu contains internally.

The developer can change the appearance the scroll bar control such as its color using the scroll bar control obtained.

The scroll bar control of the developer's own can be set using the SFZFlexListMenu::SetScrollBarControl function.

Example

The code below is to get the scroll bar control and change the color of its track.

// get the scroll bar control and change the color of its track
SFZFlexListMenuSmp          menu;
SFYScrollBarControlSmp      bar;

menu = SFZFlexListMenu::NewInstance();

if ((bar = menu->GetScrollBarControl()) != null) {
    bar->SetTrackColor(SFXRGBColor(0xDD, 0xFF, 0xDD, 0x00));
}

Reference

SFYScrollBarControl | SFZFlexListMenu::SetScrollBarControl


SFZFlexListMenu::GetScrollBarWidth
Get the width of the scroll bar control of this flex list menu. [pixels]
[ public, const ]
SInt16 GetScrollBarWidth(Void);

Return value

Width of the scroll bar control, which this flex list menu contains internally. [pixels]

Reference

SFZFlexListMenu::SetScrollBarWidth


SFZFlexListMenu::GetScrollDirection
Get the scroll direction.
[ public, const ]
DirectionEnum GetScrollDirection(Void);

Return value

Scroll direction(SFZFlexListMenu::DirectionEnum) set with the SFZFlexListMenu::SetScrollDirection function.

Reference

SFZFlexListMenu::SetScrollDirection | SFZFlexListMenu::DirectionEnum


SFZFlexListMenu::GetScrollInterval
Get the scroll-interval. [milliseconds]
[ public, const ]
UInt32 GetScrollInterval(Void);

Return value

Scroll-interval set with the SFZFlexListMenu::SetScrollInterval function. [milliseconds]

Reference

SFZFlexListMenu::SetScrollInterval


SFZFlexListMenu::GetScrollRepeat
Get the value of repeat-scroll flag of this flex list menu.
[ public, const ]
Bool GetScrollRepeat(Void);

Return value

  • If repeat-scroll is enable: true
  • Otherwise: false

Reference

SFZFlexListMenu::SetScrollRepeat


SFZFlexListMenu::GetScrollStep
Get the scroll-step. [pixels]
[ public, const ]
SInt16 GetScrollStep(Void);

Return value

Scroll-step set with the SFZFlexListMenu::SetScrollStep function. [pixels]

Reference

SFZFlexListMenu::SetScrollStep


SFZFlexListMenu::GetSelect
Get the index of currently selected item of this flex list menu.
[ public, const ]
SInt32 GetSelect(Void);

Return value

Index of currently selected item of this flex list menu.

Reference

SFZFlexListMenu::SetSelect


SFZFlexListMenu::GetSelectListColor
Get the background color of selected item of this flex list menu.
[ public, const ]
SFXRGBColorConstRef GetSelectListColor(Void);

Return value

Background color(SFXRGBColor) of selected item of this flex list menu.

Reference

SFZFlexListMenu::SetSelectListColor


SFZFlexListMenu::GetSnapDownKey
Get the SnapDown key to move the selected item down to the bottom.
[ public, const ]
AVKType GetSnapDownKey(Void);

Return value

SnapDown key to move the selected item down to the bottom.

Reference

SFZFlexListMenu::SetSnapDownKey


SFZFlexListMenu::GetSnapUpKey
Get the SnapUp key to move the selected item up to the top.
[ public, const ]
AVKType GetSnapUpKey(Void);

Return value

SnapUp key to move the selected item up to the top.

Reference

SFZFlexListMenu::SetSnapUpKey


SFZFlexListMenu::GetSpaceSize
Get the space size between the elements of each item of this flex list menu. [pixels]
[ public, const ]
SInt16 GetSpaceSize(Void);

Return value

Space size between the elements of each item of this flex list menu. [pixels]

Reference

SFZFlexListMenu::SetSpaceSize


SFZFlexListMenu::GetTextColor
Get the color of the specified text of this flex list menu.
[ public, const ]
SFXRGBColorConstRef GetTextColor(
    TextEnum textEnum   // text enum
);

Return value

Color(SFXRGBColor) of text specified with a text enum(SFZFlexListMenu::TextEnum) of this flex list menu.

Reference

SFZFlexListMenu::TextEnum | SFZFlexListMenu::SetTextColor


SFZFlexListMenu::GetToggle
Get the value of toggle state of this flex list menu.
[ public, const ]
Toggle GetToggle(Void);

Return value

Value of the toggle state of this flex list menu(logical sum of SFZFlexListBoxControl::ToggleEnum).

Reference

SFZFlexListMenu::ToggleEnum | SFZFlexListMenu::SetToggle


SFZFlexListMenu::GetVerticalAlign
Get the vertical alignment.
[ public, const ]
VerticalEnum GetVerticalAlign(Void);

Return value

Value(SFZFlexListMenu::VerticalEnum) of vertical alignment.

Reference

SFZFlexListMenu::SetVerticalAlign | SFZFlexListMenu::VerticalEnum


SFZFlexListMenu::GetWaitInterval
Get the waiting time to start to scroll. [milliseconds]
[ public, const ]
UInt32 GetWaitInterval(Void);

Return value

Waiting time to start the scroll set with the SFZFlexListMenu::SetWaitInterval function. [milliseconds]

Reference

SFZFlexListMenu::SetWaitInterval


SFZFlexListMenu::HandleAccessKey
This function will be called when the SFEVT_KEY event of the access key is received.
[ protected, virtual ]
Bool HandleAccessKey(
    AVKType key   // access key to be pressed
);

Description

This function will be called when the SFEVT_KEY event(key event[SFEVT_KEY]) of the access key set with the SFZFlexListMenu::SetItemAccessKey function is received.

In case you want to perform your own processing, override this function.

The default implementation is as follows:

  1. In the following, the selected item is the one that the access key of the received SFEVT_KEY event is set to using the SFZFlexListMenu::SetItemAccessKey function.
  2. If the enable flag of access key using the SFZFlexListMenu::SetAccessKeyEnable function or the enable flag of selected item using the SFZFlexListMenu::SetAccessKeyEnable function is set "false", nothing will happen.
  3. If the enable flag of access key and the enable flag of selected item are set to "true", the result event of SFXEvent(SFEVT_RESPONDER_RESULT, SFP16_RESULT_OK, index of the item which is set to the specified access key) will be sent.
[Note] Note
If the same access key is set to more than one item, only the setting of the first item is valid.

Internal Implementation

Internal implementation of the SFZFlexListMenu::HandleAccessKey function is as follows:

/*protected virtual */Bool SFZFlexListMenu::HandleAccessKey(AVKType key)
{
    Bool                                        result(false);

    for (SInt32 i = 0; i < GetItemCount(); ++ i) {
        if (GetItemAccessKey(i) == key) {
            if (GetItemEnable(i)) {
                _vertical->SetCurrentValue(i);
                InvokeForward(SFXEvent(SFEVT_RESPONDER_RESULT, SFP16_RESULT_OK, i), false);
                result = true;
                break;
            }
        }
    }
    return result;
}// SFZFlexListMenu::HandleAccessKey //
}// SFYWidget::HandleBoundOptimize //

Reference

SFZFlexListMenu::SetItemAccessKey | SFZFlexListMenu::SetAccessKeyEnable | SFZFlexListMenu::SetItemEnable SFYControl::GetCurrentValue | SFXEvent | Result Event | Key Event[SFEVT_KEY]


SFZFlexListMenu::HandleBoundOptimize
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.]
[ protected, virtual, const ]
Void HandleBoundOptimize(
    SFXRectanglePtr rectangle   // hint region and calculated region
);

Description

This function will be called when the region event [SFXEvent(SFEVT_RESPONDER_BOUND, SFP16_BOUND_OPTIMIZE, rectangle)] is received.

This function calculates the suitable rectangle size of this responder within the specified hint rectangle[i.e., rectangle element (P32 parameter) of the region event].

The suitable rectangle size is stored into the size element of the rectangle argument as a result of calculation. It is recommended not to change the origin of the rectangle argument in this function.

[Note] Region event[(SFEVT_RESPONDER_BOUND, SFP16_BOUND_OPTIMIZE) event]

If the rectangle argument of the hint region is specified, the SFYResponder::GetSuitableBound function will send the region event [SFXEvent(SFEVT_RESPONDER_BOUND, SFP16_BOUND_OPTIMIZE, rectangle)] to this responder.

Then, the SFYWidget::HandleBoundOptimize virtual function will be called.

The rectangle element (P32 parameter) of the region event is set to the hint region as an initial value.

Internal Implementation

Internal implementation of the SFZFlexListMenu::HandleBoundOptimize function is as follows:

struct ScrollBarRec {
    SFYScrollBarControlSmp              smp;
    SInt16                              width;
};

SFYVerticalFlexListControlSmp   _vertical;
ScrollBarRec                    _bar;

/*protected virtual */Void SFZFlexListMenu::HandleBoundOptimize(SFXRectanglePtr rectangle) const
{
    SFXSize                                     size;

    rectangle->Deflate(GetMenuMargin());
    size.Set(_vertical->GetSuitableBound(*rectangle).GetSize());
    if (_vertical->IsOptimizeOver()) {
        rectangle->SubWidth(_bar.width);
        size.Set(_vertical->GetSuitableBound(*rectangle).GetSize());
        rectangle->SetSize(size);
        rectangle->AddWidth(_bar.width);
    }
    else {
        rectangle->SetSize(size);
    }
    rectangle->Inflate(GetMenuMargin());
    return;
}// SFZFlexListMenu::HandleBoundRequest //

Reference

SFYResponder::GetSuitableBound | SFZFlexListMenu::SetFont | SFZFlexListMenu::SetItem | SFZFlexListMenu::SetItemIconImage | SFZFlexListMenu::SetItemText | SFZFlexListMenu::SetSpaceSize | SFZFlexListMenu::SetListMargin | SFZFlexListMenu::SetScrollBarWidth | SFZFlexListMenu::GetMenuMargin | SFXMargin | SFZTextMenu | SFXEvent | Region Event[SFEVT_RESPONDER_BOUND] | Handler for the Region Event[XANDLER_DECLARE_VOIDBOUND]


SFZFlexListMenu::HandleBoundRequest
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_REQUEST) event is received. [Calculate the suitable rectangle size of this responder.]
[ protected, virtual, const ]
Void HandleBoundRequest(
    SFXRectanglePtr rectangle   // calculated region
);

Description

This function will be called when the region event [SFXEvent(SFEVT_RESPONDER_BOUND, SFP16_BOUND_REQUEST, rectangle)] is received.

This function calculates the suitable rectangle size of this responder.

The suitable rectangle size is stored into the size element of the rectangle argument as a result of calculation. It is recommended not to change the origin element of the rectangle argument within this function.

[Note] Region event[(SFEVT_RESPONDER_BOUND, SFP16_BOUND_REQUEST) event]

If the rectangle argument of the hint region is not specified, the SFYResponder::GetSuitableBound function will send the region event [SFXEvent(SFEVT_RESPONDER_BOUND, SFP16_BOUND_REQUEST, rectangle)] to this responder.

Then, the SFYWidget::HandleBoundRequest virtual function will be called.

The rectangle element (P32 parameter) of the region event is set to the real region as an initial value.

[Tip] Tip
Default value of the real region: SFXRectangle(0, 0, 0, 0)

Internal Implementation

Internal implementation of the SFZFlexListMenu::HandleBoundRequest function is as follows:

SFYVerticalFlexListControlSmp   _vertical;

/*protected virtual */Void SFZFlexListMenu::HandleBoundRequest(SFXRectanglePtr rectangle) const
{
    SFXSize                                     size;

    rectangle->Deflate(GetMenuMargin());
    size.Set(_vertical->GetSuitableBound().GetSize());
    rectangle->SetSize(size);
    rectangle->Inflate(GetMenuMargin());
    return;
}// SFZFlexListMenu::HandleBoundRequest //

Reference

SFYResponder::GetSuitableBound | SFZFlexListMenu::SetFont | SFZFlexListMenu::SetItem | SFZFlexListMenu::SetItemIconImage | SFZFlexListMenu::SetItemText | SFZFlexListMenu::SetSpaceSize | SFZFlexListMenu::SetListMargin | SFZFlexListMenu::GetMenuMargin | SFXMargin | SFZTextMenu | SFXEvent | Real Region Region Event[SFEVT_RESPONDER_BOUND] | Handler for the Region Event[XANDLER_DECLARE_VOIDBOUND]


SFZFlexListMenu::HandleBoundVirtual
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.]
[ protected, virtual ]
Void HandleBoundVirtual(Void);

Description

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 real region with the new local region and relocate this responder to fit into the new virtual region.

[Note] 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.

[Note] 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

Internal implementation of the SFZFlexListMenu::HandleBoundVirtual function is as follows:

struct ScrollBarRec {
    SFYScrollBarControlSmp              smp;
    SInt16                              width;
};

SFYVerticalFlexListControlSmp   _vertical;
ScrollBarRec                    _bar;

/*protected virtual */Void SFZFlexListMenu::HandleBoundVirtual(Void)
{
    Relocate();
    return;
}// SFZFlexListMenu::HandleBoundVirtual //

/*private */Void SFZFlexListMenu::Relocate(Void)
{
    SFYFlexListItemWidgetSmp                    widget;
    SFXRectangle                                rc(GetLocalBound());
    SFXRectangle                                vx;
    SFXRectangle                                bx;
    SInt16                                      width(0);

    if (_bar.smp != null && _bar.smp->IsScrollable()) {
        width = _bar.width;
    }
    rc.Deflate(GetMenuMargin());
    vx.Set(rc.SubWidth(width));
    rc.AddX(rc.GetWidth());
    bx.Set(rc.SetWidth(width));
    if (_bar.smp != null) {
        _bar.smp->SetRealBound(bx);
    }
    _vertical->SetRealBound(vx);
    if (GetItemEnable(GetSelect())) {
        if ((widget = GetItemWidget(GetSelect())) != null) {
            if (widget->GetStateActive(true)) {
                widget->StartScroll();
            }
        }
    }
    return;
}// SFZFlexListMenu::Relocate //

Reference

SFYResponder::SetRealBound | SFYResponder::SetVirtualBound | Region Event[SFEVT_RESPONDER_BOUND] | Handler for the Region Event[XANDLER_DECLARE_VOIDBOUND] | Virtual Region | Real Region | Local Region


SFZFlexListMenu::HandleEscapeKey
This function will be called when the SFEVT_KEY event of the ESCAPE key is received.
[ protected, virtual ]
Void HandleEscapeKey(Void);

Description

This function will be called when the ESCAPE key set with the SFYMenu::SetEscapeKey function is pressed.

In case you want to perform your own processing, override this function.

The default implementation is to send the SFXEvent(SFEVT_RESPONDER_RESULT, SFP16_RESULT_ESCAPE, 0) event.

Internal Implementation

Internal implementation of the SFZFlexListMenu::HandleEscapeKey function is as follows:

/*protected virtual */Void SFZFlexListMenu::HandleEscapeKey(Void)
{
    InvokeForward(SFXEvent(SFEVT_RESPONDER_RESULT, SFP16_RESULT_ESCAPE, 0), false);
    return;
}// SFZFlexListMenu::HandleEscapeKey //

Reference

SFYMenu::SetEscapeKey | SFXEvent | Result Event[SFEVT_RESPONDER_RESULT] | Key Event[SFEVT_KEY]


SFZFlexListMenu::HandleOperateKey
This function will be called when the SFEVT_KEY event of the operation key is received.
[ protected, virtual ]
Void HandleOperateKey(Void);

Description

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 as below.

The result event of SFXEvent(SFEVT_RESPONDER_RESULT, SFP16_RESULT_OK, return value of SFZFlexListMenu::GetSelect function) will be sent if the enable flag is set to "true" with the SFZFlexListMenu::SetItemEnable function.

If the enable flag is set to "false", the result event will not be sent.

Internal Implementation

Internal implementation of the SFZFlexListMenu::HandleOperateKey function is as follows:

/*protected virtual */Void SFZFlexListMenu::HandleOperateKey(Void)
{
    if (GetItemEnable(GetSelect())) {
        InvokeForward(SFXEvent(SFEVT_RESPONDER_RESULT, SFP16_RESULT_OK, GetSelect()), false);
    }
    return;
}// SFZFlexListMenu::HandleOperateKey //

Reference

SFYMenu::SetOperateKey | SFZFlexListMenu::SetItemEnable | SFZFlexListMenu::GetSelect | SFXEvent | Result Event[SFEVT_RESPONDER_RESULT] | Key Event[SFEVT_KEY]


SFZFlexListMenu::HandleRenderRequest
This function will be called when the (SFEVT_RESPONDER_RENDER, SFP16_RENDER_REQUEST) event is received. [Draw this responder.]
[ protected, virtual, const ]
Void HandleRenderRequest(
    SFXGraphicsPtr graphics   // graphics object
);

Description

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 responder.

[Note] 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.

[Note] 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:

  1. At the end of the event loop
  2. At the applet start / resume or the end of a highest priority event handler
  3. In the callback, which is outside the event loop.

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

Internal implementation of the SFZFlexListMenu::HandleRenderRequest function is as follows:

struct ColorRec {
    SFXBevelColor                       bevel;
};
ColorRec                        _color;

/*protected virtual */Void SFZFlexListMenu::HandleRenderRequest(SFXGraphicsPtr graphics) const
{
    DrawBevel(graphics, GetLocalBound());
    return;
}// SFZFlexListMenu::HandleRenderRequest //

/*private */Void SFZFlexListMenu::DrawBevel(SFXGraphicsPtr graphics, SFXRectangleConstRef rectangle) const
{
    SFXBevelColor                               bevel;
    SFXRectangle                                result(rectangle);

    bevel.Set(_color.bevel);
    if (!GetStateActive(true) || GetMenuMargin().Equals(SFXMargin(0, 0))) {
        bevel.SetLight(bevel.GetBase());
        bevel.SetDark(bevel.GetBase());
    }
    graphics->FillBevelRectangle(result, bevel);
    return;
}// SFZFlexListMenu::DrawBevel //

Reference

SFYResponder::Invalidate | SFYResponder::Render | SFYResponder::InvokeBackward | Drawing Event[SFEVT_RESPONDER_RENDER] | Handler for the Drawing Event[XANDLER_DECLARE_VOIDRENDER] | Rendering | Event Loop | Responder Tree


SFZFlexListMenu::HandleSelectDownKey
This function will be called when the SFEVT_KEY event of the DOWN key is received.
[ protected, virtual ]
Void HandleSelectDownKey(Void);

Description

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 to make the next item of the currently setected item selected.

Internal Implementation

Internal implementation of the SFZFlexListMenu::HandleSelectDownKey function is as follows:

SFYVerticalFlexListControlSmp   _vertical;

/*protected virtual */Void SFZFlexListMenu::HandleSelectDownKey(Void)
{
    _vertical->ScrollDown();
    return;
}// SFZFlexListMenu::HandleSelectDownKey //

Reference

SFYMenu::SetSelectDownKey | SFXEvent | Result Event[SFEVT_RESPONDER_RESULT] | Key Event[SFEVT_KEY]


SFZFlexListMenu::HandleSelectUpKey
This function will be called when the SFEVT_KEY event of the UP key is received.
[ protected, virtual ]
Void HandleSelectUpKey(Void);

Description

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 to make the previous item of the currently setected item selected.

Internal Implementation

Internal implementation of the SFZFlexListMenu::HandleSelectUpKey function is as follows:

SFYVerticalFlexListControlSmp   _vertical;

/*protected virtual */Void SFZFlexListMenu::HandleSelectUpKey(Void)
{
    _vertical->ScrollUp();
    return;
}// SFZFlexListMenu::HandleSelectUpKey //

Reference

SFYMenu::SetSelectUpKey | SFXEvent | Result Event[SFEVT_RESPONDER_RESULT] | Key Event[SFEVT_KEY]


SFZFlexListMenu::Insert
Insert the specified item before the specified index.
[ public ]
SFCError Insert(
    SInt32 index           // index of item
    ItemRecConstRef item   // item structure
);
[ public ]
SFCError Insert(
    SInt32 index           // index of item
    ItemRecConstPtr item   // pointer to item structure
    SInt32 length          // number of items to insert
);
[ public ]
SFCError Insert(
    SInt32 index                 // index of item
    SFXWideStringConstRef text   // text
);
[ public ]
SFCError Insert(
    SInt32 index                 // index of item
    SFXWideStringConstPtr text   // pointer to string
    SInt32 length                // number of items to insert
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If insufficient memory: SFERR_NO_MEMOERY
  • If failed: SFERR_FAILED

Description

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.

[Note] Item structure

For the item structure, refer to SFZFlexListMenu::ItemRec.

Reference

SFZFlexListMenu::InsertFirst | SFZFlexListMenu::InsertLast | SFZFlexListMenu::Remove | SFZFlexListMenu::ItemRec


SFZFlexListMenu::InsertFirst
Insert the specified item at the head.
[ public ]
SFCError InsertFirst(
    ItemRecConstRef item   // item structure
);
[ public ]
SFCError InsertFirst(
    ItemRecConstPtr item   // pointer to item structure
    SInt32 length          // number of items to insert
);
[ public ]
SFCError InsertFirst(
    SFXWideStringConstRef text   // text
);
[ public ]
SFCError InsertFirst(
    SFXWideStringConstPtr text   // pointer to string
    SInt32 length                // number of items to insert
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If insufficient memory: SFERR_NO_MEMOERY
  • If failed: SFERR_FAILED

Description

This function inserts the specified item at the head.

[Note] Item structure

For the item structure, refer to SFZFlexListMenu::ItemRec.

Reference

SFZFlexListMenu::Insert | SFZFlexListMenu::InsertLast | SFZFlexListMenu::RemoveFirst | SFZFlexListMenu::ItemRec


SFZFlexListMenu::InsertLast
Insert the specified item at the tail.
[ public ]
SFCError InsertLast(
    ItemRecConstRef item   // item structure
);
[ public ]
SFCError InsertLast(
    ItemRecConstPtr item   // pointer to item structure
    SInt32 length          // number of items to insert
);
[ public ]
SFCError InsertLast(
    SFXWideStringConstRef text   // text
);
[ public ]
SFCError InsertLast(
    SFXWideStringConstPtr text   // pointer to string
    SInt32 length                // number of items to insert
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If insufficient memory: SFERR_NO_MEMOERY
  • If failed: SFERR_FAILED

Description

This function inserts the specified item at the tail.

[Note] Item structure

For the item structure, refer to SFZFlexListMenu::ItemRec.

Reference

SFZFlexListMenu::Insert | SFZFlexListMenu::InsertFirst | SFZFlexListMenu::RemoveLast | SFZFlexListMenu::ItemRec


SFZFlexListMenu::LastIndexOfCommandId
Get the index of the first item among the items matching with the specified command ID, of which the index equals or is smaller than the specified index to search from the tail.
[ public, const ]
SInt32 LastIndexOfCommandId(
    UInt32 id   // command id
);
[ public, const ]
SInt32 LastIndexOfCommandId(
    UInt32 id      // command id
    SInt32 index   // beginning index to search
);

Return value

  • If succeeds: the first item among the items which matches the specified command ID.
  • If failed: -1

Description

This function gets the index of the first item among the items matching with the specified command ID, of which the index equals or is smaller than the specified index to search from the tail.

[Note] Note
The beginning index of the item to search can be specified.

Reference

SFZFlexListMenu::FirstIndexOfCommandId


SFZFlexListMenu::NewInstance
Create a new instance of this responder class.
[ public, static ]
SFZFlexListMenuSmp NewInstance(
    SFCErrorPtr exception = null   // error value
);

Argument

exception

Return the error value generated inside the function.

Return value

  • If succeeds: not null pointer
  • Otherwise: null pointer

Description

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.

Example

The code to create a new instance of this responder class is as follows:

SFZFlexListMenuSmp _flexlistmenu;
SFCError error;

if ((_flexlistmenu = SFZFlexListMenu::NewInstance(&error)) != null) {

    ...
}

SFZFlexListMenu::Remove
Remove specified items from this flex list menu.
[ 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)
);

Description

This function removes the item at the specified index or the items in the specified index range from this flex list 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.

Example

SFZFlexListMenuSmp    menu;

// create instance etc. 

       ...

// insert item at the tail
if (menu->InsertLast("0 index") == SFERR_NO_ERROR) {
    // insert item at the tail
    if (menu->InsertLast("1 index") == SFERR_NO_ERROR) {
        // insert item at the tail
        if (menu->InsertLast("2 index") == SFERR_NO_ERROR) {
            // insert item at the tail
            if (menu->InsertLast("3 index") == SFERR_NO_ERROR) {
                // select "2 index" item
                menu->SetSelect(2);

                ////////////////////////////
                // state of menu          //
                // 0: "0 index"           //
                // 1: "1 index"           //
                // 2: "2 index" <---***//
                // 3: "3 index"           //
                ////////////////////////////

                // remove items from "1 index" to "2 index"
                menu->Remove(1, 3);

                ////////////////////////////
                // state of menu          //
                // 0: "0 index"           //
                // 1: "3 index" <---***//
                ////////////////////////////
            }
        }
    }
}

Reference

SFZFlexListMenu::Clear | SFZFlexListMenu::RemoveFirst | SFZFlexListMenu::RemoveLast | SFZFlexListMenu::Insert


SFZFlexListMenu::RemoveFirst
Remove the first item from this flex list menu.
[ public ]
Void RemoveFirst(Void);

Description

This function removes the first item from this flex list menu.

Reference

SFZFlexListMenu::Clear | SFZFlexListMenu::Remove | SFZFlexListMenu::RemoveLast | SFZFlexListMenu::InsertFirst


SFZFlexListMenu::RemoveLast
Remove the last item from this flex list menu.
[ public ]
Void RemoveLast(Void);

Description

This function removes the last item from this flex list menu.

Reference

SFZFlexListMenu::Clear | SFZFlexListMenu::Remove | SFZFlexListMenu::RemoveFirst | SFZFlexListMenu::InsertLast


SFZFlexListMenu::SetAccessKeyEnable
Set the enable flag of access key of this flex list menu to the specified value.
[ public ]
Void SetAccessKeyEnable(
    Bool param   // value to set
);

Description

This function sets the enable flag of access key of this flex list menu to the specified value.

When the enable flag of access key is set to "false", the access key for all items will be invalid regardless of the value of enable flag of the item set with the SFZFlexListMenu::SetItemEnable function.

On the other hand, when the enable flag of access key is set to "true", the access key for an item will be valid only if the enable flag of item is set to "true" using the SFZFlexListMenu::SetItemEnable function.

Reference

SFZFlexListMenu::GetAccessKeyEnable | SFZFlexListMenu::SetItemEnable


SFZFlexListMenu::SetBevelColor
Set the bevel color for outer frame of this flex list menu to the specified value.
[ public ]
Void SetBevelColor(
    SFXBevelColorConstRef param   // value to set
);

Description

This function sets the bevel color(SFXBevelColor) for the outer frame of this flex list menu to draw this flex list menu in the 3D style to the specified value.

Default: SFXBevelColor(SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00), SFXRGBColor(0xEE, 0xEE, 0xEE, 0x00), SFXRGBColor(0x88, 0x88, 0x88, 0x00)).

Reference

SFZFlexListMenu::GetBevelColor | SFXBevelColor | SFXRGBColor


SFZFlexListMenu::SetEvenListColor
Set the background color of unselected item at the even index of this flex list menu to the specified value.
[ public ]
Void SetEvenListColor(
    SFXRGBColorConstRef param   // value to set
);

Description

This function sets the background color(SFXRGBColor) of unselected item at the even index of this flex list menu to the specified value, in which color the background of item will be filled.

Default: SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00) [white color]

When "false" is set to the enable flag using the SFZFlexListMenu::SetItemEnable function, the background will not be filled in the color set with this function.

In this case, the background will be drawn in the color of which each RGB value is subtracted 0x33 from the color set with this function if the brightness of this color is greater than 0x7F. Otherwise it will be drawn in the color of which each RGB value is added 0x33 on the color set with this function.

The brightness of color can be obtained by calling the SFXRGBColor::GetBrightness function.

[Note] Background color of unselected item at the odd index

For the background color of unselected item at the odd index, refer to SFZFlexListMenu::SetOddListColor.

[Note] Foreground color of selected item

For the foreground color of selected item, refer to SFZFlexListMenu::SetTextColor.

[Note] Background color of selected item

For the background color of selected item, refer to SFZFlexListMenu::SetSelectListColor.

Reference

SFZFlexListMenu::GetEvenListColor | SFZFlexListMenu::SetOddListColor | SFZFlexListMenu::SetSelectListColor | SFZFlexListMenu::SetTextColor | SFZFlexListMenu::SetItemEnable | SFXRGBColor::GetBrightness | SFXRGBColor


SFZFlexListMenu::SetFont
Set the font for the specified text of this flex list menu to the specified value.
[ public ]
Void SetFont(
    TextEnum textEnum   // text enum
    AEEFont param       // font
);

Description

This function sets the font for the text of this flex list menu to the specified value, which is specified by the text enum(SFZFlexListMenu::TextEnum).

Default: AEE_FONT_NORMAL

Reference

SFZFlexListMenu::TextEnum | SFZFlexListMenu::GetFont


SFZFlexListMenu::SetGridLineColor
Set the color of grid line of this flex list menu to the specified value.
[ public ]
Void SetGridLineColor(
    SFXRGBColorConstRef param   // value to set (color of grid line)
);

Description

This function sets the color of grid line of this flex list menu to the specified value(SFXRGBColor).

The grid line will be drawn in the color set with this function only if "true" is set to its enable flag using the SFZFlexListMenu::SetGridLineEnable function.

Default: SFXRGBColor(0x00, 0x00, 0x00, 0x00)[black color].

[Caution] Drawing region of the grid line

The grid line will be drawn in the bottom line of 1 pixel width within the rectangular region of each item. It is recommended to set the margin region for the grid line using the SFZFlexListMenu::SetListMargin function in case "true" is set to this enable flag.

Reference

SFZFlexListMenu::GetGridLineColor | SFZFlexListMenu::SetGridLineEnable | SFXRGBColor


SFZFlexListMenu::SetGridLineEnable
Set the enable flag of the grid line of this flex list menu to the specified value.
[ public ]
Void SetGridLineEnable(
    Bool param   // value to set(set "true" to make the grid line visible, otherwise "false")
);

Description

This function sets the enable flag of the grid line of this flex list menu to the specified value.

The grid line will be drawn in the color set with the SFZFlexListMenu::SetGridLineColor function only if its enable flag is set to "true" using this function.

Default: false.

[Caution] Drawing region of the grid line

The grid line will be drawn in the bottom line of 1 pixel width within the rectangular region of each item. It is recommended to set the margin region for the grid line using the SFZFlexListMenu::SetListMargin function in case this enable flag is set to "true".

Reference

SFZFlexListMenu::GetGridLineEnable | SFZFlexListMenu::SetGridLineColor | SFZFlexListMenu::SetListMargin


SFZFlexListMenu::SetHorizontalAlign
Set the horizontal alignment to the specified value.
[ public ]
Void SetHorizontalAlign(
    HorizontalEnum param   // value to set
);

Description

This function sets the horizontal alignment to the specified value.

Default: SFZFlexListMenu::DEFAULT_HORIZONTAL

For the value of SFZFlexListMenu::DEFAULT_HORIZONTAL, refer to SFZFlexListMenu::HorizontalEnum.

Reference

SFZFlexListMenu::GetHorizontalAlign | SFZFlexListMenu::HorizontalEnum


SFZFlexListMenu::SetItem
Set the specified item of this flex list menu to the specified value.
[ public ]
SFCError SetItem(
    SInt32 index           // index of item
    ItemRecConstRef item   // item structure
);

Description

This function sets the specified item of this flex list menu to the specified value.

[Note] Item structure

For the item structure, refer to SFZFlexListMenu::ItemRec.

Reference

SFZFlexListMenu::GetItem | SFZFlexListMenu::ItemRec


SFZFlexListMenu::SetItemAccessKey
Set the access key of the specified item of this flex list menu to the specified value.
[ public ]
SFCError SetItemAccessKey(
    SInt32 index   // index of item
    AVKType key    // access key
);

Description

This function sets the access key of the specified item of this flex list menu to the specified value.

When "true" is set to both the enable flag of access key and the item using the SFZFlexListMenu::SetAccessKeyEnable function and the SFZFlexListMenu::SetItemEnable function respectively, the SFZFlexListMenu::HandleAccessKey function will be called if the access key set with this function is pressed.

Reference

SFZFlexListMenu::GetItemAccessKey | SFZFlexListMenu::HandleAccessKey | SFZFlexListMenu::SetAccessKeyEnable | SFZFlexListMenu::SetItemEnable


SFZFlexListMenu::SetItemCommandId
Set the command ID of the specified item of this flex list menu to the specified value.
[ public ]
SFCError SetItemCommandId(
    SInt32 index   // index of item
    UInt32 id      // command id
);

Description

This function sets the command ID of the specified item of this flex list menu to the specified value.

Reference

SFZFlexListMenu::GetItemCommandId


SFZFlexListMenu::SetItemEnable
Set the enable flag of the specified item of this flex list menu to the specified value.
[ public ]
SFCError SetItemEnable(
    SInt32 index   // index of item
    Bool param     // value to set. (true if item is valid, false otherwise)
);

Description

This function sets the enable flag of the specified item of this flex list menu to the specified value.

Default: "true"(The item is valid.)

[Note] When the enable flag of an item is set to "false"

Even if the operation key or the access key is pressed, the result event will not be sent.

The foreground color will be the color subtracted 0x44 from each RGB value of the item foreground color set with the SFZFlexListMenu::SetTextColor function if the brightness of item foreground color is bigger than 0x7F, otherwise it will be the color added 0x44 on each RGB value of the item foreground color.

The background color will be the color subtracted 0x33 from each RGB value of the item background color set with the SFZFlexListMenu::SetEvenListColor or SFZFlexListMenu::SetOddListColor function if the brightness of item background color is bigger than 0x7F, otherwise it will be the color added 0x33 on each RGB value of the item background color.

The brightness of color is the value obtained using the SFXRGBColor::GetBrightness function.

[Caution] Note

If the enable flag of an item is set to "false", the text of item will be drawn in the above adjusted foreground color when selected. It will not be drawn in the color set with the SFZFlexListMenu::SetTextColor function.

The background of item is drawn in the color set with the SFZFlexListMenu::SetSelectListColor function when selected, regardless of the value of enable flag of item.

Reference

SFZFlexListMenu::GetItemEnable | SFZFlexListMenu::HandleOperateKey | SFZFlexListMenu::HandleAccessKey | SFZFlexListMenu::SetTextColor | SFZFlexListMenu::SetEvenListColor | SFZFlexListMenu::SetOddListColor | SFZFlexListMenu::SetSelectListColor | SFXRGBColor::GetBrightness


SFZFlexListMenu::SetItemIconImage
Set the specified icon image of the specified item of this flex list menu to the specified value.
[ public ]
SFCError SetItemIconImage(
    SInt32 index           // index of item
    IconEnum iconEnum      // icon enum
    SFXPathConstRef path   // path to resource file
);
[ public ]
SFCError SetItemIconImage(
    SInt32 index           // index of item
    IconEnum iconEnum      // icon enum
    SFXPathConstRef path   // path to resource file
    UInt16 id              // resource ID
);
[ public ]
SFCError SetItemIconImage(
    SInt32 index                // index of item
    IconEnum iconEnum           // icon enum
    SFBImageSmpConstRef param   // icon image
);

Description

This function sets the icon image of the specified icon enum(SFZFlexListMenu::IconEnum) of the specified item of this flex list menu to the specified value.

The image is set directly in the argument, or read from the resource file.

This function cannot be used with the image such as the image of invalid size or the animation bitmap.

Reference

SFZFlexListMenu::IconEnum | SFZFlexListMenu::GetItemIconImage


SFZFlexListMenu::SetItemText
Set the specified text of the specified item of this flex list menu to the specified value.
[ public ]
SFCError SetItemText(
    SInt32 index           // index of item
    TextEnum textEnum      // text enum
    SFXPathConstRef path   // path to resource file
    UInt16 id              // resource ID
);
[ public ]
SFCError SetItemText(
    SInt32 index                  // index of item
    TextEnum textEnum             // text enum
    SFXWideStringConstRef param   // text
);

Description

This function sets the text of the specified text enum(SFZFlexListMenu::TextEnum) of the specified item of this flex list menu to the specified value.

The value of string is set directly in the argument, or read from the resource file.

Reference

SFZFlexListMenu::TextEnum | SFZFlexListMenu::GetItemText


SFZFlexListMenu::SetListMargin
Set the margin within each item of this flex list menu to the specified value.
[ public ]
Void SetListMargin(
    SFXMarginConstRef param   // value to set
);

Description

This function sets the margin within each item of this flex list menu to the specified value.

The contents of each item are drawn within the item region excluding this margin sepecified with this function.

Default: SFXMargin(1, 1, 1, 1)

Reference

SFZFlexListMenu::GetListMargin | SFXMargin


SFZFlexListMenu::SetMenuMargin
Set the menu margin of this flex list menu to the specified value.
[ public ]
Void SetMenuMargin(
    SFXMarginConstRef param   // value to set
);

Description

This function sets the menu margin of this flex list menu to the specified value, which corresponds to the outer frame.

If SFXMargin(0, 0, 0, 0) is specified, this frame will not be drawn.

Default: SFXMargin(2, 2, 2, 2)

Reference

SFZFlexListMenu::GetMenuMargin


SFZFlexListMenu::SetOddListColor
Set the background color of unselected item at the odd index of this flex list menu to the specified value.
[ public ]
Void SetOddListColor(
    SFXRGBColorConstRef param   // value to set
);

Description

This function sets the background color(SFXRGBColor) of unselected item at the odd index of this flex list menu to the specified value, in which color the background of item will be filled.

Default: SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00) [white color]

When "false" is set to the enable flag using the SFZFlexListMenu::SetItemEnable function, the background will not be filled in the color set with this function.

In this case, the background will be drawn in the color of which each RGB value is subtracted 0x33 from the color set with this function if the brightness of this color is greater than 0x7F. Otherwise it will be drawn in the color of which each RGB value is added 0x33 on the color set with this function.

The brightness of color can be obtained by calling the SFXRGBColor::GetBrightness function.

[Note] Background color of unselected item at the even index

For the background color of unselected item at the even index, refer to SFZFlexListMenu::SetEvenListColor.

[Note] Foreground color of selected item

For the foreground color of selected item, refer to SFZFlexListMenu::SetTextColor.

[Note] Background color of selected item

For the background color of selected item, refer to SFZFlexListMenu::SetSelectListColor.

Reference

SFZFlexListMenu::GetOddListColor | SFZFlexListMenu::SetEvenListColor | SFZFlexListMenu::SetSelectListColor | SFZFlexListMenu::SetTextColor | SFZFlexListMenu::SetItemEnable | SFXRGBColor::GetBrightness | SFXRGBColor


SFZFlexListMenu::SetPageDownKey
Set the PageDown key to move the selected item down by one page to the specified value.
[ public ]
Void SetPageDownKey(
    AVKType param   // key to set
);

Description

This function sets the PageDown key to move the selected item down by one page to the specified value.

Default: AVK_TXPGDOWN

If the PageDown key is pressed, the internal handler(*) of this flex list menu will move the selected item down by one page and send the value event.

However, in case the selected item will not be changed, it will not send the value event.

[Note] Internal handler

The value event of SFXEvent(SFEVT_RESPONDER_VALUE, SFP16_VALUE_CURRENT, index of selected item) will be sent by the internal handler of this flex list menu when the PageDown key is pressed.

Reference

SFZFlexListMenu::GetPageDownKey | SFZFlexListMenu::SetPageUpKey | SFYMenu::SetSelectUpKey | SFYMenu::SetSelectDownKey | SFZFlexListMenu::SetSnapUpKey | SFZFlexListMenu::SetSnapDownKey | SFXEvent | Value Event[SFEVT_RESPONDER_VALUE]


SFZFlexListMenu::SetPageUpKey
Set the PageUp key to move the selected item up by one page to the specified value.
[ public ]
Void SetPageUpKey(
    AVKType param   // key to set
);

Description

This function sets the PageUp key to move the selected item up by one page to the specified value.

Default: AVK_TXPGUP

If the PageUp key is pressed, the internal handler(*) of this flex list menu will move the selected item up by one page and send the value event.

However, in case the selected item will not be changed, it will not send the value event.

[Note] Internal handler

The value event of SFXEvent(SFEVT_RESPONDER_VALUE, SFP16_VALUE_CURRENT, index of selected item) will be sent by the internal handler of this flex list menu when the PageUp key is pressed.

Reference

SFZFlexListMenu::GetPageUpKey | SFZFlexListMenu::SetPageDownKey | SFYMenu::SetSelectUpKey | SFYMenu::SetSelectDownKey | SFZFlexListMenu::SetSnapUpKey | SFZFlexListMenu::SetSnapDownKey | SFXEvent | Value Event[SFEVT_RESPONDER_VALUE]


SFZFlexListMenu::SetScrollBarControl
Set the scroll bar control of this flex list menu to the specified value.
[ public ]
SFCError SetScrollBarControl(
    SFYScrollBarControlSmpConstRef param   // scroll bar control to set
);

Description

This function sets the scroll bar control used by this flex list menu to the specified value.

The developer can set his or her own scroll bar control to the flex list menu.

Example

The code below is to set the custom scroll bar control to the list box control.

// define class of original scroll bar control
class CustomScrollBarControl : public SFYScrollBarControl {
    // definition
};

Void UserApplication::SomeFunction {
    SFZFlexListMenuSmp              menu;
    CustomScrollBarControlSmp       bar;

    // create flex list menu
    menu = SFZFlexListMenu::NewInstance();

    // settings of flex list menu
    // ...

    // create scroll bar control
    bar = CustomScrollBarControl::NewInstance();

    // set original scroll bar to flex list menu
    menu->SetScrollBarControl(bar);
    return;
}

Reference

SFZFlexListMenu::GetScrollBarControl


SFZFlexListMenu::SetScrollBarWidth
Set the width of the scroll bar control of this flex list menu to the specified value.
[ public ]
Void SetScrollBarWidth(
    SInt16 param   // value to set (the width of the scroll bar control)
);

Description

This function sets the width of the scroll bar control to the specified value, which this flex list menu contains internally.

Default: SFZFlexListMenu::DEFAULT_BAR_WIDTH

For the value of SFZFlexListMenu::DEFAULT_BAR_WIDTH, refer to SFZFlexListMenu::DefaultEnum.

Reference

SFZFlexListMenu::GetScrollBarWidth | SFZFlexListMenu::DefaultEnum


SFZFlexListMenu::SetScrollDirection
Set the scroll direction of currently selected item to the specified value.
[ public ]
Void SetScrollDirection(
    DirectionEnum param   // scroll direction
);

Description

This function sets the scroll direction of currently selected item to the specified value.

Default: SFZFlexListMenu::DEFAULT_DIRECTION

For the value of SFZFlexListMenu::DEFAULT_DIRECTION, refer to SFZFlexListMenu::DirectionEnum.

Reference

SFZFlexListMenu::GetScrollDirection | SFZFlexListMenu::DirectionEnum


SFZFlexListMenu::SetScrollInterval
Set the scroll-interval of currently selected item to the specified value. [milliseconds]
[ public ]
Void SetScrollInterval(
    UInt32 param   // scroll-interval
);

Description

This function sets the scroll-interval of currently selected item to the specified value. [milliseconds]

Default: SFZFlexListMenu::DEFAULT_SCROLL

For the value of SFZFlexListMenu::DEFAULT_SCROLL, refer to SFZFlexListMenu::DefaultEnum.

Reference

SFZFlexListMenu::GetScrollInterval | SFZFlexListMenu::DefaultEnum


SFZFlexListMenu::SetScrollRepeat
Set the repeat-scroll flag of this flex list menu to the specified value.
[ public ]
Void SetScrollRepeat(
    Bool param   // value to set (true if repeat-scroll is enabled, false otherwise)
);

Description

This function sets the repeat-scroll flag of this flex list menu to the specified value.

When the repeat-scroll flag is set to "true" and the top item or the bottom item is currently selected item, the bottom item or the top item will be currently selected item if the UP key or DOWN key is pressed, respectively.

When the repeat-scroll flag is set to "false" and the top item or the bottom item is currently selected item, the top item or the bottom item will be still currently selected item even if the UP key or DOWN key is pressed, respectively.

[Note] About the UP key and the DOWN key

The UP key or ScrollDown key is set with the SFYMenu::SetSelectUpKey function or SFYMenu::SetSelectDownKey function respectively.

Reference

SFZFlexListMenu::GetScrollRepeat | SFYMenu::SetSelectDownKey | SFYMenu::SetSelectUpKey


SFZFlexListMenu::SetScrollStep
Set the scroll-step of currently selected item to the specified value. [pixels]
[ public ]
Void SetScrollStep(
    SInt16 param   // value to set
);

Description

This function sets the number of pixels of each scroll of currently selected item. If "-1"(this is default value) is set, the height of the " " character of the currently used font will be the scroll-step.

Default: SFZFlexListMenu::DEFAULT_STEP

For the value of SFZFlexListMenu::DEFAULT_STEP, refer to SFZFlexListMenu::DefaultEnum.

Reference

SFZFlexListMenu::GetScrollStep | SFZFlexListMenu::DefaultEnum


SFZFlexListMenu::SetSelect
Set the index of currently selected item of this flex list menu to the specified value.
[ public ]
Void SetSelect(
    SInt32 param   // index of item
);

Description

This function sets the index of currently selected item of this flex list menu to the specified value.

Reference

SFZFlexListMenu::GetSelect


SFZFlexListMenu::SetSelectListColor
Set the background color of selected item of this flex list menu to the specified value.
[ public ]
Void SetSelectListColor(
    SFXRGBColorConstRef param   // value to set
);

Description

This function sets the background color(SFXRGBColor) of selected item of this flex list menu to the specified value, in which color the background of item will be filled.

Default: SFXRGBColor(0x11, 0x22, 0xBB, 0x00) [blue]

[Note] Background color of unselected item at the odd index

For the background color of unselected item at the odd index, refer to SFZFlexListMenu::SetOddListColor.

[Note] Background color of unselected item at the even index

For the background color of unselected item at the even index, refer to SFZFlexListMenu::SetEvenListColor.

[Note] Foreground color of selected item

For the foreground color of selected item, refer to SFZFlexListMenu::SetTextColor.

Reference

SFZFlexListMenu::GetSelectListColor | SFZFlexListMenu::SetEvenListColor | SFZFlexListMenu::SetOddListColor | SFZFlexListMenu::SetTextColor | SFXRGBColor


SFZFlexListMenu::SetSnapDownKey
Set the SnapDown key to move the selected item down to the bottom to the specified value.
[ public ]
Void SetSnapDownKey(
    AVKType param   // key to set
);

Description

This function sets the SnapDown key to move the selected item down to the bottom to the specified value.

Default: AVK_TXEND

If the SnapDown key is pressed, the internal handler(*) of this flex list menu will move the selected item down to the bottom and send the value event.

However, in case the selected item will not be changed, it will not send the value event.

[Note] Internal handler

The value event of SFXEvent(SFEVT_RESPONDER_VALUE, SFP16_VALUE_CURRENT, index of selected item) will be sent by the internal handler of this flex list menu when the SnapDown key is pressed.

Reference

SFZFlexListMenu::GetSnapDownKeySFZFlexListMenu::SetSnapUpKey | SFYMenu::SetSelectUpKey | SFYMenu::SetSelectDownKey | SFZFlexListMenu::SetPageDownKey | SFZFlexListMenu::SetPageUpKey | SFXEvent | Value Event[SFEVT_RESPONDER_VALUE]


SFZFlexListMenu::SetSnapUpKey
Set the SnapUp key to move the selected item up to the top to the specified value.
[ public ]
Void SetSnapUpKey(
    AVKType param   // key to set
);

Description

This function sets the SnapUp key to move the selected item up to the top to the specified value.

Default: AVK_TXHOME

If the SnapUp key is pressed, the internal handler(*) of this flex list menu will move the selected item up to the top and send the value event.

However, in case the selected item will not be changed, it will not send the value event.

[Note] Internal handler

The value event of SFXEvent(SFEVT_RESPONDER_VALUE, SFP16_VALUE_CURRENT, index of selected item) will be sent by the internal handler of this flex list menu when the SnapUp key is pressed.

Reference

SFZFlexListMenu::GetSnapUpKeySFZFlexListMenu::SetSnapDownKey | SFYMenu::SetSelectUpKey | SFYMenu::SetSelectDownKey | SFZFlexListMenu::SetPageDownKey | SFZFlexListMenu::SetPageUpKey | SFXEvent | Value Event[SFEVT_RESPONDER_VALUE]


SFZFlexListMenu::SetSpaceSize
Set the space size between the elements of each item of this flex list menu to the specified value. [pixels]
[ public ]
Void SetSpaceSize(
    SInt16 param   // space size
);

Description

This function sets the space size between the elements of each item of this flex list menu to the specified value. [pixels]

Default: SFZFlexListMenu::DEFAULT_SPACE

For the value if SFZFlexListMenu::DEFAULT_SPACE, refer to SFZFlexListMenu::DefaultEnum.

Reference

SFZFlexListMenu::GetSpaceSize | SFZFlexListMenu::DefaultEnum


SFZFlexListMenu::SetTextColor
Set the color of the specified text of this flex list menu to the specified value.
[ public ]
Void SetTextColor(
    TextEnum textEnum           // text enum
    SFXRGBColorConstRef param   // value to set
);

Description

This function sets the color(SFXRGBColor) of text of the specified text enum(SFZFlexListMenu::TextEnum) of this flex list menu to the specified value.

Default values are as follows:

  • Header string of unselected item(TEXT_HEADER_NORMAL): SFXRGBColor(0x00, 0x00, 0x00, 0x00)[black color].
  • Header string of selected item(TEXT_HEADER_SELECT): SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00)[white color].
  • Body string of unselected item(TEXT_BODY_NORMAL): SFXRGBColor(0x00, 0x00, 0x00, 0x00)[black color].
  • Body string of selected item(TEXT_BODY_SELECT): SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00)[white color].

When "false" is set to the item using the SFZFlexListMenu::SetItemEnable function or the state of this flex list menu is "inactive", each of the above colors will be the color subtracted 0x44 from each RGB value of the color set with this function if the brightness of color is bigger than 0x7F, otherwise it will be the color added 0x44 on each RGB value of the color.

The brightness of color is the value obtained using the SFXRGBColor::GetBrightness function.

[Note] Background color of unselected item at the odd index

For the background color of unselected item at the odd index, refer to SFZFlexListMenu::SetOddListColor.

[Note] Background color of unselected item at the even index

For the background color of unselected item at the even index, refer to SFZFlexListMenu::SetEvenListColor.

[Note] Background color of selected item

For the background color of selected item, refer to SFZFlexListMenu::SetSelectListColor.

Reference

SFZFlexListMenu::TextEnum | SFZFlexListMenu::GetTextColor | SFZFlexListMenu::SetOddListColor | SFZFlexListMenu::SetEvenListColor | SFZFlexListMenu::SetSelectListColor | SFZFlexListMenu::SetItemEnable | SFXRGBColor::GetBrightness | SFXRGBColor | State


SFZFlexListMenu::SetToggle
Set the toggle state of this flex list menu to the specified value.
[ public ]
Void SetToggle(
    Toggle param   // value to set (logical sum of ToggleEnum)
);

Description

This function sets the toggle state of this flex list menu to the specified value, which is the logical sum of SFZFlexListMenu::ToggleEnum.

Default: 0.

Example

The code below is to set the value of toggle state.
SFZFlexListMenu       menu;

// ...

menu->SetToggle(
    SFZFlexListMenu::TOGGLE_EMPTY_BODY_ICON |
    SFZFlexListMenu::TOGGLE_MULTIPLE_BODY_TEXT
);

Reference

SFZFlexListMenu::ToggleEnum | SFZFlexListMenu::GetToggle


SFZFlexListMenu::SetVerticalAlign
Set the vertical alignment to the specified value.
[ public ]
Void SetVerticalAlign(
    VerticalEnum param   // value to set
);

Description

This function sets the vertical alignment to the specified value.

Default: SFZFlexListMenu::DEFAULT_VERTICAL

For the value of SFZFlexListMenu::DEFAULT_VERTICAL, refer to SFZFlexListMenu::VerticalEnum.

Reference

SFZFlexListMenu::GetVerticalAlign | SFZFlexListMenu::VerticalEnum


SFZFlexListMenu::SetWaitInterval
Set the waiting time to start the scroll of the item to the specified value. [milliseconds]
[ public ]
Void SetWaitInterval(
    UInt32 param   // value to set
);

Description

This function sets the waiting time to start the scroll of the item to the specified value. [milliseconds]

Default: SFZFlexListMenu::DEFAULT_WAIT

For the value of SFZFlexListMenu::DEFAULT_WAIT, refer to SFZFlexListMenu::DefaultEnum.

Reference

SFZFlexListMenu::GetWaitInterval | SFZFlexListMenu::DefaultEnum


SFZFlexListMenu::CodeEnum
Constant that represents the SFZFlexListMenu class.
enum CodeEnum {
    CODE_TYPE = four_char_code('m', 'f', 'm', 'n')
};
SFMTYPEDEFTYPE(CodeEnum)

Reference

SFYResponder::GetType | SFYResponder::SetType


SFZFlexListMenu::DefaultEnum
Constants that represent the default value for various parameters.
enum DefaultEnum {
    DEFAULT_WAIT        = 1000,     // waiting time to start the scroll [milliseconds]
    DEFAULT_SCROLL      = 100,      // scroll-interval [milliseconds]
    DEFAULT_STEP        = -1,       // scroll-step [pixels] : width of the " " character, i.e., one space character, in case of "-1"
    DEFAULT_SPACE       = 2,        // space size between items [pixels]
    DEFAULT_BAR_WIDTH   = 5         // width of scroll bar [pixels]
};

SFZFlexListMenu::DirectionEnum
Constants that represent the scroll direction.
enum DirectionEnum {
    DIRECTION_LEFT    = 0,                // scroll left
    DIRECTION_RIGHT,                      // scroll right
    DEFAULT_DIRECTION = DIRECTION_LEFT    // Default: scroll left
};
SFMTYPEDEFTYPE(DirectionEnum)

SFZFlexListMenu::HorizontalEnum
Constants that represent the horizontal alignment.
enum HorizontalEnum {
    HORIZONTAL_LEFT     = 0,                 // left-aligned
    HORIZONTAL_CENTER,                       // center-aligned
    HORIZONTAL_RIGHT,                        // right-aligned
    DEFAULT_HORIZONTAL  = HORIZONTAL_LEFT    // Default: left-aligned
};
SFMTYPEDEFTYPE(HorizontalEnum)

SFZFlexListMenu::IconEnum
Constants that is used to specify the target icon image.
enum IconEnum {
    ICON_BODY_NORMAL                    = 0,
    ICON_BODY_SELECT,
    ICON_FOOTER_NORMAL,
    ICON_FOOTER_SELECT,
    ICON_LIMIT
};
SFMTYPEDEFTYPE(IconEnum)

Description

ICON_BODY_NORMAL: body icon image of unselected item

ICON_BODY_SELECT: body icon image of selected item

ICON_FOOTER_NORMAL: footer icon image of unselected item

ICON_FOOTER_SELECT: footer icon image of selected item


SFZFlexListMenu::ItemRec
Structure that represent the various attributes of the item, which is called "item structure".
SFMTYPEDEFSTRUCT(ItemRec)
struct ItemRec {
    ItemPartRec     normal;     // attributes of unselected item
    // SFXWideString   normal.header.text;
    // SFXWideString   normal.body.text;
    // SFBImageSmp     normal.body.icon;
    // SFBImageSmp     normal.footer.icon;

    ItemPartRec     select;     // attributes of the unselect item
    // SFXWideString   select.header.text;
    // SFXWideString   select.body.text;
    // SFBImageSmp     select.body.icon;
    // SFBImageSmp     select.footer.icon;

    PropertyRec     propery;    // properties
    // UInt32          id;
    // AVKType         key;
    // Bool            enable;
};

Description

An item can be inserted into this flex list menu using this item structure.

Reference

SFZFlexListMenu::Insert | SFZFlexListMenu::InsertFirst | SFZFlexListMenu::InsertLast | SFZFlexListMenu::GetItem | SFZFlexListMenu::SetItem


SFZFlexListMenu::SelectEnum
Constants that represent whether or not the item is selected.
enum SelectEnum {
    NORMAL   = 0,
    SELECT
};
SFMTYPEDEFTYPE(SelectEnum)

Description

NORMAL: the item is not selected

SELECT: the item is selected


SFZFlexListMenu::TextEnum
Constants that is used to specify the target text.
enum TextEnum {
    TEXT_HEADER_NORMAL                  = 0,
    TEXT_HEADER_SELECT,
    TEXT_BODY_NORMAL,
    TEXT_BODY_SELECT,
    TEXT_LIMIT
};
SFMTYPEDEFTYPE(TextEnum)

Description

TEXT_HEADER_NORMAL: header text of unselected item

TEXT_HEADER_SELECT: header text of selected item

TEXT_BODY_NORMAL: body text of unselected item

TEXT_BODY_SELECT: body text of selected item


SFZFlexListMenu::ToggleEnum
Constants that is used to specify the toggle states.
enum ToggleEnum {
    TOGGLE_EMPTY_HEADER_TEXT            = 1 << 0,
    TOGGLE_EMPTY_BODY_ICON              = 1 << 1,
    TOGGLE_EMPTY_BODY_TEXT              = 1 << 2,
    TOGGLE_EMPTY_FOOTER_ICON            = 1 << 3,
    TOGGLE_MULTIPLE_BODY_TEXT           = 1 << 4,
    TOGGLE_SWAP_BODY                    = 1 << 5
};
SFMTYPEDEFTYPE(ToggleEnum)

Description

TOGGLE_EMPTY_HEADER_TEXT: the header text will not be displayed if that of selected item is null. (the header text of unselected item will not be displayed.)

TOGGLE_EMPTY_BODY_ICON: the body icon image will not be displayed if that of selected item is null.

TOGGLE_EMPTY_BODY_TEXT: the body text will not be displayed if that of selected item is null.

TOGGLE_EMPTY_FOOTER_ICON: the footer icon image will not be displayed if that of selected item is null.

TOGGLE_MULTIPLE_BODY_TEXT: the body text of selected item will be displayed as a multiple text.

TOGGLE_SWAP_BODY: swap the body icon image with the body text.

These states can be set using the logical sum operator at the same time together.

Default: 0.

Example

SFZFlexListMenuSmp    menu;

// create instance etc.
// ...

// setting of toggle state (set multiple state using logical sum operator)
menu->SetToggle(
    SFZFlexListMenu::TOGGLE_EMPTY_HEADER_TEXT |
    SFZFlexListMenu::TOGGLE_EMPTY_FOOTER_ICON |
    SFZFlexListMenu::TOGGLE_MULTIPLE_BODY_TEXT
);

Execution Result:

Reference

SFZFlexListMenu::ToggleEnum


SFZFlexListMenu::VerticalEnum
Constants that represent the vertical alignment.
enum VerticalEnum {
    VERTICAL_TOP      = 0,               // top-aligned
    VERTICAL_MIDDLE,                     // center-aligned
    VERTICAL_BOTTOM,                     // bottom-aligned
    DEFAULT_VERTICAL  = VERTICAL_MIDDLE  // default: center-aligned
};
SFMTYPEDEFTYPE(VerticalEnum)