#include </home/zeitlin/src/wx/github/interface/wx/grid.h>
wxGridSizesInfo stores information about sizes of all wxGrid rows or columns.
It assumes that most of the rows or columns (which are both called elements here as the difference between them doesn't matter at this class level) have the default size and so stores it separately. And it uses a wxHashMap to store the sizes of all elements which have the non-default size.
This structure is particularly useful for serializing the sizes of all wxGrid elements at once.
Public Member Functions | |
wxGridSizesInfo () | |
Default constructor. | |
wxGridSizesInfo (int defSize, const wxArrayInt &allSizes) | |
Constructor. | |
int | GetSize (unsigned pos) const |
Get the element size. | |
Public Attributes | |
int | m_sizeDefault |
Default size. | |
wxUnsignedToIntHashMap | m_customSizes |
Map with element indices as keys and their sizes as values. |
wxGridSizesInfo::wxGridSizesInfo | ( | ) |
Default constructor.
m_sizeDefault and m_customSizes must be initialized later.
wxGridSizesInfo::wxGridSizesInfo | ( | int | defSize, |
const wxArrayInt & | allSizes | ||
) |
Constructor.
This constructor is used by wxGrid::GetRowSizes() and GetColSizes() methods. User code will usually use the default constructor instead.
defSize | The default element size. |
allSizes | Array containing the sizes of all elements, including those which have the default size. |
int wxGridSizesInfo::GetSize | ( | unsigned | pos | ) | const |
Get the element size.
pos | The index of the element. |
wxUnsignedToIntHashMap wxGridSizesInfo::m_customSizes |
Map with element indices as keys and their sizes as values.
This map only contains the elements with non-default size.
Default size.