SophiaFramework UNIVERSE 5.3 |
#include <SFZFlexListMenu.h.hpp>
class SFZFlexListMenu : public SFYMenu;
SFMTYPEDEFCLASS(SFZFlexListMenu)
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:
Note | |
---|---|
|
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 |
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 | |
---|---|
The result event will not occur when the enable flag of selected item is set to "false" using the SFZFlexListMenu::SetItemEnable function. |
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:
SFYMenu | SFZTextMenu | SFXEvent | Result Event[SFEVT_RESPONDER_RESULT] | State
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.
|
[ protected, explicit ] SFZFlexListMenu(Void);
This constructor performs the initializations as follows:
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 | |
---|---|
In a responder inheriting from SFZFlexListMenu, the corresponding handler will be called when one of the above events occurs. |
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]
[ protected, virtual ] virtual ~SFZFlexListMenu(Void);
Delete all items from this flex list menu.
[ public ] Void Clear(Void);
[ public, const ] SInt32 FirstIndexOfCommandId( UInt32 id // command id );
[ public, const ] SInt32 FirstIndexOfCommandId( UInt32 id // command id SInt32 index // beginning index to search );
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 | |
---|---|
The beginning index of the item to search can be specified. |
[ public, const ] Bool GetAccessKeyEnable(Void);
This function gets the value of enable flag of the access key of this flex list menu.
[ public, const ] SFXBevelColorConstRef GetBevelColor(Void);
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.
[ public, const ] SFXRGBColorConstRef GetEvenListColor(Void);
Background color(SFXRGBColor) of unselected item at the even index of this flex list menu.
[ public, const ] AEEFont GetFont( TextEnum textEnum // text enum );
Font of the text of this flex list box control, which is specified by the text enum(SFZFlexListMenu::TextEnum).
This function gets the font for the specified text of this flex list menu.
[ public, const ] SFXRGBColorConstRef GetGridLineColor(Void);
Color(SFXRGBColor) of grid line of this flex list menu.
[ public, const ] Bool GetGridLineEnable(Void);
Value of the enable flag of the grid line of this flex list menu.
[ public, const ] HorizontalEnum GetHorizontalAlign(Void);
Value of horizontal alignment (SFZFlexListMenu::HorizontalEnum).
[ public, const ] ItemRec GetItem( SInt32 index // index of item SFCErrorPtr exception = null // error );
Item structure(SFZFlexListBoxControl::ItemRec) of the specified item of this flex list menu.
This function gets the item structure of the specified item of this flex list menu.
Item structure | |
---|---|
For the item structure, refer to SFZFlexListMenu::ItemRec. |
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.
Command ID of the specified item of this flex list menu.
[ public, const ] SInt32 GetItemCount(Void);
Number of the items of this flex list menu.
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.
Item height of this flex list menu. [pixels]
This function gets the item height of this flex list menu[pixels], which is calculated using the following values:
SFZFlexListMenu::SetFont | SFZFlexListMenu::SetItemIconImage | SFZFlexListMenu::SetListMargin
[ public, const ] SFBImageSmpConstRef GetItemIconImage( SInt32 index // index of item IconEnum iconEnum // icon enum );
Icon image of the specified item of this flex list menu which corresponds to the specified icon enum(SFZFlexListMenu::IconEnum).
[ public, const ] SFXWideStringConstRef GetItemText( SInt32 index // index of item TextEnum textEnum // text enum );
Text(SFXWideString) of the specified item of this flex list menu which corresponds to the specified text enum(SFZFlexListMenu::TextEnum).
[ public, const ] SFXMarginConstRef GetListMargin(Void);
Margin(SFXMargin) within each item of this flex list menu
[ public, const ] SFXMarginConstRef GetMenuMargin(Void);
Margin(SFXMargin) for the outer frame of this flex list menu.
[ public, const ] SFXRGBColorConstRef GetOddListColor(Void);
Background color(SFXRGBColor) of unselected item at the odd index of this flex list menu.
[ public, const ] AVKType GetPageDownKey(Void);
PageDown key to move the selected item down by one page.
[ public, const ] AVKType GetPageUpKey(Void);
PageUp key to move the selected item up by one page.
[ public, const ] SFYScrollBarControlSmpConstRef GetScrollBarControl(Void);
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.
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));
}
[ public, const ] SInt16 GetScrollBarWidth(Void);
Width of the scroll bar control, which this flex list menu contains internally. [pixels]
[ public, const ] DirectionEnum GetScrollDirection(Void);
Scroll direction(SFZFlexListMenu::DirectionEnum) set with the SFZFlexListMenu::SetScrollDirection function.
[ public, const ] UInt32 GetScrollInterval(Void);
Scroll-interval set with the SFZFlexListMenu::SetScrollInterval function. [milliseconds]
[ public, const ] Bool GetScrollRepeat(Void);
[ public, const ] SInt16 GetScrollStep(Void);
Scroll-step set with the SFZFlexListMenu::SetScrollStep function. [pixels]
[ public, const ] SInt32 GetSelect(Void);
Index of currently selected item of this flex list menu.
[ public, const ] SFXRGBColorConstRef GetSelectListColor(Void);
Background color(SFXRGBColor) of selected item of this flex list menu.
[ public, const ] AVKType GetSnapDownKey(Void);
SnapDown key to move the selected item down to the bottom.
[ public, const ] AVKType GetSnapUpKey(Void);
SnapUp key to move the selected item up to the top.
[ public, const ] SInt16 GetSpaceSize(Void);
Space size between the elements of each item of this flex list menu. [pixels]
[ public, const ] SFXRGBColorConstRef GetTextColor( TextEnum textEnum // text enum );
Color(SFXRGBColor) of text specified with a text enum(SFZFlexListMenu::TextEnum) of this flex list menu.
[ public, const ] Toggle GetToggle(Void);
Value of the toggle state of this flex list menu(logical sum of SFZFlexListBoxControl::ToggleEnum).
[ public, const ] VerticalEnum GetVerticalAlign(Void);
Value(SFZFlexListMenu::VerticalEnum) of vertical alignment.
[ public, const ] UInt32 GetWaitInterval(Void);
Waiting time to start the scroll set with the SFZFlexListMenu::SetWaitInterval function. [milliseconds]
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:
Note | |
---|---|
If the same access key is set to more than one item, only the setting of the first item is valid. |
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 //
SFZFlexListMenu::SetItemAccessKey | SFZFlexListMenu::SetAccessKeyEnable | SFZFlexListMenu::SetItemEnable SFYControl::GetCurrentValue | SFXEvent | Result Event | Key Event[SFEVT_KEY]
[ protected, virtual, const ] Void HandleBoundOptimize( SFXRectanglePtr rectangle // hint region and calculated region );
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.
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 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 //
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]
[ protected, virtual, const ] Void HandleBoundRequest( SFXRectanglePtr rectangle // calculated region );
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.
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.
|
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 //
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]
[ protected, virtual ] Void HandleBoundVirtual(Void);
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event is received.
In case you want to perform your own processing when the virtual region is changed, override this virtual function.
The default implementation is to equalize the real region with the new local region and relocate this responder to fit into the new virtual region.
Sending the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event | |
---|---|
The (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event will occur when the virtual region is changed by calling the SFYResponder::SetRealBound or SFYResponder::SetVirtualBound function. |
Another method when the virtual region is changed | |
---|---|
Other than overriding this virtual function, it is possible to define and implement the handler for region event[XANDLER_DECLARE_VOIDBOUND], and register it into the responder. In the processing when the virtual region is updated, this virtual function is executed first, and next the handlers for region event are executed in the registered order. In almost all cases, the method to override this virtual function is adopted since defining, implementing and registering the handler for region event can be omitted. |
Internal implementation of the 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 //
SFYResponder::SetRealBound | SFYResponder::SetVirtualBound | Region Event[SFEVT_RESPONDER_BOUND] | Handler for the Region Event[XANDLER_DECLARE_VOIDBOUND] | Virtual Region | Real Region | Local Region
[ protected, virtual ] Void HandleEscapeKey(Void);
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 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 //
SFYMenu::SetEscapeKey | SFXEvent | Result Event[SFEVT_RESPONDER_RESULT] | Key Event[SFEVT_KEY]
[ protected, virtual ] Void HandleOperateKey(Void);
This function will be called when the SFEVT_KEY event(key event[SFEVT_KEY]) of the operaion key set with the SFYMenu::SetOperateKey function is received.
In case you want to perform your own processing, override this function.
The default implementation is 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 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 //
SFYMenu::SetOperateKey | SFZFlexListMenu::SetItemEnable | SFZFlexListMenu::GetSelect | SFXEvent | Result Event[SFEVT_RESPONDER_RESULT] | Key Event[SFEVT_KEY]
[ protected, virtual, const ] Void HandleRenderRequest( SFXGraphicsPtr graphics // graphics object );
This function will be called when the (SFEVT_RESPONDER_RENDER, SFP16_RENDER_REQUEST) event is received.
In case you want to perform your own drawing of this responder, override this function.
The default implementation is to draw this responder.
The method to darw a responder | |
---|---|
In addition to overriding this virtual function, it is possible to define and implement the handler for drawing event(drawing handler)[XANDLER_DECLARE_VOIDRENDER], and register it into the responder. Then, the overridden virtual function will be called first, and next the drawing handlers registered into the responder will be booted up in the registered order. In almost all cases, the method to override this function is used to draw the responder since there is no need to declare and register the drawing handler. |
Procedure of drawing a responder | |
---|---|
The drawing handler will be booted up when the drawing event(SFEVT_RESPONDER_RENDER) occurs. And then the drawing handler draw the responder actually. The drawing event will be sent to only the responders including the region to be redrawn out of the redraw regions registered into the renderer using the SFYResponder::InvokeBackward function after the SFYResponder::Render function boots up the renderer. Here, the SFYResponder::Render function will be called at the following situations:
If calling the SFYResponder::Render function with specifying "true" as an argument, the drawing event will be sent to all the responders to be actually displayed on the screen which are located below the responder in the responder tree, regardless of the registration of redraw region. |
Internal implementation of the 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 //
SFYResponder::Invalidate | SFYResponder::Render | SFYResponder::InvokeBackward | Drawing Event[SFEVT_RESPONDER_RENDER] | Handler for the Drawing Event[XANDLER_DECLARE_VOIDRENDER] | Rendering | Event Loop | Responder Tree
[ protected, virtual ] Void HandleSelectDownKey(Void);
This function will be called when the SFEVT_KEY event(key event[SFEVT_KEY]) of the DOWN key set with the SFYMenu::SetSelectDownKey function is received.
In case you want to perform your own processing, override this function.
The default implementation is to make the next item of the currently setected item selected.
Internal implementation of the SFZFlexListMenu::HandleSelectDownKey function is as follows:
SFYVerticalFlexListControlSmp _vertical; /*protected virtual */Void SFZFlexListMenu::HandleSelectDownKey(Void) { _vertical->ScrollDown(); return; }// SFZFlexListMenu::HandleSelectDownKey //
SFYMenu::SetSelectDownKey | SFXEvent | Result Event[SFEVT_RESPONDER_RESULT] | Key Event[SFEVT_KEY]
[ protected, virtual ] Void HandleSelectUpKey(Void);
This function will be called when the SFEVT_KEY event(key event[SFEVT_KEY]) of the UP key set with the SFYMenu::SetSelectUpKey function is received.
In case you want to perform your own processing, override this function.
The default implementation is to make the previous item of the currently setected item selected.
Internal implementation of the SFZFlexListMenu::HandleSelectUpKey function is as follows:
SFYVerticalFlexListControlSmp _vertical; /*protected virtual */Void SFZFlexListMenu::HandleSelectUpKey(Void) { _vertical->ScrollUp(); return; }// SFZFlexListMenu::HandleSelectUpKey //
SFYMenu::SetSelectUpKey | SFXEvent | Result Event[SFEVT_RESPONDER_RESULT] | Key Event[SFEVT_KEY]
[ 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 );
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.
Item structure | |
---|---|
For the item structure, refer to SFZFlexListMenu::ItemRec. |
SFZFlexListMenu::InsertFirst | SFZFlexListMenu::InsertLast | SFZFlexListMenu::Remove | SFZFlexListMenu::ItemRec
[ 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 );
This function inserts the specified item at the head.
Item structure | |
---|---|
For the item structure, refer to SFZFlexListMenu::ItemRec. |
SFZFlexListMenu::Insert | SFZFlexListMenu::InsertLast | SFZFlexListMenu::RemoveFirst | SFZFlexListMenu::ItemRec
[ 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 );
This function inserts the specified item at the tail.
Item structure | |
---|---|
For the item structure, refer to SFZFlexListMenu::ItemRec. |
SFZFlexListMenu::Insert | SFZFlexListMenu::InsertFirst | SFZFlexListMenu::RemoveLast | SFZFlexListMenu::ItemRec
[ public, const ] SInt32 LastIndexOfCommandId( UInt32 id // command id );
[ public, const ] SInt32 LastIndexOfCommandId( UInt32 id // command id SInt32 index // beginning index to search );
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 | |
---|---|
The beginning index of the item to search can be specified. |
[ public, static ] SFZFlexListMenuSmp NewInstance( SFCErrorPtr exception = null // error value );
Return the error value generated inside the function.
This function creates a new instance of this responder class.
If succeeds, a not null pointer will be returned, and the "exception" argument is SFERR_NO_ERROR. If fails such as insufficient memory, a null pointer will be returned, and the "exception" argument holds the error value.
The code to create a new instance of this responder class is as follows:
SFZFlexListMenuSmp _flexlistmenu;
SFCError error;
if ((_flexlistmenu = SFZFlexListMenu::NewInstance(&error)) != null) {
...
}
[ public ] Void Remove( SInt32 index // index of item to delete );
[ public ] Void Remove( SInt32 begin // beginning index to remove(this index is included) SInt32 end // ending index to remove(this index is not included) );
This function removes the item at the specified index or the items in the specified index range from this 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.
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" <---***// //////////////////////////// } } } }
SFZFlexListMenu::Clear | SFZFlexListMenu::RemoveFirst | SFZFlexListMenu::RemoveLast | SFZFlexListMenu::Insert
[ public ] Void RemoveFirst(Void);
This function removes the first item from this flex list menu.
SFZFlexListMenu::Clear | SFZFlexListMenu::Remove | SFZFlexListMenu::RemoveLast | SFZFlexListMenu::InsertFirst
[ public ] Void RemoveLast(Void);
This function removes the last item from this flex list menu.
SFZFlexListMenu::Clear | SFZFlexListMenu::Remove | SFZFlexListMenu::RemoveFirst | SFZFlexListMenu::InsertLast
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.
[ public ] Void SetBevelColor( SFXBevelColorConstRef param // value to set );
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)).
SFZFlexListMenu::GetBevelColor | SFXBevelColor | SFXRGBColor
[ public ] Void SetEvenListColor( SFXRGBColorConstRef param // value to set );
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.
Background color of unselected item at the odd index | |
---|---|
For the background color of unselected item at the odd index, refer to SFZFlexListMenu::SetOddListColor. |
Foreground color of selected item | |
---|---|
For the foreground color of selected item, refer to SFZFlexListMenu::SetTextColor. |
Background color of selected item | |
---|---|
For the background color of selected item, refer to SFZFlexListMenu::SetSelectListColor. |
SFZFlexListMenu::GetEvenListColor | SFZFlexListMenu::SetOddListColor | SFZFlexListMenu::SetSelectListColor | SFZFlexListMenu::SetTextColor | SFZFlexListMenu::SetItemEnable | SFXRGBColor::GetBrightness | SFXRGBColor
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
[ public ] Void SetGridLineColor( SFXRGBColorConstRef param // value to set (color of grid line) );
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].
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. |
[ public ] Void SetGridLineEnable( Bool param // value to set(set "true" to make the grid line visible, otherwise "false") );
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.
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". |
SFZFlexListMenu::GetGridLineEnable | SFZFlexListMenu::SetGridLineColor | SFZFlexListMenu::SetListMargin
[ public ] Void SetHorizontalAlign( HorizontalEnum param // value to set );
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.
[ public ] SFCError SetItem( SInt32 index // index of item ItemRecConstRef item // item structure );
This function sets the specified item of this flex list menu to the specified value.
Item structure | |
---|---|
For the item structure, refer to SFZFlexListMenu::ItemRec. |
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.
SFZFlexListMenu::GetItemAccessKey | SFZFlexListMenu::HandleAccessKey | SFZFlexListMenu::SetAccessKeyEnable | SFZFlexListMenu::SetItemEnable
This function sets the command ID 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) );
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.)
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. |
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. |
SFZFlexListMenu::GetItemEnable | SFZFlexListMenu::HandleOperateKey | SFZFlexListMenu::HandleAccessKey | SFZFlexListMenu::SetTextColor | SFZFlexListMenu::SetEvenListColor | SFZFlexListMenu::SetOddListColor | SFZFlexListMenu::SetSelectListColor | SFXRGBColor::GetBrightness
[ 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 );
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.
[ 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 );
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.
[ public ] Void SetListMargin( SFXMarginConstRef param // value to set );
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)
[ public ] Void SetMenuMargin( SFXMarginConstRef param // value to set );
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)
[ public ] Void SetOddListColor( SFXRGBColorConstRef param // value to set );
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.
Background color of unselected item at the even index | |
---|---|
For the background color of unselected item at the even index, refer to SFZFlexListMenu::SetEvenListColor. |
Foreground color of selected item | |
---|---|
For the foreground color of selected item, refer to SFZFlexListMenu::SetTextColor. |
Background color of selected item | |
---|---|
For the background color of selected item, refer to SFZFlexListMenu::SetSelectListColor. |
SFZFlexListMenu::GetOddListColor | SFZFlexListMenu::SetEvenListColor | SFZFlexListMenu::SetSelectListColor | SFZFlexListMenu::SetTextColor | SFZFlexListMenu::SetItemEnable | SFXRGBColor::GetBrightness | SFXRGBColor
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.
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. |
SFZFlexListMenu::GetPageDownKey | SFZFlexListMenu::SetPageUpKey | SFYMenu::SetSelectUpKey | SFYMenu::SetSelectDownKey | SFZFlexListMenu::SetSnapUpKey | SFZFlexListMenu::SetSnapDownKey | SFXEvent | Value Event[SFEVT_RESPONDER_VALUE]
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.
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. |
SFZFlexListMenu::GetPageUpKey | SFZFlexListMenu::SetPageDownKey | SFYMenu::SetSelectUpKey | SFYMenu::SetSelectDownKey | SFZFlexListMenu::SetSnapUpKey | SFZFlexListMenu::SetSnapDownKey | SFXEvent | Value Event[SFEVT_RESPONDER_VALUE]
[ public ] SFCError SetScrollBarControl( SFYScrollBarControlSmpConstRef param // scroll bar control to set );
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.
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; }
[ public ] Void SetScrollBarWidth( SInt16 param // value to set (the width of the scroll bar control) );
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.
[ public ] Void SetScrollDirection( DirectionEnum param // scroll direction );
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.
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.
[ public ] Void SetScrollRepeat( Bool param // value to set (true if repeat-scroll is enabled, false otherwise) );
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.
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. |
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.
This function sets the index of currently selected item of this flex list menu to the specified value.
[ public ] Void SetSelectListColor( SFXRGBColorConstRef param // value to set );
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]
Background color of unselected item at the odd index | |
---|---|
For the background color of unselected item at the odd index, refer to SFZFlexListMenu::SetOddListColor. |
Background color of unselected item at the even index | |
---|---|
For the background color of unselected item at the even index, refer to SFZFlexListMenu::SetEvenListColor. |
Foreground color of selected item | |
---|---|
For the foreground color of selected item, refer to SFZFlexListMenu::SetTextColor. |
SFZFlexListMenu::GetSelectListColor | SFZFlexListMenu::SetEvenListColor | SFZFlexListMenu::SetOddListColor | SFZFlexListMenu::SetTextColor | SFXRGBColor
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.
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. |
SFZFlexListMenu::GetSnapDownKeySFZFlexListMenu::SetSnapUpKey | SFYMenu::SetSelectUpKey | SFYMenu::SetSelectDownKey | SFZFlexListMenu::SetPageDownKey | SFZFlexListMenu::SetPageUpKey | SFXEvent | Value Event[SFEVT_RESPONDER_VALUE]
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.
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. |
SFZFlexListMenu::GetSnapUpKeySFZFlexListMenu::SetSnapDownKey | SFYMenu::SetSelectUpKey | SFYMenu::SetSelectDownKey | SFZFlexListMenu::SetPageDownKey | SFZFlexListMenu::SetPageUpKey | SFXEvent | Value Event[SFEVT_RESPONDER_VALUE]
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.
[ public ] Void SetTextColor( TextEnum textEnum // text enum SFXRGBColorConstRef param // value to set );
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:
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.
Background color of unselected item at the odd index | |
---|---|
For the background color of unselected item at the odd index, refer to SFZFlexListMenu::SetOddListColor. |
Background color of unselected item at the even index | |
---|---|
For the background color of unselected item at the even index, refer to SFZFlexListMenu::SetEvenListColor. |
Background color of selected item | |
---|---|
For the background color of selected item, refer to SFZFlexListMenu::SetSelectListColor. |
SFZFlexListMenu::TextEnum | SFZFlexListMenu::GetTextColor | SFZFlexListMenu::SetOddListColor | SFZFlexListMenu::SetEvenListColor | SFZFlexListMenu::SetSelectListColor | SFZFlexListMenu::SetItemEnable | SFXRGBColor::GetBrightness | SFXRGBColor | State
[ public ] Void SetToggle( Toggle param // value to set (logical sum of ToggleEnum) );
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.
SFZFlexListMenu menu;
// ...
menu->SetToggle(
SFZFlexListMenu::TOGGLE_EMPTY_BODY_ICON |
SFZFlexListMenu::TOGGLE_MULTIPLE_BODY_TEXT
);
[ public ] Void SetVerticalAlign( VerticalEnum param // value to set );
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.
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.
enum CodeEnum { CODE_TYPE = four_char_code('m', 'f', 'm', 'n') }; SFMTYPEDEFTYPE(CodeEnum)
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] };
enum DirectionEnum { DIRECTION_LEFT = 0, // scroll left DIRECTION_RIGHT, // scroll right DEFAULT_DIRECTION = DIRECTION_LEFT // Default: scroll left }; SFMTYPEDEFTYPE(DirectionEnum)
enum HorizontalEnum { HORIZONTAL_LEFT = 0, // left-aligned HORIZONTAL_CENTER, // center-aligned HORIZONTAL_RIGHT, // right-aligned DEFAULT_HORIZONTAL = HORIZONTAL_LEFT // Default: left-aligned }; SFMTYPEDEFTYPE(HorizontalEnum)
enum IconEnum { ICON_BODY_NORMAL = 0, ICON_BODY_SELECT, ICON_FOOTER_NORMAL, ICON_FOOTER_SELECT, ICON_LIMIT }; SFMTYPEDEFTYPE(IconEnum)
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
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; };
An item can be inserted into this flex list menu using this item structure.
SFZFlexListMenu::Insert | SFZFlexListMenu::InsertFirst | SFZFlexListMenu::InsertLast | SFZFlexListMenu::GetItem | SFZFlexListMenu::SetItem
enum SelectEnum { NORMAL = 0, SELECT }; SFMTYPEDEFTYPE(SelectEnum)
NORMAL: the item is not selected
SELECT: the item is selected
enum TextEnum { TEXT_HEADER_NORMAL = 0, TEXT_HEADER_SELECT, TEXT_BODY_NORMAL, TEXT_BODY_SELECT, TEXT_LIMIT }; SFMTYPEDEFTYPE(TextEnum)
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
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)
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.
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:
enum VerticalEnum { VERTICAL_TOP = 0, // top-aligned VERTICAL_MIDDLE, // center-aligned VERTICAL_BOTTOM, // bottom-aligned DEFAULT_VERTICAL = VERTICAL_MIDDLE // default: center-aligned }; SFMTYPEDEFTYPE(VerticalEnum)
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |