Code::Blocks  SVN r11506
gotofunctiondlg.h
Go to the documentation of this file.
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 GOTOFUNCTIONDLG_H
7 #define GOTOFUNCTIONDLG_H
8 
9 #ifndef CB_PRECOMP
10  //(*HeadersPCH(GotoFunctionDlg)
11  #include <wx/dialog.h>
12  class wxBoxSizer;
13  class wxCheckBox;
14  class wxListCtrl;
15  class wxStaticText;
16  class wxTextCtrl;
17  //*)
18 #endif
19 //(*Headers(GotoFunctionDlg)
20 //*)
21 
23 
37 class GotoFunctionDlg : public wxDialog
38 {
39  public:
41  {
44  unsigned line, implLine;
45  };
46 
48  {
49  Iterator();
50 
51  void AddToken(const FunctionToken &token);
52  const FunctionToken* GetToken(int index) const;
53 
54  int GetTotalCount() const override;
55  const wxString& GetItemFilterString(int index) const override;
56  wxString GetDisplayText(int index, int column) const override;
57 
58  void SetColumnMode(bool flag);
59 
60  int GetColumnWidth(int column) const override;
61  void CalcColumnWidth(wxListCtrl &list) override;
62 
63  void Sort();
64 
65  private:
66  std::vector<FunctionToken> m_tokens;
67  int m_columnLength[3];
69  };
70  public:
71 
72  GotoFunctionDlg(wxWindow* parent, Iterator* iterator);
73  virtual ~GotoFunctionDlg();
74 
75  int GetSelection();
76 
77  private:
78 
79  //(*Declarations(GotoFunctionDlg)
83  //*)
84 
85  //(*Identifiers(GotoFunctionDlg)
86  static const long ID_CHECKBOX1;
87  static const long ID_TEXTCTRL1;
88  static const long ID_LISTCTRL1;
89  //*)
90 
91  //(*Handlers(GotoFunctionDlg)
92  void OnModeClick(wxCommandEvent& event);
93  //*)
94 
95  private:
96  void BuildContent(wxWindow* parent, Iterator* iterator);
97  void SwitchMode();
98  private:
101  private:
102  DECLARE_EVENT_TABLE()
103 };
104 
105 #endif
Iterator * m_iterator
static const long ID_CHECKBOX1
bool m_columnMode
0 is for non-column mode, 1 and 2 are for column mode.
virtual ~GotoFunctionDlg()
wxTextCtrl * m_text
void BuildContent(wxWindow *parent, Iterator *iterator)
GotoFunctionDlg(wxWindow *parent, Iterator *iterator)
IncrementalListCtrl * m_list
static const long ID_LISTCTRL1
The goto function dialog allow user to type a function name, and filter out the functions.
Class that implements a virtual list control that uses an IncrementalSelectIterator to populate the l...
std::vector< FunctionToken > m_tokens
IncrementalSelectHandler m_handler
static const long ID_TEXTCTRL1
void OnModeClick(wxCommandEvent &event)
wxCheckBox * m_mode