]> git.saurik.com Git - wxWidgets.git/blob - contrib/utils/wxrcedit/nodesdb.h
Correct orientation of splitter sash again.
[wxWidgets.git] / contrib / utils / wxrcedit / nodesdb.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Purpose: XML resources editor
3 // Author: Vaclav Slavik
4 // Created: 2000/05/05
5 // RCS-ID: $Id$
6 // Copyright: (c) 2000 Vaclav Slavik
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #if defined(__GNUG__) && !defined(__APPLE__)
11 #pragma interface "nodesdb.h"
12 #endif
13
14 #ifndef _NODESDB_H_
15 #define _NODESDB_H_
16
17 #include "wx/dynarray.h"
18 #include "wx/arrstr.h"
19
20 class WXDLLEXPORT wxXmlNode;
21 class WXDLLEXPORT wxString;
22 class WXDLLEXPORT wxPathList;
23
24
25 class PropertyInfo
26 {
27 public:
28 PropertyInfo() {}
29 PropertyInfo(const wxString& atype, const wxString& aname, const wxString& amoreinfo)
30 : Type(atype), Name(aname), MoreInfo(amoreinfo) {}
31
32 PropertyInfo& operator=(const PropertyInfo& p)
33 {
34 Type = p.Type; Name = p.Name; MoreInfo = p.MoreInfo;
35 return *this;
36 }
37
38 wxString Type;
39 wxString Name;
40 wxString MoreInfo;
41 };
42
43 WX_DECLARE_OBJARRAY(PropertyInfo, PropertyInfoArray);
44
45
46 class NodeInfo
47 {
48 public:
49 wxString NodeClass;
50 wxString Type;
51 PropertyInfoArray Props;
52 wxArrayString DerivedFrom;
53 bool Abstract;
54 wxString ChildType;
55 int Icon;
56
57 void Read(const wxString& filename, wxPathList& list);
58 };
59
60 WX_DECLARE_OBJARRAY(NodeInfo, NodeInfoArray);
61
62
63
64 class NodesDb
65 {
66 public:
67 NodesDb();
68
69 void Load();
70 void LoadDir(const wxString& path);
71 void LoadFile(const wxString& file);
72
73 NodeInfoArray& GetNodesInfo() { return m_Infos; }
74
75 static NodesDb *Get();
76
77 private:
78 static NodesDb *ms_Instance;
79 NodeInfoArray m_Infos;
80 wxArrayString m_Paths;
81 };
82
83
84
85 #endif