]> git.saurik.com Git - wxWidgets.git/blame - contrib/utils/wxrcedit/nodesdb.h
wx-config2.6
[wxWidgets.git] / contrib / utils / wxrcedit / nodesdb.h
CommitLineData
12d9e308
VS
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
ab7ce33c 10#if defined(__GNUG__) && !defined(__APPLE__)
12d9e308
VS
11 #pragma interface "nodesdb.h"
12#endif
13
14#ifndef _NODESDB_H_
15#define _NODESDB_H_
16
17#include "wx/dynarray.h"
c74caa09 18#include "wx/arrstr.h"
12d9e308
VS
19
20class WXDLLEXPORT wxXmlNode;
21class WXDLLEXPORT wxString;
22class WXDLLEXPORT wxPathList;
23
24
25class PropertyInfo
26{
27 public:
28 PropertyInfo() {}
29 PropertyInfo(const wxString& atype, const wxString& aname, const wxString& amoreinfo)
30 : Type(atype), Name(aname), MoreInfo(amoreinfo) {}
f80ea77b 31
12d9e308
VS
32 PropertyInfo& operator=(const PropertyInfo& p)
33 {
34 Type = p.Type; Name = p.Name; MoreInfo = p.MoreInfo;
35 return *this;
36 }
f80ea77b 37
12d9e308
VS
38 wxString Type;
39 wxString Name;
40 wxString MoreInfo;
41};
42
43WX_DECLARE_OBJARRAY(PropertyInfo, PropertyInfoArray);
44
45
46class NodeInfo
47{
48 public:
49 wxString NodeClass;
f80ea77b 50 wxString Type;
12d9e308
VS
51 PropertyInfoArray Props;
52 wxArrayString DerivedFrom;
53 bool Abstract;
54 wxString ChildType;
55 int Icon;
f80ea77b 56
12d9e308
VS
57 void Read(const wxString& filename, wxPathList& list);
58};
59
60WX_DECLARE_OBJARRAY(NodeInfo, NodeInfoArray);
61
62
63
64class NodesDb
65{
66 public:
67 NodesDb();
f80ea77b 68
12d9e308
VS
69 void Load();
70 void LoadDir(const wxString& path);
71 void LoadFile(const wxString& file);
f80ea77b 72
12d9e308 73 NodeInfoArray& GetNodesInfo() { return m_Infos; }
f80ea77b 74
12d9e308 75 static NodesDb *Get();
f80ea77b 76
12d9e308
VS
77 private:
78 static NodesDb *ms_Instance;
79 NodeInfoArray m_Infos;
80 wxArrayString m_Paths;
81};
82
83
84
f80ea77b 85#endif