]>
git.saurik.com Git - wxWidgets.git/blob - utils/configtool/src/configtree.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxWidgets Configuration Tool tree class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
10 /////////////////////////////////////////////////////////////////////////////
13 #ifndef _CT_CONFIGTREE_H_
14 #define _CT_CONFIGTREE_H_
17 #include "wx/treectrl.h"
19 #include "configitem.h"
24 * Holds the ctConfigItem for each tree item.
27 class ctTreeItemData
: public wxTreeItemData
30 ctTreeItemData(ctConfigItem
* item
) : m_configItem(item
) { }
33 ctConfigItem
*GetConfigItem() const { return m_configItem
; }
34 void SetConfigItem(ctConfigItem
*item
) { m_configItem
= item
; }
37 ctConfigItem
* m_configItem
;
43 * The options hierarchy viewer.
46 class ctConfigTreeCtrl
: public wxTreeCtrl
48 DECLARE_CLASS(ctConfigTreeCtrl
)
50 ctConfigTreeCtrl(wxWindow
* parent
, wxWindowID id
, const wxPoint
& pt
= wxDefaultPosition
,
51 const wxSize
& sz
= wxDefaultSize
, long style
= wxTR_HAS_BUTTONS
);
55 void OnMouseEvent(wxMouseEvent
& event
);
56 void OnSelChanged(wxTreeEvent
& event
);
57 void OnHelp(wxHelpEvent
& event
);
58 void OnKeyDown(wxKeyEvent
& event
);
62 /// Get the table of icons
63 wxIconTable
& GetIconTable() { return m_iconTable
; }
65 /// Get the context menu
66 wxMenu
* GetMenu() { return m_contextMenu
; }
68 /// Get the item associated with the context menu events
69 ctConfigItem
* GetContextItem() { return m_contextItem
; }
77 wxImageList
* m_imageList
;
78 wxIconTable m_iconTable
;
79 wxMenu
* m_contextMenu
;
80 // The item associated with the context menu events
81 ctConfigItem
* m_contextItem
;