void itemOpennessChanged (bool isNowOpen)
    {
        if (isNowOpen)
        {
            clearSubItems();

            isDirectory = file.isDirectory();

            if (isDirectory)
            {
                if (subContentsList == 0)
                {
                    jassert (parentContentsList != 0);

                    DirectoryContentsList* const l = new DirectoryContentsList (parentContentsList->getFilter(), thread);
                    l->setDirectory (file, true, true);

                    setSubContentsList (l);
                    canDeleteSubContentsList = true;
                }

                changeListenerCallback (0);
            }
        }
    }
    void rebuildItemsFromContentList()
    {
        clearSubItems();

        if (isOpen() && subContentsList != nullptr)
        {
            for (int i = 0; i < subContentsList->getNumFiles(); ++i)
                addSubItem (new FileListTreeItem (owner, subContentsList, i,
                                                  subContentsList->getFile(i), thread));
        }
    }
예제 #3
0
        void updateSubItems()
        {
            ScopedPointer<XmlElement> openness = getOpennessState();
            clearSubItems();
            int children = t.getNumChildren();

            for (int i = 0; i < children; ++i)
                addSubItem (new Item (propertiesEditor, t.getChild (i)));

            if (openness)
                restoreOpennessState (*openness);
        }
예제 #4
0
 virtual void itemOpennessChanged(bool isNowOpen) override
 {
     if (isNowOpen) {
         if (const RC505::Group *group = dynamic_cast<const RC505::Group *>(_property)) {
             for (auto child : group->children()) {
                 if (child->visible()) {
                     addSubItem(new PropertyTreeViewItem(child));
                 }
             }
         }
     } else {
         clearSubItems();
     }
 }
    void changeListenerCallback (ChangeBroadcaster*)
    {
        clearSubItems();

        if (isOpen() && subContentsList != nullptr)
        {
            for (int i = 0; i < subContentsList->getNumFiles(); ++i)
            {
                FileListTreeItem* const item
                    = new FileListTreeItem (owner, subContentsList, i, subContentsList->getFile(i), thread);

                addSubItem (item);
            }
        }
    }
    void itemOpennessChanged (bool isNowOpen)
    {
        if (isNowOpen)
        {
            if (getNumSubItems() == 0)
            {
                const Array <CommandID> commands (owner.getCommandManager().getCommandsInCategory (categoryName));

                for (int i = 0; i < commands.size(); ++i)
                    if (owner.shouldCommandBeIncluded (commands[i]))
                        addSubItem (new MappingItem (owner, commands[i]));
            }
        }
        else
        {
            clearSubItems();
        }
    }
예제 #7
0
void CtrlrValueTreeEditorItem::itemOpennessChanged (bool isNowOpen)
{
	if (isNowOpen)
	{
		if (getNumSubItems() == 0)
		{
			for (int i=0; i<treeToEdit.getNumChildren(); i++)
			{
				addSubItem (new CtrlrValueTreeEditorItem (provider, treeToEdit.getChild(i), nameIdentifier));
			}
		}
	}
	else
	{
		clearSubItems();
	}

	provider.itemOpennessChanged(isNowOpen);
}
    void changeListenerCallback (ChangeBroadcaster*)
    {
        const OpennessRestorer opennessRestorer (*this);
        clearSubItems();

        const StringArray categories (owner.getCommandManager().getCommandCategories());

        for (int i = 0; i < categories.size(); ++i)
        {
            const Array <CommandID> commands (owner.getCommandManager().getCommandsInCategory (categories[i]));
            int count = 0;

            for (int j = 0; j < commands.size(); ++j)
                if (owner.shouldCommandBeIncluded (commands[j]))
                    ++count;

            if (count > 0)
                addSubItem (new CategoryItem (owner, categories[i]));
        }
    }
예제 #9
0
void JucerTreeViewBase::refreshSubItems()
{
    WholeTreeOpennessRestorer wtor (*this);
    clearSubItems();
    addSubItems();
}
예제 #10
0
 ~FileListTreeItem()
 {
     thread.removeTimeSliceClient (this);
     clearSubItems();
 }
예제 #11
0
 ~Item()
 {
     clearSubItems();
 }
예제 #12
0
void TreeItemBase::refreshSubItems()
{
    WholeTreeOpennessRestorer wtor (*this);
    clearSubItems();
    addSubItems();
}