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