]> git.saurik.com Git - wxWidgets.git/blame - include/wx/xrc/xh_treebk.h
Compilation fix after wxCB_ flags move.
[wxWidgets.git] / include / wx / xrc / xh_treebk.h
CommitLineData
eca15c0d 1/////////////////////////////////////////////////////////////////////////////
e8a793f0 2// Name: wx/xrc/xh_treebk.h
eca15c0d
VZ
3// Purpose: XML resource handler for wxTreebook
4// Author: Evgeniy Tarassov
5// Created: 2005/09/28
6// Copyright: (c) 2005 TT-Solutions <vadim@tt-solutions.com>
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10#ifndef _WX_XH_TREEBK_H_
11#define _WX_XH_TREEBK_H_
12
13#include "wx/xrc/xmlres.h"
14
15#if wxUSE_TREEBOOK
16
17#include "wx/treebook.h"
07f93593 18#include "wx/dynarray.h"
eca15c0d 19
07f93593
VZ
20WX_DEFINE_USER_EXPORTED_ARRAY_SIZE_T(size_t, wxArrayTbkPageIndexes,
21 class WXDLLIMPEXP_XRC);
eca15c0d
VZ
22
23// ---------------------------------------------------------------------
24// wxTreebookXmlHandler class
25// ---------------------------------------------------------------------
26// Resource xml structure have to be almost the "same" as for wxNotebook
27// except the additional (size_t)depth parameter for treebookpage nodes
28// which indicates the depth of the page in the tree.
29// There is only one logical constraint on this parameter :
30// it cannot be greater than the previous page depth plus one
31class WXDLLIMPEXP_XRC wxTreebookXmlHandler : public wxXmlResourceHandler
32{
eca15c0d
VZ
33public:
34 wxTreebookXmlHandler();
35 virtual wxObject *DoCreateResource();
36 virtual bool CanHandle(wxXmlNode *node);
37
38private:
07f93593 39 wxTreebook *m_tbk;
eca15c0d 40 wxArrayTbkPageIndexes m_treeContext;
07f93593
VZ
41 bool m_isInside;
42
43 DECLARE_DYNAMIC_CLASS(wxTreebookXmlHandler)
eca15c0d
VZ
44};
45
46
47// Example:
48// -------
49// Label
50// \--First
51// | \--Second
52// \--Third
53//
54//<resource>
55// ...
56// <object class="wxTreebook">
57// <object class="treebookpage">
58// <object class="wxWindow" />
59// <label>My first page</label>
60// <depth>0</depth>
61// </object>
62// <object class="treebookpage">
63// <object class="wxWindow" />
64// <label>First</label>
65// <depth>1</depth>
66// </object>
67// <object class="treebookpage">
68// <object class="wxWindow" />
69// <label>Second</label>
70// <depth>2</depth>
71// </object>
72// <object class="treebookpage">
73// <object class="wxWindow" />
74// <label>Third</label>
75// <depth>1</depth>
76// </object>
77// </object>
78// ...
79//</resource>
80
07f93593 81#endif // wxUSE_TREEBOOK
eca15c0d
VZ
82
83#endif // _WX_XH_TREEBK_H_