1 /////////////////////////////////////////////////////////////////////////////
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"
17 #include "wx/treebook.h"
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
34 wxTreebookXmlHandler();
35 virtual wxObject
*DoCreateResource();
36 virtual bool CanHandle(wxXmlNode
*node
);
40 wxArrayTbkPageIndexes m_treeContext
;
43 DECLARE_DYNAMIC_CLASS(wxTreebookXmlHandler
)
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_TREEBOOK
83 #endif // _WX_XH_TREEBK_H_