#include <juce_TableListBox.h>
|
| TableListBox (const String &componentName=String(), TableListBoxModel *model=nullptr) |
|
| ~TableListBox () |
|
void | setModel (TableListBoxModel *newModel) |
|
TableListBoxModel * | getModel () const noexcept |
|
TableHeaderComponent & | getHeader () const noexcept |
|
void | setHeader (TableHeaderComponent *newHeader) |
|
void | setHeaderHeight (int newHeight) |
|
int | getHeaderHeight () const noexcept |
|
void | autoSizeColumn (int columnId) |
|
void | autoSizeAllColumns () |
|
void | setAutoSizeMenuOptionShown (bool shouldBeShown) noexcept |
|
bool | isAutoSizeMenuOptionShown () const noexcept |
|
Rectangle< int > | getCellPosition (int columnId, int rowNumber, bool relativeToComponentTopLeft) const |
|
Component * | getCellComponent (int columnId, int rowNumber) const |
|
void | scrollToEnsureColumnIsOnscreen (int columnId) |
|
int | getNumRows () override |
|
void | paintListBoxItem (int, Graphics &, int, int, bool) override |
|
Component * | refreshComponentForRow (int rowNumber, bool isRowSelected, Component *existingComponentToUpdate) override |
|
void | selectedRowsChanged (int lastRowSelected) override |
|
void | deleteKeyPressed (int currentSelectedRow) override |
|
void | returnKeyPressed (int currentSelectedRow) override |
|
void | backgroundClicked (const MouseEvent &) override |
|
void | listWasScrolled () override |
|
void | tableColumnsChanged (TableHeaderComponent *) override |
|
void | tableColumnsResized (TableHeaderComponent *) override |
|
void | tableSortOrderChanged (TableHeaderComponent *) override |
|
void | tableColumnDraggingChanged (TableHeaderComponent *, int) override |
|
void | resized () override |
|
A table of cells, using a TableHeaderComponent as its header.
This component makes it easy to create a table by providing a TableListBoxModel as the data source.
- See Also
- TableListBoxModel, TableHeaderComponent
Creates a TableListBox.
The model pointer passed-in can be null, in which case you can set it later with setModel(). The TableListBox does not take ownership of the model - it's the caller's responsibility to manage its lifetime and make sure it doesn't get deleted while still being used.
TableListBox::~TableListBox |
( |
| ) |
|
void TableListBox::autoSizeAllColumns |
( |
| ) |
|
void TableListBox::autoSizeColumn |
( |
int |
columnId | ) |
|
void TableListBox::deleteKeyPressed |
( |
int |
currentSelectedRow | ) |
|
|
override |
Component * TableListBox::getCellComponent |
( |
int |
columnId, |
|
|
int |
rowNumber |
|
) |
| const |
Returns the component that currently represents a given cell. If the component for this cell is off-screen or if the position is out-of-range, this may return nullptr.
- See Also
- getCellPosition
Rectangle< int > TableListBox::getCellPosition |
( |
int |
columnId, |
|
|
int |
rowNumber, |
|
|
bool |
relativeToComponentTopLeft |
|
) |
| const |
Returns the position of one of the cells in the table.
If relativeToComponentTopLeft is true, the coordinates are relative to the table component's top-left. The row number isn't checked to see if it's in-range, but the column ID must exist or this will return an empty rectangle.
If relativeToComponentTopLeft is false, the coordinates are relative to the top-left of the table's top-left cell.
Returns the header component being used in this table.
int TableListBox::getHeaderHeight |
( |
| ) |
const |
|
noexcept |
Returns the model currently in use.
int TableListBox::getNumRows |
( |
| ) |
|
|
override |
bool TableListBox::isAutoSizeMenuOptionShown |
( |
| ) |
const |
|
inlinenoexcept |
void TableListBox::listWasScrolled |
( |
| ) |
|
|
override |
Component * TableListBox::refreshComponentForRow |
( |
int |
rowNumber, |
|
|
bool |
isRowSelected, |
|
|
Component * |
existingComponentToUpdate |
|
) |
| |
|
override |
void TableListBox::resized |
( |
| ) |
|
|
override |
void TableListBox::returnKeyPressed |
( |
int |
currentSelectedRow | ) |
|
|
override |
void TableListBox::scrollToEnsureColumnIsOnscreen |
( |
int |
columnId | ) |
|
void TableListBox::selectedRowsChanged |
( |
int |
lastRowSelected | ) |
|
|
override |
void TableListBox::setAutoSizeMenuOptionShown |
( |
bool |
shouldBeShown | ) |
|
|
noexcept |
Enables or disables the auto size options on the popup menu. By default, these are enabled.
Sets the header component to use for the table. The table will take ownership of the component that you pass in, and will delete it when it's no longer needed. The pointer passed in may not be null.
void TableListBox::setHeaderHeight |
( |
int |
newHeight | ) |
|
Changes the TableListBoxModel that is being used for this table. The TableListBox does not take ownership of the model - it's the caller's responsibility to manage its lifetime and make sure it doesn't get deleted while still being used.
This is called when the user begins or ends dragging one of the columns around.
When the user starts dragging a column, this is called with the ID of that column. When they finish dragging, it is called again with 0 as the ID.
Reimplemented from TableHeaderComponent::Listener.
The documentation for this class was generated from the following files: