25 #ifndef JUCE_LISTBOX_H_INCLUDED 26 #define JUCE_LISTBOX_H_INCLUDED 46 virtual int getNumRows() = 0;
52 virtual void paintListBoxItem (
int rowNumber,
54 int width,
int height,
55 bool rowIsSelected) = 0;
84 virtual Component* refreshComponentForRow (
int rowNumber,
bool isRowSelected,
90 virtual void listBoxItemClicked (
int row,
const MouseEvent&);
95 virtual void listBoxItemDoubleClicked (
int row,
const MouseEvent&);
101 virtual void backgroundClicked (
const MouseEvent&);
111 virtual void selectedRowsChanged (
int lastRowSelected);
121 virtual void deleteKeyPressed (
int lastRowSelected);
131 virtual void returnKeyPressed (
int lastRowSelected);
138 virtual void listWasScrolled();
154 virtual String getTooltipForRow (
int row);
157 virtual MouseCursor getMouseCursorForRow (
int row);
160 #if JUCE_CATCH_DEPRECATED_CODE_MISUSE 210 void updateContent();
222 void setMultipleSelectionEnabled (
bool shouldBeEnabled)
noexcept;
231 void setClickingTogglesRowSelection (
bool flipRowSelection)
noexcept;
236 void setRowSelectedOnMouseDown (
bool isSelectedOnMouseDown)
noexcept;
243 void setMouseMoveSelectsRows (
bool shouldSelect);
259 void selectRow (
int rowNumber,
260 bool dontScrollToShowThisRow =
false,
261 bool deselectOthersFirst =
true);
271 void selectRangeOfRows (
int firstRow,
278 void deselectRow (
int rowNumber);
283 void deselectAllRows();
288 void flipRowSelection (
int rowNumber);
302 void setSelectedRows (
const SparseSet<int>& setOfRowsToBeSelected,
307 bool isRowSelected (
int rowNumber)
const;
312 int getNumSelectedRows()
const;
324 int getSelectedRow (
int index = 0)
const;
333 int getLastRowSelected()
const;
348 void selectRowsBasedOnModifierKeys (
int rowThatWasClickedOn,
350 bool isMouseUpEvent);
363 void setVerticalPosition (
double newProportion);
372 double getVerticalPosition()
const;
375 void scrollToEnsureRowIsOnscreen (
int row);
388 int getRowContainingPosition (
int x,
int y)
const noexcept;
403 int getInsertionIndexForPosition (
int x,
int y)
const noexcept;
412 bool relativeToComponentTopLeft)
const noexcept;
433 int getVisibleRowWidth()
const noexcept;
440 void setRowHeight (
int newHeight);
452 int getNumRowsOnScreen()
const noexcept;
464 backgroundColourId = 0x1002800,
466 outlineColourId = 0x1002810,
468 textColourId = 0x1002820
476 void setOutlineThickness (
int outlineThickness);
492 void setHeaderComponent (
Component* newHeaderComponent);
507 void setMinimumContentWidth (
int newMinimumWidth);
512 int getVisibleContentWidth()
const noexcept;
519 void repaintRow (
int rowNumber)
noexcept;
565 const var& dragDescription,
bool allowDraggingToOtherWindows);
577 int totalItems, rowHeight, minimumRowWidth;
578 int outlineThickness;
580 bool multipleSelection, alwaysFlipSelection, hasDoneInitialUpdate, selectOnMouseDown;
583 void selectRowInternal (
int rowNumber,
bool dontScrollToShowThisRow,
584 bool deselectOthersFirst,
bool isMouseClick);
586 #if JUCE_CATCH_DEPRECATED_CODE_MISUSE 591 JUCE_DEPRECATED (
virtual void createSnapshotOfSelectedRows (
int&,
int&)) {}
598 #endif // JUCE_LISTBOX_H_INCLUDED Definition: juce_Variant.h:46
Definition: juce_ListBox.cpp:25
int getOutlineThickness() const noexcept
Definition: juce_ListBox.h:481
Definition: juce_TableListBox.h:206
Definition: juce_KeyPress.h:37
Definition: juce_MouseCursor.h:36
virtual ~ListBoxModel()
Definition: juce_ListBox.h:40
static const String empty
Definition: juce_String.h:152
Definition: juce_ListBox.h:177
#define noexcept
Definition: juce_CompilerSupport.h:141
Definition: juce_ModifierKeys.h:38
virtual void mouseWheelMove(const MouseEvent &event, const MouseWheelDetails &wheel) override
Definition: juce_Component.cpp:2257
Definition: juce_ListBox.cpp:156
Definition: juce_String.h:43
virtual void paintOverChildren(Graphics &g)
Definition: juce_Component.cpp:1936
#define JUCE_API
Definition: juce_StandardHeader.h:139
#define JUCE_PUBLIC_IN_DLL_BUILD(declaration)
Definition: juce_StandardHeader.h:145
Definition: juce_Rectangle.h:36
ListBoxModel * getModel() const noexcept
Definition: juce_ListBox.h:199
virtual void resized()
Definition: juce_Component.cpp:2272
NotificationType
Definition: juce_NotificationType.h:33
virtual bool keyStateChanged(bool isKeyDown)
Definition: juce_Component.cpp:3005
virtual void colourChanged()
Definition: juce_Component.cpp:2139
ColourIds
Definition: juce_ListBox.h:462
virtual void paint(Graphics &g)
Definition: juce_Component.cpp:1929
Definition: juce_Component.h:33
Definition: juce_ScopedPointer.h:70
Definition: juce_MouseEvent.h:329
Definition: juce_MouseListener.h:36
int getRowHeight() const noexcept
Definition: juce_ListBox.h:445
png_const_structrp png_const_inforp int png_fixed_point * width
Definition: juce_PNGLoader.cpp:2339
virtual void parentHierarchyChanged()
Definition: juce_Component.cpp:1646
virtual void mouseUp(const MouseEvent &event) override
Definition: juce_Component.cpp:2252
Definition: juce_GraphicsContext.h:42
Definition: juce_Image.h:54
Definition: juce_Viewport.h:42
JUCE_DEPRECATED(Point< int > relativePositionToGlobal(Point< int >) const)
Definition: juce_NotificationType.h:36
virtual void visibilityChanged()
Definition: juce_Component.cpp:559
Definition: juce_MouseEvent.h:36
Component * getHeaderComponent() const noexcept
Definition: juce_ListBox.h:495
Definition: juce_ListBox.h:35
virtual bool keyPressed(const KeyPress &key)
Definition: juce_Component.cpp:3004