67 int width,
int height,
68 bool rowIsSelected) = 0;
81 int width,
int height,
82 bool rowIsSelected) = 0;
105 virtual Component* refreshComponentForCell (
int rowNumber,
int columnId,
bool isRowSelected,
114 virtual void cellClicked (
int rowNumber,
int columnId,
const MouseEvent&);
121 virtual void cellDoubleClicked (
int rowNumber,
int columnId,
const MouseEvent&);
128 virtual void backgroundClicked (
const MouseEvent&);
139 virtual void sortOrderChanged (
int newSortColumnId,
bool isForwards);
151 virtual int getColumnAutoSizeWidth (
int columnId);
154 virtual String getCellTooltip (
int rowNumber,
int columnId);
160 virtual void selectedRowsChanged (
int lastRowSelected);
165 virtual void deleteKeyPressed (
int lastRowSelected);
170 virtual void returnKeyPressed (
int lastRowSelected);
177 virtual void listWasScrolled();
188 virtual var getDragSourceDescription (
const SparseSet<int>& currentlySelectedRows);
252 void setHeaderHeight (
int newHeight);
257 int getHeaderHeight() const noexcept;
267 void autoSizeColumn (
int columnId);
270 void autoSizeAllColumns();
275 void setAutoSizeMenuOptionShown (
bool shouldBeShown) noexcept;
280 bool isAutoSizeMenuOptionShown() const noexcept {
return autoSizeOptionsShown; }
292 bool relativeToComponentTopLeft)
const;
299 Component* getCellComponent (
int columnId,
int rowNumber)
const;
305 void scrollToEnsureColumnIsOnscreen (
int columnId);
309 int getNumRows()
override;
311 void paintListBoxItem (
int,
Graphics&,
int,
int,
bool)
override;
313 Component* refreshComponentForRow (
int rowNumber,
bool isRowSelected,
Component* existingComponentToUpdate)
override;
315 void selectedRowsChanged (
int row)
override;
317 void deleteKeyPressed (
int currentSelectedRow)
override;
319 void returnKeyPressed (
int currentSelectedRow)
override;
321 void backgroundClicked (
const MouseEvent&)
override;
323 void listWasScrolled()
override;
333 void resized()
override;
338 [[deprecated (
"This function hides the non-virtual ListBox::getModel, use getTableListBoxModel instead")]]
348 int columnIdNowBeingDragged = 0;
349 bool autoSizeOptionsShown =
true;
351 void updateColumnComponents()
const;
The base class for all JUCE user-interface objects.
A graphics context, used for drawing a component or image.
A subclass of this is used to drive a ListBox.
A list of items that can be scrolled vertically.
Contains position and status information about a mouse event.
Manages a rectangle and allows geometric operations to be performed on it.
Holds a set of primitive values, storing them as a set of ranges.
One of these is used by a TableListBox as the data model for the table's contents.
virtual ~TableListBoxModel()=default
Destructor.
virtual void paintCell(Graphics &, int rowNumber, int columnId, int width, int height, bool rowIsSelected)=0
This must draw one of the cells.
virtual bool mayDragToExternalWindows() const
Called when starting a drag operation on a list row to determine whether the item may be dragged to o...
virtual void paintRowBackground(Graphics &, int rowNumber, int width, int height, bool rowIsSelected)=0
This must draw the background behind one of the rows in the table.
virtual int getNumRows()=0
This must return the number of rows currently in the table.
A table of cells, using a TableHeaderComponent as its header.
TableListBoxModel * getTableListBoxModel() const noexcept
Returns the model currently in use.
TableHeaderComponent & getHeader() const noexcept
Returns the header component being used in this table.
TableListBoxModel * getModel() const noexcept
Returns the model currently in use.
A variant class, that can be used to hold a range of primitive values.