~ubuntu-branches/ubuntu/hardy/codeblocks/hardy-backports

« back to all changes in this revision

Viewing changes to src/plugins/codecompletion/classbrowser.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Casadevall
  • Date: 2008-07-17 04:39:23 UTC
  • Revision ID: james.westby@ubuntu.com-20080717043923-gmsy5cwkdjswghkm
Tags: upstream-8.02
ImportĀ upstreamĀ versionĀ 8.02

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
 
3
 * http://www.gnu.org/licenses/gpl-3.0.html
 
4
 */
 
5
 
 
6
#ifndef CLASSBROWSER_H
 
7
#define CLASSBROWSER_H
 
8
 
 
9
#include <settings.h> // SDK
 
10
#include <cbplugin.h>
 
11
#include <manager.h>
 
12
#include <wx/panel.h>
 
13
#include "parser/parser.h"
 
14
#include "parser/token.h"
 
15
#include "classbrowserbuilderthread.h"
 
16
 
 
17
class NativeParser;
 
18
class wxTreeCtrl;
 
19
class wxTextCtrl;
 
20
class cbProject;
 
21
 
 
22
/*
 
23
 * No description
 
24
 */
 
25
class ClassBrowser : public wxPanel
 
26
{
 
27
    public:
 
28
        // class constructor
 
29
        ClassBrowser(wxWindow* parent, NativeParser* np);
 
30
        // class destructor
 
31
        ~ClassBrowser();
 
32
        const wxTreeCtrl* GetTree() { return m_Tree; }
 
33
        void SetParser(Parser* parser);
 
34
        const Parser& GetParser(){ return *m_pParser; }
 
35
        const Parser* GetParserPtr() { return m_pParser; }
 
36
        void UnlinkParser();
 
37
        void UpdateView();
 
38
    private:
 
39
        friend class myTextCtrl;
 
40
        void OnTreeItemDoubleClick(wxTreeEvent& event);
 
41
        void OnTreeItemRightClick(wxTreeEvent& event);
 
42
        void OnJumpTo(wxCommandEvent& event);
 
43
        void OnRefreshTree(wxCommandEvent& event);
 
44
        void OnForceReparse(wxCommandEvent& event);
 
45
        void OnCBViewMode(wxCommandEvent& event);
 
46
                void OnCBExpandNS(wxCommandEvent& event);
 
47
        void OnViewScope(wxCommandEvent& event);
 
48
        void OnDebugSmartSense(wxCommandEvent& event);
 
49
 
 
50
        void OnSearch(wxCommandEvent& event);
 
51
        bool FoundMatch(const wxString& search, wxTreeCtrl* tree, const wxTreeItemId& item);
 
52
        wxTreeItemId FindNext(const wxString& search, wxTreeCtrl* tree, const wxTreeItemId& start);
 
53
        bool RecursiveSearch(const wxString& search, wxTreeCtrl* tree, const wxTreeItemId& parent, wxTreeItemId& result);
 
54
 
 
55
        void ShowMenu(wxTreeCtrl* tree, wxTreeItemId id, const wxPoint& pt);
 
56
 
 
57
        void BuildTree();
 
58
 
 
59
        void OnTreeItemSelected(wxTreeEvent& event);
 
60
        void OnTreeItemExpanding(wxTreeEvent& event);
 
61
        void OnTreeItemCollapsing(wxTreeEvent& event);
 
62
 
 
63
        NativeParser* m_NativeParser;
 
64
        wxTreeCtrl* m_Tree;
 
65
        wxTextCtrl* m_Search;
 
66
        wxTreeCtrl* m_TreeForPopupMenu;
 
67
        Parser* m_pParser;
 
68
        wxTreeItemId m_RootNode;
 
69
 
 
70
        // filtering
 
71
        wxString m_ActiveFilename;
 
72
        cbProject* m_pActiveProject;
 
73
 
 
74
        wxSemaphore m_Semaphore;
 
75
        ClassBrowserBuilderThread* m_pBuilderThread;
 
76
 
 
77
        DECLARE_EVENT_TABLE()
 
78
};
 
79
 
 
80
#endif // CLASSBROWSER_H
 
81