SophiaFramework UNIVERSE 5.3 |
#include <SFZComboBoxControl.h.hpp>
class SFZComboBoxControl : public SFYButtonControl;
SFMTYPEDEFRESPONDER(SFZComboBoxControl)
How to use
Combo box control(SFZComboBoxControl) is a button control which internally contains a flex list box control(SFZFlexListBoxControl) for list items.
To insert an item, use the SFZComboBoxControl::Insert / SFZComboBoxControl::InsertFirst / SFZComboBoxControl::InsertLast function. To remove an item, use the SFZComboBoxControl::Remove / SFZComboBoxControl::RemoveFirst / SFZComboBoxControl::RemoveLast function. If the SFZComboBoxControl::Clear function is called, all items are removed.
In the region of this combo box control, the currently selected item among this flex list box control is displayed.
If there are more characters than can be displayed in the text region of a combo box control, this control will start to scroll automatically when it is in the focused state.
The flex list box control(SFZFlexListBoxControl) internally contained by the combo box control(SFZComboBoxControl) will be displayed if the pull-down button where the reverse triangle is drawn is pressed using the operation key of the combo box control set with the SFYButtonControl::SetOperateKey.
In SFZFlexListBoxControl, the focused item, currently selected item, is displayed highlightly.
Note | |
---|---|
If an item is in the invalid state, it will not be focused nor selected. |
List items can be scrolled using the scroll keys set with the SFZFlexListBoxControl::SetScrollUpKey / SFZFlexListBoxControl::SetScrollDownKey / SFZFlexListBoxControl::SetPageUpKey / SFZFlexListBoxControl::SetPageDownKey / SFZFlexListBoxControl::SetSnapUpKey / SFZFlexListBoxControl::SetSnapDownKey functions.
When the flex list box control is opened, the flex list box control will be closed by pressing the operation key or the access key. Then the selected item will be displayed in the combo box control. [*Prerequisite: the selected item needs to be enabled with the SFZFlexListBoxControl::SetItemEnable function]
In this case, this combo box control will receive the result event [SFXEvent(SFEVT_RESPONDER_RESULT, SFP16_RESULT_OK, index of the selected item)].
Tip | |
---|---|
The operation key of the flex list box control is set with the SFYBoxControl::SetOperateKey function. By default, the operation key is set to the SELECT key. |
Tip | |
---|---|
The access key is set with the SFZFlexListBoxControl::SetItemAccessKey function. |
Caution | |
---|---|
When the selected item is disabled with the SFZFlexListBoxControl::SetItemEnable function, nothing will happen if the operation key or the access key is pressed. |
When the flex list box control is opened, the flex list box control will be closed by pressing the ESCAPE key. The content of the combo box control will be the same as before the flex list box control is opened.
Tip | |
---|---|
The ESCAPE key is set with the SFZFlexListBoxControl::SetEscapeKey function. By default, the ESCAPE key is set to the CLEAR key. |
Caution | |
---|---|
In this case, no result event will occur in this combo box control. |
The below is the specification of the combo box control.
Flex List Box Control | |
---|---|
For more details, refer to SFZFlexListBoxControl. |
Limitation on combo box control specification | |
---|---|
The minimum value is always 0. The current value represents the index of currently selected item of the flex list box control(SFZFlexListBoxControl) which the combo box control contains internally. The maximum value represents the number of items of the flex list box control(SFZFlexListBoxControl) which the combo box control contains internally. [* This function is to be discontinued in the future. To get the number of items of the flex list box control(SFZFlexListBoxControl) which the combo box control contains internally, call the SFZComboBoxControl::GetItemCount function.] The minimum value or the maximum value must not be changed by using the SFYControl::SetMinimumValue function or the SFYControl::SetMaximumValue function. |
Structure of the combo box control
In the default implementation, the combo box control is drawn as below depending on its state.
The below is the sample code to create the instance of the combo box control.
// implementation of combo box including only body string Void UserClass::Main(Void) { SFZWindowSmp window; SFZComboBoxControlSmp combo; SFCError error(SFERR_NO_ERROR); // create the window window = SFZWindow::NewInstance(&error); window->SetParent(GetThis()); window->SetRealBound(GetLocalBound()); window->SetState(true, true, true, true); window->SetBackgroundColor(SFXRGBColor(0xDD, 0xFF, 0xDD, 0x00)); // [Required] create combo box combo = SFZComboBoxControl::NewInstance(&error); // [Required] set combo box's parent responder to window combo->SetParent(window); // [Required] insert string at the tail for (SInt32 i = 0; i < 5 ; ++i) { combo->InsertLast(SFXAnsiString::Format("Item index is %d.", i)); } // [Required] set real region(calculate suitable region from window's local region) combo->SetRealBound(combo->GetSuitableBound(window->GetLocalBound().Deflate(20, 50)).SetOrigin(20, 50)); // [Required] set combo box's states to "visible" + "active" + "enable" + "focus" together combo->SetState(true, true, true, true); return; } // implementation of combo box control including header string and body icon image Void UserClass::Main2(Void) { SFZWindowSmp window; SFZComboBoxControlSmp combo; SFZComboBoxControl::ItemRec item; SFBShellSmp shell(SFBShell::GetInstance()); SFBImageSmp normal(shell->LoadResImage("userclass.bar", IDI_OBJECT_5001)); SFBImageSmp select(shell->LoadResImage("userclass.bar", IDI_OBJECT_5002)); SFCError error(SFERR_NO_ERROR); // create the window window = SFZWindow::NewInstance(&error); window->SetParent(GetThis()); window->SetRealBound(GetLocalBound()); window->SetState(true, true, true, true); window->SetBackgroundColor(SFXRGBColor(0xDD, 0xFF, 0xDD, 0x00)); // [Required] create combo box combo = SFZComboBoxControl::NewInstance(&error); // [Required] set combo box's parent responder to window combo->SetParent(window); // in case image is used, append item using item structure // [Required to select] set enable flag of item structure to "true" item.property.enable = true; // [Required to select] set access key and command id of item structure // in this case, these are not used item.property.key = 0; item.property.id = SFZComboBoxControl::INVALID_COMMAND_ID; // [Optional] set image of item structure item.normal.body.icon = normal; item.select.body.icon = select; // [Required] insert 5 items for (SInt32 i = 0; i < 5; ++i) { // [Required to select] set text of item structure item.normal.header.text.Set(SFXWideString::Format("%02d", i)); item.normal.body.text.Set(SFXWideString::Format("List item %02d", i)); item.select.body.text.Set(SFXWideString::Format("The item %02d is selected.", i)); // insert item at tail combo->InsertLast(item); } // [Required] set combo box's real region(calculate suitable region from window's local region) combo->SetRealBound(combo->GetSuitableBound(window->GetLocalBound().Deflate(20, 50)).SetOrigin(20, 50)); // [Required] set combo box's states to "visible" + "active" + "enable" + "focus" together combo->SetState(true, true, true, true); return; }
Execution Result (Left: only body string is used ; Right: header string, body icon image, and body string are included)
CAUTION | |
---|---|
The region of a flex list box control internally contained by a combo box control is automatically set based on inserted items and the local region of its parent responder where the combo box control is placed. To draw the flex list box control, the real region(local region) of its parent responder needs to be set with the SFYResponder::SetRealBound function. This real region is the same with its local region unless its virtual region is set with the SFYResponder::SetVirtualBound function. * Both the local region and the virtual region represent the same rectangular region. |
Combo Box Control[SFZComboBoxControl] | SFZFlexListBoxControl | State | SFYButtonControl | SFYSingleTextWidget | SFYResponder::SetRealBound | SFYResponder::SetVirtualBound | Real Region | Local Region | Virtual Region
Constructor/Destructor |
---|
SFZComboBoxControl( Void ) Constructor of the SFZComboBoxControl class.
|
~SFZComboBoxControl( Void ) Destructor of the SFZComboBoxControl class.
|
Public Functions | |
---|---|
SFCError |
Append(
SFXPathConstRef path
, UInt16 id
) [DEPRECATED]Append an item to the flex list box control of this combo box control.
|
SFCError |
Append(
SFXPathConstRef path
, UInt16 id
, AVKType key
, WChar keyIcon = 0
) [DEPRECATED]Append an item to the flex list box control of this combo box control.
|
SFCError |
Append(
SFXWideStringConstRef item
) [DEPRECATED]Append an item to the flex list box control of this combo box control.
|
SFCError |
Append(
SFXWideStringConstRef item
, AVKType key
, WChar keyIcon = 0
) [DEPRECATED]Append an item to the flex list box control of this combo box control.
|
Void |
Clear( Void ) Clear the flex list box control of this combo box control.
|
SFXRGBColorConstRef |
GetArrowColor( Void ) Get the color of the down arrow of this combo box control.
|
AEEFont |
GetFont( Void ) Get the font of this combo box control.
|
HorizontalEnum |
GetHorizontalAlign( Void ) Get the value of horizontal alignment of the title.
|
AVKType |
GetItemAccessKey(
SInt16 index
) Get the access key for the specified item of the flex list box control of this combo box control.
|
SInt16 |
GetItemCount( Void ) Get the number of items in the flex list box control of this combo box control.
|
SFBImageSmpConstRef |
GetItemIconImage(
SInt32 index
, IconEnum iconEnum
) Get the icon image of of the specified icon enum of the specified item in the flex list box control of this combo box control.
|
SFXWideStringConstRef |
GetItemText(
SInt32 index
, TextEnum textEnum
) Get the text of the specified text enum of the specified item in the flex list box control of this combo box control.
|
SFXWideStringConstRef |
GetItemText(
SInt32 index
) Get the text of the specified text enum of the specified item in the flex list box control of this combo box control.
|
SFZFlexListBoxControlSmpConstRef |
GetListBoxControl( Void ) Get the flex list box control of this combo box control.
|
SInt32 |
GetMaximumValue( Void ) [DEPRECATED]Get the number of items in the flex list box control of this combo box control.
|
DirectionEnum |
GetScrollDirection( Void ) Get the scroll direction of the title.
|
UInt32 |
GetScrollInterval( Void ) Get the scroll-interval of the title. [milliseconds]
|
SInt16 |
GetScrollStep( Void ) Get the scroll-step of the title. [pixels]
|
SInt16 |
GetSpaceSize( Void ) Get the space size between the elements in the title. [pixels]
|
SFXRGBColorConstRef |
GetTitleColor( Void ) Get the color of the title.
|
VerticalEnum |
GetVerticalAlign( Void ) Get the value of vertical alignment of the title.
|
UInt32 |
GetWaitInterval( Void ) Get the waiting time to start to scroll the title. [milliseconds]
|
SFCError |
Insert(
SInt32 index
, ItemRecConstRef item
) Insert the specified item at the specified index of the flex list box control of this combo box control.
|
SFCError |
Insert(
SInt32 index
, ItemRecConstPtr item
, SInt32 length
) Insert the specified item at the specified index of the flex list box control of this combo box control.
|
SFCError |
Insert(
SInt32 index
, SFXWideStringConstRef text
) Insert the specified item at the specified index of the flex list box control of this combo box control.
|
SFCError |
Insert(
SInt32 index
, SFXWideStringConstPtr text
, SInt32 length
) Insert the specified item at the specified index of the flex list box control of this combo box control.
|
SFCError |
InsertFirst(
ItemRecConstRef item
) Insert the specified item at the head of the flex list box control of this combo box control.
|
SFCError |
InsertFirst(
ItemRecConstPtr item
, SInt32 length
) Insert the specified item at the head of the flex list box control of this combo box control.
|
SFCError |
InsertFirst(
SFXWideStringConstRef text
) Insert the specified item at the head of the flex list box control of this combo box control.
|
SFCError |
InsertFirst(
SFXWideStringConstPtr text
, SInt32 length
) Insert the specified item at the head of the flex list box control of this combo box control.
|
SFCError |
InsertLast(
ItemRecConstRef item
) Insert the specified item at the tail of the flex list box control of this combo box control.
|
SFCError |
InsertLast(
ItemRecConstPtr item
, SInt32 length
) Insert the specified item at the tail of the flex list box control of this combo box control.
|
SFCError |
InsertLast(
SFXWideStringConstRef text
) Insert the specified item at the tail of the flex list box control of this combo box control.
|
SFCError |
InsertLast(
SFXWideStringConstPtr text
, SInt32 length
) Insert the specified item at the tail of the flex list box control of this combo box control.
|
static SFZComboBoxControlSmp |
NewInstance(
SFCErrorPtr exception = null
) Create a new instance of this responder class.
|
Void |
Remove(
SInt32 begin
, SInt32 end
) Remove specified items from the flex list box control of this combo box control.
|
Void |
Remove(
SInt32 index
) Remove specified items from the flex list box control of this combo box control.
|
Void |
RemoveFirst( Void ) Remove the first item from this combo box control.
|
Void |
RemoveLast( Void ) Remove the last item from this combo box control.
|
Void |
SetArrowColor(
SFXRGBColorConstRef param
) Set the color of the down arrow to the specified value.
|
Void |
SetFont(
TextEnum textEnum
, AEEFont param
) Set the font of the title to the specified value.
|
Void |
SetFont(
AEEFont param
) Set the font of the title to the specified value.
|
Void |
SetHorizontalAlign(
HorizontalEnum param
) Set the horizontal alignment of the title to the specified value.
|
SFCError |
SetItemAccessKey(
SInt32 index
, AVKType key
, WChar keyIcon = 0
)
Set the access key and its icon character for the specified item of the flex list box control
of this combo box control to the specified value.
|
SFCError |
SetItemIconImage(
SInt32 index
, IconEnum iconEnum
, SFXPathConstRef path
) Set the icon image of the specified icon enum of the specified item in the flex list box control of this combo box control to the specified value.
|
SFCError |
SetItemIconImage(
SInt32 index
, IconEnum iconEnum
, SFXPathConstRef path
, UInt16 id
) Set the icon image of the specified icon enum of the specified item in the flex list box control of this combo box control to the specified value.
|
SFCError |
SetItemIconImage(
SInt32 index
, IconEnum iconEnum
, SFBImageSmpConstRef param
) Set the icon image of the specified icon enum of the specified item in the flex list box control of this combo box control to the specified value.
|
SFCError |
SetItemText(
SInt32 index
, TextEnum textEnum
, SFXPathConstRef path
, UInt16 id
) Set the text of the specified text enum of the specified item in the flex list box control of this combo box control to the specified value.
|
SFCError |
SetItemText(
SInt32 index
, TextEnum textEnum
, SFXWideStringConstRef param
) Set the text of the specified text enum of the specified item in the flex list box control of this combo box control to the specified value.
|
SFCError |
SetItemText(
SInt16 index
, SFXPathConstRef path
, UInt16 id
) Set the text of the specified text enum of the specified item in the flex list box control of this combo box control to the specified value.
|
SFCError |
SetItemText(
SInt16 index
, SFXWideStringConstRef item
) Set the text of the specified text enum of the specified item in the flex list box control of this combo box control to the specified value.
|
Void |
SetScrollDirection(
DirectionEnum param
) Set the scroll direction of the title to the specified value.
|
Void |
SetScrollInterval(
UInt32 param
) Set the scroll-interval of the title to the specified value. [milliseconds]
|
Void |
SetScrollStep(
SInt16 param
) Set the scroll-step of the title to the specified value. [pixels]
|
Void |
SetSpaceSize(
SInt16 param
) Set the space size between two elements in the title to the specified value. [pixels]
|
Void |
SetTitleColor(
SFXRGBColorConstRef param
) Set the color of the title to the specified value.
|
Void |
SetVerticalAlign(
VerticalEnum param
) Set the vertical alignment of the title to the specified value.
|
Void |
SetWaitInterval(
UInt32 param
) Set the waiting time to start to scroll the title to the specified value. [milliseconds]
|
Void |
StartScroll( Void ) Start to scroll the title.
|
Void |
StopScroll( Void ) Stop to scroll the title.
|
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 |
GetButtonColor( Void )
(inherits from SFYButtonControl)
Get the bevel color of bevel region within this button.
|
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.
|
SFXBevelColorConstRef |
GetFocusColor( Void )
(inherits from SFYButtonControl)
Get the bevel color of frame margin of this button control in the "focus" state.
|
SFYResponderSmp |
GetFrame( Void )
(inherits from SFYResponder)
Get the frame which has been attached to this responder.
|
SFXRectangle |
GetGlobalBound( Void )
(inherits from SFYResponder)
Get the globle region of this responder.
|
UInt32 |
GetID( Void )
(inherits from SFYResponder)
Get the ID of this responder instance.
|
SFXRectangle |
GetLocalBound( Void )
(inherits from SFYResponder)
Get the local region of this responder.
|
SInt32 |
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 SFYButtonControl)
Get the operation key of the button 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.
|
SFXRGBColorConstRef |
GetShadowColor( Void )
(inherits from SFYButtonControl)
Get the shadow color of this button control.
|
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 |
GetStatePress( Void )
(inherits from SFYButtonControl)
Get the value of flag indicating whether or not this button is pressed.
|
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 |
SetButtonColor(
SFXBevelColorConstRef param
)
(inherits from SFYButtonControl)
Set the bevel color of bevel region within this button 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(
SFXBevelColorConstRef param
)
(inherits from SFYButtonControl)
Set the bevel color of frame margin of this button control in the "focus" state to the specified value.
|
SFCError |
SetFrame(
SFYResponderSmpConstRef param
)
(inherits from SFYResponder)
Attach the specified frame to this frame.
|
Void |
SetID(
UInt32 param
)
(inherits from SFYResponder)
Set the ID value of this responder to the specified value.
|
Void |
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 SFYButtonControl)
Set the operation key of this button 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 |
SetShadowColor(
SFXRGBColorConstRef param
)
(inherits from SFYButtonControl)
Set the shadow color of this button control to the specified value.
|
Void |
SetState(
Bool visible
, Bool active
, Bool enable
, Bool focus
)
(inherits from SFYResponder)
Set all states of this responder to specified values together.
|
Void |
SetStateActive(
Bool param
)
(inherits from SFYResponder)
Set the active state of this responder to the specified value.
|
Void |
SetStateEnable(
Bool param
)
(inherits from SFYResponder)
Set the enable state of this responder to the specified value.
|
Void |
SetStateFocus(
Bool param
)
(inherits from SFYResponder)
Set the focus state of this responder to the specified value.
|
Void |
SetStatePress(
Bool param
)
(inherits from SFYButtonControl)
Set the flag indicating whether or not this button is pressed 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 |
DrawTab(
SFXGraphicsPtr graphics
, SFXRectangleConstRef rectangle
) Draw the reverse triangle of this combo box control in the specified region.
|
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 |
HandleOperateKeyRelease( Void ) This function will be called when the SFEVT_KEY_RELEASE 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 |
DrawButton(
SFXGraphicsPtr graphics
, SFXRectangleConstRef rectangle
)
(inherits from SFYButtonControl)
Draw the bevel region of this button control.
|
SFXRectangle |
DrawShadow(
SFXGraphicsPtr graphics
, SFXRectangleConstRef rectangle
)
(inherits from SFYButtonControl)
Draw the shadow region of this button control.
|
static SFYResponderSmp |
Factory(
SFYResponderPtr responder
, SFCErrorPtr exception = null
)
(inherits from SFYResponder)
This function is used to implement the NewInstance function.
|
static SFXMarginConstRef |
GetButtonMargin( Void )
(inherits from SFYButtonControl)
Get the margin region of this button control.
|
static SFXGridConstRef |
GetPressOffset( Void )
(inherits from SFYButtonControl)
Get the press offset of this button control.
|
static SFXMarginConstRef |
GetShadowMargin( Void )
(inherits from SFYButtonControl)
Get the margin of shadow region of this button 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 |
HandleOperateKey( Void )
(inherits from SFYButtonControl)
This function will be called when the SFEVT_KEY event of the operation key is received.
|
Void |
HandleOperateKeyPress( Void )
(inherits from SFYButtonControl)
This function will be called when the SFEVT_KEY_PRESS event of the operation key is received.
|
Void |
Invalidate( Void )
(inherits from SFYResponder)
Register the specified redraw region of this responder.
|
Void |
Invalidate(
SFXRectangleConstRef param
)
(inherits from SFYResponder)
Register the specified redraw region of this responder.
|
Void |
InvokeBackward(
SFXEventConstRef event
, Bool overload
, BoolPtr result = null
)
(inherits from SFYResponder)
Call the handlers for the specified event from the end of the handler list registered into this responder.
|
Void |
InvokeForward(
SFXEventConstRef event
, Bool overload
, BoolPtr result = null
)
(inherits from SFYResponder)
Call the handlers for the specified event from the head of the handler list registered into this responder.
|
Void |
SetType(
SFCType param
)
(inherits from SFYResponder)
Set the Type value of this responder to the specified 4-character value.
|
Void |
static_throw(
static_exception< T > const & param
)
(inherits from static_exception)
Set an exception.
|
Void |
static_throw(
T const & param
)
(inherits from static_exception)
Set an exception.
|
Bool |
static_try(
Void
)
(inherits from static_exception)
Confirm whether or not the exception is retained.
|
Types |
---|
CodeEnum Constant that represents the SFZComboBoxControl class.
|
DefaultEnum Constants that represent the default value for various parameters.
|
DirectionEnum Constants that represent the scroll direction of the title.
|
HorizontalEnum Constants that represent the horizontal alignment of the title.
|
IconEnum Constants that represent the target icon image in the title or list item.
|
ItemRec Structure that represent the various attributes of the item, which is called "item structure".
|
TextEnum Constants that represent the target text in the title or list item.
|
VerticalEnum Constants that represent the vertical alignment of the title.
|
[ protected, explicit ] SFZComboBoxControl(Void);
This constructor performs the initializations as follows:
Table 222. Event handlers regitered into this combo box control
Event | Content of the handler |
---|---|
State event [SFEVT_RESPONDER_STATE] which will occur when this combo box control becomes focused | Start to scroll the title |
State event [SFEVT_RESPONDER_STATE] which will occur when this combo box control becomes unfocused | Stop to scroll the title |
State event [SFEVT_RESPONDER_STATE] which will occur when the button press state set with SFYButtonControl::GetStatePress is set | If the button press state is "true", place the shadow region in the top and left edges of this combo box control. Otherwise, place it in the right and bottom edges. |
Value event [SFEVT_RESPONDER_STATE] which will occur when the current value is changed | Set the title of this combo box control to the currently selected item of the flex list box control. |
Note | |
---|---|
In a responder inheriting from SFZComboBoxControl, the corresponding handler will be called when one of the above events occurs. |
Table 223. Event handlers regitered into the flex list box control
Event | Content of the handler |
---|---|
Result Event[SFEVT_RESPONDER_RESULT] | Set the flex list box control's parent to "SFYResponderSmp::EmptyInstance()" and set its state to "invisible". Set the current value of this combo box control to that of the flex list box control. Set the this combo box control's state to "focused". And send the result event[SFXEvent(SFEVT_RESPONDER_RESULT, SFP16_RESULT_OK, GetCurrentValue()), false)]. |
SFYResponder::SetType | SFZComboBoxControl::CodeEnum | SFZComboBoxControl::SetArrowColor | SFZComboBoxControl::SetFont | SFZComboBoxControl::SetTitleColor | SFZComboBoxControl::SetSpaceSize | SFZComboBoxControl::SetHorizontalAlign | SFZComboBoxControl::SetVerticalAlign | SFZComboBoxControl::SetScrollDirection | SFZComboBoxControl::SetScrollInterval | SFZComboBoxControl::SetScrollStep | SFZComboBoxControl::SetWaitInterval | SFZComboBoxControl::HorizontalEnum | SFZComboBoxControl::VerticalEnum | SFZComboBoxControl::DirectionEnum | SFZComboBoxControl::DefaultEnum | SFYButtonControl::SetStatePress | SFYControl::SetCurrentValue | SFZFlexListBoxControl::NewInstance | SFXRGBColor | SFXEvent | Type | State | Event | State Event[SFEVT_RESPONDER_STATE] | Result Event[SFEVT_RESPONDER_RESULT] | Value Event[SFEVT_RESPONDER_VALUE]
[ protected, virtual ] virtual ~SFZComboBoxControl(Void);
This destructor does nothing.
[ 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 item // text );
[ public ] SFCError Append( SFXWideStringConstRef item // text AVKType key // access key WChar keyIcon = 0 // key icon );
This function inserts an item at the tail of the flex list box control(SFZFlexListBoxControl) which this combo box control contains internally.
Caution | |
---|---|
Since this function is deprecated, use the SFZComboBoxControl::InsertLast function instead. |
SFZComboBoxControl::InsertLast | SFZComboBoxControl::Remove | SFZComboBoxControl::Clear | SFZFlexListBoxControl
[ public ] Void Clear(Void);
This function removes all items in the flex list box control(SFZFlexListBoxControl) which this combo box control contains internally.
SFZComboBoxControl::InsertLast | SFZComboBoxControl::Insert | SFZComboBoxControl::InsertFirst | SFZComboBoxControl::Append | SFZComboBoxControl::Remove | SFZFlexListBoxControl
[ protected, const ] Void DrawTab( SFXGraphicsPtr graphics // graphics object SFXRectangleConstRef rectangle // region to draw the reverse triangle of this combo box control );
This function draws the reverse triangle of this combo box control in the specified region.
In case you want to perform your own processing, override this function.
Tip | |
---|---|
This function will be called in the SFZComboBoxControl::HandleRenderRequest function. |
Internal implementation of the SFZComboBoxControl::DrawTab function is as follows:
/*protected */Void SFZComboBoxControl::DrawTab(SFXGraphicsPtr graphics, SFXRectangleConstRef rectangle) const { SInt16 W(rectangle.GetWidth()); SInt16 H(rectangle.GetHeight()); SInt16 h(H / 4 - 1); SInt16 w(h * 2); SInt16 x(rectangle.GetX() + (W - w) / 2); SInt16 y(rectangle.GetY() + (H - h) / 2); SFXRGBColor rgb(GetArrowColor()); SFXTriangle triangle; triangle.Set(x, y, x + w, y, x + w / 2, y + h); if (!GetStateActive(true)) { (rgb.GetBrightness() > 0x7F) ? rgb.SubRGB(0x44) : rgb.AddRGB(0x44); } graphics->FillTriangle(triangle, rgb); return; }// SFZComboBoxControl::DrawTab //
[ public, const ] SFXRGBColorConstRef GetArrowColor(Void);
Color(SFXRGBColor) of reverse triangle on the pull-down button of this combo box control.
[ public, const ] AEEFont GetFont(Void);
Font of the text of this combo box control and the flex list box control(SFZFlexListBoxControl), which this combo box control contains internally.
This function gets the font of this combo box control.
[ public, const ] HorizontalEnum GetHorizontalAlign(Void);
Value of horizontal alignment of the title.
Access key for the specified item of the flex list box control(SFZFlexListBoxControl) which this combo box control contains internally.
"0" will be returned if the access key is not set.
[ public, const ] SInt16 GetItemCount(Void);
Number of items in the flex list box control(SFZFlexListBoxControl) which this combo box control contains internally.
SFZComboBoxControl::Append | SFZComboBoxControl::Remove | SFZComboBoxControl::Clear | SFZFlexListBoxControl
[ public, const ] SFBImageSmpConstRef GetItemIconImage( SInt32 index // index of item IconEnum iconEnum // icon enum );
Icon image specified by the icon constant(SFZComboBoxControl::IconEnum) of item in the flex list box control(SFZFlexListBoxControl) which this combo box control contains internally.
This function gets the icon image of the specified icon enum(SFZFlexListBoxControl::IconEnum) of the specified item of the flex list box control(SFZFlexListBoxControl), which this combo box control contains internally.
SFZComboBoxControl::IconEnum | SFZComboBoxControl::SetItemIconImage | SFZFlexListBoxControl
[ public, const ] SFXWideStringConstRef GetItemText( SInt32 index // index of item TextEnum textEnum // text enum );
[ public, const ] SFXWideStringConstRef GetItemText( SInt32 index // index of item );
Text of the specified item in the flex list box control(SFZFlexListBoxControl) which this combo box control contains internally.
This function gets the text of the specified text enum(SFZComboBoxControl::TextEnum) of a specified item in the flex list box control(SFZFlexListBoxControl), which is contained internally by this combo box control.
If the textEnum argument is omitted, the Body text of the list item is gotten.
[ public, const ] SFZFlexListBoxControlSmpConstRef GetListBoxControl(Void);
Flex list box control(SFZFlexListBoxControl) which this combo box control contains internally.
This function gets the flex list box control(SFZFlexListBoxControl) which this combo box control contains internally.
The developer can change the background color or the foregraound color of an item using the flex list box control obtained by this function.
Flex list box control | |
---|---|
For more details, refer to SFZFlexListBoxControl. |
The below is the code to enable the grid line using the flex list box control obtained by this function.
SFZComboBoxControlSmp combo; SFZFlexListBoxControlSmp list; // create combo box control if ((combo = SFZComboBoxControl::NewInstance()) != null) { // ... } // get flex list box control if ((list = combo->GetListBoxControl()) != null) { // enable grid line list->SetGridLineEnable(true); }
[ public, const ] SInt32 GetMaximumValue(Void);
Number of the items in the flex list box control of this combo box control.
This function gets the number of items in the flex list box control of this combo box control.
Caution | |
---|---|
Since this function is deprecated, use the SFZComboBoxControl::GetItemCount function instead. |
[ public, const ] DirectionEnum GetScrollDirection(Void);
[ public, const ] UInt32 GetScrollInterval(Void);
Scroll-interval. [milliseconds]
[ public, const ] SInt16 GetScrollStep(Void);
Scroll-step. [pixels]
[ public, const ] SInt16 GetSpaceSize(Void);
Space size between two elements in the title [pixels]
[ public, const ] SFXRGBColorConstRef GetTitleColor(Void);
Foreground color(SFXRGBColor) to draw the text of the title.
[ public, const ] VerticalEnum GetVerticalAlign(Void);
Value of vertical alignment of the title.
[ public, const ] UInt32 GetWaitInterval(Void);
Waiting time to start to scroll. [milliseconds]
[ protected, virtual, const ] Void HandleBoundOptimize( SFXRectanglePtr rectangle // hint region and calculated region );
This function will be called when the region event [SFXEvent(SFEVT_RESPONDER_BOUND, SFP16_BOUND_OPTIMIZE, rectangle)] is received.
This function calculates the suitable rectangle size of this responder within the specified hint rectangle[i.e., rectangle element (P32 parameter) of the region event].
The suitable rectangle size is stored into the size element of the rectangle argument as a result of calculation. It is recommended not to change the origin of the rectangle argument in this function.
Region event[(SFEVT_RESPONDER_BOUND, SFP16_BOUND_OPTIMIZE) event] | |
---|---|
If the rectangle argument of the hint region is specified, the SFYResponder::GetSuitableBound function will send the region event [SFXEvent(SFEVT_RESPONDER_BOUND, SFP16_BOUND_OPTIMIZE, rectangle)] to this responder. Then, the SFYWidget::HandleBoundOptimize virtual function will be called. The rectangle element (P32 parameter) of the region event is set to the hint region as an initial value. |
Internal implementation of the SFZComboBoxControl::HandleBoundOptimize function is as follows:
SFYFlexListItemWidgetSmp _widget; /*protected virtual */Void SFZComboBoxControl::HandleBoundOptimize(SFXRectanglePtr rectangle) const { SFXRectangle temp; temp.Set(*rectangle); rectangle->Deflate(GetShadowMargin()); rectangle->Deflate(GetButtonMargin()); rectangle->SetSize(_widget->GetSuitableBound(*rectangle).GetSize()); rectangle->Inflate(GetButtonMargin()); rectangle->Inflate(GetShadowMargin()); rectangle->AddWidth(rectangle->GetHeight()); if (rectangle->GetWidth() > temp.GetWidth()) { rectangle->SetWidth(temp.GetWidth()); } return; }// SFZComboBoxControl::HandleBoundOptimize //
SFYResponder::GetSuitableBound | SFXEvent | Region Event[SFEVT_RESPONDER_BOUND] | Handler for the Region Event[XANDLER_DECLARE_VOIDBOUND]
[ protected, virtual, const ] Void HandleBoundRequest( SFXRectanglePtr rectangle // calculated region );
This function will be called when the region event [SFXEvent(SFEVT_RESPONDER_BOUND, SFP16_BOUND_REQUEST, rectangle)] is received.
This function calculates the suitable rectangle size of this responder.
The suitable rectangle size is stored into the size element of the rectangle argument as a result of calculation. It is recommended not to change the origin element of the rectangle argument within this function.
Region event[(SFEVT_RESPONDER_BOUND, SFP16_BOUND_REQUEST) event] | |||||
---|---|---|---|---|---|
If the rectangle argument of the hint region is not specified, the SFYResponder::GetSuitableBound function will send the region event [SFXEvent(SFEVT_RESPONDER_BOUND, SFP16_BOUND_REQUEST, rectangle)] to this responder. Then, the SFYWidget::HandleBoundRequest virtual function will be called. The rectangle element (P32 parameter) of the region event is set to the real region as an initial value.
|
Internal implementation of the SFZComboBoxControl::HandleBoundRequest function is as follows:
SFYFlexListItemWidgetSmp _widget; /*protected virtual */Void SFZComboBoxControl::HandleBoundRequest(SFXRectanglePtr rectangle) const { rectangle->Deflate(GetShadowMargin()); rectangle->Deflate(GetButtonMargin()); rectangle->SetSize(_widget->GetSuitableBound().GetSize()); rectangle->Inflate(GetButtonMargin()); rectangle->Inflate(GetShadowMargin()); rectangle->AddWidth(rectangle->GetHeight()); return; }// SFZComboBoxControl::HandleBoundRequest //
SFYResponder::GetSuitableBound | SFXEvent | Real Region Region Event[SFEVT_RESPONDER_BOUND] | Handler for the Region Event[XANDLER_DECLARE_VOIDBOUND]
[ protected, virtual ] Void HandleBoundVirtual(Void);
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event is received.
In case you want to perform your own processing when the virtual region is changed, override this virtual function.
The default implementation is to equalize the real region with the new local region and relocate this responder to fit into the new virtual region.
Sending the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event | |
---|---|
The (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event will occur when the virtual region is changed by calling the SFYResponder::SetRealBound or SFYResponder::SetVirtualBound function. |
Another method when the virtual region is changed | |
---|---|
Other than overriding this virtual function, it is possible to define and implement the handler for region event[XANDLER_DECLARE_VOIDBOUND], and register it into the responder. In the processing when the virtual region is updated, this virtual function is executed first, and next the handlers for region event are executed in the registered order. In almost all cases, the method to override this virtual function is adopted since defining, implementing and registering the handler for region event can be omitted. |
Internal implementation of the SFZComboBoxControl::HandleBoundVirtual function is as follows:
/*protected virtual */Void SFZComboBoxControl::HandleBoundVirtual(Void) { Relocate(); if (_listbox->GetStateVisible()) { RelocateListBox(); } return; }// SFZComboBoxControl::HandleBoundVirtual // /*private */Void SFZComboBoxControl::Relocate(Void) { SFXRectangle lx; lx.Set(GetLocalBound()); lx.SubRight(lx.GetHeight()); lx.Deflate(GetShadowMargin()); lx.Deflate(GetButtonMargin()); if (GetStatePress()) { lx.Offset(GetPressOffset()); } _widget->SetRealBound(lx); return; }// SFZComboBoxControl::Relocate // /*private */Void SFZComboBoxControl::RelocateListBox(Void) { SFXRectangle rx; SFXRectangle px; SFXRectangle sx; SFYResponderSmp parent(GetParent()); if (parent != null) { rx.Set(GetRealBound()); px.Set( SFXRectangle(parent->GetVirtualBound()).GetLeftTop().Neg(), parent->GetRealBound().GetSize() ); sx.Set(SFXRectangle(rx.GetX(), px.GetY(), rx.GetWidth(), px.GetHeight())); sx.Set(_listbox->GetSuitableBound(sx)); sx.SetWidth(rx.GetWidth()); if (sx.GetHeight() < px.GetHeight()) { sx.SetY(rx.GetBottom()); if (sx.GetBottom() > px.GetBottom()) { sx.SubY(sx.GetBottom() - px.GetBottom()); } } _listbox->SetRealBound(sx); } return; }// SFZComboBoxControl::ReLocateListBox //
SFYResponder::SetRealBound | SFYResponder::SetVirtualBound | Region Event[SFEVT_RESPONDER_BOUND] | Handler for the Region Event[XANDLER_DECLARE_VOIDBOUND] | Virtual Region | Real Region | Local Region
[ protected, virtual ] Void HandleOperateKeyRelease(Void);
This function will be called when the SFEVT_KEY_RELEASE event(key event[SFEVT_KEY]) of the operaion key set with the SFYButtonControl::SetOperateKey function is received.
In case you want to perform your own processing, override this function.
The default implementation is to display the flex list box control(SFZFlexListBoxControl) which this combo box control contains internally.
Internal implementation of the SFZComboBoxControl::HandleOperateKeyRelease function is as follows:
SFZFlexListBoxControlSmp _listbox; /*protected virtual */Void SFZComboBoxControl::HandleOperateKeyRelease(Void) { SetStateFocus(false); _listbox->SetParent(GetThis()->GetParent()); _listbox->SetState(true, true, true, true); _listbox->SetCurrentValue(GetCurrentValue()); RelocateListBox(); _listbox->ToFront(); return; }// SFZComboBoxControl::HandleOperateKeyRelease /*private */Void SFZComboBoxControl::RelocateListBox(Void) { SFXRectangle rx; SFXRectangle px; SFXRectangle sx; SFYResponderSmp parent(GetParent()); if (parent != null) { rx.Set(GetRealBound()); px.Set( SFXRectangle(parent->GetVirtualBound()).GetLeftTop().Neg(), parent->GetRealBound().GetSize() ); sx.Set(SFXRectangle(rx.GetX(), px.GetY(), rx.GetWidth(), px.GetHeight())); sx.Set(_listbox->GetSuitableBound(sx)); sx.SetWidth(rx.GetWidth()); if (sx.GetHeight() < px.GetHeight()) { sx.SetY(rx.GetBottom()); if (sx.GetBottom() > px.GetBottom()) { sx.SubY(sx.GetBottom() - px.GetBottom()); } } _listbox->SetRealBound(sx); } return; }// SFZComboBoxControl::ReLocateListBox //
[ protected, virtual, const ] Void HandleRenderRequest( SFXGraphicsPtr graphics // graphic object );
This function will be called when the (SFEVT_RESPONDER_RENDER, SFP16_RENDER_REQUEST) event is received.
In case you want to perform your own drawing of this responder, override this function.
The default implementation is to draw this responder.
The method to darw a responder | |
---|---|
In addition to overriding this virtual function, it is possible to define and implement the handler for drawing event(drawing handler)[XANDLER_DECLARE_VOIDRENDER], and register it into the responder. Then, the overridden virtual function will be called first, and next the drawing handlers registered into the responder will be booted up in the registered order. In almost all cases, the method to override this function is used to draw the responder since there is no need to declare and register the drawing handler. |
Procedure of drawing a responder | |
---|---|
The drawing handler will be booted up when the drawing event(SFEVT_RESPONDER_RENDER) occurs. And then the drawing handler draw the responder actually. The drawing event will be sent to only the responders including the region to be redrawn out of the redraw regions registered into the renderer using the SFYResponder::InvokeBackward function after the SFYResponder::Render function boots up the renderer. Here, the SFYResponder::Render function will be called at the following situations:
If calling the SFYResponder::Render function with specifying "true" as an argument, the drawing event will be sent to all the responders to be actually displayed on the screen which are located below the responder in the responder tree, regardless of the registration of redraw region. |
Internal implementation of the SFZComboBoxControl::HandleRenderRequest function is as follows:
/*protected virtual */Void SFZComboBoxControl::HandleRenderRequest(SFXGraphicsPtr graphics) const { SFXRectangle lx; SFXRectangle wx; lx.Set(DrawShadow(graphics, GetLocalBound())); wx.Set(lx.GetOrigin(), lx.GetWidth() - lx.GetHeight(), lx.GetHeight()); DrawButton(graphics, wx); DrawButton(graphics, lx.SetLeft(wx.GetRight())); DrawTab(graphics, lx); return; }// SFZComboBoxControl::HandleRenderRequest //
SFZComboBoxControl::DrawTab | SFYButtonControl::DrawButton | SFYButtonControl::DrawShadow | SFZComboBoxControl::SetTitleColor | SFZComboBoxControl::SetArrowColor | SFYButtonControl::SetButtonColor | SFYButtonControl::SetFocusColor | SFYButtonControl::SetShadowColor | SFYButtonControl::SetOperateKey | SFZListBoxControl | SFYControl::GetCurrentValue | SFYWidget | SFYResponder::Invalidate | SFYResponder::Render | SFYResponder::InvokeBackward | Drawing Event[SFEVT_RESPONDER_RENDER] | Handler for the Drawing Event[XANDLER_DECLARE_VOIDRENDER] | Rendering | State
[ public ] SFCError Insert( SInt32 index // index of item ItemRecConstRef item // item structure );
[ public ] SFCError Insert( SInt32 index // index of item ItemRecConstPtr item // pointer to item structure SInt32 length // number of items to insert );
[ public ] SFCError Insert( SInt32 index // index of item SFXWideStringConstRef text // body string );
[ public ] SFCError Insert( SInt32 index // index of item SFXWideStringConstPtr text // pointer to body string SInt32 length // number of items to insert );
This function inserts the specified item at the specified index of the flex list box control(SFZFlexListBoxControl), which this combo box control contains internally.
Note | |
---|---|
The numuber of items can be obtained by calling the SFZComboBoxControl::GetItemCount function. |
SFZComboBoxControl::InsertFirst | SFZComboBoxControl::InsertLast | SFZComboBoxControl::Remove | SFZComboBoxControl::Clear | SFZComboBoxControl::GetItemCount | SFZComboBoxControl::ItemRec | SFZFlexListBoxControl
[ public ] SFCError InsertFirst( ItemRecConstRef item // item structure );
[ public ] SFCError InsertFirst( ItemRecConstPtr item // pointer to item structure SInt32 length // number of items to insert );
[ public ] SFCError InsertFirst( SFXWideStringConstRef text // body string );
[ public ] SFCError InsertFirst( SFXWideStringConstPtr text // pointer to body string SInt32 length // number of items to insert );
This function inserts the specified item at the head of the flex list box control(SFZFlexListBoxControl), which this combo box control contains internally.
Note | |
---|---|
The numuber of items can be obtained by calling the SFZComboBoxControl::GetItemCount function. |
SFZComboBoxControl::ItemRec | SFZComboBoxControl::Insert | SFZComboBoxControl::InsertLast | SFZComboBoxControl::Remove | SFZComboBoxControl::Clear | SFZComboBoxControl::GetItemCount | SFZFlexListBoxControl
[ public ] SFCError InsertLast( ItemRecConstRef item // item structure );
[ public ] SFCError InsertLast( ItemRecConstPtr item // pointer to item structure SInt32 length // number of items to insert );
[ public ] SFCError InsertLast( SFXWideStringConstRef text // body string );
[ public ] SFCError InsertLast( SFXWideStringConstPtr text // pointer to body string SInt32 length // number of items to insert );
This function inserts the specified item at the tail of the flex list box control(SFZFlexListBoxControl), which this combo box control contains internally.
Note | |
---|---|
The numuber of items can be obtained by calling the SFZComboBoxControl::GetItemCount function. |
SFZComboBoxControl::ItemRec | SFZComboBoxControl::Insert | SFZComboBoxControl::InsertFirst | SFZComboBoxControl::Remove | SFZComboBoxControl::Clear | SFZComboBoxControl::GetItemCount | SFZFlexListBoxControl
[ public, static ] SFZComboBoxControlSmp NewInstance( SFCErrorPtr exception = null // error value );
Return the error value generated inside the function.
This function creates a new instance of this responder class.
If succeeds, a not null pointer will be returned, and the "exception" argument is SFERR_NO_ERROR. If fails such as insufficient memory, a null pointer will be returned, and the "exception" argument holds the error value.
The code to create a new instance of this responder class is as follows:
SFZComboBoxControlSmp _combobox;
SFCError error;
if ((_combobox = SFZComboBoxControl::NewInstance(&error)) != null) {
...
}
[ public ] Void Remove( SInt32 begin // beginning index to remove(this index is included) SInt32 end // ending index to remove(this index is not included) );
[ public ] Void Remove( SInt32 index // index of item to delete );
This function removes specified items from the flex list box control(SFZFlexListBoxControl), which this combo box control contains internally.
If the specified index is less than 0 or greater than or equals the number of items, no item will be removed
If the beginning index to remove is greater than or equals the number of items or the ending index to remove is less than or equals 0, no item will be removed
If the beginning index to remove is less than or equals 0, it will be reset to 0.
If the ending index to remove is greater than the number of items, it will be reset to the number of items.
Note | |
---|---|
The numuber of items can be obtained by calling the SFZComboBoxControl::GetItemCount function. |
SFZComboBoxControl::Clear | SFZComboBoxControl::RemoveFirst | SFZComboBoxControl::RemoveLast | SFZComboBoxControl::Insert | SFZComboBoxControl::GetItemCount | SFZFlexListBoxControl
[ public ] Void RemoveFirst(Void);
This function removes the first item from this combo box control.
Note | |
---|---|
The numuber of items can be obtained by calling the SFZComboBoxControl::GetItemCount function. |
SFZComboBoxControl::Clear | SFZComboBoxControl::Remove | SFZComboBoxControl::RemoveLast | SFZComboBoxControl::InsertFirst | SFZComboBoxControl::GetItemCount | SFZFlexListBoxControl
[ public ] Void RemoveLast(Void);
This function removes the last item from this combo box control.
Note | |
---|---|
The numuber of items can be obtained by calling the SFZComboBoxControl::GetItemCount function. |
SFZComboBoxControl::Clear | SFZComboBoxControl::Remove | SFZComboBoxControl::RemoveFirst | SFZComboBoxControl::InsertLast | SFZComboBoxControl::GetItemCount | SFZFlexListBoxControl
[ public ] Void SetArrowColor( SFXRGBColorConstRef param // color of the down arrow );
This function sets the color(SFXRGBColor) of reverse triangle on the pull-down button to the specified value.
Default: SFXRGBColor(0x00, 0x00, 0x00, 0x00)[black color]
In the "inactive" state, the reverse triangle will be drawn in the color of which each RGB value is subtracted 0x44 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 0x44 on the color set with this function.
Brightness of the color | |
---|---|
The brightness of color can be obtained by calling the SFXRGBColor::GetBrightness function. |
SFZComboBoxControl::GetArrowColor | SFXRGBColor::GetBrightness | SFXRGBColor | State
[ public ] Void SetFont( TextEnum textEnum // text enum AEEFont param // font );
[ public ] Void SetFont( AEEFont param // font );
This function sets font of the title and the flex list box control(SFZFlexListBoxControl) to the specified value, which this combo box control contains internally.
Default: AEE_FONT_NORMAL
[ public ] Void SetHorizontalAlign( HorizontalEnum param // horizontal alignment of the title );
This function sets the horizontal alignment of the title to the specified value.
Default: SFZComboBoxControl::DEFAULT_HORIZONTAL
For the value of SFZComboBoxControl::DEFAULT_HORIZONTAL, refer to SFZComboBoxControl::HorizontalEnum.
[ public ] SFCError SetItemAccessKey( SInt32 index // index of item AVKType key // access key WChar keyIcon = 0 // icon character for access key );
This function sets the access key and its icon character for the specified item of the flex list box control(SFZFlexListBoxControl) to the specified value, which this combo box control contains internally.
The below is the code to set the access key and its icon character to the item of the flex list box control of the combo box control.
// set AVK_1 as access key, 0xFBF6 as its icon character to first item of flex list box control
_combobox->SetItemAccessKey(0, AVK_1, 0xFBF6);
[ public ] SFCError SetItemIconImage( SInt32 index // index of item IconEnum iconEnum // icon enum SFXPathConstRef path // path to resource file );
[ public ] SFCError SetItemIconImage( SInt32 index // index of item IconEnum iconEnum // icon enum SFXPathConstRef path // path to resource file UInt16 id // resource ID );
[ public ] SFCError SetItemIconImage( SInt32 index // index of item IconEnum iconEnum // icon enum SFBImageSmpConstRef param // icon image );
This function sets the icon image of the specified icon enum(SFZFlexListBoxControl::IconEnum) of the specified item of the flex list box control(SFZFlexListBoxControl) to the specified value(SFZComboBoxControl::IconEnum), which this combo box control contains internally.
SFZComboBoxControl::GetItemIconImage | SFZFlexListBoxControl | SFZComboBoxControl::IconEnum
[ public ] SFCError SetItemText( SInt32 index // index of list item TextEnum textEnum // text enum SFXPathConstRef path // path to resource file UInt16 id // resource ID );
[ public ] SFCError SetItemText( SInt32 index // index of list box item TextEnum textEnum // text enum SFXWideStringConstRef param // text );
[ public ] SFCError SetItemText( SInt16 index // index of list item SFXPathConstRef path // path to resource file UInt16 id // resource id );
[ public ] SFCError SetItemText( SInt16 index // index of list item SFXWideStringConstRef item // text );
This function sets the text of the specified text enum(SFZComboBoxControl::TextEnum) of a specified item in the flex list box control(SFZFlexListBoxControl) to the specified value, which is contained internally by this combo box control.
If the textEnum argument is omitted, the Body text of the list item is set.
[ public ] Void SetScrollDirection( DirectionEnum param // scroll direction of the title );
This function sets the scroll direction of the title to the specified value.
Default: SFZComboBoxControl::DEFAULT_DIRECTION
For the value of SFZComboBoxControl::DEFAULT_DIRECTION, refer to SFZComboBoxControl::DirectionEnum.
This function sets the scroll-interval of the title to the specified value. [milliseconds]
Default: SFZComboBoxControl::DEFAULT_SCROLL [milliseconds]
For the value of SFZComboBoxControl::DEFAULT_SCROLL, refer to SFZComboBoxControl::DefaultEnum.
This function sets the number of pixels of each scroll to the specified value. 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: SFZComboBoxControl::DEFAULT_STEP [pixels]
For the value of SFZComboBoxControl::DEFAULT_STEP, refer to SFZComboBoxControl::DefaultEnum.
This function sets the space size between two elements in the title of this combo box control as the figure below to the specified value. [pixels]
Default: 2 [pixels]
[ public ] Void SetTitleColor( SFXRGBColorConstRef param // text color of the title );
This function sets the color(SFXRGBColor) of the title to the specified value.
Default: SFXRGBColor(0x00, 0x00, 0x00, 0x00) [black color]
[ public ] Void SetVerticalAlign( VerticalEnum param // vertical alignment of the title );
This function sets the vertical alignment of the title to the specified value.
Default: SFZComboBoxControl::DEFAULT_VERTICAL
For the value of SFZComboBoxControl::DEFAULT_VERTICAL, refer to SFZComboBoxControl::VerticalEnum.
This function sets the waiting time to start to scroll the title to the specified value. [milliseconds]
Default: SFZComboBoxControl::DEFAULT_WAIT [milliseconds]
For the value of SFZComboBoxControl::DEFAULT_WAIT, refer to SFZComboBoxControl::DefaultEnum.
[ public ] Void StartScroll(Void);
This function starts to scroll the title.
If the width of the text is greater than that of the virtual region, the title will start to scroll.
Otherwise, the title will not scroll.
Though the SFEVT_APP_SUSPEND event and the SFEVT_APP_RESUME event will be automatically handled, the behaviour of this function is not defined when called between the SFEVT_APP_SUSPEND event and the SFEVT_APP_RESUME event.
[ public ] Void StopScroll(Void);
This function stops to scroll the title.
enum CodeEnum { CODE_TYPE = four_char_code('c', 'c', 'm', 'b') }; SFMTYPEDEFTYPE(CodeEnum)
enum DefaultEnum { DEFAULT_WAIT = 1000, // waiting time to start the scroll [milliseconds] DEFAULT_SCROLL = 100, // scroll-interval [milliseconds] DEFAULT_STEP = -1 // scroll-step [pixels] }; SFMTYPEDEFTYPE(DefaultEnum)
enum DirectionEnum { DIRECTION_LEFT = 0, // scroll left DIRECTION_RIGHT = // scroll right DEFAULT_DIRECTION = DIRECTION_LEFT // Default: scroll left }; SFMTYPEDEFTYPE(DirectionEnum)
enum HorizontalEnum { HORIZONTAL_LEFT = 0, // left-aligned HORIZONTAL_CENTER = // center-aligned HORIZONTAL_RIGHT = // right-aligned DEFAULT_HORIZONTAL = HORIZONTAL_CENTER // default: center-aligned }; SFMTYPEDEFTYPE(HorizontalEnum)
enum IconEnum { ICON_BODY_NORMAL = 0, ICON_BODY_SELECT, ICON_FOOTER_NORMAL, ICON_FOOTER_SELECT, ICON_LIMIT }; SFMTYPEDEFTYPE(IconEnum)
ICON_BODY_NORMAL: body icon image in not selecting
ICON_BODY_SELECT: body icon in selecting (not used for the title)
ICON_FOOTER_NORMAL: footer icon image in not selecting
ICON_FOOTER_SELECT: footer icon in selecting (not used for the title)
SFMTYPEDEFSTRUCT(ItemRec) struct ItemRec { ItemPartRec normal; // attributes of unselected item // SFXWideString normal.header.text; // SFXWideString normal.body.text; // SFBImageSmp normal.body.icon; // SFBImageSmp normal.footer.icon; ItemPartRec select; // attributes of the unselect item // SFXWideString select.header.text; // SFXWideString select.body.text; // SFBImageSmp select.body.icon; // SFBImageSmp select.footer.icon; PropertyRec propery; // properties // UInt32 id; // AVKType key; // Bool enable; };
An item can be inserted into this combo box control using this item structure.
enum VerticalEnum { VERTICAL_TOP = 0, // top-aligned VERTICAL_MIDDLE = // center-aligned VERTICAL_BOTTOM = // bottom-aligned DEFAULT_VERTICAL = VERTICAL_MIDDLE // default: center-aligned }; SFMTYPEDEFTYPE(VerticalEnum)
enum TextEnum { TEXT_HEADER_NORMAL = 0, TEXT_HEADER_SELECT, TEXT_BODY_NORMAL, TEXT_BODY_SELECT, TEXT_LIMIT }; SFMTYPEDEFTYPE(TextEnum)
TEXT_HEADER_NORMAL: header string in not selecting
TEXT_HEADER_SELECT: header string in selecting (not used for the title)
TEXT_BODY_NORMAL: body string in not selecting
TEXT_BODY_SELECT: body string in selecting (not used for the title)
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |