Version: 3.2.2
wxGridBlocks Class Reference

#include <wx/grid.h>

Detailed Description

Represents a collection of grid blocks that can be iterated over.

This class provides read-only access to the blocks making up the grid selection in the most general case.

Note that objects of this class can only be returned by wxGrid, but not constructed in the application code.

The preferable way to iterate over it is using C++11 range-for loop:

for ( const auto& block: grid->GetSelectedBlocks() ) {
... do something with block ...
}

When not using C++11, iteration has to be done manually:

wxGridBlocks range = grid->GetSelectedBlocks();
for ( wxGridBlocks::iterator it = range.begin();
it != range.end();
++it ) {
... do something with *it ...
}
Read-only forward iterator type.
Definition: grid.h:2244
Represents a collection of grid blocks that can be iterated over.
Definition: grid.h:2234
iterator begin() const
Return iterator corresponding to the beginning of the range.
iterator end() const
Return iterator corresponding to the end of the range.
Since
3.1.4

Classes

class  iterator
 Read-only forward iterator type. More...
 

Public Member Functions

iterator begin () const
 Return iterator corresponding to the beginning of the range. More...
 
iterator end () const
 Return iterator corresponding to the end of the range. More...
 

Member Function Documentation

◆ begin()

iterator wxGridBlocks::begin ( ) const

Return iterator corresponding to the beginning of the range.

◆ end()

iterator wxGridBlocks::end ( ) const

Return iterator corresponding to the end of the range.