LMMS
Loading...
Searching...
No Matches
juce::KeyMappingEditorComponent::TopLevelItem Class Reference
Inheritance diagram for juce::KeyMappingEditorComponent::TopLevelItem:
juce::TreeViewItem juce::ChangeListener

Public Member Functions

 TopLevelItem (KeyMappingEditorComponent &kec)
 ~TopLevelItem () override
bool mightContainSubItems () override
String getUniqueName () const override
void changeListenerCallback (ChangeBroadcaster *) override
Public Member Functions inherited from juce::TreeViewItem
 TreeViewItem ()
virtual ~TreeViewItem ()
int getNumSubItems () const noexcept
TreeViewItemgetSubItem (int index) const noexcept
void clearSubItems ()
void addSubItem (TreeViewItem *newItem, int insertPosition=-1)
template<class ElementComparator>
void addSubItemSorted (ElementComparator &comparator, TreeViewItem *newItem)
void removeSubItem (int index, bool deleteItem=true)
template<class ElementComparator>
void sortSubItems (ElementComparator &comparator)
TreeViewgetOwnerView () const noexcept
TreeViewItemgetParentItem () const noexcept
bool isOpen () const noexcept
void setOpen (bool shouldBeOpen)
Openness getOpenness () const noexcept
void setOpenness (Openness newOpenness)
bool isSelected () const noexcept
void setSelected (bool shouldBeSelected, bool deselectOtherItemsFirst, NotificationType shouldNotify=sendNotification)
Rectangle< intgetItemPosition (bool relativeToTreeViewTopLeft) const noexcept
void treeHasChanged () const noexcept
void repaintItem () const
int getRowNumberInTree () const noexcept
bool areAllParentsOpen () const noexcept
void setLinesDrawnForSubItems (bool shouldDrawLines) noexcept
virtual void itemOpennessChanged (bool isNowOpen)
virtual int getItemWidth () const
virtual int getItemHeight () const
virtual bool canBeSelected () const
virtual std::unique_ptr< ComponentcreateItemComponent ()
virtual void paintItem (Graphics &g, int width, int height)
virtual void paintOpenCloseButton (Graphics &, const Rectangle< float > &area, Colour backgroundColour, bool isMouseOver)
virtual void paintHorizontalConnectingLine (Graphics &, const Line< float > &line)
virtual void paintVerticalConnectingLine (Graphics &, const Line< float > &line)
virtual bool customComponentUsesTreeViewMouseHandler () const
virtual void itemClicked (const MouseEvent &)
virtual void itemDoubleClicked (const MouseEvent &)
virtual void itemSelectionChanged (bool isNowSelected)
virtual void ownerViewChanged (TreeView *newOwner)
virtual String getTooltip ()
virtual String getAccessibilityName ()
virtual var getDragSourceDescription ()
virtual bool isInterestedInFileDrag (const StringArray &files)
virtual void filesDropped (const StringArray &files, int insertIndex)
virtual bool isInterestedInDragSource (const DragAndDropTarget::SourceDetails &dragSourceDetails)
virtual void itemDropped (const DragAndDropTarget::SourceDetails &dragSourceDetails, int insertIndex)
void setDrawsInLeftMargin (bool canDrawInLeftMargin) noexcept
void setDrawsInRightMargin (bool canDrawInRightMargin) noexcept
std::unique_ptr< XmlElementgetOpennessState () const
void restoreOpennessState (const XmlElement &xml)
int getIndexInParent () const noexcept
bool isLastOfSiblings () const noexcept
String getItemIdentifierString () const

Private Attributes

KeyMappingEditorComponentowner

Additional Inherited Members

Public Types inherited from juce::TreeViewItem
enum class  Openness { opennessDefault , opennessClosed , opennessOpen }
Private Member Functions inherited from juce::ChangeListener
virtual ~ChangeListener ()=default

Constructor & Destructor Documentation

◆ TopLevelItem()

juce::KeyMappingEditorComponent::TopLevelItem::TopLevelItem ( KeyMappingEditorComponent & kec)
inline

◆ ~TopLevelItem()

juce::KeyMappingEditorComponent::TopLevelItem::~TopLevelItem ( )
inlineoverride

Member Function Documentation

◆ changeListenerCallback()

void juce::KeyMappingEditorComponent::TopLevelItem::changeListenerCallback ( ChangeBroadcaster * source)
inlineoverridevirtual

Your subclass should implement this method to receive the callback.

Parameters
sourcethe ChangeBroadcaster that triggered the callback.

Implements juce::ChangeListener.

◆ getUniqueName()

String juce::KeyMappingEditorComponent::TopLevelItem::getUniqueName ( ) const
inlineoverridevirtual

Returns a string to uniquely identify this item.

If you're planning on using the TreeView::getOpennessState() method, then these strings will be used to identify which nodes are open. The string should be unique amongst the item's sibling items, but it's ok for there to be duplicates at other levels of the tree.

If you're not going to store the state, then it's ok not to bother implementing this method.

Reimplemented from juce::TreeViewItem.

◆ mightContainSubItems()

bool juce::KeyMappingEditorComponent::TopLevelItem::mightContainSubItems ( )
inlineoverridevirtual

Tells the tree whether this item can potentially be opened.

If your item could contain sub-items, this should return true; if it returns false then the tree will not try to open the item. This determines whether or not the item will be drawn with a 'plus' button next to it.

Implements juce::TreeViewItem.

Member Data Documentation

◆ owner

KeyMappingEditorComponent& juce::KeyMappingEditorComponent::TopLevelItem::owner
private

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