sptk2 logo
SPTK Home Page
Public Member Functions | List of all members
sptk::CSelection Class Reference

List view & friend items selection. More...

#include <CListViewSelection.h>

Public Member Functions

 CSelection ()
 
 ~CSelection ()
 
void select (CPackedStrings *row)
 
void deselect (CPackedStrings *row)
 
void remove (CPackedStrings *row)
 
void deselectAll ()
 
void clear ()
 
uint32_t size () const
 
CPackedStringsoperator[] (int index) const
 
CPackedStringsfindKey (int keyValue) const
 
CPackedStringsfindCaption (const 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.

Constructor & Destructor Documentation

◆ CSelection()

sptk::CSelection::CSelection ( )
inline

Default constructor

◆ ~CSelection()

sptk::CSelection::~CSelection ( )
inline

Destructor

Member Function Documentation

◆ clear()

void sptk::CSelection::clear ( )

Removes all rows from the selection list

◆ deselect()

void sptk::CSelection::deselect ( CPackedStrings row)

Deselects a row and removes it from the selection list

◆ deselectAll()

void sptk::CSelection::deselectAll ( )

Deselects all the rows in the selection list and empties the list

◆ findCaption()

CPackedStrings * sptk::CSelection::findCaption ( const String caption) const

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

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

◆ findKey()

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

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

Parameters
keyValueint, key value

◆ operator[]()

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

Element access to the selection, const version only

Parameters
indexint, index in the selection list

◆ remove()

void sptk::CSelection::remove ( CPackedStrings row)

Removes the row from the selection list

◆ select()

void sptk::CSelection::select ( CPackedStrings row)

Selects a row and adds it to the selection list

◆ size()

uint32_t sptk::CSelection::size ( ) const
inline

Returns the number of selected rows


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

Fri Oct 14 2022 09:58:39: SPTK 5.4.1