SophiaFramework UNIVERSE 5.3 |
#include <SFXEditProperty.h.hpp>
class SFXEditProperty;
<link linkend="sec.macro.core.typedef.SFMTYPEDEFCLASS">SFMTYPEDEFCLASS</link>(SFXEditProperty)
SFXEditProperty is the class to edit the property of the native BREW text input control (i.e., BREW API ITextCtl and BREW API IMenuCtl).
SFZSingleEditLabelControl, SFZSingleEditBoxControl, SFZMultipleEditLabelControl, or SFZMultipleEditBoxControl uses this class in SFYSingleEditWidget or SFYMultipleEditWidget which is its child resopnder.
In SophiaFramework UNIVERSE, processing of the text input control of the standard BREW is encapsulated into the SFXBaseEditor, SFXEditor, and SFXEditProperty classes. It is enough that the same one kind of code has only to be programmed regardless of BREW SDK version, simulator, and device.
SFXEditor | SFZSingleEditLabelControl | SFZSingleEditBoxControl | SFYSingleEditWidget | SFZMultipleEditLabelControl | SFZMultipleEditBoxControl | SFYMultipleEditWidget | BREW API ITextCtl | BREW API IMenuCtl | BREW API AEETextInputMode
Constructor/Destructor |
---|
SFXEditProperty( Void ) Constructor of the SFXEditProperty class.
|
~SFXEditProperty( Void ) Destructor of the SFXEditProperty class.
|
Public Functions | |
---|---|
AEETextInputMode |
GetInputMode( Void ) Get the input mode of the text input control of the standard BREW.
|
UInt16 |
GetMaximumLength( Void ) Get the maximum text size supported by the text input control of the standard BREW.
|
Bool |
GetPasswordMode( Void ) Get the password mode of the text input control of the standard BREW.
|
SFXWideStringConstRef |
GetText( Void ) Get the string set in the text input control of the standard BREW.
|
Void |
SetInputMode(
AEETextInputMode param
) Set the input mode of the text input control of the standard BREW.
|
SFCError |
SetMaximumLength(
UInt16 param
) Set the maximum text size supported by the text input control of the standard BREW.
|
Void |
SetPasswordMode(
Bool param
) Set the password mode of the text input control of the standard BREW.
|
SFCError |
SetText(
SFXWideStringConstRef param
) Set the specified string into the text input control of the standard BREW.
|
[ public, explicit ] SFXEditProperty(Void);
This constructor performs the initializations as follows:
SFXEditProperty::SetMaximumLength | SFXEditProperty::SetInputMode | SFXEditProperty::SetPasswordMode | SFXEditProperty::SetText
[ public ] ~SFXEditor(Void);
[ public, const ] AEETextInputMode GetInputMode(Void);
Input mode of native BREW text input control
This function gets the input mode of the text input control of the standard BREW set with the SFXEditProperty::SetInputMode function. For more details, see ITEXTCTL_GetInputMode() and AEETextInputMode of the BREW reference.
SFXEditProperty::SetInputMode | BREW API ITEXTCTL_GetInputMode | BREW API AEETextInputMode
[ public, const ] UInt16 GetMaximumLength(Void);
Maximum text size supported by the native BREW text input control
This function gets the maximum text size supported by the text input control of the standard BREW set with the SFXEditProperty::SetMaximumLength function. For more details, see ITEXTCTL_SetMaxSize() of the BREW reference.
[ public, const ] Bool GetPasswordMode(Void);
This function gets the password mode of the text input control of the standard BREW set with the SFXEditProperty::SetPasswordMode function. For more details, see ITEXTCTL_SetProperties() and AEE ITextCtl's Properties of the BREW reference.
SFXEditProperty::SetPasswordMode | BREW API ITEXTCTL_SetProperties | BREW API AEE ITextCtl's Properties
[ public, const ] SFXWideStringConstRef GetText(Void);
String set in the text input control of the standard BREW
For more details, see ITEXTCTL_GetText() of the BREW reference.
[ public ] Void SetInputMode( AEETextInputMode param // input mode );
This function sets the input mode of the text input control of the standard BREW. For more details, see ITEXTCTL_SetInputMode() and AEETextInputMode of the BREW reference.
Default: AEE_TM_CURRENT(currently active input mode)
The below is the usage example in the implementation of the SFYSingleEditWidget::SetInputMode function.
class SFYSingleEditWidget : public SFYWidget { private: ... SFXEditProperty _property; ... }; /*public */Void SFYSingleEditWidget::SetInputMode(AEETextInputMode param) { if (param != _property.GetInputMode()) { _property.SetInputMode(param); Invalidate(); } return; }// SFYSingleEditWidget::SetInputMode //
SFXEditProperty::GetInputMode | BREW API ITEXTCTL_SetInputMode | BREW API AEETextInputMode
This function sets the maximum text size supported by the text input control of the standard BREW. For more details, see ITEXTCTL_SetMaxSize() of the BREW reference.
Default: SINT16_MAXIMUM - 1
The below is the usage example in the implementation of the SFYSingleEditWidget::Edit function.
class SFYSingleEditWidget : public SFYWidget { private: ... SFXBaseEditorPtr _editor; SFXEditProperty _property; ... }; // function which transfer to text input control /*public */SFCError SFYSingleEditWidget::Edit(Void) { SFCError error(SFERR_NO_ERROR); // set maximum length of text to text input control if ((error = _property.SetMaximumLength(_maximum)) == SFERR_NO_ERROR) { // set initial text to text input control if ((error = _property.SetText(_text)) == SFERR_NO_ERROR) { // boot up text input control(ITextCtl included in standard BREW) // OnEditor is callback function that will be called immediately after text input control finishes error = _editor->Open(XALLBACK_INTERNAL(OnEditor)); } } return error; }// SFYSingleEditWidget::Edit //
SFXEditProperty::GetMaximumLength | SFXEditProperty::SetText | BREW API ITEXTCTL_SetMaxSize
[ public ] Void SetPasswordMode( Bool param // password mode(true if the input string should be dispalyed as "***", otherwise false) );
If the argument is "true", the property value of the text input control of the standard BREW will be set with TP_PASSWORD. In this setting, all the input characters are displayed with the "*" character. The actual string is correctly managed in the BREW buffer. For more details, see ITEXTCTL_SetProperties() and AEE ITextCtl's Properties of the BREW reference.
Default: false
The below is the usage example in the implementation of the SFYSingleEditWidget::SetPasswordMode function.
class SFYSingleEditWidget : public SFYWidget { private: ... SFXEditProperty _property; ... }; /*public */SFCError SFYSingleEditWidget::SetPasswordMode(Bool param) { SFCError error(SFERR_NO_ERROR); if (param != _property.GetPasswordMode()) { if ((error = SetWidgetText(_text, param)) == SFERR_NO_ERROR) { _property.SetPasswordMode(param); Invalidate(); } } return error; }// SFYSingleEditWidget::SetPasswordMode //
SFXEditProperty::GetPasswordMode | BREW API ITEXTCTL_SetProperties | BREW API AEE ITextCtl Properties
[ public ] SFCError SetText( SFXWideStringConstRef param // string );
This function sets the specified string, whose length is upto the number set with the SFXEditProperty::SetMaximumLength function, into the text input control of the standard BREW. For more details, see ITEXTCTL_SetText() of the BREW reference.
class SFYSingleEditWidget : public SFYWidget { private: ... SFXBaseEditorPtr _editor; SFXEditProperty _property; ... }; // function which transfer to text input control /*public */SFCError SFYSingleEditWidget::Edit(Void) { SFCError error(SFERR_NO_ERROR); // set maximum length of text to text input control if ((error = _property.SetMaximumLength(_maximum)) == SFERR_NO_ERROR) { // set initial text to text input control if ((error = _property.SetText(_text)) == SFERR_NO_ERROR) { // boot up text input control(ITextCtl included in standard BREW) // OnEditor is callback function that will be called immediately after text input control finishes error = _editor->Open(XALLBACK_INTERNAL(OnEditor)); } } return error; }// SFYSingleEditWidget::Edit //
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |