]> git.saurik.com Git - wxWidgets.git/blame - contrib/utils/wxrcedit/prophnd.h
added 'centered' property to wxDialog handler
[wxWidgets.git] / contrib / utils / wxrcedit / prophnd.h
CommitLineData
56d2f750
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 "prophnd.h"
12#endif
13
14#ifndef _PROPHND_H_
15#define _PROPHND_H_
16
17
1ad83f6b
VS
18class WXDLLEXPORT wxXmlNode;
19class WXDLLEXPORT wxList;
20class WXDLLEXPORT wxListCtrl;
21class WXDLLEXPORT wxPanel;
22class WXDLLEXPORT wxWindow;
56d2f750
VS
23
24#include "wx/xml/xml.h"
25#include "wx/dynarray.h"
26
27enum PropertyType
28{
29 PROP_TEXT = 0,
30 PROP_FLAGS = 1,
31 PROP_COLOR = 2,
32 PROP_BOOL = 3,
33 PROP_INTEGER = 4,
ab13d1c5
VS
34 PROP_COORD = 5,
35 PROP_NOT_IMPLEMENTED = 6,
56d2f750 36};
ab13d1c5 37#define PROP_TYPES_CNT 7
56d2f750
VS
38
39class PropertyInfo
40{
41 public:
42 PropertyType Type;
43 wxString Name;
44 wxString MoreInfo;
45};
46
47WX_DECLARE_OBJARRAY(PropertyInfo, PropertyInfoArray);
48
49
50class PropertyHandler;
51
52class PropsListInfo : public wxObject
53{
54 public:
55 PropsListInfo(int index, PropertyHandler *hnd, wxXmlNode *node,
56 PropertyInfo *pi, wxListCtrl *listctrl) :
57 m_Index(index), m_Handler(hnd), m_Node(node),
58 m_PropInfo(pi), m_ListCtrl(listctrl) {}
59 virtual ~PropsListInfo() {}
60
61 int m_Index;
62 PropertyHandler *m_Handler;
63 wxXmlNode *m_Node;
64 PropertyInfo *m_PropInfo;
65 wxListCtrl *m_ListCtrl;
66};
67
68
69
70
71class PropertyHandler
72{
73 public:
74 PropertyHandler() {}
75
76 int CreateListItem(wxListCtrl *listctrl, wxXmlNode *node, PropertyInfo *pi);
77
78 virtual wxString GetBriefValue(wxXmlNode *node, PropertyInfo *pi);
79 virtual wxPanel *CreateEditPanel(wxWindow *parent, PropsListInfo *pli) = 0;
80};
81
82
83
84class TextPropertyHandler : public PropertyHandler
85{
86 public:
87 TextPropertyHandler() {}
88 virtual wxPanel *CreateEditPanel(wxWindow *parent, PropsListInfo *pli);
89};
90
91
92class CoordPropertyHandler : public PropertyHandler
93{
94 public:
95 CoordPropertyHandler() {}
96 virtual wxPanel *CreateEditPanel(wxWindow *parent, PropsListInfo *pli);
97};
98
99
100class BoolPropertyHandler : public PropertyHandler
101{
102 public:
103 BoolPropertyHandler() {}
104 virtual wxString GetBriefValue(wxXmlNode *node, PropertyInfo *pi);
105 virtual wxPanel *CreateEditPanel(wxWindow *parent, PropsListInfo *pli);
106};
107
108
109class FlagsPropertyHandler : public PropertyHandler
110{
111 public:
112 FlagsPropertyHandler() {}
113 virtual wxPanel *CreateEditPanel(wxWindow *parent, PropsListInfo *pli);
114};
115
116
ab13d1c5
VS
117
118class NotImplPropertyHandler : public PropertyHandler
119{
120 public:
121 NotImplPropertyHandler() {}
122 virtual wxPanel *CreateEditPanel(wxWindow *parent, PropsListInfo *pli);
123};
124
125
56d2f750 126#endif