KiCad PCB EDA Suite
|
Class that manages autosizing of columns in a wxGrid. More...
#include <wx_grid_autosizer.h>
Public Types | |
using | COL_MIN_WIDTHS = std::map< int, int > |
Map of column indices to minimum widths. | |
Public Member Functions | |
WX_GRID_AUTOSIZER (wxGrid &aGrid, COL_MIN_WIDTHS aAutosizedCols, unsigned aFlexibleCol) | |
Private Member Functions | |
void | recomputeGridWidths () |
void | onSizeEvent (wxSizeEvent &aEvent) |
Private Attributes | |
wxGrid & | m_grid |
COL_MIN_WIDTHS | m_autosizedCols |
int | m_flexibleCol |
bool | m_gridWidthsDirty = true |
int | m_gridWidth = 0 |
Class that manages autosizing of columns in a wxGrid.
The class will automatically resize the columns in the grid to fit the content, with one column being flexible and taking up the remaining space.
Definition at line 37 of file wx_grid_autosizer.h.
using WX_GRID_AUTOSIZER::COL_MIN_WIDTHS = std::map<int, int> |
Map of column indices to minimum widths.
Use 0 to indicate that a column should be autosized to fit content, but without a minimum width.
Definition at line 46 of file wx_grid_autosizer.h.
WX_GRID_AUTOSIZER::WX_GRID_AUTOSIZER | ( | wxGrid & | aGrid, |
COL_MIN_WIDTHS | aAutosizedCols, | ||
unsigned | aFlexibleCol | ||
) |
aGrid | The grid to manage. |
aAutosizedCols | A map of columns to autosize: these will sized to fit, but not smaller than the width specified. |
aFlexibleCol | The column that will take up the remaining space, with a minimum width if given in the aAutosizedCols map. |
Definition at line 31 of file wx_grid_autosizer.cpp.
References m_autosizedCols, m_flexibleCol, m_grid, m_gridWidthsDirty, onSizeEvent(), and recomputeGridWidths().
|
private |
Definition at line 105 of file wx_grid_autosizer.cpp.
References m_gridWidth, and m_gridWidthsDirty.
Referenced by WX_GRID_AUTOSIZER().
|
private |
Definition at line 65 of file wx_grid_autosizer.cpp.
References m_autosizedCols, m_flexibleCol, m_grid, m_gridWidth, and m_gridWidthsDirty.
Referenced by WX_GRID_AUTOSIZER().
|
private |
Definition at line 63 of file wx_grid_autosizer.h.
Referenced by recomputeGridWidths(), and WX_GRID_AUTOSIZER().
|
private |
Definition at line 64 of file wx_grid_autosizer.h.
Referenced by recomputeGridWidths(), and WX_GRID_AUTOSIZER().
|
private |
Definition at line 62 of file wx_grid_autosizer.h.
Referenced by recomputeGridWidths(), and WX_GRID_AUTOSIZER().
|
private |
Definition at line 67 of file wx_grid_autosizer.h.
Referenced by onSizeEvent(), and recomputeGridWidths().
|
private |
Definition at line 66 of file wx_grid_autosizer.h.
Referenced by onSizeEvent(), recomputeGridWidths(), and WX_GRID_AUTOSIZER().