File tree Expand file tree Collapse file tree
modules/gin_gui/utilities Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -445,6 +445,16 @@ void LayoutSupport::setLayout (const juce::String& rawJson)
445445 setLayoutInternal (files);
446446}
447447
448+ void LayoutSupport::setLayouts (const juce::StringArray& rawJson)
449+ {
450+ juce::Array<JsonFile> files;
451+
452+ for (auto [n, j] : juce::enumerate (rawJson))
453+ files.add ({ juce::String::formatted (" raw%d" , int (n)), j });
454+
455+ setLayoutInternal (files);
456+ }
457+
448458void LayoutSupport::setLayoutInternal (const juce::Array<JsonFile>& files)
449459{
450460 layoutSet = true ;
Original file line number Diff line number Diff line change @@ -312,6 +312,14 @@ class LayoutSupport : private gin::FileSystemWatcher::Listener
312312 */
313313 void setLayout (const juce::String& rawJson);
314314
315+ /* *
316+ Load layout from several raw JSON string.
317+
318+ @param rawJson JSON strings containing layout definition
319+ */
320+ void setLayouts (const juce::StringArray& rawJson);
321+
322+
315323 /* *
316324 Set or update a constant value.
317325
@@ -320,11 +328,16 @@ class LayoutSupport : private gin::FileSystemWatcher::Listener
320328 */
321329 void setConstant (const juce::String& name, int value);
322330
331+ /* *
332+ Find a resource by name
333+
334+ */
335+ juce::String findContent (const juce::String& name);
336+
323337 /* * Callback invoked when layout is loaded or reloaded */
324338 std::function<void ()> layoutChanged;
325339
326340protected:
327- juce::String findContent (const juce::String& name);
328341 juce::Component* getComp (const juce::String& cid);
329342
330343 juce::Component& parent;
You can’t perform that action at this time.
0 commit comments