ASPiK SDK
iuidescription.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 #ifndef __iuidescription__
6 #define __iuidescription__
7 
8 #include "../lib/vstguifwd.h"
9 #include "../lib/cfont.h"
10 #include <string>
11 #include <list>
12 
13 namespace VSTGUI {
14 
15 class IController;
16 class IViewFactory;
17 
18 //-----------------------------------------------------------------------------
20 {
21 public:
22  virtual ~IUIDescription () noexcept = default;
23 
24  virtual CView* createView (UTF8StringPtr name, IController* controller) const = 0;
25 
26  virtual CBitmap* getBitmap (UTF8StringPtr name) const = 0;
27  virtual CFontRef getFont (UTF8StringPtr name) const = 0;
28  virtual bool getColor (UTF8StringPtr name, CColor& color) const = 0;
29  virtual CGradient* getGradient (UTF8StringPtr name) const = 0;
30  virtual int32_t getTagForName (UTF8StringPtr name) const = 0;
31  virtual IControlListener* getControlListener (UTF8StringPtr name) const = 0;
32  virtual IController* getController () const = 0;
33 
34  virtual UTF8StringPtr lookupColorName (const CColor& color) const = 0;
35  virtual UTF8StringPtr lookupFontName (const CFontRef font) const = 0;
36  virtual UTF8StringPtr lookupBitmapName (const CBitmap* bitmap) const = 0;
37  virtual UTF8StringPtr lookupGradientName (const CGradient* gradient) const = 0;
38  virtual UTF8StringPtr lookupControlTagName (const int32_t tag) const = 0;
39 
40  virtual bool getVariable (UTF8StringPtr name, double& value) const = 0;
41  virtual bool getVariable (UTF8StringPtr name, std::string& value) const = 0;
42 
43  virtual void collectTemplateViewNames (std::list<const std::string*>& names) const = 0;
44  virtual void collectColorNames (std::list<const std::string*>& names) const = 0;
45  virtual void collectFontNames (std::list<const std::string*>& names) const = 0;
46  virtual void collectBitmapNames (std::list<const std::string*>& names) const = 0;
47  virtual void collectGradientNames (std::list<const std::string*>& names) const = 0;
48  virtual void collectControlTagNames (std::list<const std::string*>& names) const = 0;
49 
50  virtual const IViewFactory* getViewFactory () const = 0;
51 
52  static IdStringPtr kCustomViewName;
53 };
54 
55 
56 } // namespace VSTGUI
57 
58 #endif // __iuidescription__
font class
Definition: cfont.h:31
Definition: iuidescription.h:19
Definition: xmlparse.c:181
Definition: iviewfactory.h:15
RGBA Color structure.
Definition: ccolor.h:15
Gradient Object [new in 4.0].
Definition: cgradient.h:19
Encapsulates various platform depended kinds of bitmaps.
Definition: cbitmap.h:21
Definition: customcontrols.cpp:8
extension to IControlListener used by UIDescription
Definition: icontroller.h:20
Base Class of all view objects.
Definition: cview.h:44
Definition: icontrollistener.h:14