JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
juce::TreeViewItem::OpennessRestorer Class Reference

This handy class takes a copy of a TreeViewItem's openness when you create it, and restores that openness state when its destructor is called. More...

#include "juce_TreeView.h"

Public Member Functions

 OpennessRestorer (TreeViewItem &)
 

Detailed Description

This handy class takes a copy of a TreeViewItem's openness when you create it, and restores that openness state when its destructor is called.

This can very handy when you're refreshing sub-items - e.g.

void MyTreeViewItem::updateChildItems()
{
OpennessRestorer openness (*this); // saves the openness state here..
// add a bunch of sub-items here which may or may not be the same as the ones that
// were previously there
// ..and at this point, the old openness is restored, so any items that haven't
// changed will have their old openness retained.
}
This handy class takes a copy of a TreeViewItem's openness when you create it, and restores that open...
void clearSubItems()
Removes any sub-items.
void addSubItem(TreeViewItem *newItem, int insertPosition=-1)
Adds a sub-item.

Definition at line 595 of file juce_TreeView.h.

Constructor & Destructor Documentation

◆ OpennessRestorer()

juce::TreeViewItem::OpennessRestorer::OpennessRestorer ( TreeViewItem item)

Definition at line 2200 of file juce_TreeView.cpp.

◆ ~OpennessRestorer()

juce::TreeViewItem::OpennessRestorer::~OpennessRestorer ( )

Definition at line 2206 of file juce_TreeView.cpp.


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