Dialog CATDlgCombo

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


public class CATDlgCombo

Base class for combo boxes.
Role: The combo allows the end user to choose a value or an option by selecting a character string from a predefined list, or through a keyboard entry.
Use a combo whenever you propose to the end user to select an alphanumerical value from a discrete list, or enter an alphanumerical value to update a discrete list.


Constructor and Destructor Index


o CATDlgCombo(CATDialog*,CATString&,CATDlgStyle)
Constructs a CATDlgCombo.
o ~CATDlgCombo()

Method Index


o ClearField()
Clears the keyboard entry field.
o ClearLine()
Deletes all the lines.
o ClearLine(int)
Deletes the line specified by the index passed in argument (first line has 0 for index).
o ClearLine(int*,int)
Deletes the lines specified by the array of index passed in argument (first line has 0 for index).
o ClearSelect()
Clears the selection and reinitializes the selected line number.
o GetComboCloseUpNotification()
Returns the event notification sent whenever the list of values is hidden
o GetComboDropNotification()
Returns the event notification sent whenever the list of values is displayed.
o GetComboModifyExtNotification()
Returns the event notification sent whenever the keyboard entry is modified by pressing the "Enter" key.
o GetComboModifyNotification()
Returns the event notification sent whenever the keyboard entry is modified by selection.
o GetComboSelectNotification()
Returns the event notification sent whenever a value is selected in the list.
o GetComboSingleClickNotification()
Returns the event notification sent whenever a combo is clicked.
o GetDropDownTextWidth()
Returns the number of characters in dropdown window.
o GetEditModifyNotification()
Returns the event notification sent whenever the keyboard entry is modified by editing.
o GetField()
Returns the keyboard entry field for a double combo.
o GetField(CATUnicodeString&)
Retrieves the keyboard entry field.
o GetLine(int)
Returns the contents of the line from its index, for CATDlgCmbDouble style only (first line has 0 for index).
o GetLine(CATUnicodeString&,int)
Retrieves the contents of the line from its index (first line has 0 for index).
o GetLine(CATUnicodeString&,CATString&,int)
Retrieves the contents of the line from its index (first line has 0 for index).
o GetLine(CATUnicodeString&,char*,int&,int&,int)
Retrieves the contents of the line from its index (first line has 0 for index).
o GetLine(CATUnicodeString&,unsigned char&,unsigned char&,unsigned char&,int)
Retrieves the contents of the line from its index (first line has 0 for index).
o GetLine(CATUnicodeString&,unsigned short&,unsigned short&,unsigned short&,int)
Retrieves the contents of the line from its index (first line has 0 for index).
o GetLineCount()
Returns the number of lines of the combo box.
o GetSelect()
Returns the selected line number.
o GetVisibleTextHeight()
Returns the number of visible lines of the combo box.
o GetVisibleTextWidth()
Returns the number of visible characters in the entry zone.
o Locate(CATUnicodeString&)
Returns the index of the selected string if this string exists in the combo.
o SetDropDownTextWidth(int)
Sets the number of columns in dropdown window.
o SetField(double)
Sets the keyboard entry field for a double combo.
o SetField(CATUnicodeString&)
Sets the keyboard entry field with a string.
o SetInputCallback(CATDlgComboCallback,void*)
Declares your own function to execute when a character is entered.
o SetLine(double,int,CATULong)
Adds or modifies one line containing a double.
o SetLine(double*,int,int,CATULong)
Adds or modifies several lines containing doubles.
o SetLine(CATUnicodeString&,int,CATULong)
Adds or modifies one line containing a string.
o SetLine(CATUnicodeString*,int,int,CATULong)
Adds or modifies several lines containing strings.
o SetLine(CATUnicodeString&,char*,int,int,int,CATULong)
Adds or modifies one line containing a monochrome icon and a string.
o SetLine(CATUnicodeString&,CATString&,int,CATULong)
Adds or modifies one line containing an icon and optionally a string.
o SetLine(CATUnicodeString&,unsigned char,unsigned char,unsigned char,int,CATULong)
Adds or modifies one line containing a colored rectangle and a string.
o SetLine(CATUnicodeString&,unsigned short,unsigned short,unsigned short,int,CATULong)
Adds or modifies one line containing a drawn line and a string.
o SetSelect(int,int)
Selects a line from its index (first line has 0 for index).
o SetSelect(double,int)
Selects a line from its double contents.
o SetSelect(CATUnicodeString&,int)
Selects a line from its contents.
o SetVisibleTextHeight(int)
Sets the number of visible lines of the combo box.
o SetVisibleTextWidth(int)
Sets the number of visible characters in the entry zone.

Constructor and Destructor


o CATDlgCombo
public CATDlgCombo( iParent,
const iObjectName,
iStyle=NULL)
Constructs a CATDlgCombo.
Parameters:
iParent
The parent of the combo box.
iObjectName
The name of the combo box.
iStyle
The style of the combo box. The style can be :
default
if no value is passed, for the standard combo, composed of an entry zone which displays the selected value, and a list permanently displayed.
CATDlgCmbDropDown
for the drop down combo, composed of an entry zone which displays the selected value, and the list of values to select in, displayed when the arrow located on the right of the entry zone is selected.
CATDlgCmbOptionStyle
for the option style combo. On UNIX, it is very close to the drop down combo, with a Motif style. On Windows, this style is equivalent to CATDlgCmbDropDown combo.
CATDlgCmbEntry
to allow keyboard text entry in addition to text selection for drop down and standard combos.
CATDlgCmbDouble
if the entered number must be a double precision floating number.
CATDlgCmbColor
to show a color palette. Available in conjunction with CATDlgCmbDropDown only.
CATDlgCmbLineType
to show a linetype palette. Available in conjunction with CATDlgCmbDropDown only.
CATDlgCmbBitmap
to show an icon palette. Available in conjunction with CATDlgCmbDropDown only.
o ~CATDlgCombo
public virtual ~CATDlgCombo()

Methods


o ClearField
public ClearField()
Clears the keyboard entry field.
o ClearLine
public ClearLine()
Deletes all the lines.
o ClearLine
public ClearLine( iIndex)
Deletes the line specified by the index passed in argument (first line has 0 for index).
Parameters:
iIndex
The index of the line to delete.
o ClearLine
public ClearLine( iLinesToClear,
iNumberOfLinesToClear)
Deletes the lines specified by the array of index passed in argument (first line has 0 for index).
Parameters:
iLinesToClear
The array of index of the lines to delete.
iNumberOfLinesToClear
The number of lines to delete.
o ClearSelect
public ClearSelect()
Clears the selection and reinitializes the selected line number.
o GetComboCloseUpNotification
public GetComboCloseUpNotification()
Returns the event notification sent whenever the list of values is hidden
o GetComboDropNotification
public GetComboDropNotification()
Returns the event notification sent whenever the list of values is displayed.
o GetComboModifyExtNotification
public GetComboModifyExtNotification()
Returns the event notification sent whenever the keyboard entry is modified by pressing the "Enter" key.
o GetComboModifyNotification
public GetComboModifyNotification()
Returns the event notification sent whenever the keyboard entry is modified by selection.
o GetComboSelectNotification
public GetComboSelectNotification()
Returns the event notification sent whenever a value is selected in the list.
o GetComboSingleClickNotification
public GetComboSingleClickNotification()
Returns the event notification sent whenever a combo is clicked.
o GetDropDownTextWidth
public GetDropDownTextWidth()
Returns the number of characters in dropdown window.
o GetEditModifyNotification
public GetEditModifyNotification()
Returns the event notification sent whenever the keyboard entry is modified by editing.
o GetField
public GetField()
Returns the keyboard entry field for a double combo.
o GetField
public GetField( oEntry)
Retrieves the keyboard entry field.
Parameters:
oEntry
The returned entry field.
o GetLine
public GetLine( iIndex)
Returns the contents of the line from its index, for CATDlgCmbDouble style only (first line has 0 for index).
Parameters:
iIndex
The index of the line.
o GetLine
public GetLine( oLine,
iIndex)
Retrieves the contents of the line from its index (first line has 0 for index).
Parameters:
oLine
The returned contents of the specified line.
iIndex
The index of the line.
o GetLine
public GetLine( oVal,
oIcon,
iIndex)
Retrieves the contents of the line from its index (first line has 0 for index).
Parameters:
oVal
The returned contents of the specified line.
oIcon
The returned name of the icon.
iIndex
The index of the line.
o GetLine
public GetLine( oVal,
oBitmap,
oWidth,
oHeight,
iIndex)
Retrieves the contents of the line from its index (first line has 0 for index).
Parameters:
oVal
The returned contents of the specified line.
oBitmap
The returned bitmap representing the icon.
oWidth
The returned width of the icon.
oHeight
The returned height of the icon.
iIndex
The index of the line.
o GetLine
public GetLine( oVal,
oRed,
oGreen,
oBlue,
iIndex)
Retrieves the contents of the line from its index (first line has 0 for index).
Parameters:
oVal
The returned contents of the specified line.
oRed,oGreen,oBlue
The returned RGB composants of the color of the specified line.
iIndex
The index of the line.
o GetLine
public GetLine( oVal,
oMask,
oRepet,
oWeight,
iIndex)
Retrieves the contents of the line from its index (first line has 0 for index).
Parameters:
oVal
The returned contents of the specified line.
oMask
The returned mask.
oRepet
The returned number of pixels for each bit of the mask.
oWeight
The returned height of the line (in pixels).
iIndex
The index of the line.
o GetLineCount
public GetLineCount()
Returns the number of lines of the combo box.
o GetSelect
public GetSelect()
Returns the selected line number.
o GetVisibleTextHeight
public GetVisibleTextHeight()
Returns the number of visible lines of the combo box.
o GetVisibleTextWidth
public GetVisibleTextWidth()
Returns the number of visible characters in the entry zone.
o Locate
public Locate( const iString)
Returns the index of the selected string if this string exists in the combo.
Parameters:
iString
The selected string.
Returns:
The index of the string or -1 if the string does not exist in the combo.
o SetDropDownTextWidth
public SetDropDownTextWidth( iColumns)
Sets the number of columns in dropdown window.
Parameters:
iColumns
The number of columns to set.
o SetField
public SetField( iEntry)
Sets the keyboard entry field for a double combo.
Parameters:
iEntry
The entry field to set.
o SetField
public SetField( const iEntry)
Sets the keyboard entry field with a string.
Parameters:
iEntry
The entry field to set.
o SetInputCallback
public SetInputCallback( iCheckingFunction,
iUsefulData)
Declares your own function to execute when a character is entered.
Role: Declares your own function to execute when a character is entered. Enables to declare an exit to verify the input character. This method is relevant for CATDlgCmbEntry style combos only.
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 field casted as a pointer to void.
o SetLine
public SetLine( iVal,
iIndex=-1,
iModeAddOrModify=CATDlgDataAdd )
Adds or modifies one line containing a double.
Parameters:
iVal
The contents of the line to add or modify (for CATDlgCmbDouble style only).
iIndex
The index to specify where to add the new line or which line to modify. If no value is passed, new lines are added at the end of the list.
iModeAddOrModify
The mode to specify whether you add a new line (CATDlgDataAdd set by default) or you modify an existing line (CATDlgDataModify).
Returns:
the index of the first added or modified line in the list.
o SetLine
public SetLine( const iValArray,
iNbLines,
iIndex=-1,
iModeAddOrModify=CATDlgDataAdd )
Adds or modifies several lines containing doubles.
Parameters:
iValArray
The contents of the lines to add (for CATDlgCmbDouble style only).
iNbLines
The number of lines to add.
iIndex
The index to specify where to add the new lines or which line to modify. If no value is passed, new lines are added at the end of the list.
iModeAddOrModify
The mode to specify whether you add a new line (CATDlgDataAdd set by default) or you modify an existing line (CATDlgDataModify).
Returns:
the index of the first added or modified line in the list.
o SetLine
public SetLine( const iLine,
iIndex=-1,
iModeAddOrModify=CATDlgDataAdd )
Adds or modifies one line containing a string.
Parameters:
iLine
The contents of the line to add or modify.
iIndex
The index to specify where to add the new line or which line to modify. If no value is passed, new lines are added at the end of the list.
iModeAddOrModify
The mode to specify whether you add a new line (CATDlgDataAdd set by default) or you modify an existing line (CATDlgDataModify).
Returns:
the index of the first added or modified line in the list.
o SetLine
public SetLine( const iLinesArray,
iNbLines,
iIndex=-1,
iModeAddOrModify=CATDlgDataAdd )
Adds or modifies several lines containing strings.
Parameters:
iLinesArray
The contents of the lines to add.
iNbLines
The number of lines to add.
iIndex
The index to specify where to add the new lines or which line to modify. If no value is passed, new lines are added at the end of the list.
iModeAddOrModify
The mode to specify whether you add a new line (CATDlgDataAdd set by default) or you modify an existing line (CATDlgDataModify).
Returns:
the index of the first added or modified line in the list.
o SetLine
public SetLine( const iVal,
const iBitmap,
iWidth,
iHeight,
iIndex=-1,
iModeAddOrModify=CATDlgDataAdd )
Adds or modifies one line containing a monochrome icon and a string.
Parameters:
iVal
The contents of the line to add or modify.
iBitmap
The monochrome bitmap representing the icon. The length expected is (iWidth+7)/8 * iHeight
iWidth
The width of the icon.
iHeight
The height of the icon.
iIndex
The index to specify where to add the new line or which line to modify. If no value is passed, new lines are added at the end of the list.
iModeAddOrModify
The mode to specify whether you add a new line (CATDlgDataAdd set by default) or you modify an existing line (CATDlgDataModify).
Returns:
the index of the first added or modified line in the list.
o SetLine
public SetLine( const iVal,
const iIcon,
iIndex=-1,
iModeAddOrModify=CATDlgDataAdd )
Adds or modifies one line containing an icon and optionally a string.
Parameters:
iVal
The contents of the line to add or modify.
iIcon
The name of the icon.
iIndex
The index to specify where to add the new line or which line to modify. If no value is passed, new lines are added at the end of the list.
iModeAddOrModify
The mode to specify whether you add a new line (CATDlgDataAdd set by default) or you modify an existing line (CATDlgDataModify).
Returns:
the index of the first added or modified line in the list.
o SetLine
public SetLine( const iVal,
iRed,
iGreen,
iBlue,
iIndex=-1,
iModeAddOrModify=CATDlgDataAdd )
Adds or modifies one line containing a colored rectangle and a string.
Parameters:
iVal
The contents of the line to add or modify.
iRed,iGreen,iBlue
The RGB composants of the color of the specified line.
iIndex
The index to specify where to add the new line or which line to modify. If no value is passed, new lines are added at the end of the list.
iModeAddOrModify
The mode to specify whether you add a new line (CATDlgDataAdd set by default) or you modify an existing line (CATDlgDataModify).
Returns:
the index of the first added or modified line in the list.
o SetLine
public SetLine( const iVal,
iMask,
iRepet,
iWeight,
iIndex=-1,
iModeAddOrModify=CATDlgDataAdd )
Adds or modifies one line containing a drawn line and a string.
Parameters:
iVal
The contents of the line to add or modify.
iMask
The mask.
iRepet
The number of pixels for each bit of the mask.
iWeight
The height of the line (in pixels).
iIndex
The index to specify where to add the new line or which line to modify. If no value is passed, new lines are added at the end of the list.
iModeAddOrModify
The mode to specify whether you add a new line (CATDlgDataAdd set by default) or you modify an existing line (CATDlgDataModify).
Returns:
the index of the first added or modified line in the list.
o SetSelect
public SetSelect( iIndex,
iNotify=1)
Selects a line from its index (first line has 0 for index).
Parameters:
iIndex
The index of the line to select.
iNotify
Set this parameter to a non null value if you want the corresponding notification to be sent. Otherwise set it to 0, so no notification will be sent.
Returns:
the index of the selected line.
o SetSelect
public SetSelect( iVal,
iNotify=1)
Selects a line from its double contents.
Parameters:
iVal
Contents of the line to select (for CATDlgCmbDouble style only).
iNotify
Set this parameter to a non null value if you want the corresponding notification to be sent. Otherwise set it to 0, so no notification will be sent.
Returns:
the index of the selected line.
o SetSelect
public SetSelect( const iString,
iNotify=1)
Selects a line from its contents.
Parameters:
iString
Contents of the line to select.
iNotify
Set this parameter to a non null value if you want the corresponding notification to be sent. Otherwise set it to 0, so no notification will be sent.
Returns:
the index of the selected line.
o SetVisibleTextHeight
public SetVisibleTextHeight( iRows)
Sets the number of visible lines of the combo box.
Parameters:
iRows
The number of visible lines to set for the combo box.
o SetVisibleTextWidth
public SetVisibleTextWidth( iColumns)
Sets the number of visible characters in the entry zone.
Parameters:
iColumns
The number of visible character to set for the entry zone.

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

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