All Frameworks Class Hierarchy This Framework Previous Next Indexes
Dialog Class CATDlgEditor
System.IUnknown
|
+---System.IDispatch
|
+---System.CATBaseUnknown
|
+---System.CATEventSubscriber
|
+---System.CATCommand
|
+---Dialog.CATDialog
|
+---Dialog.CATDlgControl
|
+---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
SetSelection(int,int)
- Set the current selected sub-string.
- 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
-
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 void ClearLine( | int | 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
-
Returns the CATDlgEditFocusInNotification event notification.
which is sent by CATDlgEditor whenever
it gets the keyboard focus.
o GetEditFocusOutNotification
-
Returns the CATDlgEditFocusOutNotification event notification.
It is sent by CATDlgEditor whenever it losts
the keyboard focus.
o GetEditModifyExtNotification
-
Returns the CATDlgEditModifyExtNotification event notification.
It is sent whenever a line is modified and the key "Enter" is pressed.
o GetEditModifyNotification
-
Returns the CATDlgEditModifyNotification event notification.
It is sent whenever a line is modified.
o GetFirstColumn
public int GetFirstColumn( | ) |
-
Get the position of the first visible character in the line.
- Returns:
- The visible text first visible column.
o GetFirstLine
public int GetFirstLine( | ) |
-
Get the position of the first visible line.
- Returns:
- The visible text first line.
o GetFloatValue
public float 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 int 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
-
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 int GetLineCount( | ) |
-
Get the line count.
- Returns:
- The line count.
o GetMaxCharacterWidth
public int GetMaxCharacterWidth( | ) |
-
Get the maximum character count that a line can contain.
- Returns:
- The maximum character count that a line can contain.
o GetSelection
public void GetSelection( | int& | iStart, |
| int& | iStop) |
-
Get the current selected sub-string.
- Parameters:
-
- iFirstCharacterIndex
- The selected sub-string first character index.
- iLastCharacterIndex
- The selected sub-string last character index.
o GetSelectionChangeNotification
-
Returns the CATDlgSelectionChangeNotification event notification.
It is sent by CATDlgEditor whenever the
selection in entry field is changed.
o GetText
-
Extracts the text from a single line editor.
- Returns:
- The text extracted.
o GetValue
-
Get value for double precision editors.
Role: Get the value for a double precision editor.
- Returns:
- The double value.
o GetVisibleTextHeight
public int GetVisibleTextHeight( | ) |
-
Get the visible text height.
- Returns:
- The visible text height.
o GetVisibleTextWidth
public int GetVisibleTextWidth( | ) |
-
Get the visible text width.
- Returns:
- The visible text width.
o SetFirstColumn
public int SetFirstColumn( | int | iFirstVisibleColumn) |
-
Set the position of the first visible character in the line.
- Parameters:
-
- iFirstVisibleColumn
- The visible text first visible column.
o SetFirstLine
public int SetFirstLine( | int | iFirstVisibleLine) |
-
Set the position of the first visible line.
- Parameters:
-
- iFirstVisibleLine
- The visible text first line.
o SetFloatValue
public void SetFloatValue( | float | iFloatValue, |
| int | 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
-
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 void SetIntegerValue( | int | iIntegerValue, |
| int | 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
-
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 void SetMaxCharacterWidth( | int | iMaximumCharacterCount) |
-
Set the maximum character count that a line can contain.
- Parameters:
-
- iMaximumCharacterCount
- The maximum character count that a line can contain.
o SetSelection
public void SetSelection( | int | iFirstCharacterIndex, |
| int | 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 SetText
-
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 void SetValue( | double | iDoubleValue, |
| int | 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
-
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 void SetVisibleTextHeight( | int | iRowCount) |
-
Set the visible text height.
- Parameters:
-
- iRowCount
- The visible text height (row count).
o SetVisibleTextWidth
public void SetVisibleTextWidth( | int | 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