Class: TLinearListControlState

Declaration: ScrollingListControl.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MTableControlState

Inherited By:

None.

Purpose:

TLinearListControlState is a class that provides storage for the TTableItems in a list. It maps TTableCell objects to their corresponding TTableItem objects.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

You would not normally derive any classes from TLinearListControlState. You typically derive directly from MTableControlState.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TLinearListControlState::TLinearListControlState

  1. TLinearListControlState ()
  2. TLinearListControlState (const TLinearListControlState &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called to create a TLinearListControlState suitable for streaming into.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLinearListControlState::~TLinearListControlState

virtual ~ TLinearListControlState ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLinearListControlState::operator=

TLinearListControlState & operator =(const TLinearListControlState &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLinearListControlState::operator>>=

virtual TStream & operator >>=(TStream &) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLinearListControlState::operator<<=

virtual TStream & operator <<= (TStream &)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws TInvalidVersionError if the version of the flattened object is not supported.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLinearListControlState::GetCount

virtual unsigned long GetCount () const

Interface Category:

API.

Purpose:

Returns the number of items in this object's list.

Calling Context:

Call this function directly to obtain the number of items in this object's list.

Parameters:

Return Value:

Returns the number of items in this object's list.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLinearListControlState::AdoptLast

virtual void AdoptLast (TTableItem *)

Interface Category:

API.

Purpose:

Adds the specified item to the end of the list, and gains control of the item.

Calling Context:

Call this function directly to add an item to the end of the list.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLinearListControlState::AdoptFirst

virtual void AdoptFirst (TTableItem *)

Interface Category:

API.

Purpose:

Adds the specified item to the beginning of the list, and gains control of the item.

Calling Context:

Call this function directly to add an item to the beginning of the list.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLinearListControlState::AdoptAfter

virtual void AdoptAfter (const TTableItem &, TTableItem *)

Interface Category:

API.

Purpose:

Inserts the specified item to the list after the list item, and gains control of the item. specified.

Calling Context:

Call this function directly to insert an item in the list.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLinearListControlState::AdoptAt

virtual void AdoptAt (unsigned long, TTableItem *)

Interface Category:

API.

Purpose:

Adds the specified item to the list at the array index position specified.

Calling Context:

Call this function directly to add an item in the list at a specific index position.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

  1. If the position index is outside the range of the list of items, this method will add the specified item at the beginning of the list.
  2. Array index starts at 0.

  3. Member Function: TLinearListControlState::GetLast

    virtual TTableItem * GetLast () const

Interface Category:

API.

Purpose:

Returns a pointer to the last item in the list.

Calling Context:

Call this function directly to obtain the last item in the list.

Parameters:

Return Value:

Returns a pointer to the last item in the list.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLinearListControlState::GetFirst

virtual TTableItem * GetFirst () const

Interface Category:

API.

Purpose:

Returns a pointer to the first item in the list.

Calling Context:

Call this function directly to obtain the first item in the list.

Parameters:

Return Value:

Returns a pointer to the first item in the list.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLinearListControlState::GetAfter

virtual TTableItem * GetAfter (const TTableItem &) const

Interface Category:

API.

Purpose:

Returns a pointer to the item in the list after the item specified.

Calling Context:

Call this function directly to obtain the item in the list after the item specified.

Parameters:

Return Value:

Returns a pointer to the item in the list after the item specified.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLinearListControlState::Orphan

virtual TTableItem * Orphan (TTableItem &)

Interface Category:

API.

Purpose:

Removes the specified item from the state.

Calling Context:

Call this function directly to remove the specified item from the state.

Parameters:

Return Value:

Returns a pointer to the item removed.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLinearListControlState::DeleteAll

virtual void DeleteAll ()

Interface Category:

API.

Purpose:

Deletes all items from the list.

Calling Context:

Call this function directly to delete all items from the list.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLinearListControlState::GetItemFromCell

virtual TTableItem * GetItemFromCell (const TTableCell & cell) const

Interface Category:

API.

Purpose:

Returns a pointer to the item from the specified cell.

Calling Context:

Call this function directly to return a cell's item.

Parameters:

Return Value:

Returns a pointer to the item from the specified cell.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLinearListControlState::GetCellFromItem

virtual void GetCellFromItem (TTableCell & cell, const TTableItem & item) const

Interface Category:

API.

Purpose:

Fills in the cell parameter with the cell representing the specified item in the list.

Calling Context:

Call this function directly to return a cell which maps to the position of the specified item in the list.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLinearListControlState::SetEnabled

virtual void SetEnabled (bool enabled)

Interface Category:

API.

Purpose:

Sets all items in the list to enabled or disabled, based on the specified parameter.

Calling Context:

Call this function directly to enable or disable all items in the list.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLinearListControlState::IsEnabled

virtual bool IsEnabled () const

Interface Category:

API.

Purpose:

Returns true if this control is enabled.

Calling Context:

Call this function directly to determine if this control is enabled.

Parameters:

Return Value:

Returns true if this control is enabled.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLinearListControlState::GetItems

virtual const TArrayOf < TTableItem > * GetItems () const

Interface Category:

API.

Purpose:

Returns the items in the list.

Calling Context:

Call this function directly to return the items in the list.

Parameters:

Return Value:

Returns the items in the list.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLinearListControlState::GetSingleDefaultSelectableItem

virtual TTableItem * GetSingleDefaultSelectableItem () const

Interface Category:

API.

Purpose:

Returns a pointer to the first selected item in the list.

Calling Context:

Call this function directly to obtain the first selected item in the list.

Parameters:

Return Value:

Returns a pointer to the first selected item in the list.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.