]> git.saurik.com Git - wxWidgets.git/blame - contrib/utils/wxrcedit/prophnd.h
documented EVT_LIST_ITEM_RIGHT_CLICK
[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
bebb14d5
VS
27/* ADD NEW PROPERTY TYPES HERE
28 (search for other occurences of this comment in _all_ files) */
56d2f750
VS
29enum PropertyType
30{
31 PROP_TEXT = 0,
32 PROP_FLAGS = 1,
33 PROP_COLOR = 2,
34 PROP_BOOL = 3,
35 PROP_INTEGER = 4,
ab13d1c5 36 PROP_COORD = 5,
bebb14d5
VS
37 PROP_DIMENSION = 6,
38 PROP_NOT_IMPLEMENTED = 7,
56d2f750 39};
bebb14d5 40#define PROP_TYPES_CNT 8
56d2f750
VS
41
42class PropertyInfo
43{
44 public:
45 PropertyType Type;
46 wxString Name;
47 wxString MoreInfo;
48};
49
50WX_DECLARE_OBJARRAY(PropertyInfo, PropertyInfoArray);
51
52
53class PropertyHandler;
54
55class PropsListInfo : public wxObject
56{
57 public:
58 PropsListInfo(int index, PropertyHandler *hnd, wxXmlNode *node,
59 PropertyInfo *pi, wxListCtrl *listctrl) :
60 m_Index(index), m_Handler(hnd), m_Node(node),
61 m_PropInfo(pi), m_ListCtrl(listctrl) {}
62 virtual ~PropsListInfo() {}
63
64 int m_Index;
65 PropertyHandler *m_Handler;
66 wxXmlNode *m_Node;
67 PropertyInfo *m_PropInfo;
68 wxListCtrl *m_ListCtrl;
69};
70
71
72
73
74class PropertyHandler
75{
76 public:
77 PropertyHandler() {}
78
79 int CreateListItem(wxListCtrl *listctrl, wxXmlNode *node, PropertyInfo *pi);
80
81 virtual wxString GetBriefValue(wxXmlNode *node, PropertyInfo *pi);
82 virtual wxPanel *CreateEditPanel(wxWindow *parent, PropsListInfo *pli) = 0;
83};
84
85
86
87class TextPropertyHandler : public PropertyHandler
88{
89 public:
90 TextPropertyHandler() {}
91 virtual wxPanel *CreateEditPanel(wxWindow *parent, PropsListInfo *pli);
92};
93
94
95class CoordPropertyHandler : public PropertyHandler
96{
97 public:
98 CoordPropertyHandler() {}
99 virtual wxPanel *CreateEditPanel(wxWindow *parent, PropsListInfo *pli);
100};
101
102
bebb14d5
VS
103class DimensionPropertyHandler : public PropertyHandler
104{
105 public:
106 DimensionPropertyHandler() {}
107 virtual wxPanel *CreateEditPanel(wxWindow *parent, PropsListInfo *pli);
108};
109
110
56d2f750
VS
111class BoolPropertyHandler : public PropertyHandler
112{
113 public:
114 BoolPropertyHandler() {}
115 virtual wxString GetBriefValue(wxXmlNode *node, PropertyInfo *pi);
116 virtual wxPanel *CreateEditPanel(wxWindow *parent, PropsListInfo *pli);
117};
118
119
120class FlagsPropertyHandler : public PropertyHandler
121{
122 public:
123 FlagsPropertyHandler() {}
124 virtual wxPanel *CreateEditPanel(wxWindow *parent, PropsListInfo *pli);
125};
126
127
ab13d1c5
VS
128
129class NotImplPropertyHandler : public PropertyHandler
130{
131 public:
132 NotImplPropertyHandler() {}
133 virtual wxPanel *CreateEditPanel(wxWindow *parent, PropsListInfo *pli);
134};
135
136
56d2f750 137#endif