SophiaFramework UNIVERSE 5.3 |
BREW 2.0 | BREW 2.1 | BREW 3.1 | BREW 4.0 |
---|---|---|---|
O | O | O | O |
Public Functions | |
---|---|
Bool |
AddItem(
ACharConstPtr resFile
, UInt16 resID
, UInt16 itemID
, UInt32 data
)
Add a new item to a menu.
|
Bool |
AddItem(
UInt16 itemID
, WCharPtr text
, UInt32 data
)
Add a new item to a menu.
|
Bool |
AddItem(
SFXAnsiStringConstRef resFile
, UInt16 resID
, UInt16 itemID
, UInt32 data
)
Add a new item to a menu.
|
Bool |
AddItem(
UInt16 itemID
, SFXWideStringPtr text
, UInt32 data
)
Add a new item to a menu.
|
Bool |
AddItemEx(
CtlAddItem* item
)
Add an item to a menu, list, or icon view.
|
Bool |
AddOwnerDrawItem(
UInt16 itemID
, UInt32 itemData
)
ADD an owner draw item to a menu.
|
Bool |
DeleteAll( Void )
Delete all items from a menu control object.
|
Bool |
DeleteItem(
UInt16 itemID
)
Delete an item from the menu control object.
|
Void |
EnableCommand(
Bool enable
) Enable the menu control object to send the specified command to the
AEE Shell when it receives an event generated by a device user pressing the SELECT key.
|
UInt16 |
EnumNextSel( Void ) This function should only be used only with Multi Select menus (MP_MULTI_SEL).
|
Bool |
EnumSelInit( Void ) This function should only be used only with Multi Select menus (MP_MULTI_SEL).
|
Void |
GetColors(
AEEMenuColors* colors
)
Get the color of menu elements.
|
UInt16 |
GetFocus( Void ) This function should only be used only with Multi Select menus (MP_MULTI_SEL).
|
Bool |
GetItem(
UInt16 itemID
, CtlAddItem* item
)
Query all of the relevant values associated with an item.
|
SInt32 |
GetItemCount( Void ) Return the count of the number of items in a menu.
|
Bool |
GetItemData(
UInt16 itemID
, UInt32Ptr data
) Get the data associated with an item in the given menu control object.
|
UInt16 |
GetItemID(
SInt32 index
) Return the item ID given the index of the item.
|
Void |
GetItemRect(
UInt16 index
, SFXRectanglePtr rect
, UInt16 index
) Get rect used to draw that item in menu control.
|
SInt32 |
GetItemTime(
UInt16 itemID
, UInt16Ptr duration
)
If the menu control is calendar, this function retrieves the start time
and duration (the difference between the end time and the start time) of
the item specified by the item ID.
|
UInt16 |
GetSel( Void ) Get the item identifier of the menu control object’s current selection.
|
Void |
GetStyle(
AEEItemStyle* normal
, AEEItemStyle* selected
) Get the display style for the items.
|
Void |
MoveItem(
UInt16 itemID
, SInt32 direction
) Move an item by one position in the specified direction.
|
static SFBMenuCtlSmp |
NewInstance(
SFCErrorPtr exception = null
) Create a new SFBMenuCtl instance.
|
static SFBMenuCtlSmp |
NewInstance(
AEECLSID id
, SFCErrorPtr exception = null
) Create a new SFBMenuCtl instance.
|
Void |
SetColors(
AEEMenuColors* colors
) By default, the color of menu elements are determined by entries
in the system color table defined by the device manufacturer.
|
Void |
SetFocus(
UInt16 itemID
) This function is only to be used with Multi Select menus (MP_MULTI_SEL).
|
Bool |
SetItem(
UInt16 itemID
, UInt16 flags
, CtlAddItem* item
) Set any field in an item after the item has been created.
|
Void |
SetItemText(
UInt16 itemID
, ACharConstPtr resFile
, UInt16 resID
) Set a new item text name, given the item ID.
|
Void |
SetItemText(
UInt16 itemID
, WCharPtr text
) Set a new item text name, given the item ID.
|
Void |
SetItemText(
UInt16 itemID
, SFXAnsiStringConstRef resFile
, UInt16 resID
) Set a new item text name, given the item ID.
|
Void |
SetItemText(
UInt16 itemID
, SFXWideStringPtr text
) Set a new item text name, given the item ID.
|
Void |
SetItemTime(
UInt16 itemID
, UInt16 minStart
, UInt16 duration
) Set the calendar menu control.
|
Void |
SetSel(
UInt16 itemID
) Make an item the current selection of the menu control
object and requests a redraw if the MP_NO_REDRAW property is not set.
|
Void |
SetSelEx(
UInt16 itemID
, Bool selected
) This function must be used only with Multi Select menus (MP_MULTI_SEL).
|
Void |
SetStyle(
AEEItemStyle* normal
, AEEItemStyle* selected
) Set the display style for the items.
|
Bool |
SetTitle(
ACharConstPtr resFile
, UInt16 resID
) Set the title of a menu control object.
|
Bool |
SetTitle(
WCharPtr text
) Set the title of a menu control object.
|
Bool |
SetTitle(
SFXAnsiStringConstRef resFile
, UInt16 resID
) Set the title of a menu control object.
|
Bool |
SetTitle(
SFXWideStringPtr text
) Set the title of a menu control object.
|
Void |
Sort(
AEEMenuSortType type
) Sort the items in a menu.
|
Void |
SortCustom(
PFNMENUSORTCOMPARE notify
, VoidPtr data
) Sort a menu using a user-supplied comparison callback,
allowing menus to be sorted by criteria other than simple name/value comparisons.
|
UInt32 |
GetProperties( Void )
(inherits from SFBControl)
Return the control-specific properties or flags.
|
Void |
GetRect(
SFXRectanglePtr rect
)
(inherits from SFBControl)
Get the rectangle of the control.
|
SFXRectangle |
GetRect( Void )
(inherits from SFBControl)
Get the rectangle of the control.
|
Bool |
HandleEvent(
AEEEvent event
, UInt16 wParam
, UInt32 dwParam
)
(inherits from SFBControl)
Pass events to a control. The BREW controls process
various events to allow a device user to enter a text, time, or date
value or choose an item from a menu. Refer to the descriptions of
each control for the events it handles. Your applet must pass a
control all of the events, unless the control is part of a dialog.
Below is an example of an application passing all of the events to
the controls of the application.
|
Bool |
HandleEvent(
SFXEventConstRef event
)
(inherits from SFBControl)
Pass events to a control. The BREW controls process
various events to allow a device user to enter a text, time, or date
value or choose an item from a menu. Refer to the descriptions of
each control for the events it handles. Your applet must pass a
control all of the events, unless the control is part of a dialog.
Below is an example of an application passing all of the events to
the controls of the application.
|
Bool |
IsActive( Void )
(inherits from SFBControl)
Return the active or focus state of the control.
|
Bool |
Redraw( Void )
(inherits from SFBControl)
Instruct the control to redraw its contents.
|
Void |
Reset( Void )
(inherits from SFBControl)
Instruct the control to reset (free/delete) its contents and to immediately leave active/focus mode.
|
Void |
SetActive(
Bool active = true
)
(inherits from SFBControl)
Instruct the control to enter/leave focus or selected mode.
|
Void |
SetProperties(
UInt32 properties
)
(inherits from SFBControl)
Set control-specific properties or flags.
|
Void |
SetRect(
SFXRectangleConstRef rect
)
(inherits from SFBControl)
Set the active screen coordinates of the control.
This may result in the control redrawing its contents.
|
Protected Functions | |
---|---|
static SFBBaseSmp |
FactoryByCreate(
AEECLSID id
, SFCErrorPtr exception = null
)
(inherits from SFBBase)
Create the instance for the specified ClassID's interface.
|
static SFBBaseSmp |
FactoryByQuery(
SFBQuerySmpConstRef query
, AEECLSID id
, SFCErrorPtr exception = null
)
(inherits from SFBBase)
Create the instance for the specified ClassID's interface using the SFBQuery instance.
|
[ public ] Bool AddItem( ACharConstPtr resFile // null-terminated string that contains the resource file name UInt16 resID // resource identifier that identifies a text resource UInt16 itemID // item identifier that uniquely identifies an item UInt32 data // item data associated with the item );
[ public ] Bool AddItem( UInt16 itemID // item identifier that uniquely identifies an item WCharPtr text // null-terminated string that contains the item name UInt32 data // item data associated with the item );
[ public ] Bool AddItem( SFXAnsiStringConstRef resFile // resource file name UInt16 resID // resource identifier that identifies a text resource UInt16 itemID // item identifier that uniquely identifies an item UInt32 data // item data associated with the item );
[ public ] Bool AddItem( UInt16 itemID // item identifier that uniquely identifies an item SFXWideStringPtr text // string that contains the item name UInt32 data // item data associated with the item );
BREW API IMENUCTL_AddItem | SFBMenuCtl::DeleteItem | SFBControl::Redraw | SFBControl::SetActive
[ public ] Bool AddItemEx( CtlAddItem* item // pointer to the CtlAddItem structure );
BREW API IMENUCTL_AddItemEx | SFBControl::Redraw | SFBMenuCtl::AddItem
[ public ] Bool AddOwnerDrawItem( UInt16 itemID // item identifier that uniquely identifies an item UInt32 itemData // item data associated with the item );
This function is available in BREW 3.1.
BREW API IMENUCTL_AddOwnerDrawItem | SFBMenuCtl::DeleteItem | SFBControl::Redraw | SFBControl::SetActive
[ public ] Bool DeleteAll(Void);
[ public ] Bool DeleteItem( UInt16 itemID // item identifier used when the item was added to the menu );
[ public ] UInt16 EnumNextSel(Void);
[ public ] Bool EnumSelInit(Void);
[ public ] Void GetColors( AEEMenuColors* colors // color value );
This function is available in BREW 3.1.
[ public ] UInt16 GetFocus(Void);
[ public ] Bool GetItem( UInt16 itemID // item ID CtlAddItem* item // item information structure );
BREW API IMENUCTL_GetItem | CtlAddItem | SFBMenuCtl::SetItem
[ public ] SInt32 GetItemCount(Void);
[ public ] Bool GetItemData( UInt16 itemID // item identifier used when this item is added to the menu UInt32Ptr data // placeholder for item data );
[ public, public ] Void GetItemRect( UInt16 index // index of item SFXRectanglePtr rect // item rectangle UInt16 index // index of item );
This function is available in BREW 3.1.
[ public ] SInt32 GetItemTime( UInt16 itemID // item Identifier UInt16Ptr duration // duration in minutes );
[ public ] UInt16 GetSel(Void);
[ public ] Void GetStyle( AEEItemStyle* normal // style for normal items AEEItemStyle* selected // style for selected items );
This function is available in BREW 3.1.
[ public ] Void MoveItem( UInt16 itemID // item identifier SInt32 direction // direction: Value of -1:UP Value of 1:DOWN );
[ public, static ] SFBMenuCtlSmp NewInstance( SFCErrorPtr exception = null // Error );
[ public, static ] SFBMenuCtlSmp NewInstance( AEECLSID id // Class ID SFCErrorPtr exception = null // Error );
[ public ] Void SetColors( AEEMenuColors* colors // pointer to the structure containing both a bitmask to indicate // the item whose color needs to be changed, and the color values );
[ public ] Bool SetItem( UInt16 itemID // item id UInt16 flags // mask of valid fields in CtlAddItem structure CtlAddItem* item // item information structure );
BREW API IMENUCTL_SetItem | CtlAddItem | SFBMenuCtl::GetItem | SFBControl::Redraw
[ public ] Void SetItemText( UInt16 itemID // item identifier ACharConstPtr resFile // null-terminated string containing the resource file name UInt16 resID // resource Id );
[ public ] Void SetItemText( UInt16 itemID // item identifier WCharPtr text // new item text in string form );
[ public ] Void SetItemText( UInt16 itemID // item identifier SFXAnsiStringConstRef resFile // resource file name UInt16 resID // resource id );
[ public ] Void SetItemText( UInt16 itemID // item identifier SFXWideStringPtr text // new item text in string form );
[ public ] Void SetItemTime( UInt16 itemID // item identifier UInt16 minStart // start time in minutes UInt16 duration // duration in minutes );
[ public ] Void SetSel( UInt16 itemID // item identifier used when this item is added to the menu );
[ public ] Void SetSelEx( UInt16 itemID // id of the item to set Bool selected // select/deselect the item );
[ public ] Void SetStyle( AEEItemStyle* normal // style for normal items AEEItemStyle* selected // style for selected items );
[ public ] Bool SetTitle( ACharConstPtr resFile // null-terminated string containing resource file name UInt16 resID // resource identifier );
[ public ] Bool SetTitle( WCharPtr text // null-terminated character string to be used for the menu title );
[ public ] Bool SetTitle( SFXAnsiStringConstRef resFile // resource file name UInt16 resID // resource identifier );
[ public ] Bool SetTitle( SFXWideStringPtr text // null-terminated character string to be used for the menu title );
[ public ] Void Sort( AEEMenuSortType type // sort type );
BREW API IMENUCTL_Sort | AEEMenuSortType | SFBMenuCtl::SortCustom
[ public ] Void SortCustom( PFNMENUSORTCOMPARE notify // user sort comparison callback VoidPtr data // pointer to user context passed to comparison function );
BREW API IMENUCTL_SortCustom | PFNMENUSORTCOMPARE | SFBMenuCtl::Sort
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |