All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

Dialog Class CATDlgMultiList

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---System.CATEventSubscriber
        |
        +---System.CATCommand
          |
          +---Dialog.CATDialog
            |
            +---Dialog.CATDlgControl
              |
              +---CATDlgMultiList
 

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


public class CATDlgMultiList

Base class for lists with multiple columns.


Constructor and Destructor Index


o CATDlgMultiList(CATDialog*,CATString&,CATDlgStyle)
Constructor.
o ~CATDlgMultiList()
Destructor.

Method Index


o ClearLine()
Removes all the rows from the multilist.
o ClearLine(int)
Removes a row indentified by its index from the multilist.
o ClearLine(int*,int)
Removes a list of rows indentified by their indices from the multilist.
o ClearSelect()
Clears the selection.
o EditCell(int,int,int)
Edits a cell in the multilist.
o GetColumnCount()
Returns the count of columns.
o GetColumnItem(int,CATUnicodeString&,int)
Returns the string in a cell identified by its row and column.
o GetColumnPixelWidth(int)
Returns the width of a given column in pixels.
o GetColumnTextWidth(int)
Returns the width of a given column in characters.
o GetColumnTitle(int,CATUnicodeString&)
Returns the title of a multilist column identified by its index.
o GetColumnVisibility(int)
Returns whether a column identified by its index is visible or hidden.
o GetContextualColumn()
Returns the column index under the cursor when a contextual menu is activated.
o GetContextualLine()
Returns the row index under the cursor when a contextual menu is activated.
o GetFirstLine()
Returns the index of the first visible row.
o GetLineCount()
Returns the count of rows.
o GetListActivateNotification()
Returns the event notification sent whenever the multilist is activated.
o GetListCellModifyNotification()
Returns the event notification sent whenever a multilist cell is modified.
o GetListColumnActivateNotification()
Returns the event notification sent whenever a multilist column is selected.
o GetListSelectNotification()
Returns the event notification sent whenever the multilist selection changes.
o GetModifiedCell(int&,int&)
Returns the coordinates of the cell which has been edited.
o GetSelect(int*,int)
Returns the count of selected rows in the multilist and their row indices.
o GetSelect(int,CATUnicodeString*,int)
Returns the count of selected rows in a column of the multilist and their string values.
o GetSelectCount()
Returns the count of selected rows.
o GetSelectedColumn()
Returns the column index of the selected column.
o GetTitlesVisibility()
Returns whether the titles of the multilist columns are visible or hidden.
o GetVisibleColumnCount()
Returns the number of visible columns.
o GetVisibleLineCount()
Returns the number of visible rows.
o GetVisibleTextWidth()
Returns the total width of the multilist, in characters.
o IsSelect(int)
Returns whether a row, identified by its index is selected or not.
o IsSelect(int,CATUnicodeString&)
Returns whether a row, identified by its index is selected or not.
o ReorderColumns(int*,int,int)
Reorder a set of contiguous columns contained by the multilist.
o SetColumnEditable(int,int)
Sets whether the cells in a column identified by its index are editable.
o SetColumnItem(int,CATUnicodeString&,CATString&,int,CATULong)
Sets string value and icon value of a cell identified by its row and column, or creates the cell.
o SetColumnItem(int,CATUnicodeString&,int,CATULong)
Sets string value of a cell identified by its row and column, or creates the cell.
o SetColumnItems(int,CATUnicodeString*,int,int,CATULong)
Sets string value of several consecutive cells on a row identified by its index.
o SetColumnPixelWidth(int,int)
Sets the width of a given column in pixels.
o SetColumnSortMethod(int,CATDlgLstSortOrder,CATDlgMultiListSortMethod)
Sets the sort method.
o SetColumnTextWidth(int,int)
Sets the width of a given column in characters.
o SetColumnTitles(int,CATUnicodeString*)
Sets the title of the multilist columns.
o SetColumnVisibility(int,CATULong)
Hides or shows a column identified by its index.
o SetFirstLine(int)
Scroll the list to make the specified row the first visible row.
o SetRowEditable(int,int)
Sets whether the cells in a row identified by its index are editable.
o SetSelect(int*,int,int)
Selects several rows of the multilist identified by their row indices.
o SetSelect(int,CATUnicodeString*,int,int)
Selects several rows of the multilist identified by a column index and the string values to look up in the row.
o SetTitlesVisibility(CATULong)
Set the display state of the titles of the multilist columns.
o SetVisibleColumnCount(int)
Set the count of visible columns.
o SetVisibleLineCount(int)
Set the count of visible rows.
o SetVisibleTextWidth(int)
Sets the total width of the multilist, in characters.
o SortColumn(int)
Sorts a column in the multilist.
o Synchronize(CATDlgMultiList*)
Synchronize another multilist with the receiver.

Constructor and Destructor


o CATDlgMultiList
public CATDlgMultiList(CATDialog* iParent,
const CATString& iObjectName,
CATDlgStyle iStyle=NULL)
Constructor.
Parameters:
iParent
The parent widget.
iObjectName
The internal name of the multilist.
iStyle
The style of the multilist.
Legal values:
default
multiple selection is not allowed.
CATDlgLstMultisel
multiple selection is allowed.
CATDlgLstAutoSort
automatic sort is activated when the user presses the title of a column, see
SetColumnSortMethod.
o ~CATDlgMultiList
public virtual ~CATDlgMultiList()
Destructor.

Methods


o ClearLine
public void ClearLine()
Removes all the rows from the multilist.
o ClearLine
public void ClearLine(int iRowIndex)
Removes a row indentified by its index from the multilist.
Parameters:
iRowIndex
the index of the row to remove.
o ClearLine
public void ClearLine(int* iRowIndices,
int iRowIndicesCount)
Removes a list of rows indentified by their indices from the multilist.
Parameters:
iRowIndices
an array of row indices.
iRowIndicesCount
the size of the array.
o ClearSelect
public void ClearSelect()
Clears the selection.
o EditCell
public void EditCell(int iColumnIndex,
int iRowIndex,
int iEditable)
Edits a cell in the multilist.
Parameters:
iColumnIndex
the index of the column.
iRowIndex
the index of the row.
iEditable

Legal values:
TRUE
the cell turns to edit mode.
FALSE
the cell is not any more editable.
o GetColumnCount
public int GetColumnCount()
Returns the count of columns.
o GetColumnItem
public void GetColumnItem(int iColumnIndex,
CATUnicodeString& oString,
int iRowIndex)
Returns the string in a cell identified by its row and column.
Parameters:
iColumnIndex
the column index of the cell.
oString
the string value of the cell. param iRowIndex the row index of the cell.
o GetColumnPixelWidth
public int GetColumnPixelWidth(int iColumnIndex)
Returns the width of a given column in pixels.
Parameters:
iColumnIndex
the index of the column.
o GetColumnTextWidth
public int GetColumnTextWidth(int iColumnIndex)
Returns the width of a given column in characters.
Parameters:
iColumnIndex
the index of the column.
o GetColumnTitle
public void GetColumnTitle(int iColumnIndex,
CATUnicodeString& oString)
Returns the title of a multilist column identified by its index.
Parameters:
iColumnIndex
the column index.
oString
the string value of the title.
o GetColumnVisibility
public CATULong GetColumnVisibility(int iColumnIndex)
Returns whether a column identified by its index is visible or hidden.
Parameters:
iColumnIndex
the index of the column
Returns:
a column visibility status
Legal values:
CATDlgShow
Show the column.
CATDlgHide
Hide the column.
o GetContextualColumn
public int GetContextualColumn()
Returns the column index under the cursor when a contextual menu is activated.
o GetContextualLine
public int GetContextualLine()
Returns the row index under the cursor when a contextual menu is activated.
o GetFirstLine
public int GetFirstLine()
Returns the index of the first visible row.
o GetLineCount
public int GetLineCount()
Returns the count of rows.
o GetListActivateNotification
public CATNotification * GetListActivateNotification()const
Returns the event notification sent whenever the multilist is activated.
o GetListCellModifyNotification
public CATNotification * GetListCellModifyNotification()const
Returns the event notification sent whenever a multilist cell is modified.
o GetListColumnActivateNotification
public CATNotification * GetListColumnActivateNotification()const
Returns the event notification sent whenever a multilist column is selected.
o GetListSelectNotification
public CATNotification * GetListSelectNotification()const
Returns the event notification sent whenever the multilist selection changes.
o GetModifiedCell
public int GetModifiedCell(int& oRowIndex,
int& oColumnIndex)
Returns the coordinates of the cell which has been edited.
Parameters:
oRowIndex
the row index of the cell.
oColumnIndex
the column index of the cell.
Returns:
a boolean which indicates if there is currently an edited cell.
Legal values:
TRUE
there is an edited cell.
FALSE
there is no edited cell.
o GetSelect
public int GetSelect(int* ioTabRow,
int iSize)
Returns the count of selected rows in the multilist and their row indices. The size of the array should be defined by the method GetSelectCount
Parameters:
ioTabRow
an array of row indices.
iSize
the size of the array.
Returns:
the number of selected rows.
o GetSelect
public int GetSelect(int iColumnIndex,
CATUnicodeString* ioTabString,
int iSize)
Returns the count of selected rows in a column of the multilist and their string values. The size of the array should be defined by the method GetSelectCount
Parameters:
iColumnIndex
a column index.
ioTabString
an array of strings to look up in the column.
iSize
the size of the array.
Returns:
the number of selected rows.
o GetSelectCount
public int GetSelectCount()
Returns the count of selected rows.
o GetSelectedColumn
public int GetSelectedColumn()
Returns the column index of the selected column.
o GetTitlesVisibility
public CATULong GetTitlesVisibility()
Returns whether the titles of the multilist columns are visible or hidden.
Returns:
a titles visibility status
Legal values:
CATDlgShow
the titles are visible.
CATDlgHide
the titles are hidden.
o GetVisibleColumnCount
public int GetVisibleColumnCount()
Returns the number of visible columns.
o GetVisibleLineCount
public int GetVisibleLineCount()
Returns the number of visible rows.
o GetVisibleTextWidth
public int GetVisibleTextWidth()
Returns the total width of the multilist, in characters.
o IsSelect
public CATBool IsSelect(int iRowIndex)
Returns whether a row, identified by its index is selected or not.
Parameters:
iRowIndex
the index of the row.
o IsSelect
public CATBool IsSelect(int nColumn,
const CATUnicodeString& rString)
Returns whether a row, identified by its index is selected or not.
o ReorderColumns
public void ReorderColumns(int* iNewPosTab,
int iTabSize,
int iFrom=0)
Reorder a set of contiguous columns contained by the multilist.
Parameters:
iNewPosTab
an array of integers which describes at which position the column currently at index 0..iSize - 1should wind up.
iTabSize
the size of the integer array.
o SetColumnEditable
public void SetColumnEditable(int iColumnIndex,
int iEditable)
Sets whether the cells in a column identified by its index are editable.
Parameters:
iColumnIndex
the index of the column
iEditable

Legal values:
TRUE
the column cells are editable.
FALSE
the column cells are not editable.
o SetColumnItem
public int SetColumnItem(int iColumnIndex,
const CATUnicodeString& iString,
const CATString& iIconName,
int iRowIndex=-1,
CATULong iMode=CATDlgDataAdd )
Sets string value and icon value of a cell identified by its row and column, or creates the cell.
Parameters:
iColumnIndex
the column index of the cell.
iString
the string value of the cell.
iIconName
the name of the icon.
iRowIndex
the row index of the cell.
Legal values:
-1
the cell is appended to the multilist.
valid row index
the cell is placed at the specified row index.
iMode
a mode which describes how to alter the contents of the cell.
Legal values:
CATDlgDataAdd
the cell is created.
CATDlgDataModify
the cell is modified.

Limitations:
The column index must be different from 0.
The maximum size for the icon is 16x16.
For performance reasons, avoid using the icons in too many different columns.
Returns:
the count of selected rows.
o SetColumnItem
public int SetColumnItem(int iColumnIndex,
const CATUnicodeString& iString,
int iRowIndex=-1,
CATULong iMode=CATDlgDataAdd )
Sets string value of a cell identified by its row and column, or creates the cell.
Parameters:
iColumnIndex
the column index of the cell.
iString
the string value of the cell.
iRowIndex
the row index of the cell.
Legal values:
-1
the cell is appended to the multilist.
valid row index
the cell is placed at the specified row index.
iMode
a mode which describes how to alter the contents of the cell.
Legal values:
CATDlgDataAdd
the cell is created.
CATDlgDataModify
the cell is modified.
Returns:
the count of selected rows.
o SetColumnItems
public int SetColumnItems(int iColumnIndex,
const CATUnicodeString* iStringArray,
int iStringArraySize,
int iRowIndex=-1,
CATULong iMode=CATDlgDataAdd )
Sets string value of several consecutive cells on a row identified by its index.
Parameters:
iColumnIndex
the column index of the first cell.
iStringArray
an array of strings.
iStringArraySize
the size of the array.
iRowIndex
the row index of the cells.
Legal values:
-1
the cells are appended to the multilist.
valid row index
the cells are placed at the specified row indices.
iMode
a mode which describes how to alter the contents of the cells.
Legal values:
CATDlgDataAdd
the cells are created.
CATDlgDataModify
the cells are modified.
Returns:
the count of selected rows.
o SetColumnPixelWidth
public void SetColumnPixelWidth(int iColumnIndex,
int iPixelWidth)
Sets the width of a given column in pixels.
Parameters:
iColumnIndex
the index of the column.
iPixelWidth
the width of the column, in pixels.
o SetColumnSortMethod
public void SetColumnSortMethod(int iColumnIndex,
CATDlgLstSortOrder iSortOrder,
CATDlgMultiListSortMethod ptrSortMethod=NULL)
Sets the sort method.
Parameters:
iColumnIndex
the index of the column.
iSortOrder
the sort mode.
Legal values:
  • AlphabeticalOrder The sort is alphabetical, default.
  • NumericalOrder The sort is numerical.
  • UserDefinedOrder The sort is defined by the function provided as 3rd argument.
ptrSortMethod
the applicative function to define how to compare two cells. This parameter is ignored if the CATDlgLstSortOrder is different from UserDefinedOrder. The function must return a negative value if its first argument is less than its second, a zero if equal, and a positive value if greater.
o SetColumnTextWidth
public void SetColumnTextWidth(int iColumnIndex,
int iTextWidth)
Sets the width of a given column in characters.
Parameters:
iColumnIndex
the index of the column.
iTextWidth
the width of the column, in characters.
o SetColumnTitles
public void SetColumnTitles(int iArraySize,
CATUnicodeString* iTitleArray)
Sets the title of the multilist columns.
Parameters:
iArraySize
the size of the title array.
iTitleArray
an array of column titles.
o SetColumnVisibility
public void SetColumnVisibility(int iColumnIndex,
CATULong iVisibility)
Hides or shows a column identified by its index.
Parameters:
iColumnIndex
the index of the column
iVisibility
a column visibility status
Legal values:
CATDlgShow
Show the column.
CATDlgHide
Hide the column.
o SetFirstLine
public int SetFirstLine(int iRowIndex)
Scroll the list to make the specified row the first visible row.
Parameters:
iRowIndex
the index of the row which should become the first visible row.
o SetRowEditable
public void SetRowEditable(int iRowIndex,
int iEditable)
Sets whether the cells in a row identified by its index are editable.
Parameters:
iRowIndex
the index of the row
iEditable

Legal values:
TRUE
the row cells are editable.
FALSE
the row cells are not editable.
o SetSelect
public int SetSelect(int* iTabRow,
int iSize,
int iNotify=1)
Selects several rows of the multilist identified by their row indices.
Parameters:
iTabRow
an array of row indices to select.
iSize
the size of the array.
iNotify
Whether to trigger the GetListSelectNotificationor not.
Legal values:
0
do not trigger the notification.
1
trigger the notification (default).
Returns:
the number of actually selected rows.
o SetSelect
public int SetSelect(int iColumnIndex,
CATUnicodeString* iTabString,
int iSize,
int iNotify=1)
Selects several rows of the multilist identified by a column index and the string values to look up in the row.
Parameters:
iColumnIndex
a column index.
iTabString
an array of strings to look up in the column.
iSize
the size of the array.
iNotify
Whether to trigger the GetListSelectNotificationor not.
Legal values:
0
do not trigger the notification.
1
trigger the notification (default).
Returns:
the number of actually selected rows.
o SetTitlesVisibility
public void SetTitlesVisibility(CATULong iState)
Set the display state of the titles of the multilist columns.
Parameters:
iState
The visibility state to set.
Legal values : It can be set to either :
CATDlgShow
to show the titles,
CATDlgHide
to hide the titles.
o SetVisibleColumnCount
public void SetVisibleColumnCount(int iColumnCount)
Set the count of visible columns.
Parameters:
iColumnCount
the count of visible columns.
o SetVisibleLineCount
public void SetVisibleLineCount(int iRowCount)
Set the count of visible rows.
Parameters:
iRowCount
the count of visible rows.
o SetVisibleTextWidth
public void SetVisibleTextWidth(int iTextWidth)
Sets the total width of the multilist, in characters.
Parameters:
iTextWidth
the width of the multilist, in characters.
o SortColumn
public void SortColumn(int iColumnIndex)
Sorts a column in the multilist.
Parameters:
iColumnIndex
the index of the column.
o Synchronize
public void Synchronize(CATDlgMultiList* iList)
Synchronize another multilist with the receiver. Scrolling on the receiver will be applied to the other multilist too.
Parameters:
iList
the other list.

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

Copyright © 2003, Dassault Systèmes. All rights reserved.