All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

Dialog Class CATDlgSelectorList

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---System.CATEventSubscriber
        |
        +---System.CATCommand
          |
          +---Dialog.CATDialog
            |
            +---Dialog.CATDlgControl
              |
              +---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(CATUnicodeString*,int)
Retrieves the selected lines as an array of CATUnicodeString.
o GetSelect(int*,int)
Retrieves the selected lines as an array of int.
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(CATUnicodeString&)
Returns TRUE if the given line specified by its contents is selected, FALSE otherwise.
o IsSelect(int)
Returns TRUE if the given line specified by its number 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(CATUnicodeString*,int,int)
Sets the selected lines from an array of CATUnicodeString.
o SetSelect(int*,int,int)
Sets the selected lines from an array of int.
o SetVisibleTextHeight(int)
Sets the visible text height.
o SetVisibleTextWidth(int)
Sets the number of visible characters.

Constructor and Destructor


o CATDlgSelectorList
public CATDlgSelectorList(CATDialog* iParent,
const CATString& iObjectName,
CATDlgStyle 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 void ClearLine()
Deletes all lines.
o ClearLine
public void ClearLine(int iIndex)
Deletes a line from its number.
Parameters:
iIndex
The number of the line to delete.
o ClearLine
public void ClearLine(int* iRow,
int 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 void ClearSelect()
Deselects all selected lines.
o GetContextualLine
public int GetContextualLine()
Returns the line number of the selected line under the mouse when the end user displays the contextual menu.
o GetFirstColumn
public int GetFirstColumn()
Returns the first visible character position.
o GetFirstLine
public int GetFirstLine()
Returns the first visible line position.
o GetLine
public void GetLine(CATUnicodeString& oString,
int 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 int GetLineCount()
Returns the number of lines in the list.
o GetListActivateNotification
public CATNotification * GetListActivateNotification()const
Returns the event notification sent whenever a line is double clicked.
o GetListSelectNotification
public CATNotification * GetListSelectNotification()const
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 int GetSelect(CATUnicodeString* oTabString,
int 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 GetSelect
public int GetSelect(int* oTabRow,
int 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 GetSelectCount
public int GetSelectCount()
Returns the number of selected items.
o GetVisibleTextHeight
public int GetVisibleTextHeight()
Returns the visible text height.
o GetVisibleTextWidth
public int GetVisibleTextWidth()
Returns the number of visible characters.
o IsSelect
public CATBool IsSelect( const CATUnicodeString& 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 IsSelect
public CATBool IsSelect(int 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 SetFirstColumn
public int SetFirstColumn(int 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 int SetFirstLine(int 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 int SetLine( const CATUnicodeString& iString,
int iIndex=-1,
CATULong 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 SetSelect , 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 int SetLine( const CATUnicodeString* iString,
int iNbLines,
int iIndex=-1,
CATULong 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 SetSelect 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 int SetSelect(CATUnicodeString* iTabString,
int iSize,
int 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 SetSelect
public int SetSelect(int* iTabRow,
int iSize,
int 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 SetVisibleTextHeight
public void SetVisibleTextHeight(int iHeight)
Sets the visible text height.
Parameters:
iHeight
The visible text height to set.
o SetVisibleTextWidth
public void SetVisibleTextWidth(int 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 © 2003, Dassault Systèmes. All rights reserved.