# IMFListPart Struct Reference
[MCFrame]

Inheritance diagram for IMFListPart:

List of all members.

## Public Member Functions
virtual void MCCOMAPI | GetCellRect (const int32 inCell, TMCRect &outRect) const =0
virtual boolean MCCOMAPI | GetNextSelectedCell (int32 &ioCell) const =0
virtual void MCCOMAPI | GetSelectedCellRange (int32 &outFirstCell, int32 &outLastCell) const =0
virtual int32 MCCOMAPI | GetNumOfCells (void) const =0
virtual MCCOMErr MCCOMAPI | AddCells (int32 inStartingWhere, int32 inHowMany, boolean inInvalidate)=0
virtual MCCOMErr MCCOMAPI | DeleteCells (int32 inStartingWhere, int32 inHowMany, boolean inInvalidate)=0
virtual void MCCOMAPI | SelectCell (const int32 inCell, const boolean beSelected, boolean inInvalidate)=0
virtual void MCCOMAPI | CreateNamedCells (const TMCClassArray< TMCDynamicString > &inNames)=0
virtual IMFPart *MCCOMAPI | GetThisPart ()=0
| Retruns the IMFPart interface (always supported).
virtual int32 MCCOMAPI | GetCellHeight () const =0
| Get the cell height.
virtual void MCCOMAPI | SetCellHeight (const int32 inNewHeight)=0
| Set the cell height.

## Detailed Description

List Parts implement a 1 column by N row list of cells. Cells are selectable.

## Member Function Documentation

virtual MCCOMErr MCCOMAPI IMFListPart::AddCells | ( | int32 | inStartingWhere,
|  | int32 | inHowMany,
|  | boolean | inInvalidate |
| ) |  |  | `[pure virtual]`

Add "inHowMany" cells to the list, starting at "inStartingWhere". "inStartingWhere" MUST BE WITHIN 0 AND THE TOTAL CELLS.

Parameters:

  | inStartingWhere | Index at which to insert the new cells
  | inHowMany | How many cells to insert
  | inInvalidate | If True, invalidate the List

virtual void MCCOMAPI IMFListPart::CreateNamedCells | ( | const TMCClassArray< TMCDynamicString > & | inNames | ) | `[pure virtual]`

Only implemented by TMFNameListPart (TMFListPart doens't do anything) Deletes previous cells, and creates a named cell for each element in inNames

Parameters:

  | inNames | Array of names of cells to create

virtual MCCOMErr MCCOMAPI IMFListPart::DeleteCells | ( | int32 | inStartingWhere,
|  | int32 | inHowMany,
|  | boolean | inInvalidate |
| ) |  |  | `[pure virtual]`

Delete cells from the list between inStartingWhere and inStartingWhere+inHowMany If *ALL* cells should be deleted, pass "kLIST_DELETE_ALL" for "inHowMany".

Parameters:

  | inStartingWhere | First index of cell to be deleted
  | inHowMany | How many cells to delete
  | inInvalidate | If True, invalidate the List

virtual int32 MCCOMAPI IMFListPart::GetCellHeight | ( |  | ) | const`[pure virtual]`

Get the cell height.

virtual void MCCOMAPI IMFListPart::GetCellRect | ( | const int32 | inCell,
|  | TMCRect & | outRect |
| ) |  |  | const`[pure virtual]`

Return the rectangle that encloses the passed-in cell. The cell may not be visible, hence the rect may not be visible either.

Parameters:

  | inCell | Index of cell to check
  | outRect | Returns bounds of the cell

virtual boolean MCCOMAPI IMFListPart::GetNextSelectedCell | ( | int32 & | ioCell | ) | const`[pure virtual]`

Returns the index of the next selected cell. Pass in the index of the first cell to check for selectedness. NOTE: 0 starts at top, may return 0 as first one too. If no cells are selected then FALSE is returned and "ioCell" should be ignored.

Parameters:

  | ioCell | Pass in a cell index, get back the index of the next selected cell

Returns:
  False if there is no next selected cell. If this is the case, the contents of ioCell should not be used.

virtual int32 MCCOMAPI IMFListPart::GetNumOfCells | ( | void |  | ) | const`[pure virtual]`

Returns the number of cells in the list.

virtual void MCCOMAPI IMFListPart::GetSelectedCellRange | ( | int32 & | outFirstCell,
|  | int32 & | outLastCell |
| ) |  |  | const`[pure virtual]`

Returns the first and last cells that are selected. If no cells are selected then -1 is returned for both. Note that there may be "holes" in the middle, that is, the returned parameters are simply bounds, not an inclusive list.

Parameters:

  | outFirstCell | Returns the first cell that is selected or -1 if nothing selected
  | outLastCell | Returns the last cell that is selected or -1 if nothing selected

virtual IMFPart* MCCOMAPI IMFListPart::GetThisPart | ( |  | ) | `[pure virtual]`

Retruns the IMFPart interface (always supported).

virtual void MCCOMAPI IMFListPart::SelectCell | ( | const int32 | inCell,
|  | const boolean | beSelected,
|  | boolean | inInvalidate |
| ) |  |  | `[pure virtual]`

Set the selection state of a cell - redraws the cell too. If only single selection is allowed, other cells are deselected if "beSelected" is TRUE.

Parameters:

  | inCell | Which cell to select
  | beSelected | If true, sets this cell to selected. If false, to not selected.
  | inInvalidate | If true, invalidates the cell

virtual void MCCOMAPI IMFListPart::SetCellHeight | ( | const int32 | inNewHeight | ) | `[pure virtual]`

Set the cell height.

The documentation for this struct was generated from the following file:

- IMFListPart.h