]> git.saurik.com Git - wxWidgets.git/blame - contrib/utils/wxrcedit/nodesdb.h
This should work on SuSE and Mandrake icon themes.
[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) {}
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
43WX_DECLARE_OBJARRAY(PropertyInfo, PropertyInfoArray);
44
45
46class 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
60WX_DECLARE_OBJARRAY(NodeInfo, NodeInfoArray);
61
62
63
64class 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