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"
19 WX_DEFINE_ARRAY_SIZE_T(size_t, wxArrayTbkPageIndexes
);
21 // ---------------------------------------------------------------------
22 // wxTreebookXmlHandler class
23 // ---------------------------------------------------------------------
24 // Resource xml structure have to be almost the "same" as for wxNotebook
25 // except the additional (size_t)depth parameter for treebookpage nodes
26 // which indicates the depth of the page in the tree.
27 // There is only one logical constraint on this parameter :
28 // it cannot be greater than the previous page depth plus one
29 class WXDLLIMPEXP_XRC wxTreebookXmlHandler
: public wxXmlResourceHandler
31 DECLARE_DYNAMIC_CLASS(wxTreebookXmlHandler
)
33 wxTreebookXmlHandler();
34 virtual wxObject
*DoCreateResource();
35 virtual bool CanHandle(wxXmlNode
*node
);
40 wxArrayTbkPageIndexes m_treeContext
;
53 // <object class="wxTreebook">
54 // <object class="treebookpage">
55 // <object class="wxWindow" />
56 // <label>My first page</label>
59 // <object class="treebookpage">
60 // <object class="wxWindow" />
61 // <label>First</label>
64 // <object class="treebookpage">
65 // <object class="wxWindow" />
66 // <label>Second</label>
69 // <object class="treebookpage">
70 // <object class="wxWindow" />
71 // <label>Third</label>
80 #endif // _WX_XH_TREEBK_H_