]> git.saurik.com Git - wxWidgets.git/blob - samples/xti/classlist.h
Restore propagation of EVT_SEARCHCTRL_CANCEL_BTN events to the parent.
[wxWidgets.git] / samples / xti / classlist.h
1 ////////////////////////////////////////////////////
2 // Name: classlist.h
3 // Purpose: ClassListDialog definition
4 // Author: Francesco Montorsi
5 // Modified by:
6 // Created: 03/06/2007 14:49:55
7 // RCS-ID: $Id$
8 // Copyright: (c) 2007 Francesco Montorsi
9 // Licence: wxWindows licence
10 ////////////////////////////////////////////////////
11
12 #ifndef _CLASSLIST_H_
13 #define _CLASSLIST_H_
14
15
16 // ----------------------------------------------------------------------------
17 // includes
18 // ----------------------------------------------------------------------------
19
20 #include "wx/choicebk.h"
21 #include "wx/treectrl.h"
22
23 // ----------------------------------------------------------------------------
24 // IDs
25 // ----------------------------------------------------------------------------
26
27 #define ID_LISTMODE 10006
28 #define ID_LISTBOX 10003
29 #define ID_PANEL 10007
30 #define ID_TREECTRL 10008
31 #define ID_TEXTCTRL 10004
32 #define ID_SHOW_ONLY_XTI 10005
33 #define ID_SHOW_PROPERTIES_RECURSIVELY 10002
34 #define SYMBOL_CLASSLISTDIALOG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
35 #define SYMBOL_CLASSLISTDIALOG_TITLE _("wxWidgets class list")
36 #define SYMBOL_CLASSLISTDIALOG_IDNAME wxID_ANY
37 #define SYMBOL_CLASSLISTDIALOG_SIZE wxSize(400, 300)
38 #define SYMBOL_CLASSLISTDIALOG_POSITION wxDefaultPosition
39
40
41 // ----------------------------------------------------------------------------
42 // ClassListDialog
43 // ----------------------------------------------------------------------------
44
45 class ClassListDialog: public wxDialog
46 {
47 // we explicitly don't want to use the following macro:
48 // DECLARE_DYNAMIC_CLASS( ClassListDialog )
49 // as otherwise the ClassListDialog class would appear in the list
50 // shown by this dialog!
51 DECLARE_EVENT_TABLE()
52
53 public:
54 // Constructors
55 ClassListDialog();
56 ClassListDialog( wxWindow* parent, wxWindowID id = SYMBOL_CLASSLISTDIALOG_IDNAME,
57 const wxString& caption = SYMBOL_CLASSLISTDIALOG_TITLE,
58 const wxPoint& pos = SYMBOL_CLASSLISTDIALOG_POSITION,
59 const wxSize& size = SYMBOL_CLASSLISTDIALOG_SIZE,
60 long style = SYMBOL_CLASSLISTDIALOG_STYLE );
61
62 // Creation
63 bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CLASSLISTDIALOG_IDNAME,
64 const wxString& caption = SYMBOL_CLASSLISTDIALOG_TITLE,
65 const wxPoint& pos = SYMBOL_CLASSLISTDIALOG_POSITION,
66 const wxSize& size = SYMBOL_CLASSLISTDIALOG_SIZE,
67 long style = SYMBOL_CLASSLISTDIALOG_STYLE );
68
69 // Destructor
70 ~ClassListDialog();
71
72 public: // misc
73
74 void Init();
75 void CreateControls();
76 void InitControls();
77
78 void UpdateClassInfo(const wxString &itemName);
79 void UpdateFilterText();
80 bool IsToDiscard(const wxString &classname) const;
81
82 int AddClassesWithParent(const wxClassInfo *parent, const wxTreeItemId &id);
83
84 public: // event handlers
85
86 void OnListboxSelected( wxCommandEvent& event );
87 void OnTreectrlSelChanged( wxTreeEvent& event );
88 void OnChoiceBookPageChange( wxChoicebookEvent& event );
89 void OnShowOnlyXTICheckbox( wxCommandEvent& event );
90 void OnShowRecursiveInfoCheckbox( wxCommandEvent& event );
91
92 // Should we show tooltips?
93 static bool ShowToolTips();
94
95 protected:
96 wxChoicebook* m_pChoiceBook;
97 wxStaticText* m_pClassCountText;
98 wxListBox* m_pRawListBox;
99 wxTreeCtrl* m_pParentTreeCtrl;
100 wxListBox* m_pSizeListBox;
101 wxTextCtrl* m_pTextCtrl;
102
103 int m_nTotalCount; // number of classes in wxXTI system
104 int m_nCount; // number of shown classes
105 };
106
107 #endif
108 // _CLASSLIST_H_