IForEach Class Reference
Interface to iterate items in the
CGrid.
More...
#include <Dapfor/GUI/IForEach.h>
List of all members.
Detailed Description
Interface to iterate items in the
CGrid.
- ThreadSafety:
- The operator () will be always called in the GUI thread.
- Version:
- 2.0.0 Initial version
- Example
#include <Dapfor/GUI/IForEach.h>
class RowsCounter : public Dapfor::GUI::IForEach
{
public:
int GetVisibleRows() const {return m_VisibleRows;}
int GetInvisibleRows() const {return m_InvisibleRows;}
virtual bool operator () (Dapfor::GUI::CGrid& grid, Dapfor::GUI::HITEM item, Dapfor::Common::CDataObject* pDO)
{
if(grid.IsVisible(item))
{
m_VisibleRows++;
}
else
{
m_InvisibleRows++;
}
return true;
}
private:
int m_VisibleRows;
int m_InvisibleRows;
};
RowsCounter functor1;
m_Grid.ForEach(functor1);
RowsCounter functor2;
m_Grid.ForEachVisible(functor2);
Member Function Documentation
Called to perform some operations on items in the grid.
- Parameters:
-
[in] | grid | Reference to CGrid object |
[in] | item | Handle associated with the data object. |
[in] | pDO | Pointer to the data object. |
- Returns:
- False if no more iterations are needed. Otherwise true.