PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFZListBoxControl
Responder which represents a list box control.
#include <SFZListBoxControl.h.hpp>
class SFZListBoxControl : public SFYBoxControl;
SFMTYPEDEFRESPONDER(SFZListBoxControl)

Inheritance diagram

 Inheritance diagram of SFZListBoxControlClass

Collaboration diagram

 Collaboration diagram of SFZListBoxControlClass

Description

How to use

List box control(SFZListBoxControl) is a control to have a user select one item among list items.

Usage of the list box control

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

The selected item can be moved using the UP key set with the SFZListBoxControl::SetUpKey function or the DOWN key set with the SFZListBoxControl::SetDownKey function.

If the selected item is moved, 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.

[Note] Note
This value event will occur in the SFYControl::SetCurrentValue function called internally in SFZListBoxControl.

In the selected item, the text is drawn in the color set with the SFZListBoxControl::SetSelForeColor function, and the background is filled in the color set with the SFZListBoxControl::SetSelBackColor function.

In the unselected item, the text is drawn in the color set with the SFZListBoxControl::SetItemForeColor function, and the background is filled in the color set with the SFZListBoxControl::SetItemBackColor function.

The grid line can be drawn using the SFZListBoxControl::SetGridLineEnable and SFZListBoxControl::SetGridLineColor functions. The margin between two items can be set using the SFZListBoxControl::SetListMargin function.

In the default implementation, the list box control[SFZListBoxControl] will receive the following result events[SFEVT_RESPONDER_RESULT].

The developer can register handlers for these events.

The operation key is set with the SFYBoxControl::SetOperateKey function. By default, the operation key is set to the SELECT key.

The access key is set with the SFZListBoxControl::SetItemAccessKey function.

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

[Caution] Caution
The result event will not occur when the enable flag of selected item is set to "false" using the SFZListBoxControl::SetItemEnable function.

Reference: Result Event[SFEVT_RESPONDER_RESULT] | SFZListBoxControl::HandleOperateKey | SFZListBoxControl::HandleAccessKey | SFZListBoxControl::HandleEscapeKey

[Caution] Limitation on specification

The minimum value is always 0.

The current value represents the index of currently selected item.

The maximum value represents the number of items. [* This function is to be discontinued in the future. To get the number of items, call the SFZListBoxControl::GetItemCount function.]

The minimum value or the maximum value must not be changed by using the SFYControl::SetMinimumValue function or the SFYControl::SetMaximumValue function.

[Note] Flex list box control

The flex list box control of which functions are more advanced than the list box control is available. For more details, refer to SFZFlexListBoxControl.

Code to create the list box control

Void UserClass::Main(Void)
{
    SFZWindowSmp            window;
    SFZListBoxControlSmp    list;

    // 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 list box control
    list = SFZListBoxControl::NewInstance(&error);

    // [Required] set list box control's parent responder to window
    list->SetParent(window);

    // [Required] insert 20 items at the tail
    for (SInt32 i = 0;  i < 20 ; ++i) {
        list->InsertLast(SFXWideString::Format("List Item %d ", i));
    }

    // [Optional] set grid line to enabled
    list->SetGridLineEnable(true);

    // [Optional] set grid line's color to black
    list->SetGridLineColor(SFXRGBColor(0x00, 0x00, 0x00, 0x00));

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

    // [Optional] set scroll bar's width to 7
    list->SetScrollBarWidth(7);

    // [Required] set list box control's real region to suitable size for given region
    list->SetRealBound(list->GetSuitableBound(_window->GetLocalBound().Deflate(30, 30)).SetOrigin(30, 30));

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

Execution Result:

Reference

List Box Control [SFZListBoxControl] | SFZFlexListBoxControl | SFYBoxControl | SFZComboBoxControl | SFXEvent | State | Value Event[SFEVT_RESPONDER_VALUE]

Member

Constructor/Destructor
SFZListBoxControl( Void )
Constructor of the SFZListBoxControl class.
~SFZListBoxControl( Void )
Destructor of the SFZListBoxControl class.
Public Functions
SFCError Append( SFXPathConstRef path , UInt16 id )
[DEPRECATED]Append an item to the list. Use the InsertLast() function.
SFCError Append( SFXPathConstRef path , UInt16 id , AVKType key , WChar keyIcon = 0 )
[DEPRECATED]Append an item to the list. Use the InsertLast() function.
SFCError Append( SFXWideStringConstRef text )
[DEPRECATED]Append an item to the list. Use the InsertLast() function.
SFCError Append( SFXWideStringConstRef text , AVKType key , WChar keyIcon = 0 )
[DEPRECATED]Append an item to the list. Use the InsertLast() function.
Void Clear( Void )
Remove all items from this list box control.
SFXRGBColorConstRef GetDefaultItemBackColor( Void )
Get the default background color of unselected item of this list box control.
SFXRGBColorConstRef GetDefaultItemForeColor( Void )
Get the default foreground color of unselected item of this list box control.
AVKType GetDownKey( Void )
Get the DOWN key to move the selected item down by one item of this list box control.
AVKType GetEscapeKey( Void )
Get the ESCAPE key of this list box control.
SInt32 GetFieldValue( Void )
Get the number of items which can be displayed at the same time.
AEEFont GetFont( Void )
Get the font of this list box control.
SFXRGBColorConstRef GetGridLineColor( Void )
Get the color of grid line of this list box control.
Bool GetGridLineEnable( Void )
Get the value of enable flag of the grid line of this list box control.
AVKType GetItemAccessKey( SInt16 index )
Get the access key of the specified item of this list box control.
SFXRGBColorConstRef GetItemBackColor( SInt16 index )
Get the background color of the specified unselected item of this list box control.
SInt32 GetItemCount( Void )
Get the number of items of this list box control.
Bool GetItemEnable( SInt32 index )
Get the value of enable flag of the specified item of this list box control.
SFXRGBColorConstRef GetItemForeColor( SInt16 index )
Get the foreground color of the specified unselected item of this list box control.
SInt16 GetItemHeight( Void )
Get the item height of this list box control. [pixels]
WChar GetItemKeyIcon( SInt32 index )
Get the key icon of the specified item of this list box control.
SFXWideString GetItemText( SInt16 index )
Get the text of the specified item of this list box control.
SFXMarginConstRef GetListMargin( Void )
Get the margin within each item of this list box control.
SInt32 GetMaximumValue( Void )
Get the number of items of this list box control.
SFYScrollBarControlSmpConstRef GetScrollBarControl( Void )
Get the scroll bar control of this list box control.
SInt16 GetScrollBarWidth( Void )
Get the width of the scroll bar control of this list box control. [pixels]
DirectionEnum GetScrollDirection( Void )
Get the scroll direction.
UInt32 GetScrollInterval( Void )
Get the scroll-interval. [milliseconds]
Bool GetScrollRepeat( Void )
Get the value of repeat-scroll flag of this list box control.
SInt16 GetScrollStep( Void )
Get the scroll-step. [pixels]
SFXRGBColorConstRef GetSelBackColor( Void )
Get the background color of currently selected item of this list box control.
SFXRGBColorConstRef GetSelForeColor( Void )
Get the foreground color of currently selected item of this list box control.
SInt32 GetTopValue( Void )
Get the index of the item of this list box control which is currently displayed at the top.
AVKType GetUpKey( Void )
Get the UP key to move the selected item up by one item of this list box control.
UInt32 GetWaitInterval( Void )
Get the waiting time to start to scroll. [milliseconds]
SFCError Insert( SInt32 index , SFXPathConstRef path , UInt16 id )
Insert the specified item before the specified index.
SFCError Insert( SInt32 index , SFXPathConstRef path , UInt16 id , AVKType key , WChar keyIcon )
Insert the specified item before the specified index.
SFCError Insert( SInt32 index , SFXWideStringConstRef text )
Insert the specified item before the specified index.
SFCError Insert( SInt32 index , SFXWideStringConstRef text , AVKType key , WChar keyIcon )
Insert the specified item before the specified index.
SFCError InsertFirst( SFXPathConstRef path , UInt16 id )
Insert the specified item at the head.
SFCError InsertFirst( SFXPathConstRef path , UInt16 id , AVKType key , WChar keyIcon )
Insert the specified item at the head.
SFCError InsertFirst( SFXWideStringConstRef text )
Insert the specified item at the head.
SFCError InsertFirst( SFXWideStringConstRef text , AVKType key , WChar keyIcon )
Insert the specified item at the head.
SFCError InsertLast( SFXPathConstRef path , UInt16 id )
Insert the specified item at the tail.
SFCError InsertLast( SFXPathConstRef path , UInt16 id , AVKType key , WChar keyIcon )
Insert the specified item at the tail.
SFCError InsertLast( SFXWideStringConstRef text )
Insert the specified item at the tail.
SFCError InsertLast( SFXWideStringConstRef text , AVKType key , WChar keyIcon )
Insert the specified item at the tail.
static
SFZListBoxControlSmp
NewInstance( SFCErrorPtr exception = null )
Create a new instance of this responder class.
Void Remove( SInt32 begin , SInt32 end )
Remove specified items from this list box control.
Void Remove( SInt32 index )
Remove specified items from this list box control.
Void RemoveFirst( Void )
Remove the first item from this list box control.
Void RemoveLast( Void )
Remove the last item from this list box control.
Void SetDefaultItemBackColor( SFXRGBColorConstRef param )
Set the default background color of unselected item of this list box control to the specified value.
Void SetDefaultItemForeColor( SFXRGBColorConstRef param )
Set the default foreground color of unselected item of this list box control to the specified value.
Void SetDownKey( AVKType param )
Set the DOWN key of this list box control to the specified value.
Void SetEscapeKey( AVKType param )
Set the ESCAPE key of this list box control to the specified value.
Void SetFont( AEEFont value )
Set the font of this list box control to the specified value.
Void SetGridLineColor( SFXRGBColorConstRef param )
Set the color of grid line of this list box control to the specified value.
Void SetGridLineEnable( Bool param )
Set the enable flag of the grid line of this list box control to the specified value.
SFCError SetItemAccessKey( SInt16 index , AVKType key , WChar keyIcon = 0 )
Set the access key and the specified key icon of the specified item of this list box control to specified values.
SFCError SetItemBackColor( SInt16 index , SFXRGBColorConstRef param )
Set the background color of the specified unselected item of this list box control to the specified value.
SFCError SetItemEnable( SInt32 index , Bool param )
Set the enable flag of the specified item of this list box control to the specified value.
Void SetItemForeColor( SInt16 index , SFXRGBColorConstRef param )
Set the foreground color of the specified unselected item of this list box control to the specified value.
SFCError SetItemKeyIcon( SInt32 index , WChar param )
Set the key icon of the specified item of this list box control to the specified value.
SFCError SetItemText( SInt16 index , SFXPathConstRef path , UInt16 id )
Set the text of the specified item of this list box control to the specified value.
SFCError SetItemText( SInt16 index , SFXWideStringConstRef item )
Set the text of the specified item of this list box control to the specified value.
Void SetListMargin( SFXMarginConstRef param )
Set the margin within each item of this list box control to the specified value.
SFCError SetScrollBarControl( SFYScrollBarControlSmpConstRef param )
Set the scroll bar control of this list box control to the specified value.
Void SetScrollBarWidth( SInt16 param )
Set the width of the scroll bar control of this list box control to the specified value.
Void SetScrollDirection( DirectionEnum param )
Set the scroll direction to the specified value.
Void SetScrollInterval( UInt32 param )
Set the scroll-interval to the specified value. [milliseconds]
Void SetScrollRepeat( Bool param )
Set the repeat-scroll flag of this list box control to the specified value.
Void SetScrollStep( SInt16 param )
Set the scroll-step to the specified value. [pixels]
Void SetSelBackColor( SFXRGBColorConstRef param )
Set the background color of selected item of this list box control to the specified value.
Void SetSelForeColor( SInt16 index , SFXRGBColorConstRef param )
Set the foreground color of selected item of this list box control to the specified value.
Void SetUpKey( AVKType param )
Set the UP key of this list box control to the specified value.
Void SetWaitInterval( UInt32 param )
Set the waiting time to start the scroll 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 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
Void 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 SFZListBoxControl class.
DefaultEnum
Constants that represent the default value for various parameters.
DirectionEnum
Constants that represent the scroll direction.
HorizontalEnum (inherits from SFYResponder)
Constants that represent the horizontal alignment.
VerticalEnum (inherits from SFYResponder)
Constants that represent the vertical alignment.

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

Description

This constructor performs the initializations as follows:

  1. Set the type of this responder to "clst".
  2. Initialize the default scroll bar control.
  3. Set the default background color of unselected item of this list box control to SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00)[white color].
  4. Set the default foreground color of unselected item of this list box control to SFXRGBColor(0x00, 0x00, 0x00, 0x00)[black color].
  5. Set the background color of selected item of this list box control to SFXRGBColor(0x11, 0x22, 0xBB, 0x00)[blue color].
  6. Set the foreground color of selected item of this list box control to SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00)[white color].
  7. Set the color of grid line of this list box control to SFXRGBColor(0x00, 0x00, 0x00, 0x00)[black color].
  8. Set the enable flag of the grid line to "false".
  9. Set the repeat-scroll flag to "false".
  10. Set the number of items which can be displayed at the same time to 0.
  11. Set the index-0th item to be displayed at the top of the real region as currently selected item.
  12. Set the font of this list box control to AEE_FONT_NORMAL.
  13. Set the margin within each item to SFXMargin(1, 2).
  14. Set the width of the scroll bar control to SFZListBoxControl::DEFAULT_BAR_WIDTH.
  15. Set the waiting time to start the scroll to SFZListBoxControl::DEFAULT_WAIT [milliseconds].
  16. Set the scroll direction to SFZListBoxControl::DEFAULT_DIRECTION.
  17. Set the scroll-interval to SFZListBoxControl::DEFAULT_SCROLL [milliseconds].
  18. Set the scroll-step to SFZListBoxControl::DEFAULT_STEP [pixels].
  19. Set the operation key to AVK_SELECT.
  20. Set the ESCAPE key to AVK_CLR.
  21. Set the UP key to AVK_UP.
  22. Set the DOWN key to AVK_DOWN.
  23. Register the event handlers in the table below into this responder.

Table 232. Event handler

Event Content of the handler
SFEVT_KEY event of the operation key set with SFYBoxControl::SetOperateKey Call the SFZListBoxControl::HandleOperateKey function.
SFEVT_KEY event of the access key set with SFZListBoxControl::SetItemAccessKey Call the SFZListBoxControl::HandleOperateKey function.
SFEVT_KEY event of the ESCAPE key set with SFZListBoxControl::SetEscapeKey Call the SFZListBoxControl::HandleEscapeKey function.
SFEVT_KEY event of the UP key set with SFZListBoxControl::SetUpKey Make the above item be the currently selected item.
SFEVT_KEY event of the DOWN key set with SFZListBoxControl::SetDownKey Make the below item be the currently selected item.
Applet-Suspend Event[SFEVT_APP_SUSPEND] Cancel the timer processing to scroll the currently selected item.
Applet-Resume Event[SFEVT_APP_RESUME] Restart the timer processing to scroll the currently selected item.
State event[SFEVT_RESPONDER_STATE] which will occur when the focus state becomes changed Start the scroll of the currently selected item when this list box becomes focused, and stop the scroll when unfocused.
Value event[SFEVT_RESPONDER_VALUE] indicating that the currently selected item has been changed Call the SFYControl::SetCurrentValue function to set the current value to the index of the currently selected item.
Value event[SFEVT_RESPONDER_VALUE] indicating that the number of the currently displayed items has been changed Relocate this listbox control.
[Note] Note
In a responder inheriting from SFZListBoxControl, the corresponding handler will be called when one of the above events occurs.

Reference

SFYResponder::SetType | SFZListBoxControl::CodeEnum | SFZListBoxControl::SetDefaultItemBackColor | SFZListBoxControl::SetDefaultItemForeColor | SFZListBoxControl::SetSelBackColor | SFZListBoxControl::SetSelForeColor | SFZListBoxControl::SetGridLineColor | SFZListBoxControl::SetGridLineEnable | SFZListBoxControl::SetScrollRepeat | SFZListBoxControl::GetFieldValue | SFZListBoxControl::GetTopValue | SFZListBoxControl::SetFont | SFZListBoxControl::SetListMargin | SFZListBoxControl::SetScrollBarWidth SFZListBoxControl::SetScrollDirection | SFZListBoxControl::SetScrollInterval | SFZListBoxControl::SetScrollStep | SFZListBoxControl::SetWaitInterval | SFZListBoxControl::DirectionEnum | SFZListBoxControl::DefaultEnum | SFYBoxControl::SetOperateKey | SFZListBoxControl::SetItemAccessKey | SFZListBoxControl::HandleOperateKey | SFZListBoxControl::SetEscapeKey | SFZListBoxControl::HandleEscapeKey | SFZListBoxControl::SetUpKey | SFZListBoxControl::SetDownKey | SFXMargin | SFXRGBColor | SFXEvent | Type | Real Region | State | Event | Key Event[SFEVT_KEY] | Applet-Suspend Event[SFEVT_APP_SUSPEND] | Applet-Resume Event[SFEVT_APP_RESUME] | State Event[SFEVT_RESPONDER_STATE] | Value Event[SFEVT_RESPONDER_VALUE]


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

Description

Delete all items from this list box control.

Reference

SFZListBoxControl::Clear


SFZListBoxControl::Append
[DEPRECATED]Append an item to the list. Use the InsertLast() function.
[ public ]
SFCError Append(
    SFXPathConstRef path   // path to resource file
    UInt16 id              // object id
);
[ public ]
SFCError Append(
    SFXPathConstRef path   // path to resource file
    UInt16 id              // object id
    AVKType key            // access key
    WChar keyIcon = 0      // key icon
);
[ public ]
SFCError Append(
    SFXWideStringConstRef text   // text
);
[ public ]
SFCError Append(
    SFXWideStringConstRef text   // text
    AVKType key                  // access key
    WChar keyIcon = 0            // key icon
);

Description

This function inserts an item at the tail of the list box control.

The numuber of items is set to the maximum value of the SFYControl class.

[Caution] Caution
Since this function is deprecated, use the SFZListBoxControl::InsertLast function instead.

Reference

SFZListBoxControl::InsertLast | SFZListBoxControl::Remove | SFZListBoxControl::Clear | SFYControl::SetMaximumValue


SFZListBoxControl::Clear
Remove all items from this list box control.
[ public ]
Void Clear(Void);

Reference

SFZListBoxControl::Append SFZListBoxControl::Remove


SFZListBoxControl::GetDefaultItemBackColor
Get the default background color of unselected item of this list box control.
[ public, const ]
SFXRGBColorConstRef GetDefaultItemBackColor(Void);

Description

This function gets the default background color(SFXRGBColor) of unselected item of this list box control.

Reference

SFZListBoxControl::SetDefaultItemBackColor


SFZListBoxControl::GetDefaultItemForeColor
Get the default foreground color of unselected item of this list box control.
[ public, const ]
SFXRGBColorConstRef GetDefaultItemForeColor(Void);

Description

This function gets the default foreground color(SFXRGBColor) to draw the text of unselected item of this list box control.

Reference

SFZListBoxControl::SetDefaultItemForeColor


SFZListBoxControl::GetDownKey
Get the DOWN key to move the selected item down by one item of this list box control.
[ public, const ]
AVKType GetDownKey(Void);

Return value

DOWN key to move the selected item down by one item, which is set by the SFZListBoxControl::SetDownKey function.

Reference

SFZListBoxControl::SetDownKey | SFZListBoxControl::GetUpKey | SFZListBoxControl::SetUpKey


SFZListBoxControl::GetEscapeKey
Get the ESCAPE key of this list box control.
[ public, const ]
AVKType GetEscapeKey(Void);

Return value

ESCAPE key set with the SFZListBoxControl::GetEscapeKey function.

Reference

SFZListBoxControl::GetEscapeKey


SFZListBoxControl::GetFieldValue
Get the number of items which can be displayed at the same time.
[ public, const ]
SInt32 GetFieldValue(Void);

Description

This function gets the number of items of this list box control which can be displayed at the same time.

This number is calculated using the height, the list margin, or the font of this list box control.

Reference

SFZListBoxControl::SetListMargin | SFZListBoxControl::SetFont


SFZListBoxControl::GetFont
Get the font of this list box control.
[ public, const ]
AEEFont GetFont(Void);

Return value

Font set with the SFZListBoxControl::SetFont function.

Description

This function gets the font of this list box control.

Reference

SFZListBoxControl::SetFont


SFZListBoxControl::GetGridLineColor
Get the color of grid line of this list box control.
[ public, const ]
SFXRGBColorConstRef GetGridLineColor(Void);

Return value

Color(SFXRGBColor) of grid line of this list box control.

Reference

SFZListBoxControl::SetGridLineColor | SFZListBoxControl::SetGridLineEnable


SFZListBoxControl::GetGridLineEnable
Get the value of enable flag of the grid line of this list box control.
[ public, const ]
Bool GetGridLineEnable(Void);

Return value

Value of the enable flag of the grid line of this list box control.

Reference

SFZListBoxControl::SetGridLineEnable | SFZListBoxControl::SetGridLineColor


SFZListBoxControl::GetItemAccessKey
Get the access key of the specified item of this list box control.
[ public, const ]
AVKType GetItemAccessKey(
    SInt16 index   // index of item 
);

Description

This function gets the access key of the specified item of this list box control. AVK_UNDEFINED will be returned if the access key is not set.

Reference

SFZListBoxControl::SetItemAccessKey


SFZListBoxControl::GetItemBackColor
Get the background color of the specified unselected item of this list box control.
[ public, const ]
SFXRGBColorConstRef GetItemBackColor(
    SInt16 index   // list item index
);

Description

This function gets the background color(SFXRGBColor) of the specified unselected item of this list box control.

Reference

SFZListBoxControl::SetItemBackColor


SFZListBoxControl::GetItemCount
Get the number of items of this list box control.
[ public, const ]
SInt32 GetItemCount(Void);

Return value

Number of the items of this list box control.


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

Return value

  • If item is valid: true
  • Otherwise: false

Description

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

Reference

SFZListBoxControl::SetItemEnable


SFZListBoxControl::GetItemForeColor
Get the foreground color of the specified unselected item of this list box control.
[ public, const ]
SFXRGBColorConstRef GetItemForeColor(
    SInt16 index   // index of item
);

Description

This function gets the foreground color(SFXRGBColor) to draw the text of the specified unselected item of this list box control.

Reference

SFZListBoxControl::SetItemForeColor | SFXRGBColor


SFZListBoxControl::GetItemHeight
Get the item height of this list box control. [pixels]
[ public, const ]
SInt16 GetItemHeight(Void);

Description

This function gets the item height of this list box control. [pixels]

Reference

SFZListBoxControl::SetFont | SFZListBoxControl::SetListMargin


SFZListBoxControl::GetItemKeyIcon
Get the key icon of the specified item of this list box control.
[ public, const ]
WChar GetItemKeyIcon(
    SInt32 index   // index of item
);

Return value

Key icon(icon character) of the WChar type of the specified item of this list box control.

Reference

SFZListBoxControl::SetItemKeyIcon


SFZListBoxControl::GetItemText
Get the text of the specified item of this list box control.
[ public ]
SFXWideString GetItemText(
    SInt16 index   // index of item
);

Return value

Text of the specified item of this list box control.

Reference

SFZListBoxControl::SetItemText


SFZListBoxControl::GetListMargin
Get the margin within each item of this list box control.
[ public, const ]
SFXMarginConstRef GetListMargin(Void);

Return value

Margin(SFXMargin) within each item of this list box control

Reference

SFZListBoxControl::SetListMargin


SFZListBoxControl::GetMaximumValue
Get the number of items of this list box control.
[ public, const ]
SInt32 GetMaximumValue(Void);

Return value

Number of items of this list box control.


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

Description

This function gets the scroll bar control, which this 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 SFZListBoxControl::SetScrollBarControl function.

Example

The code below is to get the scroll bar control used by the list box control.

// get the scroll bar control
SFZListBoxControlSmp    _list;
SFYScrollBarControlSmp  _bar;

_list = SFZListBoxControl::NewInstance();

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

Reference

SFYScrollBarControl | SFZListBoxControl::SetScrollBarControl


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

Return value

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

Reference

SFZListBoxControl::SetScrollBarWidth


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

Return value

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

Reference

SFZListBoxControl::SetScrollDirection | SFZListBoxControl::DirectionEnum


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

Return value

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

Reference

SFZListBoxControl::SetScrollInterval


SFZListBoxControl::GetScrollRepeat
Get the value of repeat-scroll flag of this list box control.
[ public, const ]
Bool GetScrollRepeat(Void);

Return value

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

Reference

SFZListBoxControl::SetScrollRepeat


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

Return value

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

Reference

SFZListBoxControl::SetScrollStep


SFZListBoxControl::GetSelBackColor
Get the background color of currently selected item of this list box control.
[ public, const ]
SFXRGBColorConstRef GetSelBackColor(Void);

Return value

Background color(SFXRGBColor) of currently selected item of this list box control, in which the rectangle containing the currently selected item is filled.

Reference

SFZListBoxControl::SetSelBackColor | SFZListBoxControl::GetSelForeColor | SFZListBoxControl::SetSelForeColor | SFXRGBColor


SFZListBoxControl::GetSelForeColor
Get the foreground color of currently selected item of this list box control.
[ public, const ]
SFXRGBColorConstRef GetSelForeColor(Void);

Return value

Foreground color(SFXRGBColor) of currently selected item of this list box control.

Reference

SFZListBoxControl::SetSelForeColor | SFZListBoxControl::GetSelBackColor | SFZListBoxControl::SetSelBackColor | SFXRGBColor


SFZListBoxControl::GetTopValue
Get the index of the item of this list box control which is currently displayed at the top.
[ public, const ]
SInt32 GetTopValue(Void);

Return value

Index of the item of this list box control, which is currently displayed at the top.


SFZListBoxControl::GetUpKey
Get the UP key to move the selected item up by one item of this list box control.
[ public, const ]
AVKType GetUpKey(Void);

Return value

UP key to move the selected item up by one item, which is set by the SFZListBoxControl::SetUpKey function.

Reference

SFZListBoxControl::SetUpKey | SFZListBoxControl::GetDownKey | SFZListBoxControl::SetDownKey


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

Return value

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

Reference

SFZListBoxControl::SetWaitInterval


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

Description

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

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

The default implementation is as follows:

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

Internal Implementation

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

struct ListItem {
    SFXWideString                       text;
    AVKType                             key;
    WChar                               keyIcon;
    SFXRGBColor                         foreColor;
    SFXRGBColor                         backColor;
    Bool                                enable;
};

ListItemArray                   _item;

/*protected virtual */Void SFZListBoxControl::HandleAccessKey(AVKType key)
{
    ListItemPtr                                 item;

    for (SInt32 i = 0; i < GetItemCount(); ++i) {
        if ((item = GetListItem(i)) != null) {
            if (item->key == key) {
                if (item->enable) {
             SetCurrentValue(i);
                    Invalidate();
                    InvokeForward(SFXEvent(SFEVT_RESPONDER_RESULT, SFP16_RESULT_OK, i), false);
                    break;
                }
            }
        }
    }
    return;
}// SFZListBoxControl::HandleAccessKey //

/*private */SFZListBoxControl::ListItemPtr SFZListBoxControl::GetListItem(SInt32 param) const
{
    ListItemPtr                                 result(null);

    if (0 <= param && param < GetItemCount()) {
        result = _item.Get(param);
    }
    return result;
}// SFZListBoxControl::GetListItem //

Reference

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


SFZListBoxControl::HandleBoundOptimize
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_OPTIMIZE) event is received. [Calculate the suitable rectangle size of this responder within the specified hint rectangle.]
[ protected, virtual, const ]
Void HandleBoundOptimize(
    SFXRectanglePtr rectangle   // hint region and calculated region
);

Description

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

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

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

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

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

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

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

Internal Implementation

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

struct ListItem {
    SFXWideString                       text;
    AVKType                             key;
    WChar                               keyIcon;
    SFXRGBColor                         foreColor;
    SFXRGBColor                         backColor;
    Bool                                enable;
};

/*protected virtual */Void SFZListBoxControl::HandleBoundOptimize(SFXRectanglePtr rectangle) const
{
    ListItemPtr                                 item;
    SInt16                                      width;
    SInt16                                      maxWidth;
    SInt16                                      barWidth;
    SInt16                                      height;
    SInt32                                      num;

    maxWidth = 0;
    barWidth = 0;
    height = GetItemHeight();
    rectangle->Deflate(GetBoxMargin());
    num = rectangle->GetHeight() / height;
    if (num > 0) {
        if (num < GetItemCount()) {
            barWidth = _barWidth;
        }
        else {
            num = GetItemCount();
        }
        rectangle->SetHeight(static_cast<SInt16>(height * num));
    }
    for (SInt32 i = 0; i < GetItemCount(); ++i) {
        if ((item = GetListItem(i)) != null) {
            width = SFXGraphics::MeasureSingleText(_font, item->text);
            if (item->keyIcon != null) {
                width += GetFontSize().GetWidth();
            }
            maxWidth = (maxWidth < width) ? width : maxWidth;
        }
    }
    maxWidth += barWidth;
    rectangle->Deflate(GetListMargin());
    if (maxWidth < rectangle->GetWidth()) {
        rectangle->SetWidth(maxWidth);
    }
    rectangle->Inflate(GetListMargin());
    rectangle->Inflate(GetBoxMargin());
    return;
}// SFZListBoxControl::HandleBoundOptimize //

Reference

SFYResponder::GetSuitableBound | SFZListBoxControl::SetFont | SFZListBoxControl::SetItemKeyIcon | SFZListBoxControl::SetItemText | SFZListBoxControl::SetListMargin | SFZListBoxControl::SetScrollBarWidth | SFYBoxControl::GetBoxMargin | SFXMargin | SFXEvent | Region Event[SFEVT_RESPONDER_BOUND] | Handler for the Region Event[XANDLER_DECLARE_VOIDBOUND]


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

Description

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

This function calculates the suitable rectangle size of this responder.

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

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

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

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

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

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

Internal Implementation

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

struct ListItem {
    SFXWideString                       text;
    AVKType                             key;
    WChar                               keyIcon;
    SFXRGBColor                         foreColor;
    SFXRGBColor                         backColor;
    Bool                                enable;
};

/*protected virtual */Void SFZListBoxControl::HandleBoundRequest(SFXRectanglePtr rectangle) const
{
    ListItemPtr                                 item;
    SInt16                                      width;
    SInt16                                      maxWidth;

    maxWidth = 0;
    rectangle->Deflate(GetBoxMargin());
    for (SInt32 i = 0; i < GetItemCount(); ++i) {
        if ((item = GetListItem(i)) != null) {
            width = SFXGraphics::MeasureSingleText(_font, item->text);
            if (item->keyIcon != null) {
                width += GetFontSize().GetWidth();
            }
            maxWidth = (maxWidth < width) ? width : maxWidth;
        }
    }
    rectangle->SetHeight(static_cast<SInt16>(GetItemHeight() * GetItemCount()));
    rectangle->Deflate(GetListMargin());
    rectangle->SetWidth(maxWidth);
    rectangle->Inflate(GetListMargin());
    rectangle->Inflate(GetBoxMargin());
    return;
}// SFZListBoxControl::HandleBoundRequest //

Reference

SFYResponder::GetSuitableBound | SFZListBoxControl::SetFont | SFZListBoxControl::SetItemKeyIcon | SFZListBoxControl::SetItemText | SFZListBoxControl::SetListMargin | SFYBoxControl::GetBoxMargin | SFXMargin | SFXEvent | Real Region Region Event[SFEVT_RESPONDER_BOUND] | Handler for the Region Event[XANDLER_DECLARE_VOIDBOUND]


SFZListBoxControl::HandleBoundVirtual
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event is received. [Perform the processing when the virtual region is changed.]
[ protected, virtual ]
Void HandleBoundVirtual(Void);

Description

This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event is received.

In case you want to perform your own processing when the virtual region is changed, override this virtual function.

The default implementation is to equalize the real region with the new local region and relocate this responder to fit into the new virtual region.

[Note] Sending the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event

The (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event will occur when the virtual region is changed by calling the SFYResponder::SetRealBound or SFYResponder::SetVirtualBound function.

[Note] Another method when the virtual region is changed

Other than overriding this virtual function, it is possible to define and implement the handler for region event[XANDLER_DECLARE_VOIDBOUND], and register it into the responder.

In the processing when the virtual region is updated, this virtual function is executed first, and next the handlers for region event are executed in the registered order.

In almost all cases, the method to override this virtual function is adopted since defining, implementing and registering the handler for region event can be omitted.

Internal Implementation

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

/*protected virtual */Void SFZListBoxControl::HandleBoundVirtual(Void)
{
    SFXMargin                                   margin(GetBoxMargin());
    SInt32                                      field;

    StopScroll();
    field = (GetLocalBound().GetHeight() - margin.GetTop() - margin.GetBottom()) / GetItemHeight();
    field = (field > 0) ? field : 1;
    SetFieldValue(field);
    _offset = 0;
    Relocate();
    if (_state != STATE_IDLE) {
 StartScroll();
    }
    return;
}// SFZListBoxControl::HandleBoundVirtual //

/*private */Void SFZListBoxControl::Relocate(Void)
{
    SFXRectangle                                rc(GetLocalBound());

    if (_bar != null) {
        rc.Deflate(GetBoxMargin());
        rc.SubRight(_barWidth);
        _bar->SetRealBound(SFXRectangle(rc.GetRight(), rc.GetTop(), _barWidth, rc.GetHeight()));
    }
    return;
}// SFZListBoxControl::Relocate //

Reference

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


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

Description

This function will be called when the SFEVT_KEY event(key event[SFEVT_KEY]) of the ESCAPE key set with the SFZListBoxControl::SetEscapeKey function is received.

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

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

Internal Implementation

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

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

Reference

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


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

Description

This function will be called when the SFEVT_KEY event(key event[SFEVT_KEY]) of the operaion key set with the SFYBoxControl::SetOperateKey function is received.

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

The default implementation is as follows:

  1. If "false" is set to the enable flag of selected item using the SFZListBoxControl::SetItemEnable function, nothing will happen.
  2. If "true" is set to the enable flag of selected item, the result event of SFXEvent(SFEVT_RESPONDER_RESULT, SFP16_RESULT_OK, return value of SFYControl::GetCurrentValue) will be sent.

Internal Implementation

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

struct ListItem {
    SFXWideString                       text;
    AVKType                             key;
    WChar                               keyIcon;
    SFXRGBColor                         foreColor;
    SFXRGBColor                         backColor;
    Bool                                enable;
};

/*protected virtual */Void SFZListBoxControl::HandleOperateKey(Void)
{
    ListItemPtr                                 item;

    if ((item = GetListItem(GetCurrentValue())) != null) {
        if (item->enable) {
            InvokeForward(SFXEvent(SFEVT_RESPONDER_RESULT, SFP16_RESULT_OK, GetCurrentValue()), false);
        }
    }
    return;
}// SFZListBoxControl::HandleOperateKey //

Reference

SFYBoxControl::SetOperateKey | SFZListBoxControl::SetItemEnable | SFXEvent | Result Event[SFEVT_RESPONDER_RESULT] | Key Event[SFEVT_KEY]


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

Description

This function will be called when the (SFEVT_RESPONDER_RENDER, SFP16_RENDER_REQUEST) event is received.

In case you want to perform your own drawing of this responder, override this function.

The default implementation is to draw this responder.

[Note] The method to darw a responder

In addition to overriding this virtual function, it is possible to define and implement the handler for drawing event(drawing handler)[XANDLER_DECLARE_VOIDRENDER], and register it into the responder.

Then, the overridden virtual function will be called first, and next the drawing handlers registered into the responder will be booted up in the registered order.

In almost all cases, the method to override this function is used to draw the responder since there is no need to declare and register the drawing handler.

[Note] Procedure of drawing a responder

The drawing handler will be booted up when the drawing event(SFEVT_RESPONDER_RENDER) occurs. And then the drawing handler draw the responder actually.

The drawing event will be sent to only the responders including the region to be redrawn out of the redraw regions registered into the renderer using the SFYResponder::InvokeBackward function after the SFYResponder::Render function boots up the renderer.

Here, the SFYResponder::Render function will be called at the following situations:

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

If calling the SFYResponder::Render function with specifying "true" as an argument, the drawing event will be sent to all the responders to be actually displayed on the screen which are located below the responder in the responder tree, regardless of the registration of redraw region.

Internal Implementation

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

struct ListItem {
    SFXWideString                       text;
    AVKType                             key;
    WChar                               keyIcon;
    SFXRGBColor                         foreColor;
    SFXRGBColor                         backColor;
    Bool                                enable;
};

/*protected virtual */Void SFZListBoxControl::HandleRenderRequest(SFXGraphicsPtr graphics) const
{
    SFXRectangle                                rc(GetLocalBound());

    DrawBox(graphics, rc);
    DrawItemList(graphics, rc.Deflate(GetBoxMargin()));
    return;
}// SFZListBoxControl::HandleRenderRequest //

/*private */Void SFZListBoxControl::DrawItemList(SFXGraphicsPtr graphics, SFXRectangleConstRef rectangle) const
{
    SFXRectangle                                rc(rectangle);
    SInt16                                      itemHeight(GetItemHeight());

    if (_bar != null && _bar->GetStateVisible()) {
        rc.SubRight(_barWidth);
    }
    if (rc.GetHeight() > itemHeight) {
        rc.SetHeight(itemHeight);
    }
    for (SInt32 i = 0; i < GetFieldValue(); ++i) {
        if (GetTopValue() + i < GetItemCount()) {
            DrawItem(graphics, rc, i + GetTopValue());
            if (_line) {
                graphics->DrawLine(rc.GetEdgeBottom(), _color.gridLine);
            }
        }
        rc.AddY(itemHeight);
    }
    return;
}// SFZListBoxControl::DrawItemList //

/*private */Void SFZListBoxControl::DrawItem(SFXGraphicsPtr graphics, SFXRectangleConstRef rectangle, SInt32 index) const
{
    ListItemPtr                                 item;
    SFXRectangle                                rc(rectangle);
    SFXGrid                                     grid;
    SFXRGBColor                                 fore;
    SFXRGBColor                                 back;

    if ((item = GetListItem(index)) != null) {
        fore.Set(item->foreColor);
        back.Set(item->backColor);
        if (!item->enable || !GetStateActive(true)) {
            (fore.GetBrightness() > 0x7F) ? fore.SubRGB(RGB_ACTIVE) : fore.AddRGB(RGB_ACTIVE);
        }
        else if (index == GetCurrentValue()) {
            fore.Set(_color.selFore);
        }
        if (!item->enable) {
            (back.GetBrightness() > 0x7F) ? back.SubRGB(RGB_ENABLE) : back.AddRGB(RGB_ENABLE);
        }
        if (index == GetCurrentValue()) {
            back.Set(_color.selBack);
        }
        graphics->FillRectangle(rectangle, back);
        rc.Deflate(GetListMargin());
        if (item->keyIcon != 0) {
     SFXRectangle iconRect(rc);
            iconRect.SetSize(GetFontSize());
            graphics->SetFont(_font);
            graphics->DrawSingleText(SFXWideString(item->keyIcon), iconRect, fore, IDF_ALIGN_LEFT);
            rc.AddX(iconRect.GetWidth());
        }
        grid = rc.GetOrigin();
        if (index == GetCurrentValue()) {
            grid.AddX(_offset);
        }
        graphics->SetFont(_font);
        graphics->DrawSingleText(item->text, grid, rc, fore, IDF_ALIGN_LEFT);
    }
    return;
}// SFZListBoxControl::DrawItem //

/*private */inline SFXSize SFZListBoxControl::GetFontSize(Void) const
{
    return _size;
}// SFZListBoxControl::GetFontSize //

Reference

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


SFZListBoxControl::Insert
Insert the specified item before the specified index.
[ public ]
SFCError Insert(
    SInt32 index           // index of item
    SFXPathConstRef path   // path to resource file
    UInt16 id              // object id
);
[ public ]
SFCError Insert(
    SInt32 index           // index of item
    SFXPathConstRef path   // path to resource file
    UInt16 id              // object id
    AVKType key            // access key
    WChar keyIcon          // key icon
);
[ public ]
SFCError Insert(
    SInt32 index                 // index of item
    SFXWideStringConstRef text   // text of item
);
[ public ]
SFCError Insert(
    SInt32 index                 // text of item
    SFXWideStringConstRef text   // text of item
    AVKType key                  // access key
    WChar keyIcon                // key icon
);

Return value

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

Description

This function inserts the specified item before the specified index.

If the value of the specified index is less than or equals 0, the item will be inserted at the head.

If the value of the specified index is greater than or equals the maximum value, the item will be inserted at the tail.

[Note] Note

The numuber of items can be obtained by calling the SFZListBoxControl::GetItemCount function.

Reference

SFZListBoxControl::InsertFirst | SFZListBoxControl::InsertLast | SFZListBoxControl::Remove | SFZListBoxControl::GetItemCount


SFZListBoxControl::InsertFirst
Insert the specified item at the head.
[ public ]
SFCError InsertFirst(
    SFXPathConstRef path   // index of item
    UInt16 id              // object id
);
[ public ]
SFCError InsertFirst(
    SFXPathConstRef path   // path to resource file
    UInt16 id              // object id
    AVKType key            // access key
    WChar keyIcon          // key icon
);
[ public ]
SFCError InsertFirst(
    SFXWideStringConstRef text   // text of item
);
[ public ]
SFCError InsertFirst(
    SFXWideStringConstRef text   // text of item
    AVKType key                  // access key
    WChar keyIcon                // key icon
);

Return value

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

Description

This function inserts the specified item at the head.

[Note] Note

The numuber of items can be obtained by calling the SFZListBoxControl::GetItemCount function.

Reference

SFZListBoxControl::Insert | SFZListBoxControl::InsertLast| SFZListBoxControl::RemoveFirst | SFZListBoxControl::GetItemCount


SFZListBoxControl::InsertLast
Insert the specified item at the tail.
[ public ]
SFCError InsertLast(
    SFXPathConstRef path   // index of item
    UInt16 id              // object id
);
[ public ]
SFCError InsertLast(
    SFXPathConstRef path   // path to resource file
    UInt16 id              // object id
    AVKType key            // access key
    WChar keyIcon          // key icon
);
[ public ]
SFCError InsertLast(
    SFXWideStringConstRef text   // text of item
);
[ public ]
SFCError InsertLast(
    SFXWideStringConstRef text   // text of item
    AVKType key                  // access key
    WChar keyIcon                // key icon
);

Return value

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

Description

This function inserts the specified item at the tail.

[Note] Note

The numuber of items can be obtained by calling the SFZListBoxControl::GetItemCount function.

Reference

SFZListBoxControl::Insert | SFZListBoxControl::InsertFirst | SFZListBoxControl::RemoveLast | SFZListBoxControl::GetItemCount


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

Argument

exception

Return the error value generated inside the function.

Return value

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

Description

This function creates a new instance of this responder class.

If succeeds, a not null pointer will be returned, and the "exception" argument is SFERR_NO_ERROR. If fails such as insufficient memory, a null pointer will be returned, and the "exception" argument holds the error value.

Example

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

SFZListBoxControlSmp _listbox;
SFCError error;

if ((_listbox = SFZListBoxControl::NewInstance(&error)) != null) {

    ...
}

SFZListBoxControl::Remove
Remove specified items from this list box control.
[ 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
);

Description

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

The numuber of items can be obtained by calling the SFZListBoxControl::GetItemCount function.

Reference

SFZListBoxControl::Clear SFZListBoxControl::RemoveFirst | SFZListBoxControl::RemoveLast | SFZListBoxControl::Insert | SFZListBoxControl::GetItemCount


SFZListBoxControl::RemoveFirst
Remove the first item from this list box control.
[ public ]
Void RemoveFirst(Void);

Description

This function removes the first item from this list box control.

[Note] Note

The numuber of items can be obtained by calling the SFZListBoxControl::GetItemCount function.

Reference

SFZListBoxControl::Clear | SFZListBoxControl::Remove | SFZListBoxControl::RemoveLast | SFZListBoxControl::InsertFirst | SFZListBoxControl::GetItemCount


SFZListBoxControl::RemoveLast
Remove the last item from this list box control.
[ public ]
Void RemoveLast(Void);

Description

This function removes the last item from this list box control.

[Note] Note

The numuber of items can be obtained by calling the SFZListBoxControl::GetItemCount function.

Reference

SFZListBoxControl::Clear | SFZListBoxControl::Remove | SFZListBoxControl::RemoveFirst | SFZListBoxControl::InsertLast | SFZListBoxControl::GetItemCount


SFZListBoxControl::SetDefaultItemBackColor
Set the default background color of unselected item of this list box control to the specified value.
[ public ]
Void SetDefaultItemBackColor(
    SFXRGBColorConstRef param   // default background color to set
);

Description

This function sets the default background color(SFXRGBColor) of unselected item of this list box control to the specified value.

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

[Note] Default background color of unselected item

The default background color of unselected item can be changed using the SFZListBoxControl::SetItemBackColor function.

If you want to make the background color of unselected item be the same one, the background color needs to be set using this function. The SFZListBoxControl::SetItemBackColor function to set it individually is not recommended.

However, the background color of selected item is always the one set with the SFZListBoxControl::SetSelBackColor function.

Reference

SFZListBoxControl::GetDefaultItemBackColor | SFZListBoxControl::SetDefaultItemForeColor | SFZListBoxControl::SetItemBackColor | SFZListBoxControl::SetSelBackColor | SFZListBoxControl::SetItemEnable | SFXRGBColor::GetBrightness | SFXRGBColor


SFZListBoxControl::SetDefaultItemForeColor
Set the default foreground color of unselected item of this list box control to the specified value.
[ public ]
Void SetDefaultItemForeColor(
    SFXRGBColorConstRef param   // default foreground color to set
);

Description

This function sets the default foreground color(SFXRGBColor) to draw the text of unselected item of this list box control to the specified value.

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

[Note] Default foreground color of unselected item

The default foreground color of unselected item can be changed using the SFZListBoxControl::SetItemForeColor function.

If you want to make the foreground color of all unselected items be the same one, the foreground color needs to be set using this function. The SFZListBoxControl::SetItemForeColor function to set it individually is not recommended.

However, the foreground color of selected item is always the one set with the SFZListBoxControl::SetSelForeColor function, except when the enable flag of item is set to "false" using the SFZListBoxControl::SetItemEnable function.

[Note] Foreground color of unselected item when the enable flag of the item is set to "false" or in the "inactive" state

If the enable flag of item is set to "false" using the SFZListBoxControl::SetItemEnable function or this list box control is in the "inactive" state, the text will not be drawn in the foreground color set with this function.

In this case, the foreground color will be the color subtracted 0x33 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 0x33 on each RGB value of the color.

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

Reference

SFZListBoxControl::GetDefaultItemForeColor | SFZListBoxControl::SetDefaultItemBackColor | SFZListBoxControl::SetItemForeColor | SFZListBoxControl::SetSelForeColor | SFZListBoxControl::SetItemEnable | SFXRGBColor::GetBrightness | SFXRGBColor | State


SFZListBoxControl::SetDownKey
Set the DOWN key of this list box control to the specified value.
[ public ]
Void SetDownKey(
    AVKType param   // value to set
);

Return value

*** description of return value ***

Description

This function sets the DOWN key of this list box control to the specified value.

Default: AVK_DOWN.

If the DOWN key is pressed, the internal handler(*) of this 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 SFZListBoxControl::SetScrollRepeat and the bottom item is currently selected, the top item will be selected if the DOWN 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 DOWN key is pressed.

[Note] Internal handler

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

Reference

SFZListBoxControl::GetDownKey | SFZListBoxControl::GetUpKey | SFZListBoxControl::SetUpKey | SFZListBoxControl::SetScrollRepeat | SFXEvent | Value Event[SFEVT_RESPONDER_VALUE]


SFZListBoxControl::SetEscapeKey
Set the ESCAPE key of this list box control to the specified value.
[ public ]
Void SetEscapeKey(
    AVKType param   // key to set
);

Description

This function sets the ESCAPE key of this list box control to the specified value.

Default: AVK_CLR

The SFZListBoxControl::HandleEscapeKey function will be called if the ESCAPE key is pressed.

Reference

SFZListBoxControl::GetEscapeKey | SFZListBoxControl::HandleEscapeKey


SFZListBoxControl::SetFont
Set the font of this list box control to the specified value.
[ public ]
Void SetFont(
    AEEFont value   // font to set
);

Description

This function sets the font to the specified value , which is for the item text of this list box control.

Default: AEE_FONT_NORMAL.

Reference

SFZListBoxControl::GetFont


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

Description

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

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

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

[Caution] Drawing region of the grid line

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

Reference

SFZListBoxControl::GetGridLineColor | SFZListBoxControl::SetGridLineEnable | SFXRGBColor


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

Description

This function sets the enable flag of the grid line of this list box control to the specified value.

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

Default: false.

[Caution] Drawing region of the grid line

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

Reference

SFZListBoxControl::GetGridLineEnable | SFZListBoxControl::SetGridLineColor | SFZListBoxControl::SetListMargin


SFZListBoxControl::SetItemAccessKey
Set the access key and the specified key icon of the specified item of this list box control to specified values.
[ public ]
SFCError SetItemAccessKey(
    SInt16 index        // index of item
    AVKType key         // access key
    WChar keyIcon = 0   // key icon
);

Description

This function sets the access key and the key icon of the specified item of this list box control to specified values.

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

Example

The code below shows how to set a access key and a key icon for an item.

// set access key to AVK_1, key icon to 0xFBF6 for first list item of _list list box 
_listbox->SetItemAccessKey(0, AVK_1, 0xFBF6);

Reference

SFZListBoxControl::GetItemAccessKey | SFZListBoxControl::HandleAccessKey | SFZListBoxControl::SetItemEnable


SFZListBoxControl::SetItemBackColor
Set the background color of the specified unselected item of this list box control to the specified value.
[ public ]
SFCError SetItemBackColor(
    SInt16 index                // list item index
    SFXRGBColorConstRef param   // background color to set
);

Description

This function sets the background color(SFXRGBColor) of the specified item of this list box when unselected to the specified value.

Default: The default background color set with the SFZListBoxControl::SetDefaultItemBackColor function. SFXRGBColor(0xFF, 0xFF, 0xFF, 0x00)[white color] if the default background color is not set.

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

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

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

[Note] Foreground color of unselected item

For the foreground color of unselected item, refer to SFZListBoxControl::SetItemForeColor.

[Note] Foreground color of selected item

For the foreground color of selected item, refer to SFZListBoxControl::SetSelForeColor.

[Note] Background color of selected item

For the background color of selected item, refer to SFZListBoxControl::SetSelBackColor.

Example

*** Example ***


Reference

SFZListBoxControl::SetDefaultItemBackColor | SFZListBoxControl::GetItemBackColor | SFZListBoxControl::SetItemForeColor | SFZListBoxControl::SetItemEnable | SFXRGBColor::GetBrightness | SFZListBoxControl::SetSelForeColor | SFZListBoxControl::SetSelBackColor | SFXRGBColor


SFZListBoxControl::SetItemEnable
Set the enable flag of the specified item of this 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)
);

Description

This function sets the enable flag of the specified item of this list box control to the specified value.

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

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

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

The foreground color will be the color subtracted 0x44 from each RGB value of the item foreground color set with the SFZListBoxControl::SetItemForeColor 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 SFZListBoxControl::SetItemBackColor function if the brightness of item background color is bigger than 0x7F, otherwise it will be the color added 0x33 on each RGB value of the item background color.

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

[Caution] Note

If the enable flag of 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 SFZListBoxControl::SetSelForeColor function.

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

Reference

SFZListBoxControl::GetItemEnable | SFZListBoxControl::HandleOperateKey | SFZListBoxControl::HandleAccessKey | SFZListBoxControl::SetItemForeColor | SFZListBoxControl::SetItemBackColor | SFZListBoxControl::SetSelForeColor | SFZListBoxControl::SetSelBackColor | SFZListBoxControl::SetSelForeColor


SFZListBoxControl::SetItemForeColor
Set the foreground color of the specified unselected item of this list box control to the specified value.
[ public ]
Void SetItemForeColor(
    SInt16 index                // index of item
    SFXRGBColorConstRef param   // foreground color to set
);

Description

This function sets the foreground color(SFXRGBColor) to draw the text of the specified unselected item of this list box control to the specified value.

Default: The default foreground color set with the SFZListBoxControl::SetDefaultItemForeColor function. SFXRGBColor(0x00, 0x00, 0x00, 0x00)[black color] if the default background color is not set.

[Note] Foreground color of unselected item when the enable flag of item is set to "false" or in the "inactive" state

If the enable flag of item is set to "false" using the SFZListBoxControl::SetItemEnable function or this list box control is in the "inactive" state, the text will not be drawn in the foreground color set with this function.

In this case, the foreground color will be the color subtracted 0x33 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 0x33 on each RGB value of the color.

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

[Note] Background color of unselected item

For the background color of unselected item, refer to SFZListBoxControl::SetItemBackColor.

[Note] Background color of unselected item

For the background color of unselected item, refer to SFZListBoxControl::SetItemBackColor.

[Note] Foreground color of selected item

For the foreground color of selected item, refer to SFZListBoxControl::SetSelForeColor.

[Note] Background color of selected item

For the background color of selected item, refer to SFZListBoxControl::SetSelBackColor.

Reference

SFZListBoxControl::SetDefaultItemForeColor | SFZListBoxControl::GetItemForeColor | SFZListBoxControl::SetItemBackColor | SFZListBoxControl::SetSelForeColor | SFZListBoxControl::SetSelBackColor | SFZListBoxControl::SetItemEnable | SFXRGBColor::GetBrightness | SFXRGBColor | State


SFZListBoxControl::SetItemKeyIcon
Set the key icon of the specified item of this list box control to the specified value.
[ public ]
SFCError SetItemKeyIcon(
    SInt32 index   // index of item
    WChar param    // key icon(icon character)
);

Description

This function sets the key icon of the specified item of this list box control to the specified value.

Example

The code below shows how to set a key icon for an item.

// set key icon to 0xFBF6 for first list item of _list list box 
_listbox->SetItemKeyIcon(0, 0xFBF6);

Reference

SFZListBoxControl::GetItemKeyIcon


SFZListBoxControl::SetItemText
Set the text of the specified item of this list box control to the specified value.
[ public ]
SFCError SetItemText(
    SInt16 index           // index of item
    SFXPathConstRef path   // path to resource file
    UInt16 id              // object id
);
[ public ]
SFCError SetItemText(
    SInt16 index                 // index of item
    SFXWideStringConstRef item   // text
);

Description

This function sets the text of the specified item of this list box control to the specified value.

Reference

SFZListBoxControl::GetItemText


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

Description

This function sets the margin within each item of this 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, 2)

Reference

SFZListBoxControl::GetListMargin | SFXMargin


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

Description

This function sets the scroll bar control used by the list box control to the specified value.

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

Example

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

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

Void UserApplication::SomeFunction {
    SFZListBoxControlSmp        list;
    CustomScrollBarControlSmp   bar;

    // create list box control
    list = SFZListBoxControl::NewInstance();

    // settings of list box control
    // …

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

    // set original scroll bar to list box control
    list->SetScrollBarControl(bar);
    return;
}

Reference

SFYScrollBarControl SFZListBoxControl::GetScrollBarControl


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

Description

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

Default: SFZListBoxControl::DEFAULT_BAR_WIDTH

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

Reference

SFZListBoxControl::GetScrollBarWidth | SFZListBoxControl::DefaultEnum


SFZListBoxControl::SetScrollDirection
Set the scroll direction to the specified value.
[ public ]
Void SetScrollDirection(
    DirectionEnum param   // value to set
);

Description

This function sets the scroll direction to the specified value.

Default: SFZListBoxControl::DEFAULT_DIRECTION

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

Reference

SFZListBoxControl::GetScrollDirection | SFZListBoxControl::DirectionEnum


SFZListBoxControl::SetScrollInterval
Set the scroll-interval to the specified value. [milliseconds]
[ public ]
Void SetScrollInterval(
    UInt32 param   // value to set
);

Description

Default: SFZListBoxControl::DEFAULT_SCROLL [milliseconds]

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

Reference

SFZListBoxControl::GetScrollInterval | SFZListBoxControl::DirectionEnum


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

Description

This function sets the repeat-scroll flag of this 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 UP key or DOWM key is pressed, respectively.

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

[Note] About the UP key and the DOWM key

The UP key or DOWM key is set with the SFZListBoxControl::SetUpKey function or SFZListBoxControl::SetDownKey function respectively.

Reference

SFZListBoxControl::GetScrollRepeat | SFZListBoxControl::SetUpKey | SFZListBoxControl::SetDownKey


SFZListBoxControl::SetScrollStep
Set the scroll-step to the specified value. [pixels]
[ public ]
Void SetScrollStep(
    SInt16 param   // value to set
);

Description

This function sets the number of pixels of each scroll. [pixels]

If "-1"(this is default value) is set, the scroll-step will be set to the width of the " " character of the currently used font.

Default: SFZListBoxControl::DEFAULT_STEP [pixels]

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

Reference

SFZListBoxControl::GetScrollStep | SFZListBoxControl::DirectionEnum


SFZListBoxControl::SetSelBackColor
Set the background color of selected item of this list box control to the specified value.
[ public ]
Void SetSelBackColor(
    SFXRGBColorConstRef param   // value to set
);

Description

This function sets the background color(SFXRGBColor) of currently selected item of this list box control to the specified value, in which the rectangle containing the selected item is filled.

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

[Note] Foreground color of selected item

For the foreground color of selected item, refer to SFZListBoxControl::SetSelForeColor.

[Note] Foreground color of unselected item

For the foreground color of unselected item, refer to SFZListBoxControl::SetItemForeColor.

[Note] Background color of unselected item

For the background color of unselected item, refer to SFZListBoxControl::SetItemBackColor.

Reference

SFZListBoxControl::GetSelBackColor | SFZListBoxControl::GetSelForeColor | SFZListBoxControl::SetSelForeColor | SFZListBoxControl::SetItemBackColor | SFZListBoxControl::SetItemForeColor | SFXRGBColor


SFZListBoxControl::SetSelForeColor
Set the foreground color of selected item of this list box control to the specified value.
[ public ]
Void SetSelForeColor(
    SInt16 index                // index of item
    SFXRGBColorConstRef param   // value to set
);

Description

This function sets the foreground color(SFXRGBColor) to draw the text of the specified selected item of this list box control to the specified value.

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

If the enable flag of an item is set to "false" using the SFZListBoxControl::SetItemEnable function or this list box control is in the "inactive" state, the text will not be drawn in the foreground color set with this function.

In this case, the foreground color will be the color subtracted 0x33 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 0x33 on each RGB value of the color.

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

[Note] Background color of selected item

For the background color of selected item, refer to SFZListBoxControl::SetSelBackColor.

[Note] Foreground color of unselected item

For the foreground color of unselected item, refer to SFZListBoxControl::SetItemForeColor.

[Note] Background color of unselected item

For the background color of unselected item, refer to SFZListBoxControl::SetItemBackColor.

Reference

SFZListBoxControl::GetSelForeColor | SFZListBoxControl::SetSelBackColor | SFZListBoxControl::SetItemForeColor | SFZListBoxControl::SetItemBackColor | SFZListBoxControl::SetItemEnable | SFXRGBColor::GetBrightness | SFXRGBColor | State


SFZListBoxControl::SetUpKey
Set the UP key of this list box control to the specified value.
[ public ]
Void SetUpKey(
    AVKType param   // value to set
);

Description

This function sets the UP key of the list box control to the specified value.

Default: AVK_UP.

If the UP key is pressed, the internal handler(*) of this 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 SFZListBoxControl::SetScrollRepeat and the top item is currently selected, the bottom item will be selected if the UP 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 UP key is pressed.

[Note] Internal handler

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

Reference

SFZListBoxControl::GetUpKey | SFZListBoxControl::GetDownKey | SFZListBoxControl::SetDownKey SFZListBoxControl::SetScrollRepeat | SFXEvent | Value Event[SFEVT_RESPONDER_VALUE]


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

Description

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

Default: SFZListBoxControl::DEFAULT_SCROLL [milliseconds]

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

Reference

SFZListBoxControl::SetWaitInterval | SFZListBoxControl::DirectionEnum


SFZListBoxControl::CodeEnum
Constant that represents the SFZListBoxControl class.
    enum CodeEnum {
     CODE_TYPE = four_char_code('c', 'l', 's', 't')
};
SFMTYPEDEFTYPE(CodeEnum)

SFZListBoxControl::DefaultEnum
Constants that represent the default value for various parameters.
        
enum DefaultEnum {
    DEFAULT_WAIT     = 1000,   // waiting time to start the scroll [milliseconds]
    DEFAULT_SCROLL   = 100,    // scroll-interval [milliseconds]
    DEFAULT_STEP     = -1      // scroll-step [pixels]
};

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