openshot-audio  0.1.7
Public Member Functions | List of all members
FileTreeComponent Class Reference

#include <juce_FileTreeComponent.h>

Inheritance diagram for FileTreeComponent:
TreeView DirectoryContentsDisplayComponent DragAndDropTarget

Public Member Functions

 FileTreeComponent (DirectoryContentsList &listToShow)
 
 ~FileTreeComponent ()
 
int getNumSelectedFiles () const
 
File getSelectedFile (int index=0) const
 
void deselectAllFiles ()
 
void scrollToTop ()
 
void setSelectedFile (const File &)
 
void refresh ()
 
void setDragAndDropDescription (const String &description)
 
const StringgetDragAndDropDescription () const noexcept
 
void setItemHeight (int newHeight)
 
int getItemHeight () const noexcept
 
- Public Member Functions inherited from TreeView
 TreeView (const String &componentName=String::empty)
 
 ~TreeView ()
 
void setRootItem (TreeViewItem *newRootItem)
 
TreeViewItemgetRootItem () const noexcept
 
void deleteRootItem ()
 
void setRootItemVisible (bool shouldBeVisible)
 
bool isRootItemVisible () const noexcept
 
void setDefaultOpenness (bool isOpenByDefault)
 
bool areItemsOpenByDefault () const noexcept
 
void setMultiSelectEnabled (bool canMultiSelect)
 
bool isMultiSelectEnabled () const noexcept
 
void setOpenCloseButtonsVisible (bool shouldBeVisible)
 
bool areOpenCloseButtonsVisible () const noexcept
 
void clearSelectedItems ()
 
int getNumSelectedItems (int maximumDepthToSearchTo=-1) const noexcept
 
TreeViewItemgetSelectedItem (int index) const noexcept
 
void moveSelectedRow (int deltaRows)
 
int getNumRowsInTree () const
 
TreeViewItemgetItemOnRow (int index) const
 
TreeViewItemgetItemAt (int yPosition) const noexcept
 
void scrollToKeepItemVisible (TreeViewItem *item)
 
ViewportgetViewport () const noexcept
 
int getIndentSize () noexcept
 
void setIndentSize (int newIndentSize)
 
TreeViewItemfindItemFromIdentifierString (const String &identifierString) const
 
XmlElementgetOpennessState (bool alsoIncludeScrollPosition) const
 
void restoreOpennessState (const XmlElement &newState, bool restoreStoredSelection)
 
void paint (Graphics &) override
 
void resized () override
 
bool keyPressed (const KeyPress &) override
 
void colourChanged () override
 
void enablementChanged () override
 
bool isInterestedInFileDrag (const StringArray &files) override
 
void fileDragEnter (const StringArray &files, int x, int y) override
 
void fileDragMove (const StringArray &files, int x, int y) override
 
void fileDragExit (const StringArray &files) override
 
void filesDropped (const StringArray &files, int x, int y) override
 
bool isInterestedInDragSource (const SourceDetails &) override
 
void itemDragEnter (const SourceDetails &) override
 
void itemDragMove (const SourceDetails &) override
 
void itemDragExit (const SourceDetails &) override
 
void itemDropped (const SourceDetails &) override
 
- Public Member Functions inherited from DragAndDropTarget
virtual ~DragAndDropTarget ()
 
virtual bool shouldDrawDragImageWhenOver ()
 
- 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 TreeView
enum  ColourIds { backgroundColourId = 0x1000500, linesColourId = 0x1000501, dragAndDropIndicatorColourId = 0x1000502, selectedItemBackgroundColourId = 0x1000503 }
 
- Public Types inherited from DirectoryContentsDisplayComponent
enum  ColourIds { highlightColourId = 0x1000540, textColourId = 0x1000541 }
 
- Protected Attributes inherited from DirectoryContentsDisplayComponent
DirectoryContentsListfileList
 
ListenerList< FileBrowserListenerlisteners
 

Detailed Description

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

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, FileListComponent

Constructor & Destructor Documentation

FileTreeComponent::FileTreeComponent ( DirectoryContentsList listToShow)

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

FileTreeComponent::~FileTreeComponent ( )

Destructor.

Member Function Documentation

void FileTreeComponent::deselectAllFiles ( )
virtual

Deselects any files that are currently selected.

Implements DirectoryContentsDisplayComponent.

const String& FileTreeComponent::getDragAndDropDescription ( ) const
inlinenoexcept

Returns the last value that was set by setDragAndDropDescription().

int FileTreeComponent::getItemHeight ( ) const
inlinenoexcept

Returns the height of the treeview items.

int FileTreeComponent::getNumSelectedFiles ( ) const
inlinevirtual

Returns the number of files the user has got selected.

See Also
getSelectedFile

Implements DirectoryContentsDisplayComponent.

File FileTreeComponent::getSelectedFile ( int  index = 0) const
virtual

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 FileTreeComponent::refresh ( )

Updates the files in the list.

void FileTreeComponent::scrollToTop ( )
virtual

Scrolls the list to the top.

Implements DirectoryContentsDisplayComponent.

void FileTreeComponent::setDragAndDropDescription ( const String description)

Setting a name for this allows tree items to be dragged.

The string that you pass in here will be returned by the getDragSourceDescription() of the items in the tree. For more info, see TreeViewItem::getDragSourceDescription().

void FileTreeComponent::setItemHeight ( int  newHeight)

Changes the height of the treeview items.

void FileTreeComponent::setSelectedFile ( const File target)
virtual

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: