Dialog CATDlgSelectorList

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


public class CATDlgSelectorList

Base class for lists.
Role: The selector list allows the end user to select one or several values among a discrete list of predefined values. The values are generally character strings. Scrollbars are added if the list is longer or wider than the list display area. The selected value(s) is (are) highlighted. The end user cannot enter values and can only select among those proposed.
Use selector list whenever you propose to the end user to select values from a predefined list.


Constructor and Destructor Index


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

Method Index


o ClearLine()
Deletes all lines.
o ClearLine(int)
Deletes a line from its number.
o ClearLine(int*,int)
Deletes several lines from their numbers.
o ClearSelect()
Deselects all selected lines.
o GetContextualLine()
Returns the line number of the selected line under the mouse when the end user displays the contextual menu.
o GetFirstColumn()
Returns the first visible character position.
o GetFirstLine()
Returns the first visible line position.
o GetLine(CATUnicodeString&,int)
Retrieves the contents of a line given its number.
o GetLineCount()
Returns the number of lines in the list.
o GetListActivateNotification()
Returns the event notification sent whenever a line is double clicked.
o GetListSelectNotification()
Returns the event notification sent whenever a line is selected.
o GetSelect(int*,int)
Retrieves the selected lines as an array of int.
o GetSelect(CATUnicodeString*,int)
Retrieves the selected lines as an array of CATUnicodeString.
o GetSelectCount()
Returns the number of selected items.
o GetVisibleTextHeight()
Returns the visible text height.
o GetVisibleTextWidth()
Returns the number of visible characters.
o IsSelect(int)
Returns TRUE if the given line specified by its number is selected, FALSE otherwise.
o IsSelect(CATUnicodeString&)
Returns TRUE if the given line specified by its contents is selected, FALSE otherwise.
o SetFirstColumn(int)
Sets the first visible character position.
o SetFirstLine(int)
Sets the first visible line position.
o SetLine(CATUnicodeString&,int,CATULong)
Sets or modifies the contents of a line given its number.
o SetLine(CATUnicodeString*,int,int,CATULong)
Sets or modifies the contents of one or several contigous lines given the number of the first line.
o SetSelect(int*,int,int)
Sets the selected lines from an array of int.
o SetSelect(CATUnicodeString*,int,int)
Sets the selected lines from an array of CATUnicodeString.
o SetVisibleTextHeight(int)
Sets the visible text height.
o SetVisibleTextWidth(int)
Sets the number of visible characters.

Constructor and Destructor


o CATDlgSelectorList
public CATDlgSelectorList( iParent,
const iObjectName,
iStyle=NULL)
Constructs a CATDlgSelectorList.
Parameters:
iParent
The parent of the selector list.
iObjectName
The name of the selector list.
iStyle
The style of the selector list. The style can be :
NULL
: if no value is passed, only a single value can be selected,
CATDlgLstMultisel
: several values can be selected using the Shift and Ctrl keys.
o ~CATDlgSelectorList
public virtual ~CATDlgSelectorList()

Methods


o ClearLine
public ClearLine()
Deletes all lines.
o ClearLine
public ClearLine( iIndex)
Deletes a line from its number.
Parameters:
iIndex
The number of the line to delete.
o ClearLine
public ClearLine( iRow,
iLines)
Deletes several lines from their numbers.
Parameters:
iRow
The array of int representing the numbers of the lines to delete.
iLines
The number of lines to delete.
o ClearSelect
public ClearSelect()
Deselects all selected lines.
o GetContextualLine
public GetContextualLine()
Returns the line number of the selected line under the mouse when the end user displays the contextual menu.
o GetFirstColumn
public GetFirstColumn()
Returns the first visible character position.
o GetFirstLine
public GetFirstLine()
Returns the first visible line position.
o GetLine
public GetLine( oString,
iRow)
Retrieves the contents of a line given its number.
Parameters:
oString
The returned contents of the specified line.
iRow
The number of the line.
o GetLineCount
public GetLineCount()
Returns the number of lines in the list.
o GetListActivateNotification
public GetListActivateNotification()
Returns the event notification sent whenever a line is double clicked.
o GetListSelectNotification
public GetListSelectNotification()
Returns the event notification sent whenever a line is selected.
Role:This notification is sent when the end user select an item of the list. So it means that the Dialog object must contain at least one item.
o GetSelect
public GetSelect( oTabRow,
iSize)
Retrieves the selected lines as an array of int. Pay attention to properly allocate and deallocate the array.
Parameters:
oTabRow
The pointer to the returned array of int.
iSize
The size of the array.
Returns:
the number of selected lines.
o GetSelect
public GetSelect( oTabString,
iSize)
Retrieves the selected lines as an array of CATUnicodeString. Pay attention to properly allocate and deallocate the array.
Parameters:
oTabString
The pointer to the returned array of CATUnicodeString.
iSize
The size of the array.
Returns:
the number of selected lines.
o GetSelectCount
public GetSelectCount()
Returns the number of selected items.
o GetVisibleTextHeight
public GetVisibleTextHeight()
Returns the visible text height.
o GetVisibleTextWidth
public GetVisibleTextWidth()
Returns the number of visible characters.
o IsSelect
public IsSelect( iRow)
Returns TRUE if the given line specified by its number is selected, FALSE otherwise. A CATBool is a short.
Parameters:
iRow
The number of the specified line.
o IsSelect
public IsSelect( const iString)
Returns TRUE if the given line specified by its contents is selected, FALSE otherwise. A CATBool is a short.
Parameters:
iString
The contents of the specified line.
o SetFirstColumn
public SetFirstColumn( iColumn)
Sets the first visible character position.
Parameters:
iColumn
The position to set for the first visible character.
Returns:
the first visible character position.
o SetFirstLine
public SetFirstLine( iRow)
Sets the first visible line position.
Parameters:
iRow
The position to set for the first visible line.
Returns:
the first visible line position.
o SetLine
public SetLine( const iString,
iIndex=-1,
iMode=CATDlgDataAdd )
Sets or modifies the contents of a line given its number.
Role:This method sets or modifies the contents of a line given its position. If the line was selected, see , the line is no more.
Parameters:
iString
The contents of the specified line.
iIndex
The number of the line to add or modify. If iIndex is omitted or set to -1, the line is appended to the list .The first element of the list is 0;
iMode
Two modes are available :
CATDlgDataAdd
to add a line, which is the default,
CATDlgDataModify
to modify an existing line.
o SetLine
public SetLine( const iString,
iNbLines,
iIndex=-1,
iMode=CATDlgDataAdd )
Sets or modifies the contents of one or several contigous lines given the number of the first line.
Role:This method sets or modifies the contents of one or several contigous lines given the position of the first line. All the selected lines, see are no more.
Parameters:
iString
The array of contents of the specified lines.
iNbLines
The number of lines to add or modify.
iIndex
The number of the first line to add or modify. If iIndex is omitted or set to -1, the lines are appended to the list.
iMode
Two modes are available :
CATDlgDataAdd
to add lines, which is the default,
CATDlgDataModify
to modify existing lines.
o SetSelect
public SetSelect( iTabRow,
iSize,
iNotify=1)
Sets the selected lines from an array of int.
Parameters:
iTabRow
The pointer to the array of int representing the numbers of the lines to select.
iSize
The size of the array.
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 number of selected lines.
o SetSelect
public SetSelect( iTabString,
iSize,
iNotify=1)
Sets the selected lines from an array of CATUnicodeString.
Parameters:
iTabString
The pointer to the array of CATUnicodeString representing the contents of the lines to select.
iSize
The size of the array.
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 number of selected lines.
o SetVisibleTextHeight
public SetVisibleTextHeight( iHeight)
Sets the visible text height.
Parameters:
iHeight
The visible text height to set.
o SetVisibleTextWidth
public SetVisibleTextWidth( iWidth)
Sets the number of visible characters.
Parameters:
iWidth
The number of visible characters to set.

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

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