Dialog CATDlgEditor

Usage: you must use this class as is. You should never derive it.


public class CATDlgEditor

Class to enable characters to be entered.
Role: Enables characters to be entered. It allows the end user to enter a text, numerics, or both, or modify existing ones. The text can extend on one or several lines. Scrollbars can be added if the text is longer than the editor display area. Use editor whenever you propose to the end user to edit or modify a text or unpredictable numerical values. Usually you will instanciate this class, however, you may derive it for example if you want to specialize it using the SetColor method.


Constructor and Destructor Index


o CATDlgEditor(CATDialog*,CATString&,CATDlgStyle)
Constructs an input field.

Method Index


o ClearLine(int)
Reset the context of a line.
o GetEditFocusInNotification()
Returns the CATDlgEditFocusInNotification event notification.
o GetEditFocusOutNotification()
Returns the CATDlgEditFocusOutNotification event notification.
o GetEditModifyExtNotification()
Returns the CATDlgEditModifyExtNotification event notification.
o GetEditModifyNotification()
Returns the CATDlgEditModifyNotification event notification.
o GetFirstColumn()
Get the position of the first visible character in the line.
o GetFirstLine()
Get the position of the first visible line.
o GetFloatValue()
Get an float from the contents of a line (multiple line editor case), or from the contents of the text (single line editor case).
o GetIntegerValue()
Get an integer from the contents of a line (multiple line editor case), or from the contents of the text (single line editor case).
o GetLine(CATUnicodeString&,int)
Extracts a line for a multiple line editor.
o GetLineCount()
Get the line count.
o GetMaxCharacterWidth()
Get the maximum character count that a line can contain.
o GetSelection(int&,int&)
Get the current selected sub-string.
o GetSelectionChangeNotification()
Returns the CATDlgSelectionChangeNotification event notification.
o GetText()
Extracts the text from a single line editor.
o GetValue()
Get value for double precision editors.
o GetVisibleTextHeight()
Get the visible text height.
o GetVisibleTextWidth()
Get the visible text width.
o SetFirstColumn(int)
Set the position of the first visible character in the line.
o SetFirstLine(int)
Set the position of the first visible line.
o SetFloatValue(float,int)
Set value for float precision editors.
o SetInputCallback(CATDlgEditorCallback,void*)
Declare your own function to execute when a character is entered.
o SetIntegerValue(int,int)
Set value for integer precision editors.
o SetLine(CATUnicodeString&,int)
Sets a line contents for a multiple line editor.
o SetMaxCharacterWidth(int)
Set the maximum character count that a line can contain.
o SetReadOnly(CATBoolean)
Dynamically changes the capability for the end user to change the editor's contents.
o SetSelection(int,int)
Set the current selected sub-string.
o SetTabChangesFocusFlag(CATBoolean)
o SetText(CATUnicodeString&,int)
Sets the text in a single line editor.
o SetValue(double,int)
Set value for double precision editors.
o SetVerifyCallback(CATDlgEditorCallback,void*)
Declare your own function to execute when a string is entered.
o SetVisibleTextHeight(int)
Set the visible text height.
o SetVisibleTextWidth(int)
Set the visible text width.

Constructor and Destructor


o CATDlgEditor
public CATDlgEditor( iParent,
const iDialogObjectName,
iStyle=NULL)
Constructs an input field.
Role: Constructs an input field.
Parameters:
iParent
The parent of the editor.
iDialogObjectName
The dialog object name.
iStyle
The application window styles. You can cumulate several styles using a logical or.
Legal values: NULL (default) so that the text extend on a single line, or CATDlgEdtMultiline if the text can extend on several lines, or CATDlgEdtReadOnly if the text cannot be edited.

For single line editors only, you can use also: CATDlgEdtPassword if the text is hidden, or CATDlgEdtInteger if the text must be an integer, or CATDlgEdtFloat if the text must be a float, or CATDlgEdtAlphabetical if the text must contain only alphabetical characters, or CATDlgEdtNumerical if the text must contain only numerical characters, or CATDlgEdtAlphanumerical if the must contain only alphanumerical characters, or CATDlgEdtDouble if the text must be a double, expressed in the chosen unit.

For multiple line editors only, you can use also: CATDlgEdtWrap if the text automatically skips to the next line, or CATDlgEdtNoScrollBar if the editor has no scrollbars, or CATDlgEdtNoCR if the text doesn' include carriage return characters.

Methods


o ClearLine
public ClearLine( iLineIndex=-1 )
Reset the context of a line.
Role: Reset the contents of a line contents (multiple line editor case), or the contents of the text (single line editor case).
Parameters:
iLineIndex
The line index. An index ranges from 0 to the line count - 1.
o GetEditFocusInNotification
public GetEditFocusInNotification()
Returns the CATDlgEditFocusInNotification event notification. which is sent by CATDlgEditor whenever it gets the keyboard focus.
o GetEditFocusOutNotification
public GetEditFocusOutNotification()
Returns the CATDlgEditFocusOutNotification event notification. It is sent by CATDlgEditor whenever it losts the keyboard focus.
o GetEditModifyExtNotification
public GetEditModifyExtNotification()
Returns the CATDlgEditModifyExtNotification event notification. It is sent whenever a line is modified and the key "Enter" is pressed.
o GetEditModifyNotification
public GetEditModifyNotification()
Returns the CATDlgEditModifyNotification event notification. It is sent whenever a line is modified.
o GetFirstColumn
public GetFirstColumn()
Get the position of the first visible character in the line.
Returns:
The visible text first visible column.
o GetFirstLine
public GetFirstLine()
Get the position of the first visible line.
Returns:
The visible text first line.
o GetFloatValue
public GetFloatValue()
Get an float from the contents of a line (multiple line editor case), or from the contents of the text (single line editor case).
Returns:
The float.
o GetIntegerValue
public GetIntegerValue()
Get an integer from the contents of a line (multiple line editor case), or from the contents of the text (single line editor case).
Returns:
The integer.
o GetLine
public GetLine( oLine,
iIndex=-1 )
Extracts a line for a multiple line editor.
Role: Extracts a line from the current multiple line editor.
Parameters:
oLine
The line extracted.
iIndex
The index of the line to extract. An index ranges from 0 to the line count - 1.
o GetLineCount
public GetLineCount()
Get the line count.
Returns:
The line count.
o GetMaxCharacterWidth
public GetMaxCharacterWidth()
Get the maximum character count that a line can contain.
Returns:
The maximum character count that a line can contain.
o GetSelection
public GetSelection( oFirstCharacterIndex,
oLastCharacterIndex)
Get the current selected sub-string.
Parameters:
oFirstCharacterIndex
The selected sub-string first character index.
oLastCharacterIndex
The selected sub-string last character index.
o GetSelectionChangeNotification
public GetSelectionChangeNotification()
Returns the CATDlgSelectionChangeNotification event notification. It is sent by CATDlgEditor whenever the selection in entry field is changed.
o GetText
public GetText()
Extracts the text from a single line editor.
Returns:
The text extracted.
o GetValue
public GetValue()
Get value for double precision editors.
Role: Get the value for a double precision editor.
Returns:
The double value.
o GetVisibleTextHeight
public GetVisibleTextHeight()
Get the visible text height.
Returns:
The visible text height.
o GetVisibleTextWidth
public GetVisibleTextWidth()
Get the visible text width.
Returns:
The visible text width.
o SetFirstColumn
public SetFirstColumn( iFirstVisibleColumn)
Set the position of the first visible character in the line.
Parameters:
iFirstVisibleColumn
The visible text first visible column.
o SetFirstLine
public SetFirstLine( iFirstVisibleLine)
Set the position of the first visible line.
Parameters:
iFirstVisibleLine
The visible text first line.
o SetFloatValue
public SetFloatValue( iFloatValue,
iSendingNotificationFlag=1 )
Set value for float precision editors.
Role: Set the value for a float precision editor.
Parameters:
iFloatValue
The float value.
iSendingNotificationFlag
To specify if you want the CATDlgEditModifyNotification notification to be sent.
Legal values: 1: default (or any non NULL value) if you want the notification to be sent, or NULL otherwise.
o SetInputCallback
public SetInputCallback( iCheckingFunction,
iUsefulData)
Declare your own function to execute when a character is entered.
Role: Declare your own function to execute when a character is entered. Enables to declare an exit to verify the input character.
Parameters:
iCheckingFunction
The applicative function to check the input character.
iUsefulData
The data that will be transmited to the application when calling its function. It is the contents of the filed casted as a pointer to void.
o SetIntegerValue
public SetIntegerValue( iIntegerValue,
iSendingNotificationFlag=1 )
Set value for integer precision editors.
Role: Set the value for a integer precision editor.
Parameters:
iIntegerValue
The integer value.
iSendingNotificationFlag
To specify if you want the CATDlgEditModifyNotification notification to be sent.
Legal values: 1: default (or any non NULL value) if you want the notification to be sent, or NULL otherwise.
o SetLine
public SetLine( const iLine,
iIndex=-1 )
Sets a line contents for a multiple line editor.
Role: Sets a line contents in the current multiple line editor.
Parameters:
iLine
The line.
iIndex
The line index.
Legal values: -1 so that the provided string be added as a new line to the current multiple line editor, or Other (from 0 to the line count - 1) for the index itself.
Returns:
The line count.
o SetMaxCharacterWidth
public SetMaxCharacterWidth( iMaximumCharacterCount)
Set the maximum character count that a line can contain.
Parameters:
iMaximumCharacterCount
The maximum character count that a line can contain.
o SetReadOnly
public SetReadOnly( iReadOnly)
Dynamically changes the capability for the end user to change the editor's contents.
Parameters:
iReadOnly
o SetSelection
public SetSelection( iFirstCharacterIndex,
iLastCharacterIndex)
Set the current selected sub-string.
Parameters:
iFirstCharacterIndex
The selected sub-string first character index.
iLastCharacterIndex
The selected sub-string last character index.
o SetTabChangesFocusFlag
public SetTabChangesFocusFlag( i_bTabChangesFocusFlag)
o SetText
public SetText( const iText,
iSendingNotificationFlag=0 )
Sets the text in a single line editor.
Parameters:
iText
The text.
iSendingNotificationFlag
To specify if you want the CATDlgEditModifyNotification notification to be sent.
Legal values: 1: (or any non NULL value) if you want the notification to be sent, or NULL (default) otherwise.
Beware: for upward compatibily reasons, the default value is not consistent with other methods.
o SetValue
public SetValue( iDoubleValue,
iSendingNotificationFlag=1 )
Set value for double precision editors.
Role: Set the value for a double precision editor.
Parameters:
iDoubleValue
The double value.
iSendingNotificationFlag
To specify if you want the CATDlgEditModifyNotification notification to be sent.
Legal values: 1: default (or any non NULL value) if you want the notification to be sent, or NULL otherwise.
o SetVerifyCallback
public SetVerifyCallback( iCheckingFunction,
iUsefulData)
Declare your own function to execute when a string is entered.
Role: Declare your own function to execute when a string is entered. Enables to declare an exit to verify the input string.
Parameters:
iCheckingFunction
The applicative function to check the input string.
iUsefulData
The data that will be transmited to the application when calling its function. It is the contents of the filed casted as a pointer to void.
o SetVisibleTextHeight
public SetVisibleTextHeight( iRowCount)
Set the visible text height.
Parameters:
iRowCount
The visible text height (row count).
o SetVisibleTextWidth
public SetVisibleTextWidth( iColumnCount)
Set the visible text width.
Parameters:
iColumnCount
The visible text width (column count).

This object is included in the file: CATDlgEditor.h
If needed, your Imakefile.mk should include the module: DI0PANV2

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.