1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/xrc/xh_treebk.h
3 // Purpose: XML resource handler for wxTreebook
4 // Author: Evgeniy Tarassov
6 // Copyright: (c) 2005 TT-Solutions <vadim@tt-solutions.com>
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_XH_TREEBK_H_
11 #define _WX_XH_TREEBK_H_
13 #include "wx/xrc/xmlres.h"
15 #if wxUSE_XRC && wxUSE_TREEBOOK
17 class WXDLLIMPEXP_FWD_CORE wxTreebook
;
18 #include "wx/dynarray.h"
20 WX_DEFINE_USER_EXPORTED_ARRAY_SIZE_T(size_t, wxArrayTbkPageIndexes
,
21 class WXDLLIMPEXP_XRC
);
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
31 class WXDLLIMPEXP_XRC wxTreebookXmlHandler
: public wxXmlResourceHandler
33 DECLARE_DYNAMIC_CLASS(wxTreebookXmlHandler
)
36 wxTreebookXmlHandler();
37 virtual wxObject
*DoCreateResource();
38 virtual bool CanHandle(wxXmlNode
*node
);
42 wxArrayTbkPageIndexes m_treeContext
;
56 // <object class="wxTreebook">
57 // <object class="treebookpage">
58 // <object class="wxWindow" />
59 // <label>My first page</label>
62 // <object class="treebookpage">
63 // <object class="wxWindow" />
64 // <label>First</label>
67 // <object class="treebookpage">
68 // <object class="wxWindow" />
69 // <label>Second</label>
72 // <object class="treebookpage">
73 // <object class="wxWindow" />
74 // <label>Third</label>
81 #endif // wxUSE_XRC && wxUSE_TREEBOOK
83 #endif // _WX_XH_TREEBK_H_