SophiaFramework UNIVERSE 5.3 |
#include <SFRComboboxControl.hpp>
class SFRComboboxControl : public SFRButtonBase;
SFMTYPEDEFCLASS(SFRComboboxControl)
The combobox control is used to select an item in the list.
The combobox control can display the string of the title, and set the color of selected part with SFRComboboxControl::ColorEnum.
Access key can be also specified.
The code to use the combobox control is as below:
SFMTYPEDEFCLASS(UserClass) class UserClass : public SFRPlainWindow { // the constructor etc. is omitted private: Void Main (Void); HANDLER_DECLARE_VOIDCONTROL(ComboboxHandler) }; Void UserClass::Main(Void) { SFRComboboxControlPtr combobox; SFXWideString item[] = {"item1", "item2", "item3"}; combobox = new SFRComboboxControl(window, SFXRectangle(5, 5, 48, 16), item, lengthof(item)); combobox->RegisterHandler(SREVT_CONTROL, HANDLER_BEFORE, HANDLER_FUNCTION(ComboboxHandler)); // specify the access key of item1 combobox->SetAccessKey(0, AVK_1, 0x69F7); // set the color of combo-box // use the default color if there is no color setting combobox->SetColor(SFRComboboxControl::COLOR_BUTTON_LIGHT, SFXRGBColor(0x99, 0x99, 0x99, 0x00)); combobox->SetColor(SFRComboboxControl::COLOR_BUTTON_BASE, SFXRGBColor(0x66, 0x66, 0x66, 0x00)); combobox->SetColor(SFRComboboxControl::COLOR_BUTTON_SHADOW, SFXRGBColor(0x33, 0x33, 0x33, 0x00)); combobox->SetColor(SFRComboboxControl::COLOR_BUTTON_TITLE, SFXRGBColor(0xBB, 0xBB, 0xBB, 0x00)); combobox->SetColor(SFRComboboxControl::COLOR_MENU_LIGHT, SFXRGBColor(0x99, 0x99, 0x99, 0x00)); combobox->SetColor(SFRComboboxControl::COLOR_MENU_BASE, SFXRGBColor(0x66, 0x66, 0x6, 0x006)); combobox->SetColor(SFRComboboxControl::COLOR_MENU_SHADOW, SFXRGBColor(0x33, 0x33, 0x33, 0x00)); combobox->SetColor(SFRComboboxControl::COLOR_MENU_TITLE, SFXRGBColor(0xBB, 0xBB, 0xBB, 0x00)); return; } HANDLER_IMPLEMENT_VOIDCONTROL(UserClass, ComboboxHandler, result, control) { { // this handler runs when the menu of combo-box is selected return; }
SFRResponder | SFRApplication | SFRWindow | SFRDialog | SFRControl | Combo Box
Constructor/Destructor |
---|
SFRComboboxControl(
SFRResponderPtr director
, SFXRectangleConstRef rect
, SFXWideStringConstPtr item
, SInt16 limit
, BehaviorType behavior = BEHAVIOR_SFRCOMBOBOXCONTROL
, SFCType attribute = ATTRIBUTE_SFRCOMBOBOXCONTROL
)
Constructor of the SFRComboboxControl class.
|
~SFRComboboxControl( Void ) Destructor of the SFRComboboxControl class.
|
Public Functions | |
---|---|
SFCError |
AppendItem(
SFXWideStringConstPtr item
, SInt16 limit
) Append the specified items onto the combobox menu.
|
SFCError |
AppendItem(
SFXWideStringConstRef title
, UInt16 key
, WChar icon = 0x0000
) Append the specified items onto the combobox menu.
|
Void |
ClearItem( Void ) Clear the combobox, delete all items.
|
UInt16 |
GetAccessKey(
SInt16 index
) Get the registered access key of the item.
|
SFXRGBColorConstRef |
GetColor(
ColorType index
) Get the color.
|
AEEFont |
GetFont( Void ) Get the font.
|
SFXWideString |
GetTitle(
SInt16 index
) Get the title of item.
|
SInt16 |
GetValue( Void ) Get the current value.
|
Void |
RemoveItem(
SInt16 index
) This function remove an item from the combo-box menu.
|
Void |
SetAccessKey(
SInt16 index
, UInt16 key
, WChar icon = 0x0000
) Set the access key of item.
|
Void |
SetBaseBound(
SFXRectangleConstRef rect
) Set the base region with the coordinate of virtual region of parent responder.
|
Void |
SetColor(
ColorType index
, SFXRGBColorConstRef color
) Set the color.
|
Void |
SetFont(
AEEFont font
) Set the font.
|
SFCError |
SetItem(
SFXWideStringConstPtr item
, SInt16 limit
) Set the specified items.
|
Void |
SetItem(
SInt16 index
, SFXWideStringConstRef title
, UInt16 key
, WChar icon = 0x0000
) Set the specified items.
|
Void |
SetTitle(
SInt16 index
, SFXWideStringConstRef title
) Set the title of item.
|
Void |
SetValue(
SInt16 value
) Set the current value of combobox.
|
Bool |
ClearHandler( Void )
(inherits from SFRResponder)
[Handler] Clear the " Targeted " status of responder, or destroy the responder.
|
Bool |
Compare(
SFCType type
, SFCType attribute
, BehaviorType behavior
)
(inherits from SFRResponder)
Compare with type, attribute and behavior.
|
Bool |
FocusDown(
Bool repeat = true
)
(inherits from SFRResponder)
Focus down to the next responder.
|
Bool |
FocusDownHandler( Void )
(inherits from SFRResponder)
[Handler] Focus down to the next responder.
|
Bool |
FocusLeft(
Bool repeat = true
)
(inherits from SFRResponder)
Focus left to the next responder.
|
Bool |
FocusLeftHandler( Void )
(inherits from SFRResponder)
[Handler] Focus left to the next responder.
|
Bool |
FocusNext(
Bool repeat = true
)
(inherits from SFRResponder)
Focus to the next sibling responder.
|
Bool |
FocusNextHandler( Void )
(inherits from SFRResponder)
[Handler] Focus to the next sibling responder.
|
Bool |
FocusPrevious(
Bool repeat = true
)
(inherits from SFRResponder)
Focus to the previous sibling responder.
|
Bool |
FocusPreviousHandler( Void )
(inherits from SFRResponder)
[Handler] Focus to the previous sibling responder.
|
Bool |
FocusRight(
Bool repeat = true
)
(inherits from SFRResponder)
Focus right to the next responder.
|
Bool |
FocusRightHandler( Void )
(inherits from SFRResponder)
[Handler] Focus right to the next responder.
|
Bool |
FocusUp(
Bool repeat = true
)
(inherits from SFRResponder)
Focus up to the next responder.
|
Bool |
FocusUpHandler( Void )
(inherits from SFRResponder)
[Handler] Focus up to the next responder.
|
SFCType |
GetAttribute( Void )
(inherits from SFRResponder)
Get the attribute.
|
SFRResponderPtr |
GetBack(
SFCType type = TYPE_WILDCARD
, SFCType attribute = ATTRIBUTE_WILDCARD
, BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE
)
(inherits from SFRResponder)
Get the child responder at the most background that matches the specified search condition.
|
SFXRectangleConstRef |
GetBaseBound( Void )
(inherits from SFRResponder)
Get the base region with the coordinate of content region of parent responder.
|
SFXRectangle |
GetBaseWorld( Void )
(inherits from SFRResponder)
Get the base region.
|
SFXRectangleConstRef |
GetContentBound( Void )
(inherits from SFRResponder)
Get the content region with the coordinate of base region.
|
SFXRectangle |
GetContentWorld( Void )
(inherits from SFRResponder)
Get the content region.
|
SFRResponderPtr |
GetDirector( Void )
(inherits from SFRResponder)
Get the parent responder.
|
SFRResponderPtr |
GetFocus( Void )
(inherits from SFRResponder)
Get the responder with focus in its ownership hierarchy.
|
SFXMargin |
GetFrameMargin( Void )
(inherits from SFRResponder)
Get the margin between base and content region(in pixels).
|
SFRResponderPtr |
GetFront(
SFCType type = TYPE_WILDCARD
, SFCType attribute = ATTRIBUTE_WILDCARD
, BehaviorType compare = STATUS_VISIBLE | STATUS_ENABLE
)
(inherits from SFRResponder)
Get the child responder at the most foreground that matches the specified search condition.
|
SInt16 |
GetIndexBackward(
SFCType type = TYPE_WILDCARD
, SFCType attribute = ATTRIBUTE_WILDCARD
, BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE
)
(inherits from SFRResponder)
Get the index number from the most background of responder that matches the specified search condition.
|
SInt16 |
GetIndexForward(
SFCType type = TYPE_WILDCARD
, SFCType attribute = ATTRIBUTE_WILDCARD
, BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE
)
(inherits from SFRResponder)
Get the index number from the most foreground of responder that matches the specified search condition.
|
Bool |
GetInheritEnable( Void )
(inherits from SFRResponder)
Get the " Enable / Disable " status of responder including its parent responders.
|
Bool |
GetInheritFocus( Void )
(inherits from SFRResponder)
Get the " Focused / Unfocused " status of responder including its parent responders.
|
Bool |
GetInheritTarget( Void )
(inherits from SFRResponder)
Get the " Target / Not-Target " status of responder including its parent responders.
|
Bool |
GetInheritVisible( Void )
(inherits from SFRResponder)
Get the " Visible / Invisible " status of responder including its parent responders.
|
SFRResponderPtr |
GetLeft(
SFCType type = TYPE_WILDCARD
, SFCType attribute = ATTRIBUTE_WILDCARD
, BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE
)
(inherits from SFRResponder)
Get the previous responder among the grouped responders that matches the specified search condition.
|
SInt16 |
GetMoveInterval( Void )
(inherits from SFRResponder)
Get the move interval in pixels.
|
SInt16 |
GetMoveMargin( Void )
(inherits from SFRResponder)
Get the margin pixels of content region ( or virtual region if set with the parent responder ) where the child responder cannot move.
|
SFRResponderPtr |
GetNext(
SFCType type = TYPE_WILDCARD
, SFCType attribute = ATTRIBUTE_WILDCARD
, BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE
, Bool repeat = true
)
(inherits from SFRResponder)
Get the next sibling responder that matches the specified search condition.
|
SFRResponderPtr |
GetNthBackward(
SInt16 index
, SFCType type = TYPE_WILDCARD
, SFCType attribute = ATTRIBUTE_WILDCARD
, BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE
)
(inherits from SFRResponder)
Get the Nth child responder from the most background that matches the specified search condition.
|
SFRResponderPtr |
GetNthForward(
SInt16 index
, SFCType type = TYPE_WILDCARD
, SFCType attribute = ATTRIBUTE_WILDCARD
, BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE
)
(inherits from SFRResponder)
Get the Nth child responder from the most foreground that matches the specified search condition.
|
SFRResponderPtr |
GetPrevious(
SFCType type = TYPE_WILDCARD
, SFCType attribute = ATTRIBUTE_WILDCARD
, BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE
, Bool repeat = true
)
(inherits from SFRResponder)
Get the previous sibling responder that matches the specified search condition.
|
VoidPtr |
GetReference( Void )
(inherits from SFRResponder)
Get the reference value.
|
SFRResponderPtr |
GetRight(
SFCType type = TYPE_WILDCARD
, SFCType attribute = ATTRIBUTE_WILDCARD
, BehaviorType compare = STATUS_VISIBLE|STATUS_ENABLE
)
(inherits from SFRResponder)
Get the next responder among the grouped responders that matches the specified search condition.
|
SInt16 |
GetScrollInterval( Void )
(inherits from SFRResponder)
Get the scroll interval in pixels.
|
Bool |
GetStatusEnable( Void )
(inherits from SFRResponder)
Get the value of " Enable / Disable " flag.
|
Bool |
GetStatusFocus( Void )
(inherits from SFRResponder)
Get the value of " Focused / Unfocused " flag.
|
Bool |
GetStatusTarget( Void )
(inherits from SFRResponder)
Get the value of " Target / Non-target " flag.
|
Bool |
GetStatusVisible( Void )
(inherits from SFRResponder)
Get the value of " Visible / Invisible " flag.
|
SFXGrid |
GetTranslate( Void )
(inherits from SFRResponder)
Get the origin coordinate of virtual region with the coordinate of content region.
|
SInt16 |
GetTravelMargin( Void )
(inherits from SFRResponder)
Get the margin pixels of content region inside which the rectangle in the virtual region but outside the content region should be automatically scrolled by using the SFRResponder::Travel function.
|
SFCType |
GetType( Void )
(inherits from SFRResponder)
Get the responder type.
|
SFXRectangleConstRef |
GetVirtualBound( Void )
(inherits from SFRResponder)
Get the virtual region with the coordinate of content region.
|
SFXRectangle |
GetVirtualWorld( Void )
(inherits from SFRResponder)
Get the virtual region
|
Void |
Group(
SFRResponderPtr with
)
(inherits from SFRResponder)
Group the responder with the group of which representative responder is specified as an argument.
|
Void |
GroupMove(
SFXSizeConstRef size
)
(inherits from SFRResponder)
Move all the responders grouped together.
|
Void |
GroupScroll(
SFXSizeConstRef size
)
(inherits from SFRResponder)
Scroll all the virtual regions of responders grouped together.
|
Void |
GroupSelect( Void )
(inherits from SFRResponder)
Select all the responders grouped together. ( move all of them to the most foreground )
|
Void |
GroupStatusEnable(
Bool enable
)
(inherits from SFRResponder)
Set the " Enable / Disable " status of all the responders grouped together.
|
Void |
GroupStatusVisible(
Bool visible
)
(inherits from SFRResponder)
Set the " Visible / Invisible " status of all the responders grouped together.
|
Void |
InvalidateBase( Void )
(inherits from SFRResponder)
Register an area in the base region to be redrawn.
|
Void |
InvalidateBase(
SFXRectangleConstRef rect
)
(inherits from SFRResponder)
Register an area in the base region to be redrawn.
|
Void |
InvalidateContent( Void )
(inherits from SFRResponder)
Register an area in the content region to be redrawn.
|
Void |
InvalidateContent(
SFXRectangleConstRef rect
)
(inherits from SFRResponder)
Register an area in the content region to be redrawn.
|
Void |
InvalidateVirtual( Void )
(inherits from SFRResponder)
Register an area in the virtual region to be redrawn.
|
Void |
InvalidateVirtual(
SFXRectangleConstRef rect
)
(inherits from SFRResponder)
Register an area in the virtual region to be redrawn.
|
Bool |
Invoke(
SFXEventConstRef event
)
(inherits from SFRResponder)
Send the specified event.
|
Void |
Move(
SFXSizeConstRef size
)
(inherits from SFRResponder)
Move the responder.
|
Bool |
MoveDownHandler( Void )
(inherits from SFRResponder)
[Handler] Move the responder down.
|
Bool |
MoveLeftHandler( Void )
(inherits from SFRResponder)
[Handler] Move the responder left.
|
Bool |
MoveRightHandler( Void )
(inherits from SFRResponder)
[Handler] Move the responder right.
|
Bool |
MoveUpHandler( Void )
(inherits from SFRResponder)
[Handler] Move the responder up.
|
SFCError |
RegisterHandler(
HandlerEnum timing
, SFRHandlerSPP spp
, VoidPtr ref
)
(inherits from SFRHandler)
Register a handler.
|
SFCError |
RegisterHandler(
SFCEventEnum type
, HandlerEnum timing
, SFRHandlerSPP spp
, VoidPtr ref
)
(inherits from SFRHandler)
Register a handler.
|
SFCError |
RegisterHandler(
SFCEventEnum type
, UInt16 p16
, HandlerEnum timing
, SFRHandlerSPP spp
, VoidPtr ref
)
(inherits from SFRHandler)
Register a handler.
|
SFCError |
RegisterHandler(
SFCEventEnum type
, UInt16 bp16
, UInt16 ep16
, HandlerEnum timing
, SFRHandlerSPP spp
, VoidPtr ref
)
(inherits from SFRHandler)
Register a handler.
|
SFCError |
RegisterHandler(
SFCEventEnum btype
, SFCEventEnum etype
, HandlerEnum timing
, SFRHandlerSPP spp
, VoidPtr ref
)
(inherits from SFRHandler)
Register a handler.
|
SFCError |
RegisterHandler(
SFCEventEnum btype
, SFCEventEnum endType
, UInt16 p16
, HandlerEnum timing
, SFRHandlerSPP spp
, VoidPtr ref
)
(inherits from SFRHandler)
Register a handler.
|
SFCError |
RegisterHandler(
SFCEventEnum btype
, SFCEventEnum etype
, UInt16 bp16
, UInt16 ep16
, HandlerEnum timing
, SFRHandlerSPP spp
, VoidPtr ref
)
(inherits from SFRHandler)
Register a handler.
|
SFCError |
RegisterTracer(
BehaviorType behavior
, TracerEnum trace
)
(inherits from SFRTracer)
Register the tracer.
|
SFCError |
RegisterTracer(
SFCEventEnum type
, BehaviorType behavior
, TracerEnum trace
)
(inherits from SFRTracer)
Register the tracer.
|
SFCError |
RegisterTracer(
SFCEventEnum type
, UInt16 p16
, BehaviorType behavior
, TracerEnum trace
)
(inherits from SFRTracer)
Register the tracer.
|
SFCError |
RegisterTracer(
SFCEventEnum type
, UInt16 bgnP16
, UInt16 endP16
, BehaviorType behavior
, TracerEnum trace
)
(inherits from SFRTracer)
Register the tracer.
|
SFCError |
RegisterTracer(
SFCEventEnum bgnType
, SFCEventEnum endType
, BehaviorType behavior
, TracerEnum trace
)
(inherits from SFRTracer)
Register the tracer.
|
SFCError |
RegisterTracer(
SFCEventEnum bgnType
, SFCEventEnum endType
, UInt16 p16
, BehaviorType behavior
, TracerEnum trace
)
(inherits from SFRTracer)
Register the tracer.
|
SFCError |
RegisterTracer(
SFCEventEnum bgnType
, SFCEventEnum endType
, UInt16 bgnP16
, UInt16 endP16
, BehaviorType behavior
, TracerEnum trace
)
(inherits from SFRTracer)
Register the tracer.
|
Void |
Scroll(
SFXSizeConstRef size
)
(inherits from SFRResponder)
Scroll the virtual region.
|
Bool |
ScrollDownHandler( Void )
(inherits from SFRResponder)
[Handler] Scroll the virtual region down.
|
Bool |
ScrollLeftHandler( Void )
(inherits from SFRResponder)
[Handler] Scroll the virtual region left.
|
Bool |
ScrollRightHandler( Void )
(inherits from SFRResponder)
[Handler] Scroll the virtual region right.
|
Bool |
ScrollUpHandler( Void )
(inherits from SFRResponder)
[Handler] Scroll the virtual region up.
|
Void |
Select( Void )
(inherits from SFRResponder)
Select the responder and move it to the most foreground.
|
Bool |
SelectHandler( Void )
(inherits from SFRResponder)
[Handler] Set the target status of a responder to true.
|
Void |
SetContentBound(
SFXRectangleConstRef rect
)
(inherits from SFRButtonBase)
Set the content region with the base region coordinate. [This function is not available.]
|
Void |
SetFrameMargin(
SFXMarginConstRef param
)
(inherits from SFRResponder)
Set the margin between base and content region(in pixels).
|
Void |
SetMoveInterval(
SInt16 interval
)
(inherits from SFRResponder)
Set the move interval in pixels.
|
Void |
SetMoveMargin(
SInt16 margin
)
(inherits from SFRResponder)
Set the margin pixels of content region ( or virtual region if set with the parent responder ) where the child responder cannot move.
|
Void |
SetReference(
VoidPtr ref
)
(inherits from SFRResponder)
Set the reference value.
|
Void |
SetScrollInterval(
SInt16 interval
)
(inherits from SFRResponder)
Set the scroll interval in pixels.
|
Void |
SetStatusEnable(
Bool enable
)
(inherits from SFRResponder)
Set the value of " Enable / Disable " flag.
|
Void |
SetStatusFocus(
Bool focus
)
(inherits from SFRResponder)
Set the value of " Focused / Unfocused " flag.
|
Void |
SetStatusTarget(
Bool target
)
(inherits from SFRResponder)
Set the value of " Target / Not-Target " flag.
|
Void |
SetStatusVisible(
Bool visible
)
(inherits from SFRResponder)
Set the value of " Visible / Invisible " flag.
|
Void |
SetTranslate(
SFXGridConstRef point
)
(inherits from SFRResponder)
Set the origin coordinate of virtual region with the coordinate of content region.
|
Void |
SetTravelMargin(
SInt16 margin
)
(inherits from SFRResponder)
Set the margin pixels of content region inside which the rectangle in the virtual region but outside the content region should be automatically scrolled by using the SFRResponder::Travel function.
|
Void |
SetVirtualBound(
SFXRectangleConstRef rect
)
(inherits from SFRButtonBase)
Set the virtual region with the content region coordinate. [This function is not available.]
|
Void |
Travel(
SFXRectangleConstRef rect
)
(inherits from SFRResponder)
Scroll the virtual region of responder so that the specified rectangle can get into the content region.
|
Void |
Ungroup( Void )
(inherits from SFRResponder)
Ungroup the responders which are grouped together.
|
Void |
UnregisterHandler(
HandlerEnum timing
)
(inherits from SFRHandler)
Unregister the registered handler.
|
Void |
UnregisterHandler(
SFCEventEnum type
, HandlerEnum timing
)
(inherits from SFRHandler)
Unregister the registered handler.
|
Void |
UnregisterHandler(
SFCEventEnum type
, UInt16 p16
, HandlerEnum timing
)
(inherits from SFRHandler)
Unregister the registered handler.
|
Void |
UnregisterHandler(
SFCEventEnum type
, UInt16 bgnP16
, UInt16 endP16
, HandlerEnum timing
)
(inherits from SFRHandler)
Unregister the registered handler.
|
Void |
UnregisterHandler(
SFCEventEnum bgnType
, SFCEventEnum endType
, HandlerEnum timing
)
(inherits from SFRHandler)
Unregister the registered handler.
|
Void |
UnregisterHandler(
SFCEventEnum bgnType
, SFCEventEnum endType
, UInt16 p16
, HandlerEnum timing
)
(inherits from SFRHandler)
Unregister the registered handler.
|
Void |
UnregisterHandler(
SFCEventEnum bgnType
, SFCEventEnum endType
, UInt16 bgnP16
, UInt16 endP16
, HandlerEnum timing
)
(inherits from SFRHandler)
Unregister the registered handler.
|
Void |
UnregisterTracer( Void )
(inherits from SFRTracer)
Unregister the tracer.
|
Void |
UnregisterTracer(
SFCEventEnum type
)
(inherits from SFRTracer)
Unregister the tracer.
|
Void |
UnregisterTracer(
SFCEventEnum type
, UInt16 p16
)
(inherits from SFRTracer)
Unregister the tracer.
|
Void |
UnregisterTracer(
SFCEventEnum type
, UInt16 bgnP16
, UInt16 endP16
)
(inherits from SFRTracer)
Unregister the tracer.
|
Void |
UnregisterTracer(
SFCEventEnum bgnType
, SFCEventEnum endType
)
(inherits from SFRTracer)
Unregister the tracer.
|
Void |
UnregisterTracer(
SFCEventEnum bgnType
, SFCEventEnum endType
, UInt16 p16
)
(inherits from SFRTracer)
Unregister the tracer.
|
Void |
UnregisterTracer(
SFCEventEnum bgnType
, SFCEventEnum endType
, UInt16 bgnP16
, UInt16 endP16
)
(inherits from SFRTracer)
Unregister the tracer.
|
Protected Functions | |
---|---|
Bool |
GetAppearanceTransparent( Void )
(inherits from SFRResponder)
Get the value of APPEARANCE_TRANSPARENT flag.
|
Bool |
GetPropertyClosable( Void )
(inherits from SFRResponder)
Get the value of PROPERTY_CLOSABLE flag.
|
Bool |
GetPropertyDirect( Void )
(inherits from SFRResponder)
Get the value of PROPERTY_DIRECT flag.
|
Bool |
GetPropertyMovable( Void )
(inherits from SFRResponder)
Get the value of PROPERTY_MOVABLE flag.
|
Bool |
GetPropertyScrollable( Void )
(inherits from SFRResponder)
Get the value of PROPERTY_SCROLLABLE flag.
|
Bool |
GetPropertySelect( Void )
(inherits from SFRResponder)
Get the value of PROPERTY_SELECT flag.
|
Bool |
GetPropertyTravel( Void )
(inherits from SFRResponder)
Get the value of PROPERTY_TRAVEL flag.
|
Bool |
GetStatusPress( Void )
(inherits from SFRButtonBase)
Get whether the key is pressed.
|
Void |
HandleContent(
SFXGraphicsPtr graphic
)
(inherits from SFRButtonBase)
Draw the content region.
|
Void |
HandlePress( Void )
(inherits from SFRButtonBase)
Run when the key is pressed.
|
Void |
HandleRelease( Void )
(inherits from SFRButtonBase)
Run when the key is released.
|
Void |
InvalidateButton( Void )
(inherits from SFRButtonBase)
Register the button region as update region.
|
HandlerRecConstPtr |
SearchHandler(
SFXEventConstRef event
, HandlerEnum timing
)
(inherits from SFRHandler)
Search for the handler that matches the specified event.
|
TracerRecConstPtr |
SearchTracer(
SFXEventConstRef event
)
(inherits from SFRTracer)
Search for the tracer that matches the specified event.
|
Types |
---|
ColorEnum
Constant that represents a specific part.
|
BehaviorEnum
(inherits from SFRControl)
Constant that represents the behavior of control.
|
HandlerEnum
(inherits from SFRHandler)
Constant that represents the timing to call the handler.
|
SFRHandlerSPP
(inherits from SFRHandler)
Type of the callback function.
|
TracerEnum
(inherits from SFRTracer)
Constant that represents the trace order.
|
TracerTraceMPP
(inherits from SFRTracer)
Type of the callback function.
|
[ public ] SFRComboboxControl( SFRResponderPtr director // parent responder SFXRectangleConstRef rect // base bound SFXWideStringConstPtr item // matrix of item string SInt16 limit // limit of the number of the item string BehaviorType behavior = BEHAVIOR_SFRCOMBOBOXCONTROL // behavior SFCType attribute = ATTRIBUTE_SFRCOMBOBOXCONTROL // attribute );
Create a check-box control, register the handler that the menu of combo-box is selected.
SFRComboboxControlPtr combobox; SFXWideString item[] = {"item1", "item2", "item3"}; combobox = new SFRComboboxControl(window, SFXRectangle(5, 5, 48, 16), item, lengthof(item)); combobox->RegisterHandler(SREVT_CONTROL, HANDLER_BEFORE, HANDLER_FUNCTION(ComboboxHandler));
[ public, virtual ] ~SFRComboboxControl(Void);
[ public ] SFCError AppendItem( SFXWideStringConstPtr item // matrix of items SInt16 limit // limit of the number of items );
[ public ] SFCError AppendItem( SFXWideStringConstRef title // title string UInt16 key // key code WChar icon = 0x0000 // icon );
Append items onto the combobox, and add one more item onto it.
SFRComboboxControlPtr combobox; SFXWideString item[] = {"item1", "item2", "item3"}; combobox = new SFRComboboxControl(window, SFXRectangle(5, 5, 48, 16), null, 0); combobox->AppendItem(item, lengthof(item)); combobox->AppendItem("appended", AVK_9, 0x69F7);
[ public ] Void ClearItem(Void);
The value of combobox is set to 0.
Delete all items in the combobox menu.
SFRComboboxControlPtr combobox; SFXWideString item[] = {"item1", "item2", "item3"}; combobox = new SFRComboboxControl(window, SFXRectangle(5, 5, 48, 16), item, lengthof(item)); combobox->ClearItem();
The access key is as same as the key code in BREW.
If the access key is not set, AVK_UNDEFINED will be returned.
[ public, const ] SFXRGBColorConstRef GetColor( ColorType index // palette index );
Specify the palette index of SFRComboboxControl::ColorEnum type.
The behavior is not defined when the specified palette index is invalid.
Get the base color of the button.
SFRComboboxControlPtr combobox; SFXRGBColor color; combobox = new SFRComboboxControl(window, SFXRectangle(5, 5, 48, 16), null, 0); color = combobox->GetColor(SFRComboboxControl::COLOR_BUTTON_BASE);
[ public, const ] AEEFont GetFont(Void);
[ public, const ] SFXWideString GetTitle( SInt16 index // index );
[ public, const ] SInt16 GetValue(Void);
The value is 0-based.
Remove a registered item from combo-box menu.
SFRComboboxControlPtr combobox; SFXWideString item[] = {"item1", "item2", "item3"}; combobox = new SFRComboboxControl(window, SFXRectangle(5, 5, 48, 16), item, lengthof(item)); combobox->RemoveItem(0);
[ public ] Void SetAccessKey( SInt16 index // index UInt16 key // key code WChar icon = 0x0000 // icon );
The access key is as same as the key code in BREW.
The icon can be displayed on the left of the string when menu is shown.
Set the access key and the icon of the item.
SFRComboboxControlPtr combobox; SFXWideString item[] = {"item1", "item2", "item3"}; combobox = new SFRComboboxControl(window, SFXRectangle(5, 5, 48, 16), item, lengthof(item)); combobox->SetAccessKey(0, AVK_1, 0x69F7);
[ public, virtual ] Void SetBaseBound( SFXRectangleConstRef rect // base region );
Create a combo-box at the coordinate ( 5 , 5 , 48 , 16 ) in base region, and modify it into (10 , 10 , 96 , 16 )
SFRComboboxControlPtr combobox; combobox = new SFRComboboxControl(window, SFXRectangle(5, 5, 48, 16), null, 0); combobox->SetBaseBound(SFXRectangle(10, 10, 96, 16));
[ public ] Void SetColor( ColorType index // palette index SFXRGBColorConstRef color // color );
Specify the palette index of SFRComboboxControl::ColorEnum type.
Specify the color.
The behavior is not defined when the specified palette index is invalid.
Set the color of combo-box to black.
SFRComboboxControlPtr combobox; combobox = new SFRComboboxControl(window, SFXRectangle(5, 5, 48, 16), null, 0); combobox->SetColor(SFRComboboxControl::COLOR_BUTTON_LIGHT, SFXRGBColor(0x99, 0x99, 0x99, 0x00)); combobox->SetColor(SFRComboboxControl::COLOR_BUTTON_BASE, SFXRGBColor(0x66, 0x66, 0x66, 0x00)); combobox->SetColor(SFRComboboxControl::COLOR_BUTTON_SHADOW, SFXRGBColor(0x33, 0x33, 0x33, 0x00)); combobox->SetColor(SFRComboboxControl::COLOR_BUTTON_TITLE, SFXRGBColor(0xBB, 0xBB, 0xBB, 0x00)); combobox->SetColor(SFRComboboxControl::COLOR_MENU_LIGHT, SFXRGBColor(0x99, 0x99, 0x99, 0x00)); combobox->SetColor(SFRComboboxControl::COLOR_MENU_BASE, SFXRGBColor(0x66, 0x66, 0x66, 0x00)); combobox->SetColor(SFRComboboxControl::COLOR_MENU_SHADOW, SFXRGBColor(0x33, 0x33, 0x33, 0x00)); combobox->SetColor(SFRComboboxControl::COLOR_MENU_TITLE, SFXRGBColor(0xBB, 0xBB, 0xBB, 0x00));
Set the title font of the combo-box.
Set the title text into bold.
SFRComboboxControlPtr combobox; combobox = new SFRComboboxControl(window, SFXRectangle(5, 5, 48, 16), null, 0); combobox->SetFont(AEE_FONT_BOLD);
[ public ] SFCError SetItem( SFXWideStringConstPtr item // matrix of items SInt16 limit // limit of the number of items );
[ public ] Void SetItem( SInt16 index // index SFXWideStringConstRef title // title string UInt16 key // key code WChar icon = 0x0000 // icon );
Set the items, and modify 1 of them.
SFRComboboxControlPtr combobox; SFXWideString item[] = {"item1", "item2", "item3"}; combobox = new SFRComboboxControl(window, SFXRectangle(5, 5, 48, 16), null, 0); combobox->SetItem(item, lengthof(item)); combobox->SetItem(0, "changed", AVK_1, 0x69F7);
SFRComboboxControl::GetTitle | SFRComboboxControl::GetAccessKey | SFRComboboxControl::AppendItem
[ public ] Void SetTitle( SInt16 index // index SFXWideStringConstRef title // title string );
Modify the title of an item.
SFRComboboxControlPtr combobox; SFXWideString item[] = {"item1", "item2", "item3"}; combobox = new SFRComboboxControl(window, SFXRectangle(5, 5, 48, 16), item, lengthof(item)); combobox->SetTitle(0, "changed");
The value is 0-based.
Set the value of combobox to 1.(The status of combobox can be changed to "item2" if selected.)
SFRComboboxControlPtr combobox; SFXWideString item[] = {"item1", "item2", "item3"}; combobox = new SFRComboboxControl(window, SFXRectangle(5, 5, 48, 16), item, lengthof(item)); combobox->SetValue(1);
enum ColorEnum { COLOR_BUTTON_BASE = 0, // inside the combobox control COLOR_BUTTON_LIGHT, // top and left edges of combobox control COLOR_BUTTON_SHADOW, // bottom and right edges of combobox control COLOR_BUTTON_TITLE, // title texts in the combobox control COLOR_MENU_BASE, // inside the menu part of combobox control COLOR_MENU_LIGHT, // top and left edges of menu of combobox control COLOR_MENU_SHADOW, // bottom and right edges of menu of combobox control COLOR_MENU_TITLE // title texts in the item of combobox control };
SFRComboboxControl::ColorEnum is used to set or get the color of specific part of SFRComboboxControl object.
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |