sptk2 logo
SPTK Home Page

sptk::CSelection Class Reference
[GUI Classes]

List view & friend items selection. More...

#include <CListViewSelection.h>

List of all members.

Public Member Functions

 CSelection ()
 Default constructor.
 ~CSelection ()
 Destructor.
void select (CPackedStrings *row)
 Selects a row and adds it to the selection list.
void deselect (CPackedStrings *row)
 Deselects a row and removes it from the selection list.
void remove (CPackedStrings *row)
 Removes the row from the selection list.
void deselectAll ()
 Deselects all the rows in the selection list and empties the list.
void clear ()
 Removes all rows from the selection list.
uint32_t size () const
 Returns the number of selected rows.
CPackedStringsoperator[] (int index) const
CPackedStringsfindKey (int keyValue) const
CPackedStringsfindCaption (std::string caption) const


Detailed Description

List view & friend items selection.

Allows CListView to work with one or few selected rows without scanning through all the rows in list view for selected rows.


Member Function Documentation

CPackedStrings* sptk::CSelection::findCaption ( std::string  caption  )  const

Finds an item with a particular caption. Returns NULL if not found.

Parameters:
caption CString, item caption (a string in the first column)

CPackedStrings* sptk::CSelection::findKey ( int  keyValue  )  const

Finds an item with a particular key value. Returns NULL if not found.

Parameters:
keyValue int, key value

CPackedStrings& sptk::CSelection::operator[] ( int  index  )  const [inline]

Element access to the selection, const version only

Parameters:
index int, index in the selection list


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

Mon Mar 5 11:56:16 2012: SPTK 3.5.7