2000-11-04 18:34:33 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Purpose: XML resources editor
|
|
|
|
// Author: Vaclav Slavik
|
|
|
|
// Created: 2000/05/05
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) 2000 Vaclav Slavik
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2002-09-07 08:28:46 -04:00
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
2000-11-04 18:34:33 -05:00
|
|
|
#pragma interface "nodesdb.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _NODESDB_H_
|
|
|
|
#define _NODESDB_H_
|
|
|
|
|
|
|
|
#include "wx/dynarray.h"
|
2003-09-10 16:53:01 -04:00
|
|
|
#include "wx/arrstr.h"
|
2000-11-04 18:34:33 -05:00
|
|
|
|
|
|
|
class WXDLLEXPORT wxXmlNode;
|
|
|
|
class WXDLLEXPORT wxString;
|
|
|
|
class WXDLLEXPORT wxPathList;
|
|
|
|
|
|
|
|
|
|
|
|
class PropertyInfo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
PropertyInfo() {}
|
|
|
|
PropertyInfo(const wxString& atype, const wxString& aname, const wxString& amoreinfo)
|
|
|
|
: Type(atype), Name(aname), MoreInfo(amoreinfo) {}
|
2004-06-11 09:14:23 -04:00
|
|
|
|
2000-11-04 18:34:33 -05:00
|
|
|
PropertyInfo& operator=(const PropertyInfo& p)
|
|
|
|
{
|
|
|
|
Type = p.Type; Name = p.Name; MoreInfo = p.MoreInfo;
|
|
|
|
return *this;
|
|
|
|
}
|
2004-06-11 09:14:23 -04:00
|
|
|
|
2000-11-04 18:34:33 -05:00
|
|
|
wxString Type;
|
|
|
|
wxString Name;
|
|
|
|
wxString MoreInfo;
|
|
|
|
};
|
|
|
|
|
|
|
|
WX_DECLARE_OBJARRAY(PropertyInfo, PropertyInfoArray);
|
|
|
|
|
|
|
|
|
|
|
|
class NodeInfo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxString NodeClass;
|
2004-06-11 09:14:23 -04:00
|
|
|
wxString Type;
|
2000-11-04 18:34:33 -05:00
|
|
|
PropertyInfoArray Props;
|
|
|
|
wxArrayString DerivedFrom;
|
|
|
|
bool Abstract;
|
|
|
|
wxString ChildType;
|
|
|
|
int Icon;
|
2004-06-11 09:14:23 -04:00
|
|
|
|
2000-11-04 18:34:33 -05:00
|
|
|
void Read(const wxString& filename, wxPathList& list);
|
|
|
|
};
|
|
|
|
|
|
|
|
WX_DECLARE_OBJARRAY(NodeInfo, NodeInfoArray);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class NodesDb
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NodesDb();
|
2004-06-11 09:14:23 -04:00
|
|
|
|
2000-11-04 18:34:33 -05:00
|
|
|
void Load();
|
|
|
|
void LoadDir(const wxString& path);
|
|
|
|
void LoadFile(const wxString& file);
|
2004-06-11 09:14:23 -04:00
|
|
|
|
2000-11-04 18:34:33 -05:00
|
|
|
NodeInfoArray& GetNodesInfo() { return m_Infos; }
|
2004-06-11 09:14:23 -04:00
|
|
|
|
2000-11-04 18:34:33 -05:00
|
|
|
static NodesDb *Get();
|
2004-06-11 09:14:23 -04:00
|
|
|
|
2000-11-04 18:34:33 -05:00
|
|
|
private:
|
|
|
|
static NodesDb *ms_Instance;
|
|
|
|
NodeInfoArray m_Infos;
|
|
|
|
wxArrayString m_Paths;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2004-06-11 09:14:23 -04:00
|
|
|
#endif
|