ASPiK SDK
shareduiresources.h
1 // This file is part of VSTGUI. It is subject to the license terms
2 // in the LICENSE file found in the top-level directory of this
3 // distribution and at http://github.com/steinbergmedia/vstgui/LICENSE
4 
5 #pragma once
6 
7 #include "../../uidescription/uidescriptionfwd.h"
8 #include "../../lib/optional.h"
9 #include "../include/ishareduiresources.h"
10 
11 //------------------------------------------------------------------------
12 namespace VSTGUI {
13 namespace Standalone {
14 namespace Detail {
15 
16 //------------------------------------------------------------------------
17 const ISharedUIResources& getSharedUIResources ();
18 
19 //------------------------------------------------------------------------
20 SharedPointer<UIDescription> getSharedUIDescription ();
21 
22 //------------------------------------------------------------------------
23 void cleanupSharedUIResources ();
24 
25 //------------------------------------------------------------------------
26 //------------------------------------------------------------------------
27 //------------------------------------------------------------------------
28 #if VSTGUI_LIVE_EDITING
29 void saveSharedUIDescription ();
30 
31 //------------------------------------------------------------------------
32 struct IEditFileMap
33 {
34  virtual void set (const std::string& filename, const std::string& absolutePath) = 0;
35  virtual Optional<const char*> get (const std::string& filename) const = 0;
36 };
37 
38 //------------------------------------------------------------------------
39 IEditFileMap& getEditFileMap ();
40 
41 //------------------------------------------------------------------------
42 enum class UIDescCheckFilePathResult
43 {
44  Exists,
45  NewPathSet,
46  Cancel
47 };
48 
49 //------------------------------------------------------------------------
50 UIDescCheckFilePathResult checkAndUpdateUIDescFilePath (
51  UIDescription& uiDesc, CFrame* _frame,
52  UTF8StringPtr notFoundText = "The uidesc file location cannot be found.");
53 
54 //------------------------------------------------------------------------
55 bool initUIDescAsNew (UIDescription& uiDesc, CFrame* _frame);
56 
57 #endif // VSTGUI_LIVE_EDITING
58 
59 //------------------------------------------------------------------------
60 } // Detail
61 } // Standalone
62 } // VSTGUI
Definition: customcontrols.cpp:8