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
juce_ContentSharer.cpp
Go to the documentation of this file.
1 /*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 By using JUCE, you agree to the terms of both the JUCE 7 End-User License
11 Agreement and JUCE Privacy Policy.
12
13 End User License Agreement: www.juce.com/juce-7-licence
14 Privacy Policy: www.juce.com/juce-privacy-policy
15
16 Or: You may also use this code under the terms of the GPL v3 (see
17 www.gnu.org/licenses).
18
19 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
20 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
21 DISCLAIMED.
22
23 ==============================================================================
24*/
25
26namespace juce
27{
28
30 Callback callback,
31 Component* parent)
32{
33 auto impl = detail::ScopedContentSharerInterface::shareFiles (files, parent);
34 return detail::ConcreteScopedContentSharerImpl::show (std::move (impl), std::move (callback));
35}
36
38 Callback callback,
39 Component* parent)
40{
41 auto impl = detail::ScopedContentSharerInterface::shareText (text, parent);
42 return detail::ConcreteScopedContentSharerImpl::show (std::move (impl), std::move (callback));
43}
44
47 Callback callback,
48 Component* parent)
49{
50 auto impl = detail::ScopedContentSharerInterface::shareImages (images, std::move (format), parent);
51 return detail::ConcreteScopedContentSharerImpl::show (std::move (impl), std::move (callback));
52}
53
55 Callback callback,
56 Component* parent)
57{
58 auto impl = detail::ScopedContentSharerInterface::shareData (mb, parent);
59 return detail::ConcreteScopedContentSharerImpl::show (std::move (impl), std::move (callback));
60}
61
62#if ! (JUCE_CONTENT_SHARING && (JUCE_IOS || JUCE_ANDROID))
63auto detail::ScopedContentSharerInterface::shareFiles (const Array<URL>&, Component*) -> std::unique_ptr<ScopedContentSharerInterface>
64{
65 return std::make_unique<detail::ScopedContentSharerInterface>();
66}
67
68auto detail::ScopedContentSharerInterface::shareText (const String&, Component*) -> std::unique_ptr<ScopedContentSharerInterface>
69{
70 return std::make_unique<detail::ScopedContentSharerInterface>();
71}
72#endif
73
74} // namespace juce
Holds a resizable array of primitive or copy-by-value objects.
Definition juce_Array.h:56
The base class for all JUCE user-interface objects.
static ScopedMessageBox shareFilesScoped(const Array< URL > &files, Callback callback, Component *parent=nullptr)
Shares the given files.
static ScopedMessageBox shareDataScoped(const MemoryBlock &mb, Callback callback, Component *parent=nullptr)
A convenience function to share arbitrary data.
static ScopedMessageBox shareTextScoped(const String &text, Callback callback, Component *parent=nullptr)
Shares the given text.
static ScopedMessageBox shareImagesScoped(const Array< Image > &images, std::unique_ptr< ImageFileFormat > format, Callback callback, Component *parent=nullptr)
A convenience function to share an image.
A class to hold a resizable block of raw data.
Objects of this type can be used to programmatically close message boxes.
The JUCE String class!
Definition juce_String.h:53
JUCE Namespace.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
Definition juce_Memory.h:88