openshot-audio  0.1.6
Classes | Public Member Functions | List of all members
FileListComponent Class Reference

#include <juce_FileListComponent.h>

Inheritance diagram for FileListComponent:
ListBox DirectoryContentsDisplayComponent ListBoxModel ChangeListener SettableTooltipClient TooltipClient

Classes

class  ItemComponent
 

Public Member Functions

 FileListComponent (DirectoryContentsList &listToShow)
 
 ~FileListComponent ()
 
int getNumSelectedFiles () const override
 
File getSelectedFile (int index=0) const override
 
void deselectAllFiles () override
 
void scrollToTop () override
 
void setSelectedFile (const File &) override
 
- Public Member Functions inherited from ListBox
 ListBox (const String &componentName=String::empty, ListBoxModel *model=nullptr)
 
 ~ListBox ()
 
void setModel (ListBoxModel *newModel)
 
ListBoxModelgetModel () const noexcept
 
void updateContent ()
 
void setMultipleSelectionEnabled (bool shouldBeEnabled) noexcept
 
void setClickingTogglesRowSelection (bool flipRowSelection) noexcept
 
void setRowSelectedOnMouseDown (bool isSelectedOnMouseDown) noexcept
 
void setMouseMoveSelectsRows (bool shouldSelect)
 
void selectRow (int rowNumber, bool dontScrollToShowThisRow=false, bool deselectOthersFirst=true)
 
void selectRangeOfRows (int firstRow, int lastRow)
 
void deselectRow (int rowNumber)
 
void deselectAllRows ()
 
void flipRowSelection (int rowNumber)
 
SparseSet< intgetSelectedRows () const
 
void setSelectedRows (const SparseSet< int > &setOfRowsToBeSelected, NotificationType sendNotificationEventToModel=sendNotification)
 
bool isRowSelected (int rowNumber) const
 
int getNumSelectedRows () const
 
int getSelectedRow (int index=0) const
 
int getLastRowSelected () const
 
void selectRowsBasedOnModifierKeys (int rowThatWasClickedOn, ModifierKeys modifiers, bool isMouseUpEvent)
 
void setVerticalPosition (double newProportion)
 
double getVerticalPosition () const
 
void scrollToEnsureRowIsOnscreen (int row)
 
ScrollBargetVerticalScrollBar () const noexcept
 
ScrollBargetHorizontalScrollBar () const noexcept
 
int getRowContainingPosition (int x, int y) const noexcept
 
int getInsertionIndexForPosition (int x, int y) const noexcept
 
Rectangle< intgetRowPosition (int rowNumber, bool relativeToComponentTopLeft) const noexcept
 
ComponentgetComponentForRowNumber (int rowNumber) const noexcept
 
int getRowNumberOfComponent (Component *rowComponent) const noexcept
 
int getVisibleRowWidth () const noexcept
 
void setRowHeight (int newHeight)
 
int getRowHeight () const noexcept
 
int getNumRowsOnScreen () const noexcept
 
void setOutlineThickness (int outlineThickness)
 
int getOutlineThickness () const noexcept
 
void setHeaderComponent (Component *newHeaderComponent)
 
ComponentgetHeaderComponent () const noexcept
 
void setMinimumContentWidth (int newMinimumWidth)
 
int getVisibleContentWidth () const noexcept
 
void repaintRow (int rowNumber) noexcept
 
virtual Image createSnapshotOfRows (const SparseSet< int > &rows, int &x, int &y)
 
ViewportgetViewport () const noexcept
 
bool keyPressed (const KeyPress &) override
 
bool keyStateChanged (bool isKeyDown) override
 
void paint (Graphics &) override
 
void paintOverChildren (Graphics &) override
 
void resized () override
 
void visibilityChanged () override
 
void mouseWheelMove (const MouseEvent &, const MouseWheelDetails &) override
 
void mouseUp (const MouseEvent &) override
 
void colourChanged () override
 
void parentHierarchyChanged () override
 
void startDragAndDrop (const MouseEvent &, const SparseSet< int > &rowsToDrag, const var &dragDescription, bool allowDraggingToOtherWindows)
 
- Public Member Functions inherited from SettableTooltipClient
virtual ~SettableTooltipClient ()
 
virtual void setTooltip (const String &newTooltip)
 
virtual String getTooltip ()
 
- Public Member Functions inherited from TooltipClient
virtual ~TooltipClient ()
 
- Public Member Functions inherited from DirectoryContentsDisplayComponent
 DirectoryContentsDisplayComponent (DirectoryContentsList &listToShow)
 
virtual ~DirectoryContentsDisplayComponent ()
 
void addListener (FileBrowserListener *listener)
 
void removeListener (FileBrowserListener *listener)
 
void sendSelectionChangeMessage ()
 
void sendDoubleClickMessage (const File &file)
 
void sendMouseClickMessage (const File &file, const MouseEvent &e)
 

Additional Inherited Members

- Public Types inherited from ListBox
enum  ColourIds { backgroundColourId = 0x1002800, outlineColourId = 0x1002810, textColourId = 0x1002820 }
 
- Public Types inherited from DirectoryContentsDisplayComponent
enum  ColourIds { highlightColourId = 0x1000540, textColourId = 0x1000541 }
 
- Protected Member Functions inherited from SettableTooltipClient
 SettableTooltipClient ()
 
- Protected Attributes inherited from DirectoryContentsDisplayComponent
DirectoryContentsListfileList
 
ListenerList< FileBrowserListenerlisteners
 

Detailed Description

A component that displays the files in a directory as a listbox.

This implements the DirectoryContentsDisplayComponent base class so that it can be used in a FileBrowserComponent.

To attach a listener to it, use its DirectoryContentsDisplayComponent base class and the FileBrowserListener class.

See also
DirectoryContentsList, FileTreeComponent

Constructor & Destructor Documentation

FileListComponent::FileListComponent ( DirectoryContentsList listToShow)

Creates a listbox to show the contents of a specified directory.

FileListComponent::~FileListComponent ( )

Destructor.

Member Function Documentation

void FileListComponent::deselectAllFiles ( )
overridevirtual

Deselects any files that are currently selected.

Implements DirectoryContentsDisplayComponent.

int FileListComponent::getNumSelectedFiles ( ) const
overridevirtual

Returns the number of files the user has got selected.

See also
getSelectedFile

Implements DirectoryContentsDisplayComponent.

File FileListComponent::getSelectedFile ( int  index = 0) const
overridevirtual

Returns one of the files that the user has currently selected. The index should be in the range 0 to (getNumSelectedFiles() - 1).

See also
getNumSelectedFiles

Implements DirectoryContentsDisplayComponent.

void FileListComponent::scrollToTop ( )
overridevirtual

Scrolls to the top of the list.

Implements DirectoryContentsDisplayComponent.

void FileListComponent::setSelectedFile ( const File f)
overridevirtual

If the specified file is in the list, it will become the only selected item (and if the file isn't in the list, all other items will be deselected).

Implements DirectoryContentsDisplayComponent.


The documentation for this class was generated from the following files: