Code::Blocks
SVN r11506
plugins
codecompletion
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
22
#include "
incremental_select_helper.h
"
23
37
class
GotoFunctionDlg
:
public
wxDialog
38
{
39
public
:
40
struct
FunctionToken
41
{
42
wxString
displayName
,
name
;
43
wxString
paramsAndreturnType
,
funcName
;
44
unsigned
line
,
implLine
;
45
};
46
47
struct
Iterator
:
IncrementalSelectIteratorIndexed
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];
68
bool
m_columnMode
;
69
};
70
public
:
71
72
GotoFunctionDlg
(
wxWindow
* parent,
Iterator
* iterator);
73
virtual
~GotoFunctionDlg
();
74
75
int
GetSelection
();
76
77
private
:
78
79
//(*Declarations(GotoFunctionDlg)
80
IncrementalListCtrl
*
m_list
;
81
wxCheckBox
*
m_mode
;
82
wxTextCtrl
*
m_text
;
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
:
99
IncrementalSelectHandler
m_handler
;
100
Iterator
*
m_iterator
;
101
private
:
102
DECLARE_EVENT_TABLE()
103
};
104
105
#endif
GotoFunctionDlg::m_iterator
Iterator * m_iterator
Definition:
gotofunctiondlg.h:100
GotoFunctionDlg::ID_CHECKBOX1
static const long ID_CHECKBOX1
Definition:
gotofunctiondlg.h:86
GotoFunctionDlg::Iterator::m_columnMode
bool m_columnMode
0 is for non-column mode, 1 and 2 are for column mode.
Definition:
gotofunctiondlg.h:68
GotoFunctionDlg::~GotoFunctionDlg
virtual ~GotoFunctionDlg()
Definition:
gotofunctiondlg.cpp:168
GotoFunctionDlg::FunctionToken::name
wxString name
Definition:
gotofunctiondlg.h:42
GotoFunctionDlg::Iterator
Definition:
gotofunctiondlg.h:47
wxListCtrl
GotoFunctionDlg::m_text
wxTextCtrl * m_text
Definition:
gotofunctiondlg.h:82
wxCommandEvent
GotoFunctionDlg::GetSelection
int GetSelection()
Definition:
gotofunctiondlg.cpp:210
wxTextCtrl
wxBoxSizer
GotoFunctionDlg::FunctionToken::paramsAndreturnType
wxString paramsAndreturnType
Definition:
gotofunctiondlg.h:43
GotoFunctionDlg::FunctionToken::funcName
wxString funcName
Definition:
gotofunctiondlg.h:43
GotoFunctionDlg::FunctionToken::displayName
wxString displayName
Definition:
gotofunctiondlg.h:42
GotoFunctionDlg::BuildContent
void BuildContent(wxWindow *parent, Iterator *iterator)
Definition:
gotofunctiondlg.cpp:130
dialog.h
GotoFunctionDlg::GotoFunctionDlg
GotoFunctionDlg(wxWindow *parent, Iterator *iterator)
Definition:
gotofunctiondlg.cpp:123
wxString
GotoFunctionDlg::m_list
IncrementalListCtrl * m_list
Definition:
gotofunctiondlg.h:80
wxDialog
GotoFunctionDlg::FunctionToken
Definition:
gotofunctiondlg.h:40
GotoFunctionDlg::ID_LISTCTRL1
static const long ID_LISTCTRL1
Definition:
gotofunctiondlg.h:88
IncrementalSelectIteratorIndexed
Definition:
incremental_select_helper.h:45
incremental_select_helper.h
wxCheckBox
GotoFunctionDlg
The goto function dialog allow user to type a function name, and filter out the functions.
Definition:
gotofunctiondlg.h:37
IncrementalListCtrl
Class that implements a virtual list control that uses an IncrementalSelectIterator to populate the l...
Definition:
incremental_select_helper.h:82
GotoFunctionDlg::Iterator::m_tokens
std::vector< FunctionToken > m_tokens
Definition:
gotofunctiondlg.h:66
wxStaticText
GotoFunctionDlg::FunctionToken::implLine
unsigned implLine
Definition:
gotofunctiondlg.h:44
GotoFunctionDlg::FunctionToken::line
unsigned line
Definition:
gotofunctiondlg.h:44
GotoFunctionDlg::m_handler
IncrementalSelectHandler m_handler
Definition:
gotofunctiondlg.h:99
GotoFunctionDlg::ID_TEXTCTRL1
static const long ID_TEXTCTRL1
Definition:
gotofunctiondlg.h:87
GotoFunctionDlg::OnModeClick
void OnModeClick(wxCommandEvent &event)
Definition:
gotofunctiondlg.cpp:199
wxWindow
GotoFunctionDlg::m_mode
wxCheckBox * m_mode
Definition:
gotofunctiondlg.h:81
IncrementalSelectHandler
Definition:
incremental_select_helper.h:58
GotoFunctionDlg::SwitchMode
void SwitchMode()
Definition:
gotofunctiondlg.cpp:176
Generated by
1.8.13