PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFBTextCtl
Wrapper Class for the ITextCtl interface.
#include <SFBTextCtl.h.hpp>
class SFBTextCtl : public SFBControl;
SFMTYPEDEFWRAPPER(SFBTextCtl)

Inheritance diagram

 Inheritance diagram of SFBTextCtlClass

Version

BREW 2.0 BREW 2.1 BREW 3.1 BREW 4.0
O O O O

Reference

BREW API ITextCtl

Member

Public Functions
Void EnableCommand( Bool enable , UInt16 id )
Enable sending of specified command by the text control object to the shell object upon receiving the event generated by pressing the SELECT key.
Void EnumModeInit( Void )
Initialize the mode enumeration mechanism for the test control.
AEETextInputMode EnumNextMode( AEETextInputModeInfo* info = null )
Enumerate the text control modes.
SInt32 GetCursorPos( Void )
Get the position of a cursor in a text control object.
AEETextInputMode GetInputMode( AEETextInputModeInfo* info = null )
Get the selected text input mode and the string associated with it.
UInt32 GetPropertiesEx( Void )
Return the extended text control-specific properties or flags.
UInt32 GetSelection( Void )
Get the selected text.
Bool GetText( WCharPtr buf , SInt32 maxChars )
Get text associated with the SFBTextCtl Interface object in the given buffer subject to the maximum of MaxChars.
Bool GetText( SFXWideStringPtr text )
Get text associated with the SFBTextCtl Interface object in the given buffer subject to the maximum of MaxChars.
WCharConstPtr GetTextPtr( Void )
Get the pointer to the text maintained by the SFBTextCtl object.
static
SFBTextCtlSmp
NewInstance( SFCErrorPtr exception = null )
Create a new SFBTextCtl instance.
static
SFBTextCtlSmp
NewInstance( AEECLSID clsid = AEECLSID_TEXTCTL , SFCErrorPtr exception = null )
Create a new SFBTextCtl instance.
Void SetCursorPos( SInt32 offset )
Set the position of a cursor in a text control object.
AEETextInputMode SetInputMode( AEETextInputMode mode )
Set the selected text input mode.
Void SetMaxSize( UInt16 maxSize )
Set the maximum text size supported by the text control object.
Void SetPropertiesEx( UInt32 props )
Set extended text control-specific properties or flags.
Void SetSelection( UInt32 sel )
Set a selection over the given character positions.
Void SetSoftKeyMenu( SFBMenuCtlSmpConstRef menu )
Replace the existing Soft Key menu of the text control object with the specified menu control object.
Bool SetText( WCharConstPtr text , SInt32 count = -1 )
Assign given string as text of the text control object.
Bool SetText( SFXWideStringConstRef text , SInt32 count = -1 )
Assign given string as text of the text control object.
Bool SetTitle( ACharConstPtr file , UInt16 id )
Set title of a text control object.
Bool SetTitle( WCharPtr text )
Set title of a text control object.
Bool SetTitle( SFXAnsiStringConstRef file , UInt16 id )
Set title of a text control object.
Bool SetTitle( SFXWideStringPtr text )
Set title of a text control object.
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.

SFBTextCtl::EnableCommand
Enable sending of specified command by the text control object to the shell object upon receiving the event generated by pressing the SELECT key.
[ public ]
Void EnableCommand(
    Bool enable   // boolean value for enable/disable flag 
    UInt16 id     // command ID
);

Reference

BREW API ITEXTCTL_EnableCommand


SFBTextCtl::EnumModeInit
Initialize the mode enumeration mechanism for the test control.
[ public ]
Void EnumModeInit(Void);

Reference

BREW API ITEXTCTL_EnumModeInit


SFBTextCtl::EnumNextMode
Enumerate the text control modes.
[ public ]
AEETextInputMode EnumNextMode(
    AEETextInputModeInfo* info = null   // optional pointer to receive Text Mode Information. 
                                        // if you do not wish to receive this information, 
                                        // call this function with a null value as the second parameter
);

Reference

BREW API ITEXTCTL_EnumNextMode | AEETextInputMode


SFBTextCtl::GetCursorPos
Get the position of a cursor in a text control object.
[ public ]
SInt32 GetCursorPos(Void);

Reference

BREW API ITEXTCTL_GetCursorPos | SFBTextCtl::SetCursorPos


SFBTextCtl::GetInputMode
Get the selected text input mode and the string associated with it.
[ public ]
AEETextInputMode GetInputMode(
    AEETextInputModeInfo* info = null   // input: a pointer to a AEETextInputModeInfo Info structure to be filled OR can be null, 
                                        //        so as to not fill a structure and return current mode. 
                                        // output: if a valid pointer is given it is filled with the current mode and the string associated with that mode
);

Reference

BREW API ITEXTCTL_GetInputMode | AEETextInputModeInfo


SFBTextCtl::GetPropertiesEx
Return the extended text control-specific properties or flags.
[ public ]
UInt32 GetPropertiesEx(Void);

Return value

32-bit properties for the text control.

Version

Introduced BREW Client 3.1.3

Reference

BREW API ITEXTCTL_GetPropertiesEx


SFBTextCtl::GetSelection
Get the selected text.
[ public ]
UInt32 GetSelection(Void);

Return value

Double word indicating the selection positions.

The lower word is for selection start.

The upper word is for selection end.

Version

Introduced BREW Client 3.1.3

Reference

BREW API ITEXTCTL_GetSelection


SFBTextCtl::GetText
Get text associated with the SFBTextCtl Interface object in the given buffer subject to the maximum of MaxChars.
[ public ]
Bool GetText(
    WCharPtr buf      // placeholder for the text
    SInt32 maxChars   // maximum number of characters to be read
);
[ public ]
Bool GetText(
    SFXWideStringPtr text   // placeholder for the text
);

Reference

BREW API ITEXTCTL_GetText | SFBTextCtl::GetTextPtr


SFBTextCtl::GetTextPtr
Get the pointer to the text maintained by the SFBTextCtl object.
[ public ]
WCharConstPtr GetTextPtr(Void);

Reference

BREW API ITEXTCTL_GetTextPtr | SFBTextCtl::GetText


SFBTextCtl::NewInstance
Create a new SFBTextCtl instance.
[ public, static ]
SFBTextCtlSmp NewInstance(
    SFCErrorPtr exception = null   // Error
);
[ public, static ]
SFBTextCtlSmp NewInstance(
    AEECLSID clsid = AEECLSID_TEXTCTL   // Class ID fot the text input control
    SFCErrorPtr exception = null        // Error
);

SFBTextCtl::SetCursorPos
Set the position of a cursor in a text control object.
[ public ]
Void SetCursorPos(
    SInt32 offset   // placement of the text object:
                    // TC_CURSOREND - Place the cursor at the end of the text. 
                    // TC_CURSORSTART - Place the cursor at the beginning of the text
);

Reference

BREW API ITEXTCTL_SetCursorPos | SFBTextCtl::GetCursorPos


SFBTextCtl::SetInputMode
Set the selected text input mode.
[ public ]
AEETextInputMode SetInputMode(
    AEETextInputMode mode   // text input mode
);

Reference

BREW API ITEXTCTL_SetInputMode | AEETextInputMode


SFBTextCtl::SetMaxSize
Set the maximum text size supported by the text control object.
[ public ]
Void SetMaxSize(
    UInt16 maxSize   // maximum text size in AECHAR characters excluding null and if 0 (zero) then no effect
);

Reference

BREW API ITEXTCTL_SetMaxSize


SFBTextCtl::SetPropertiesEx
Set extended text control-specific properties or flags.
[ public ]
Void SetPropertiesEx(
    UInt32 props   // 32-bit set of flags/properties
);

Version

Introduced BREW Client 3.1.3

Reference

BREW API ITEXTCTL_SetPropertiesEx


SFBTextCtl::SetSelection
Set a selection over the given character positions.
[ public ]
Void SetSelection(
    UInt32 sel   // Lower word is for selection start. Upper word for selection end.
);

Version

Introduced BREW Client 3.1.3

Reference

BREW API ITEXTCTL_SetSelection


SFBTextCtl::SetSoftKeyMenu
Replace the existing Soft Key menu of the text control object with the specified menu control object.
[ public ]
Void SetSoftKeyMenu(
    SFBMenuCtlSmpConstRef menu   // new menu control object for the soft key menu
);

Reference

BREW API ITEXTCTL_SetSoftKeyMenu


SFBTextCtl::SetText
Assign given string as text of the text control object.
[ public ]
Bool SetText(
    WCharConstPtr text   // text to be set
    SInt32 count = -1    // number of AECHAR characters to be assigned from the string to the text of the text control object.
                         // if count is negative or greater than the length of psz string, then the length of string is used
);
[ public ]
Bool SetText(
    SFXWideStringConstRef text   // text to be set
    SInt32 count = -1            // number of AECHAR characters to be assigned from the string to the text of the text control object. 
                                 // if count is negative or greater than the length of psz string, then the length of string is used
);

Reference

BREW API ITEXTCTL_SetText


SFBTextCtl::SetTitle
Set title of a text control object.
[ public ]
Bool SetTitle(
    ACharConstPtr file   // file containing resource string
    UInt16 id            // resource identifier
);
[ public ]
Bool SetTitle(
    WCharPtr text   // null-terminated title string
);
[ public ]
Bool SetTitle(
    SFXAnsiStringConstRef file   // file containing resource string
    UInt16 id                    // resource identifier
);
[ public ]
Bool SetTitle(
    SFXWideStringPtr text   // null-terminated title string
);

Reference

BREW API ITEXTCTL_SetTitle