mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Made a lot of the functions that used to return a raw XmlElement* instead return a std::unique_ptr<XmlElement> to make it safer and more concise to capture them. Also added new methods to XmlElement for generating text, and deprecated the old ones
This commit is contained in:
parent
bb5b534ab8
commit
2e2cfb5f6c
48 changed files with 373 additions and 362 deletions
|
|
@ -254,19 +254,19 @@ void ComponentLayout::copySelectedToClipboard()
|
|||
|
||||
for (int i = 0; i < components.size(); ++i)
|
||||
{
|
||||
Component* const c = components.getUnchecked(i);
|
||||
auto c = components.getUnchecked(i);
|
||||
|
||||
if (selected.isSelected (c))
|
||||
{
|
||||
if (ComponentTypeHandler* const type = ComponentTypeHandler::getHandlerFor (*c))
|
||||
if (auto type = ComponentTypeHandler::getHandlerFor (*c))
|
||||
{
|
||||
XmlElement* const e = type->createXmlFor (c, this);
|
||||
auto e = type->createXmlFor (c, this);
|
||||
clip.addChildElement (e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SystemClipboard::copyTextToClipboard (clip.createDocument ("", false, false));
|
||||
SystemClipboard::copyTextToClipboard (clip.toString());
|
||||
}
|
||||
|
||||
void ComponentLayout::paste()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue