wxWidgets/contrib/utils/wxrcedit/prophnd.h
Václav Slavík 1ad83f6b37 added WXDLLEXPORT
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7868 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-27 09:35:16 +00:00

117 lines
2.6 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Purpose: XML resources editor
// Author: Vaclav Slavik
// Created: 2000/05/05
// RCS-ID: $Id$
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma interface "prophnd.h"
#endif
#ifndef _PROPHND_H_
#define _PROPHND_H_
class WXDLLEXPORT wxXmlNode;
class WXDLLEXPORT wxList;
class WXDLLEXPORT wxListCtrl;
class WXDLLEXPORT wxPanel;
class WXDLLEXPORT wxWindow;
#include "wx/xml/xml.h"
#include "wx/dynarray.h"
enum PropertyType
{
PROP_TEXT = 0,
PROP_FLAGS = 1,
PROP_COLOR = 2,
PROP_BOOL = 3,
PROP_INTEGER = 4,
PROP_COORD = 5
};
#define PROP_TYPES_CNT 6
class PropertyInfo
{
public:
PropertyType Type;
wxString Name;
wxString MoreInfo;
};
WX_DECLARE_OBJARRAY(PropertyInfo, PropertyInfoArray);
class PropertyHandler;
class PropsListInfo : public wxObject
{
public:
PropsListInfo(int index, PropertyHandler *hnd, wxXmlNode *node,
PropertyInfo *pi, wxListCtrl *listctrl) :
m_Index(index), m_Handler(hnd), m_Node(node),
m_PropInfo(pi), m_ListCtrl(listctrl) {}
virtual ~PropsListInfo() {}
int m_Index;
PropertyHandler *m_Handler;
wxXmlNode *m_Node;
PropertyInfo *m_PropInfo;
wxListCtrl *m_ListCtrl;
};
class PropertyHandler
{
public:
PropertyHandler() {}
int CreateListItem(wxListCtrl *listctrl, wxXmlNode *node, PropertyInfo *pi);
virtual wxString GetBriefValue(wxXmlNode *node, PropertyInfo *pi);
virtual wxPanel *CreateEditPanel(wxWindow *parent, PropsListInfo *pli) = 0;
};
class TextPropertyHandler : public PropertyHandler
{
public:
TextPropertyHandler() {}
virtual wxPanel *CreateEditPanel(wxWindow *parent, PropsListInfo *pli);
};
class CoordPropertyHandler : public PropertyHandler
{
public:
CoordPropertyHandler() {}
virtual wxPanel *CreateEditPanel(wxWindow *parent, PropsListInfo *pli);
};
class BoolPropertyHandler : public PropertyHandler
{
public:
BoolPropertyHandler() {}
virtual wxString GetBriefValue(wxXmlNode *node, PropertyInfo *pi);
virtual wxPanel *CreateEditPanel(wxWindow *parent, PropsListInfo *pli);
};
class FlagsPropertyHandler : public PropertyHandler
{
public:
FlagsPropertyHandler() {}
virtual wxPanel *CreateEditPanel(wxWindow *parent, PropsListInfo *pli);
};
#endif