SophiaFramework UNIVERSE 5.3 |
#include <SFZFlexListBoxControl.h.hpp>
class SFZFlexListBoxControl : public SFYBoxControl;
SFMTYPEDEFCLASS(SFZFlexListBoxControl)
How to use
SFZFlexListBoxControl is a control to have a user select one item among list items, which has more advanced features than the SFZListBoxControl class.
Below is the layout of flex list box control:
Each item has three parts(header, body, and footer from left) as follows:
Note | |
---|---|
|
Difference between SFZFlexListBoxControl and SFZListBoxControl
Content | SFZListBoxControl | SFZFlexListBoxControl |
---|---|---|
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 |
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 SFZFlexListBoxControl 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 SFZFlexListBoxControl class which has more than several hundred items. For the memory usage, the same can be said. It is recommended to use the SFZListBoxControl class when the number of items is more than several hundred. |
Usage of the flex list box control
To insert an item, use the SFZFlexListBoxControl::Insert / SFZFlexListBoxControl::InsertFirst / SFZFlexListBoxControl::InsertLast function. To remove an item, use the SFZFlexListBoxControl::Remove / SFZFlexListBoxControl::RemoveFirst / SFZFlexListBoxControl::RemoveLast function. If the SFZFlexListBoxControl::Clear function is called, all items are removed.
The selected item can be moved by one item using the ScrollUp or ScrollDown key set with the SFZFlexListBoxControl::SetScrollUpKey or SFZFlexListBoxControl::SetScrollDownKey function respectively.
The selected item can be moved by one page using the PageUp or PageDown key set with the SFZFlexListBoxControl::SetPageUpKey or SFZFlexListBoxControl::SetPageDownKey function respectively.
The selected item can be moved to the top or bottom using the SnapUp or SnapDown key set with the SFZFlexListBoxControl::SetSnapUpKey or SFZFlexListBoxControl::SetSnapDownKey function respectively.
The value event of SFXEvent(SFEVT_RESPONDER_VALUE, SFP16_VALUE_CURRENT, index of selected item) will occur when the selected item is moved.
In the selected item, the text is drawn in the color set with the SFZFlexListBoxControl::SetTextColor function, and the background is filled in the color set with the SFZFlexListBoxControl::SetSelectListColor function.
In the unselected item, the text is drawn in the color set with the SFZFlexListBoxControl::SetTextColor function, the background of each item at the odd or even index is filled in the color set with the SFZFlexListBoxControl::SetOddListColor or SFZFlexListBoxControl::SetEvenListColor function respectively.
In the item of which the enable flag is set to "false", the text is drawn in the color which is calculated for the "invalid" item using the color set with the SFZFlexListBoxControl::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 SFZFlexListBoxControl::SetOddListColor or SFZFlexListBoxControl::SetEvenListColor function respectively. However, the background of selected item is always filled in the color set with the SFZFlexListBoxControl::SetSelectListColor function. And when the state of this responder is in the "inactive" state, each item is drawn in the same way as its enable flag is set to "false".
The grid line can be drawn using the SFZFlexListBoxControl::SetGridLineEnable function and the SFZFlexListBoxControl::SetGridLineColor function. The margin in each item is set with the SFZFlexListBoxControl::SetListMargin function.
In the default implementation, the flex list menu[SFZFlexListBoxControl] will receive the following result events[SFEVT_RESPONDER_RESULT].
The developer can register handlers for these events.
The operation key of the menu is set with the SFYBoxControl::SetOperateKey function. By default, the operation key is set to the SELECT key.
The access key of the menu is set with the SFZFlexListBoxControl::SetItemAccessKey function.
The ESCAPE key is set with the SFZFlexListBoxControl::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 SFZFlexListBoxControl::SetItemEnable function. |
Reference: Result Event[SFEVT_RESPONDER_RESULT] | SFZFlexListBoxControl::HandleOperateKey | SFZFlexListBoxControl::HandleAccessKey | SFZFlexListBoxControl::HandleEscapeKey
Code to create a flex list box control
Void UserClass::Main(Void) { SFZWindowSmp window; SFZFlexListBoxControlSmp list; SFZFlexListBoxControl::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); // create the window window = SFZWindow::NewInstance(); window->SetParent(GetThis()); window->SetBackgroundColor(SFXRGBColor(0xDD, 0xFF, 0xDD, 0x00)); window->SetRealBound(GetLocalBound()); window->SetState(true, true, true, true); // [Required] create flex list box control list = SFZFlexListBoxControl::NewInstance(&error); // [Required] set flex list box control's parent responder to window list->SetParent(window); // [Optional] set background color of even item list->SetEvenListColor(SFXRGBColor(0xFF, 0xFF, 0xCC, 0x00)); // [Optional] set background color of odd item list->SetOddListColor(SFXRGBColor(0xFF, 0xCC, 0xFF, 0x00)); // [Optional] set horizontal alignment of unselected item to "center-aligned" list->SetHorizontalAlign(SFZFlexListBoxControl::NORMAL, SFZFlexListBoxControl::HORIZONTAL_CENTER); // [Optional] set list margin within each item list->SetListMargin(SFXMargin(2, 1, 2, 1)); // [Optional] make grid line invalid (default) list->SetGridLineEnable(false); // [Optional] set space size list->SetSpaceSize(4); // [Optional] set repeat-scroll flag to "true" list->SetScrollRepeat(true); // [Optional] set width of scroll bar control to 5 list->SetScrollBarWidth(5); // [Optional] make multiple text displayed for selected item list->SetToggle(SFZFlexListBoxControl::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 = SFZFlexListBoxControl::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 list->InsertLast(item); } // [Optional] make 5th item invalid list->SetItemEnable(5, false); // [Required] set flex list box control's real region to suitable region list->SetRealBound(list->GetSuitableBound(window->GetLocalBound().Deflate(10, 10)).SnapCenterMiddle(GetLocalBound().GetCenterMiddle())); // [Required] set flex list box control's state to "visible" + "active" + "enable" + "focus" together list->SetState(true, true, true, true); // [Optional] make 1st item selected(*) list->SetCurrentValue(1); // (*note) // after setting flex list box control's state to "enable", select item // return; }
Execution Result:
SFYBoxControl | SFZListBoxControl | SFXEvent | Value Event[SFEVT_RESPONDER_VALUE] | Result Event[SFEVT_RESPONDER_RESULT] | State
Constructor/Destructor |
---|
SFZFlexListBoxControl( Void ) Constructor of the SFZFlexListBoxControl class.
|
~SFZFlexListBoxControl( Void ) Destructor of the SFZFlexListBoxControl class.
|
Public Functions | |
---|---|
Void |
Clear( Void ) Remove all items from this flex list box control.
|
Bool |
ContainsAccessKey(
AVKType key
)
Check whether or not the specified access key of this flex list box control 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 box control.
|
AVKType |
GetEscapeKey( Void ) Get the ESCAPE key of this flex list box control.
|
SFXRGBColorConstRef |
GetEvenListColor( Void )
Get the background color of unselected item at the even index of this flex list box control.
|
AEEFont |
GetFont(
TextEnum textEnum
) Get the font for the specified text of this flex list box control.
|
SFXRGBColorConstRef |
GetGridLineColor( Void ) Get the color of grid line of this flex list box control.
|
Bool |
GetGridLineEnable( Void ) Get the value of enable flag of the grid line of this flex list box control.
|
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 box control.
|
AVKType |
GetItemAccessKey(
SInt32 index
) Get the access key of the specified item of this flex list box control.
|
UInt32 |
GetItemCommandId(
SInt32 index
) Get the command ID of the specified item of this flex list box control.
|
SInt32 |
GetItemCount( Void )
Get the number of items of this flex list box control.
|
Bool |
GetItemEnable(
SInt32 index
) Get the value of enable flag of the specified item of this flex list box control.
|
SInt16 |
GetItemHeight(
SInt32 index
) Get the item height of this flex list box control. [pixels]
|
SFBImageSmpConstRef |
GetItemIconImage(
SInt32 index
, IconEnum iconEnum
) Get the specified icon image of the specified item of this flex list box control.
|
SFXWideStringConstRef |
GetItemText(
SInt32 index
, TextEnum textEnum
) Get the specified text of the specified item of this flex list box control.
|
SFXMarginConstRef |
GetListMargin( Void )
Get the margin within each item of this flex list box control.
|
SFXRGBColorConstRef |
GetOddListColor( Void ) Get the background color of unselected item at the odd index of this flex list box control.
|
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 box control.
|
SInt16 |
GetScrollBarWidth( Void )
Get the width of the scroll bar control of this flex list box control. [pixels]
|
DirectionEnum |
GetScrollDirection( Void ) Get the scroll direction.
|
AVKType |
GetScrollDownKey( Void ) Get the ScrollDown key to move the selected item down by one item of this flex list box control.
|
UInt32 |
GetScrollInterval( Void ) Get the scroll-interval. [milliseconds]
|
Bool |
GetScrollRepeat( Void ) Get the value of repeat-scroll flag of this flex list box control.
|
SInt16 |
GetScrollStep( Void ) Get the scroll-step. [pixels]
|
AVKType |
GetScrollUpKey( Void ) Get the ScrollUp key to move the selected item up by one item of this flex list box control.
|
SFXRGBColorConstRef |
GetSelectListColor( Void )
Get the background color of selected item of this flex list box control.
|
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 box control. [pixels]
|
SFXRGBColorConstRef |
GetTextColor(
TextEnum textEnum
) Get the color of the specified text of this flex list box control.
|
Toggle |
GetToggle( Void )
Get the value of toggle state of this flex list box control.
|
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 SFZFlexListBoxControlSmp |
NewInstance(
SFCErrorPtr exception = null
) Create a new instance of this responder class.
|
Void |
Remove(
SInt32 begin
, SInt32 end
) Remove specified items from this flex list box control.
|
Void |
Remove(
SInt32 index
) Remove specified items from this flex list box control.
|
Void |
RemoveFirst( Void ) Remove the first item from this flex list box control.
|
Void |
RemoveLast( Void ) Remove the last item from this flex list box control.
|
Void |
SetAccessKeyEnable(
Bool param
)
Set the enable flag of access key of this flex list box control to the specified value.
|
Void |
SetEscapeKey(
AVKType param
) Set the ESCAPE key of this flex list box control to the specified value.
|
Void |
SetEvenListColor(
SFXRGBColorConstRef param
)
Set the background color of unselected item at the even index of this flex list box control to the specified value.
|
Void |
SetFont(
TextEnum textEnum
, AEEFont param
) Set the font for the specified text of this flex list box control to the specified value.
|
Void |
SetGridLineColor(
SFXRGBColorConstRef param
) Set the color of the grid line of this flex list box control to the specified value.
|
Void |
SetGridLineEnable(
Bool param
) Set the enable flag of the grid line of this flex list box control 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 box control to the specified value.
|
SFCError |
SetItemAccessKey(
SInt32 index
, AVKType key
) Set the access key of the specified item of this flex list box control to the specified value.
|
SFCError |
SetItemCommandId(
SInt32 index
, UInt32 id
)
Set the command ID of the specified item of this flex list box control to the specified value.
|
SFCError |
SetItemEnable(
SInt32 index
, Bool param
) Set the enable flag of the specified item of this flex list box control 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 box control 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 box control 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 box control 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 box control to the specified value.
|
SFCError |
SetItemText(
SInt32 index
, TextEnum textEnum
, SFXWideStringConstRef param
)
Set the specified text of the specified item of this flex list box control to the specified value.
|
Void |
SetListMargin(
SFXMarginConstRef param
)
Set the margin within each item of this flex list box control to the specified value.
|
Void |
SetOddListColor(
SFXRGBColorConstRef param
)
Set the background color of unselected item at the odd index of this flex list box control 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 box control to the specified value.
|
Void |
SetScrollBarWidth(
SInt16 param
)
Set the width of the scroll bar control of this flex list box control to the specified value.
|
Void |
SetScrollDirection(
DirectionEnum param
) Set the scroll direction of currently selected item to the specified value.
|
Void |
SetScrollDownKey(
AVKType param
) Set the ScrollDown key to move the selected item down by one 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 box control to the specified value.
|
Void |
SetScrollStep(
SInt16 param
) Set the scroll-step of currently selected item to the specified value. [pixels]
|
Void |
SetScrollUpKey(
AVKType param
) Set the ScrollUp key to move the selected item up by one item to the specified value.
|
Void |
SetSelectListColor(
SFXRGBColorConstRef param
)
Set the background color of selected item of this flex list box control 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 box control to the specified value. [pixels]
|
Void |
SetTextColor(
TextEnum textEnum
, SFXRGBColorConstRef param
) Set the color of the specified text of this flex list box control to the specified value.
|
Void |
SetToggle(
Toggle param
)
Set the toggle state of this flex list box control 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 currently selected item to the specified value. [milliseconds]
|
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.
|
SFXBevelColorConstRef |
GetBevelColor( Void )
(inherits from SFYBoxControl)
Get the bevel color of the outer frame of this box control.
|
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.
|
SInt32 |
GetCurrentValue( Void )
(inherits from SFYControl)
Get the current value of this control.
|
SFYDistributerPtr |
GetDistributer( Void )
(inherits from SFYResponder)
Get the distributer bound with this responder.
|
SFXRGBColorConstRef |
GetFocusColor( Void )
(inherits from SFYBoxControl)
Get the color of the inner frame region of this box control in the "focus" state.
|
SFYResponderSmp |
GetFrame( Void )
(inherits from SFYResponder)
Get the frame which has been attached to this responder.
|
SFXRGBColorConstRef |
GetFrameColor( Void )
(inherits from SFYBoxControl)
Get the color of the middle frame of this box control.
|
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 |
GetMaximumValue( Void )
(inherits from SFYControl)
Get the maximum value of this control.
|
SInt32 |
GetMinimumValue( Void )
(inherits from SFYControl)
Get the minimum value of this control.
|
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 SFYBoxControl)
Get the operation key of the box control.
|
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.
|
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 |
SetBackgroundColor(
SFXRGBColorConstRef param
)
(inherits from SFYWidget)
Set the background color to the specified value.
|
Void |
SetBevelColor(
SFXBevelColorConstRef param
)
(inherits from SFYBoxControl)
Set the bevel color of the outer frame of this box control to the specified value.
|
Void |
SetCurrentValue(
SInt32 param
)
(inherits from SFYControl)
Set the current value of this control to the specified value.
|
Void |
SetDistributer(
SFYDistributerPtr param
)
(inherits from SFYResponder)
Bind this responder with the specified distributer.
|
Void |
SetFocusColor(
SFXRGBColorConstRef param
)
(inherits from SFYBoxControl)
Set the color of the inner frame region of this box control in the "focus" state to the specified value.
|
SFCError |
SetFrame(
SFYResponderSmpConstRef param
)
(inherits from SFYResponder)
Attach the specified frame to this frame.
|
Void |
SetFrameColor(
SFXRGBColorConstRef param
)
(inherits from SFYBoxControl)
Set the color of the middle frame of this box control to the specified value.
|
Void |
SetID(
UInt32 param
)
(inherits from SFYResponder)
Set the ID value of this responder to the specified value.
|
Void |
SetMaximumValue(
SInt32 param
)
(inherits from SFYControl)
Set the maximum value of the control to the specified value.
|
Void |
SetMinimumValue(
SInt32 param
)
(inherits from SFYControl)
Set the minimum value of the control to the specified value.
|
Void |
SetOperateKey(
AVKType param
)
(inherits from SFYBoxControl)
Set the operation key of this box control 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 |
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 |
DrawBox(
SFXGraphicsPtr graphics
, SFXRectangleConstRef rectangle
)
(inherits from SFYBoxControl)
Draw this box control.
|
static SFYResponderSmp |
Factory(
SFYResponderPtr responder
, SFCErrorPtr exception = null
)
(inherits from SFYResponder)
This function is used to implement the NewInstance function.
|
static SFXMarginConstRef |
GetBoxMargin( Void )
(inherits from SFYBoxControl)
Get the margin region of this box control.
|
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 SFYControl)
This function will be called when the real region is changed.
|
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 SFZFlexListBoxControl 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 ] SFZFlexListBoxControl(Void);
This constructor performs the initializations as follows:
Table 229. Event handler
Event | Content of the handler |
---|---|
SFEVT_KEY event of the operation key set with SFYBoxControl::SetOperateKey | Call the SFZFlexListBoxControl::HandleOperateKey function. |
SFEVT_KEY event of the access key set with SFZFlexListBoxControl::SetItemAccessKey | Call the SFZFlexListBoxControl::HandleOperateKey function. |
SFEVT_KEY event of the ESCAPE key set with SFZFlexListBoxControl::SetEscapeKey | Call the SFZFlexListBoxControl::HandleEscapeKey function. |
SFEVT_KEY event of the ScrollUp key set with SFZFlexListBoxControl::SetScrollUpKey | Make the above item be currently selected item(scroll up one item if necessary) |
SFEVT_KEY event of the ScrollDown key set with SFZFlexListBoxControl::SetScrollDownKey | Make the below item be currently selected item(scroll down one item if necessary) |
SFEVT_KEY event of the PageUp key set with SFZFlexListBoxControl::SetPageUpKey | Scroll up one page |
SFEVT_KEY event of the PageDown key set with SFZFlexListBoxControl::SetPageDownKey | Scroll down one page |
SFEVT_KEY event of the SnapUp key set with SFZFlexListBoxControl::SetSnapUpKey | Scroll up to the top |
SFEVT_KEY event of the SnapDown key set with SFZFlexListBoxControl::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 SFZFlexListBoxControl, the corresponding handler will be called when one of the above events occurs. |
SFYResponder::SetType | SFZFlexListBoxControl::CodeEnum | SFZFlexListBoxControl::SetScrollBarWidth | SFYControl::GetCurrentValue | SFZFlexListBoxControl::SetScrollRepeat | SFZFlexListBoxControl::SetEvenListColor | SFZFlexListBoxControl::SetOddListColor | SFZFlexListBoxControl::SetSelectListColor | SFZFlexListBoxControl::SetTextColor | SFZFlexListBoxControl::SetGridLineColor | SFZFlexListBoxControl::SetListMargin | SFZFlexListBoxControl::SetGridLineEnable | SFZFlexListBoxControl::SetAccessKeyEnable | SFZFlexListBoxControl::SetFont | SFZFlexListBoxControl::SetSpaceSize | SFZFlexListBoxControl::SetToggle | SFZFlexListBoxControl::SetScrollDirection | SFZFlexListBoxControl::SetScrollInterval | SFZFlexListBoxControl::SetScrollStep | SFZFlexListBoxControl::SetWaitInterval | SFYBoxControl::SetOperateKey | SFZFlexListBoxControl::SetItemAccessKey | SFZFlexListBoxControl::HandleOperateKey | SFZFlexListBoxControl::SetEscapeKey | SFZFlexListBoxControl::HandleEscapeKey | SFZFlexListBoxControl::SetScrollUpKey | SFZFlexListBoxControl::SetScrollDownKey | SFZFlexListBoxControl::SetPageUpKey | SFZFlexListBoxControl::SetPageDownKey | SFZFlexListBoxControl::SetSnapUpKey | SFZFlexListBoxControl::SetSnapDownKey | SFZFlexListBoxControl::HorizontalEnum | SFZFlexListBoxControl::VerticalEnum | SFZFlexListBoxControl::DirectionEnum | SFZFlexListBoxControl::DefaultEnum | SFZFlexListBoxControl::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 ~SFZFlexListBoxControl(Void);
Delete all items from this flex list box control.
[ 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 box control.
[ public, const ] AVKType GetEscapeKey(Void);
ESCAPE key set with the SFZFlexListBoxControl::SetEscapeKey function.
[ public, const ] SFXRGBColorConstRef GetEvenListColor(Void);
Background color(SFXRGBColor) of unselected item at the even index of this flex list box control.
[ 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(SFZFlexListBoxControl::TextEnum).
This function gets the font for the specified text of this flex list box control.
[ public, const ] SFXRGBColorConstRef GetGridLineColor(Void);
Color(SFXRGBColor) of grid line of this flex list box control.
[ public, const ] Bool GetGridLineEnable(Void);
Value of the enable flag of the grid line of this flex list box control.
[ public, const ] HorizontalEnum GetHorizontalAlign(Void);
Value of the horizontal alignment(SFZFlexListBoxControl::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 box control.
This function gets the item structure of the specified item of this flex list box control.
Item structure | |
---|---|
For the item structure, refer to SFZFlexListBoxControl::ItemRec. |
This function gets the access key of the specified item of this flex list box control. "0" will be returned if the access key is not set.
Command ID of the specified item of this flex list box control.
[ public, const ] SInt32 GetItemCount(Void);
Number of the items of this flex list box control.
This function gets the value of enable flag of the specified item of this flex list box control. If the item is valid, "true" will be returned. Otherwise "false" will be returned.
Item height of this flex list box control. [pixels]
This function gets the item height of this flex list box control[pixels], which is calculated using the following values:
SFZFlexListBoxControl::SetFont | SFZFlexListBoxControl::SetItemIconImage | SFZFlexListBoxControl::SetListMargin
[ public, const ] SFBImageSmpConstRef GetItemIconImage( SInt32 index // index of item IconEnum iconEnum // icon enum );
Icon image of the specified item of this flex list box control which corresponds to the specified icon enum(SFZFlexListBoxControl::IconEnum).
[ public, const ] SFXWideStringConstRef GetItemText( SInt32 index // index of item TextEnum textEnum // text enum );
Text(SFXWideString) of the specified item of this flex list box control which corresponds to the specified text enum(SFZFlexListBoxControl::TextEnum).
[ public, const ] SFXMarginConstRef GetListMargin(Void);
Margin(SFXMargin) within each item of this flex list box control
[ public, const ] SFXRGBColorConstRef GetOddListColor(Void);
Background color(SFXRGBColor) of unselected item at the odd index of this flex list box control.
[ 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 box control 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 SFZFlexListBoxControl::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
SFZFlexListBoxControlSmp _list;
SFYScrollBarControlSmp _bar;
_list = SFZFlexListBoxControl::NewInstance();
if ((_bar = _list->GetScrollBarControl()) != null) {
_bar->SetTrackColor(SFXRGBColor(0xDD, 0xFF, 0xDD, 0x00));
}
[ public, const ] SInt16 GetScrollBarWidth(Void);
Width of the scroll bar control, which this flex list box control contains internally. [pixels]
[ public, const ] DirectionEnum GetScrollDirection(Void);
Scroll direction(SFZFlexListBoxControl::DirectionEnum) set with the SFZFlexListBoxControl::SetScrollDirection function.
[ public, const ] AVKType GetScrollDownKey(Void);
ScrollDown key to move the selected item down by one item, which is set by the SFZFlexListBoxControl::SetScrollDownKey function.
[ public, const ] UInt32 GetScrollInterval(Void);
Scroll-interval set with the SFZFlexListBoxControl::SetScrollInterval function. [milliseconds]
[ public, const ] Bool GetScrollRepeat(Void);
[ public, const ] SInt16 GetScrollStep(Void);
Scroll-step set with the SFZFlexListBoxControl::SetScrollStep function. [pixels]
[ public, const ] AVKType GetScrollUpKey(Void);
ScrollUp key to move the selected item up by one item, which is set by the SFZFlexListBoxControl::SetScrollUpKey function.
[ public, const ] SFXRGBColorConstRef GetSelectListColor(Void);
Background color(SFXRGBColor) of selected item of this flex list box control.
[ public, const ] AVKType GetSnapDownKey(Void);
SnapDown key to scroll down the items 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 box control. [pixels]
[ public, const ] SFXRGBColorConstRef GetTextColor( TextEnum textEnum // text enum );
Color(SFXRGBColor) of text specified with a text enum(SFZFlexListBoxControl::TextEnum) of this flex list box control.
[ public, const ] Toggle GetToggle(Void);
Value of the toggle state of this flex list box control(logical sum of SFZFlexListBoxControl::ToggleEnum).
[ public, const ] VerticalEnum GetVerticalAlign(Void);
The value(SFZFlexListBoxControl::VerticalEnum) of vertical alignment.
[ public, const ] UInt32 GetWaitInterval(Void);
Waiting time to start the scroll set with the SFZFlexListBoxControl::SetWaitInterval function. [milliseconds]
This function will be called when the SFEVT_KEY event(key event[SFEVT_KEY]) of the access key set with the SFZFlexListBoxControl::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 SFZFlexListBoxControl::HandleAccessKey function is as follows:
/*protected virtual */Bool SFZFlexListBoxControl::HandleAccessKey(AVKType key) { Bool result(false); for (SInt32 i = 0; i < GetItemCount(); ++ i) { if (GetItemAccessKey(i) == key) { if (GetItemEnable(i)) { SetCurrentValue(i); InvokeForward(SFXEvent(SFEVT_RESPONDER_RESULT, SFP16_RESULT_OK, i), false); result = true; break; } } } return result; }// SFZFlexListBoxControl::HandleAccessKey // }// SFYWidget::HandleBoundOptimize //
SFZFlexListBoxControl::SetItemAccessKey | SFZFlexListBoxControl::SetAccessKeyEnable | SFZFlexListBoxControl::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 SFZFlexListBoxControl::HandleBoundOptimize function is as follows:
struct ScrollBarRec { SFYScrollBarControlSmp smp; SInt16 width; }; SFYVerticalFlexListControlSmp _vertical; ScrollBarRec _bar; /*protected virtual */Void SFZFlexListBoxControl::HandleBoundOptimize(SFXRectanglePtr rectangle) const { SFXSize size; rectangle->Deflate(GetBoxMargin()); 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(GetBoxMargin()); return; }// SFZFlexListBoxControl::HandleBoundRequest //
SFYResponder::GetSuitableBound | SFZFlexListBoxControl::SetFont | SFZFlexListBoxControl::SetItem | SFZFlexListBoxControl::SetItemIconImage | SFZFlexListBoxControl::SetItemText | SFZFlexListBoxControl::SetSpaceSize | SFZFlexListBoxControl::SetListMargin | SFZFlexListBoxControl::SetScrollBarWidth | SFYBoxControl::GetBoxMargin | SFXMargin | SFZListBoxControl | 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 SFZFlexListBoxControl::HandleBoundRequest function is as follows:
SFYVerticalFlexListControlSmp _vertical; /*protected virtual */Void SFZFlexListBoxControl::HandleBoundRequest(SFXRectanglePtr rectangle) const { SFXSize size; rectangle->Deflate(GetBoxMargin()); size.Set(_vertical->GetSuitableBound().GetSize()); rectangle->SetSize(size); rectangle->Inflate(GetBoxMargin()); return; }// SFZFlexListBoxControl::HandleBoundRequest //
SFYResponder::GetSuitableBound | SFZFlexListBoxControl::SetFont | SFZFlexListBoxControl::SetItem | SFZFlexListBoxControl::SetItemIconImage | SFZFlexListBoxControl::SetItemText | SFZFlexListBoxControl::SetSpaceSize | SFZFlexListBoxControl::SetListMargin | SFYBoxControl::GetBoxMargin | SFXMargin | SFZListBoxControl | 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 SFZFlexListBoxControl::HandleBoundVirtual function is as follows:
struct ScrollBarRec { SFYScrollBarControlSmp smp; SInt16 width; }; SFYVerticalFlexListControlSmp _vertical; ScrollBarRec _bar; /*protected virtual */Void SFZFlexListBoxControl::HandleBoundVirtual(Void) { Relocate(); return; }// SFZFlexListBoxControl::HandleBoundVirtual // /*private */Void SFZFlexListBoxControl::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(GetBoxMargin()); 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(GetCurrentValue())) { if ((widget = GetItemWidget(GetCurrentValue())) != null) { if (widget->GetStateActive(true)) { widget->StartScroll(); } } } return; }// SFZFlexListBoxControl::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 SFEVT_KEY event(key event[SFEVT_KEY]) of the ESCAPE key set with the SFZFlexListBoxControl::SetEscapeKey function is received.
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 SFZFlexListBoxControl::HandleEscapeKey function is as follows:
/*protected virtual */Void SFZFlexListBoxControl::HandleEscapeKey(Void) { InvokeForward(SFXEvent(SFEVT_RESPONDER_RESULT, SFP16_RESULT_ESCAPE, 0), false); return; }// SFZFlexListBoxControl::HandleEscapeKey //
SFZFlexListBoxControl::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 SFYBoxControl::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 SFYControl::GetCurrentValue function) will be sent if the enable flag is set to "true" with the SFZFlexListBoxControl::SetItemEnable function.
If the enable flag is set to "false", the result event will not be sent.
Internal implementation of the SFZFlexListBoxControl::HandleOperateKey function is as follows:
/*protected virtual */Void SFZFlexListBoxControl::HandleOperateKey(Void) { if (GetItemEnable(GetCurrentValue())) { InvokeForward(SFXEvent(SFEVT_RESPONDER_RESULT, SFP16_RESULT_OK, GetCurrentValue()), false); } return; }// SFZFlexListBoxControl::HandleOperateKey //
SFYBoxControl::SetOperateKey | SFZFlexListBoxControl::SetItemEnable | 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 SFZFlexListBoxControl::HandleRenderRequest function is as follows:
/*protected virtual */Void SFZFlexListBoxControl::HandleRenderRequest(SFXGraphicsPtr graphics) const { DrawBox(graphics, GetLocalBound()); return; }// SFZFlexListBoxControl::HandleRenderRequest //
SFYResponder::Invalidate | SFYResponder::Render | SFYResponder::InvokeBackward | Drawing Event[SFEVT_RESPONDER_RENDER] | Handler for the Drawing Event[XANDLER_DECLARE_VOIDRENDER] | Rendering | Event Loop | Responder Tree
[ 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 maximum value, the item will be inserted at the tail.
Note | |
---|---|
The numuber of items is set to the maximum value of the SFYControl class. |
Item structure | |
---|---|
For the item structure, refer to SFZFlexListBoxControl::ItemRec. |
SFZFlexListBoxControl::InsertFirst | SFZFlexListBoxControl::InsertLast | SFZFlexListBoxControl::Remove | SFYControl::SetMaximumValue | SFZFlexListBoxControl::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.
Note | |
---|---|
The numuber of items is set to the maximum value of the SFYControl class. |
Item structure | |
---|---|
For the item structure, refer to SFZFlexListBoxControl::ItemRec. |
SFZFlexListBoxControl::Insert | SFZFlexListBoxControl::InsertLast | SFZFlexListBoxControl::RemoveFirst | SFYControl::SetMaximumValue | SFZFlexListBoxControl::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.
Note | |
---|---|
The numuber of items is set to the maximum value of the SFYControl class. |
Item structure | |
---|---|
For the item structure, refer to SFZFlexListBoxControl::ItemRec. |
SFZFlexListBoxControl::InsertFirst | SFZFlexListBoxControl::InsertLast | SFZFlexListBoxControl::RemoveLast | SFYControl::SetMaximumValue | SFZFlexListBoxControl::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 ] SFZFlexListBoxControlSmp 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:
SFZFlexListBoxControlSmp _flexlistbox;
SFCError error;
if ((_flexlistbox = SFZFlexListBoxControl::NewInstance(&error)) != null) {
...
}
[ public ] Void Remove( SInt32 begin // beginning index to remove(this index is included) SInt32 end // ending index to remove(this index is not included) );
[ public ] Void Remove( SInt32 index // index of item to delete );
This function removes the item at the specified index or the items in the specified index range from this flex list box control.
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.
Note | |
---|---|
The numuber of items is set to the maximum value of the SFYControl class. |
SFZFlexListBoxControlSmp listbox; // create instance etc. ... // insert item at the tail if (listbox->InsertLast("0 index") == SFERR_NO_ERROR) { // insert item at the tail if (listbox->InsertLast("1 index") == SFERR_NO_ERROR) { // insert item at the tail if (listbox->InsertLast("2 index") == SFERR_NO_ERROR) { // insert item at the tail if (listbox->InsertLast("3 index") == SFERR_NO_ERROR) { // select "2 index" item listbox->SetCurrentValue(2); //////////////////////////// // state of list box // // 0: "0 index" // // 1: "1 index" // // 2: "2 index" <---***// // 3: "3 index" // //////////////////////////// // remove items from "1 index" to "2 index" listbox->Remove(1, 3); //////////////////////////// // state of list box // // 0: "0 index" // // 1: "3 index" <---***// //////////////////////////// } } } }
SFZFlexListBoxControl::Clear | SFZFlexListBoxControl::RemoveFirst | SFZFlexListBoxControl::RemoveLast | SFZFlexListBoxControl::Insert | SFYControl::SetMaximumValue
[ public ] Void RemoveFirst(Void);
This function removes the first item from this flex list box control.
Note | |
---|---|
The numuber of items is set to the maximum value of the SFYControl class. |
SFZFlexListBoxControl::Clear | SFZFlexListBoxControl::Remove | SFZFlexListBoxControl::RemoveLast | SFZFlexListBoxControl::InsertFirst | SFYControl::SetMaximumValue
[ public ] Void RemoveLast(Void);
This function removes the last item from this flex list box control.
Note | |
---|---|
The numuber of items is set to the maximum value of the SFYControl class. |
SFZFlexListBoxControl::Clear | SFZFlexListBoxControl::Remove | SFZFlexListBoxControl::RemoveFirst | SFZFlexListBoxControl::InsertLast | SFYControl::SetMaximumValue
This function sets the enable flag of access key of this flex list box control 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 item set with the SFZFlexListBoxControl::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 SFZFlexListBoxControl::SetItemEnable function.
This function sets the ESCAPE key of this flex list box control to the specified value.
Default: AVK_CLR
The SFZFlexListBoxControl::HandleEscapeKey function will be called if the ESCAPE key is pressed.
[ 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 box control 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 SFZFlexListBoxControl::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 SFZFlexListBoxControl::SetOddListColor. |
Foreground color of selected item | |
---|---|
For the foreground color of selected item, refer to SFZFlexListBoxControl::SetTextColor. |
Background color of selected item | |
---|---|
For the background color of selected item, refer to SFZFlexListBoxControl::SetSelectListColor. |
SFZFlexListBoxControl::GetEvenListColor | SFZFlexListBoxControl::SetOddListColor | SFZFlexListBoxControl::SetSelectListColor | SFZFlexListBoxControl::SetTextColor | SFZFlexListBoxControl::SetItemEnable | SFXRGBColor::GetBrightness | SFXRGBColor
This function sets the font for the text of this flex list box control to the specified value, which is specified by the text enum(SFZFlexListBoxControl::TextEnum).
Default: AEE_FONT_NORMAL
[ public ] Void SetGridLineColor( SFXRGBColorConstRef param // value to set (color of grid line) );
This function sets the color of the grid line of this flex list box control 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 SFZFlexListBoxControl::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 SFZFlexListBoxControl::SetListMargin function in case "true" is set to this enable flag. |
SFZFlexListBoxControl::GetGridLineColor | SFZFlexListBoxControl::SetGridLineEnable | SFXRGBColor
[ 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 box control to the specified value.
The grid line will be drawn in the color set with the SFZFlexListBoxControl::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 SFZFlexListBoxControl::SetListMargin function in case this enable flag is set to "true". |
SFZFlexListBoxControl::GetGridLineEnable | SFZFlexListBoxControl::SetGridLineColor | SFZFlexListBoxControl::SetListMargin
[ public ] Void SetHorizontalAlign( HorizontalEnum param // value to set );
This function sets the horizontal alignment to the specified value.
Default: SFZFlexListBoxControl::DEFAULT_HORIZONTAL
For the value of SFZFlexListBoxControl::DEFAULT_HORIZONTAL, refer to SFZFlexListBoxControl::HorizontalEnum.
[ public ] SFCError SetItem( SInt32 index // index of item ItemRecConstRef item // item structure );
This function sets the specified item of this flex list box control to the specified value.
Item structure | |
---|---|
For the item structure, refer to SFZFlexListBoxControl::ItemRec. |
This function sets the access key of the specified item of this flex list box control to the specified value.
When "true" is set to both the enable flag of access key and the item using the SFZFlexListBoxControl::SetAccessKeyEnable function and the SFZFlexListBoxControl::SetItemEnable function respectively, the SFZFlexListBoxControl::HandleAccessKey function will be called if the access key set with this function is pressed.
SFZFlexListBoxControl::GetItemAccessKey | SFZFlexListBoxControl::HandleAccessKey | SFZFlexListBoxControl::SetAccessKeyEnable | SFZFlexListBoxControl::SetItemEnable
This function sets the command ID of the specified item of this flex list box control 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 box control 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 SFZFlexListBoxControl::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 SFZFlexListBoxControl::SetEvenListColor or SFZFlexListBoxControl::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 SFZFlexListBoxControl::SetTextColor function. The background of item is drawn in the color set with the SFZFlexListBoxControl::SetSelectListColor function when selected, regardless of the value of enable flag of item. |
SFZFlexListBoxControl::GetItemEnable | SFZFlexListBoxControl::HandleOperateKey | SFZFlexListBoxControl::HandleAccessKey | SFZFlexListBoxControl::SetTextColor | SFZFlexListBoxControl::SetEvenListColor | SFZFlexListBoxControl::SetOddListColor | SFZFlexListBoxControl::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(SFZFlexListBoxControl::IconEnum) of the specified item of this flex list box control 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 the text of the specified text enum(SFZFlexListBoxControl::TextEnum) of the specified item of this flex list box control 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 box control 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 SetOddListColor( SFXRGBColorConstRef param // value to set );
This function sets the background color(SFXRGBColor) of unselected item at the odd index of this flex list box control 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 SFZFlexListBoxControl::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 SFZFlexListBoxControl::SetEvenListColor. |
Foreground color of selected item | |
---|---|
For the foreground color of selected item, refer to SFZFlexListBoxControl::SetTextColor. |
Background color of selected item | |
---|---|
For the background color of selected item, refer to SFZFlexListBoxControl::SetSelectListColor. |
SFZFlexListBoxControl::GetOddListColor | SFZFlexListBoxControl::SetEvenListColor | SFZFlexListBoxControl::SetSelectListColor | SFZFlexListBoxControl::SetTextColor | SFZFlexListBoxControl::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 box control 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 box control when the PageDown key is pressed. |
SFZFlexListBoxControl::GetPageDownKey | SFZFlexListBoxControl::SetPageUpKey | SFZFlexListBoxControl::SetScrollUpKey | SFZFlexListBoxControl::SetScrollDownKey | SFZFlexListBoxControl::SetSnapUpKey | SFZFlexListBoxControl::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 box control 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 box control when the PageUp key is pressed. |
SFZFlexListBoxControl::GetPageUpKey | SFZFlexListBoxControl::SetPageDownKey | SFZFlexListBoxControl::SetScrollUpKey | SFZFlexListBoxControl::SetScrollDownKey | SFZFlexListBoxControl::SetSnapUpKey | SFZFlexListBoxControl::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 the flex list box control to the specified value.
The developer can set his or her own scroll bar control to the flex list box control.
The code below is to set the custom scroll bar control to the flex list box control.
// define class of original scroll bar control class CustomScrollBarControl : public SFYScrollBarControl { // definition }; Void UserApplication::SomeFunction { SFZFlexListBoxControlSmp list; CustomScrollBarControlSmp bar; // create flex list box control list = SFZFlexListBoxControl::NewInstance(); // settings of flex list box control // … // create scroll bar control bar = CustomScrollBarControl::NewInstance(); // set original scroll bar to flex list box control list->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 box control contains internally.
Default: SFZFlexListBoxControl::DEFAULT_BAR_WIDTH
For the value of SFZFlexListBoxControl::DEFAULT_BAR_WIDTH, refer to SFZFlexListBoxControl::DefaultEnum.
[ public ] Void SetScrollDirection( DirectionEnum param // scroll direction );
This function sets the scroll direction of currently selected item to the specified value.
Default: SFZFlexListBoxControl::DEFAULT_DIRECTION
For the value of SFZFlexListBoxControl::DEFAULT_DIRECTION, refer to SFZFlexListBoxControl::DirectionEnum.
This function sets the ScrollDown key to move the selected item down by one item to the specified value.
Default: AVK_DOWN
If the ScrollDown key is pressed, the internal handler(*) of this flex list box control will move the selected item down by one item and send the value event.
When "true" is set to the "repeat-scroll" flag using the SFZFlexListBoxControl::SetScrollRepeat and the bottom item is currently selected, the top item will be selected if the ScrollDown key is pressed.
On the contrary, when "false" is set to the "repeat-scroll" flag and the bottom item is currently selected, the bottom item will be still selected even if the ScrollDown key is pressed. At this time, the value event will not be sent.
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 list box control when the ScrollDown key is pressed. |
SFZFlexListBoxControl::GetScrollDownKey | SFZFlexListBoxControl::SetScrollUpKey | SFZFlexListBoxControl::SetScrollRepeat | SFZFlexListBoxControl::SetPageUpKey | SFZFlexListBoxControl::SetPageDownKey | SFZFlexListBoxControl::SetSnapUpKey | SFZFlexListBoxControl::SetSnapDownKey | SFXEvent | Value Event[SFEVT_RESPONDER_VALUE]
This function sets Set the scroll-interval of currently selected item to the specified value. [milliseconds]
Default: SFZFlexListBoxControl::DEFAULT_SCROLL
For the value of SFZFlexListBoxControl::DEFAULT_SCROLL, refer to SFZFlexListBoxControl::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 box control 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 ScrollUp key or ScrollDown 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 ScrollUp key or ScrollDown key is pressed, respectively.
About the ScrollUp key and the ScrollDown key | |
---|---|
The ScrollUp key or ScrollDown key is set with the SFZFlexListBoxControl::SetScrollUpKey function or SFZFlexListBoxControl::SetScrollDownKey function respectively. |
SFZFlexListBoxControl::GetScrollRepeat | SFZFlexListBoxControl::SetScrollUpKey | SFZFlexListBoxControl::SetScrollDownKey
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: SFZFlexListBoxControl::DEFAULT_STEP
For the value of SFZFlexListBoxControl::DEFAULT_STEP, refer to SFZFlexListBoxControl::DefaultEnum.
This function sets the ScrollUp key to move the selected item up by one item to the specified value.
Default: AVK_UP
If the ScrollUp key is pressed, the internal handler(*) of this flex list box control will move the selected item up by one item and send the value event.
When the "repeat-scroll" flag is set to "true" using the SFZFlexListBoxControl::SetScrollRepeat and the top item is currently selected, the bottom item will be selected if the ScrollUp key is pressed.
On the contrary, when the "repeat-scroll" flag is set to "false" and the top item is currently selected, the top item will be still selected even if the ScrollUp key is pressed. At this time, the value event will not be sent.
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 list box control when the ScrollUp key is pressed. |
SFZFlexListBoxControl::GetScrollUpKey | SFZFlexListBoxControl::SetScrollDownKey | SFZFlexListBoxControl::SetScrollRepeat | SFZFlexListBoxControl::SetPageUpKey | SFZFlexListBoxControl::SetPageDownKey | SFZFlexListBoxControl::SetSnapUpKey | SFZFlexListBoxControl::SetSnapDownKey | SFXEvent | Value Event[SFEVT_RESPONDER_VALUE]
[ public ] Void SetSelectListColor( SFXRGBColorConstRef param // value to set );
This function sets the background color(SFXRGBColor) of selected item of this flex list box control 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 SFZFlexListBoxControl::SetOddListColor. |
Background color of unselected item at the even index | |
---|---|
For the background color of unselected item at the even index, refer to SFZFlexListBoxControl::SetEvenListColor. |
Foreground color of selected item | |
---|---|
For the foreground color of selected item, refer to SFZFlexListBoxControl::SetTextColor. |
SFZFlexListBoxControl::GetSelectListColor | SFZFlexListBoxControl::SetEvenListColor | SFZFlexListBoxControl::SetOddListColor | SFZFlexListBoxControl::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 box control 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 box control when the SnapDown key is pressed. |
SFZFlexListBoxControl::GetSnapDownKey SFZFlexListBoxControl::SetSnapUpKey | SFZFlexListBoxControl::SetScrollUpKey | SFZFlexListBoxControl::SetScrollDownKey | SFZFlexListBoxControl::SetPageDownKey | SFZFlexListBoxControl::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 box control 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 box control when the SnapUp key is pressed. |
SFZFlexListBoxControl::GetSnapUpKey SFZFlexListBoxControl::SetSnapDownKey | SFZFlexListBoxControl::SetScrollUpKey | SFZFlexListBoxControl::SetScrollDownKey | SFZFlexListBoxControl::SetPageDownKey | SFZFlexListBoxControl::SetPageUpKey | SFXEvent | Value Event[SFEVT_RESPONDER_VALUE]
This function sets the space size between the elements of each item of this flex list box control to the specified value. [pixels]
Default: SFZFlexListBoxControl::DEFAULT_SPACE
For the value if SFZFlexListBoxControl::DEFAULT_SPACE, refer to SFZFlexListBoxControl::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(SFZFlexListBoxControl::TextEnum) of this flex list box control to the specified value.
Default values are as follows:
When the enable flag is set to "false" using the SFZFlexListBoxControl::SetItemEnable function or the state of this flex list box control 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 SFZFlexListBoxControl::SetOddListColor. |
Background color of unselected item at the even index | |
---|---|
For the background color of unselected item at the even index, refer to SFZFlexListBoxControl::SetEvenListColor. |
Background color of selected item | |
---|---|
For the background color of selected item, refer to SFZFlexListBoxControl::SetSelectListColor. |
SFZFlexListBoxControl::TextEnum | SFZFlexListBoxControl::GetTextColor | SFZFlexListBoxControl::SetOddListColor | SFZFlexListBoxControl::SetEvenListColor | SFZFlexListBoxControl::SetSelectListColor | SFZFlexListBoxControl::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 box control to the specified value, which is the logical sum of SFZFlexListBoxControl::ToggleEnum.
Default: 0.
The code below is to set the value of toggle state.
SFZFlexListBoxControl listbox;
// ...
listbox->SetToggle(
SFZFlexListBoxControl::TOGGLE_EMPTY_BODY_ICON |
SFZFlexListBoxControl::TOGGLE_MULTIPLE_BODY_TEXT
);
[ public ] Void SetVerticalAlign( VerticalEnum param // value to set );
This function sets the vertical alignment to the specified value.
Default: SFZFlexListBoxControl::DEFAULT_VERTICAL
For the value of SFZFlexListBoxControl::DEFAULT_VERTICAL, refer to SFZFlexListBoxControl::VerticalEnum.
This function sets the waiting time to start the scroll of currently selected item to the specified value. [milliseconds]
Default: SFZFlexListBoxControl::DEFAULT_WAIT
For the value of SFZFlexListBoxControl::DEFAULT_WAIT, refer to SFZFlexListBoxControl::DefaultEnum.
enum CodeEnum { CODE_TYPE = four_char_code('c', 'f', 'l', 'b') }; 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 box control using this item structure.
SFZFlexListBoxControl::Insert | SFZFlexListBoxControl::InsertFirst | SFZFlexListBoxControl::InsertLast | SFZFlexListBoxControl::GetItem | SFZFlexListBoxControl::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.
SFZFlexListBoxControlSmp list; // create instance etc. // ... // setting of toggle state (set multiple state using logical sum operator) list->SetToggle( SFZFlexListBoxControl::TOGGLE_EMPTY_HEADER_TEXT | SFZFlexListBoxControl::TOGGLE_EMPTY_FOOTER_ICON | SFZFlexListBoxControl::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. |