28
28
class ThreadSearchLoggerList : public wxEvtHandler, public ThreadSearchLoggerBase
32
ThreadSearchLoggerList(ThreadSearchView& threadSearchView, ThreadSearch& threadSearchPlugin,
33
InsertIndexManager::eFileSorting fileSorting, wxPanel* pParent, long id);
32
ThreadSearchLoggerList(ThreadSearchView& threadSearchView, ThreadSearch& threadSearchPlugin,
33
InsertIndexManager::eFileSorting fileSorting, wxPanel* pParent, long id);
36
virtual ~ThreadSearchLoggerList();
39
virtual eLoggerTypes GetLoggerType() {return TypeList;}
41
/** Called by ThreadSearchView when new settings are applied. */
42
virtual void Update();
44
/** Called by ThreadSearchView to process a ThreadSearchEvent
45
* sent by worker thread.
47
virtual void OnThreadSearchEvent(const ThreadSearchEvent& event);
49
/** Removes all items from logger. */
52
/** Returns the logger window. */
53
virtual wxWindow* GetWindow();
55
/** Sets focus on list window. */
56
virtual void SetFocus();
58
/** Single click event handler */
59
void OnLoggerListClick(wxListEvent& event);
61
/** Double click event handler */
62
void OnLoggerListDoubleClick(wxListEvent& event);
36
virtual ~ThreadSearchLoggerList();
39
virtual eLoggerTypes GetLoggerType() {return TypeList;}
41
/** Called by ThreadSearchView when new settings are applied. */
42
virtual void Update();
44
/** Called by ThreadSearchView to process a ThreadSearchEvent
45
* sent by worker thread.
47
virtual void OnThreadSearchEvent(const ThreadSearchEvent& event);
49
/** Removes all items from logger. */
52
/** Called on search begin to prepare logger. */
53
virtual void OnSearchBegin(const ThreadSearchFindData& findData);
55
/** Returns the logger window. */
56
virtual wxWindow* GetWindow();
58
/** Sets focus on list window. */
59
virtual void SetFocus();
61
/** Single click event handler */
62
void OnLoggerListClick(wxListEvent& event);
64
/** Double click event handler */
65
void OnLoggerListDoubleClick(wxListEvent& event);
66
* The SimpleListLog constructor does not set the provided columns on Linux.
67
* It is necessary to set columns after the ThreadSearchLoggerList constructor.
69
void SetListColumns();
71
/** GetFileLineFromListEvent
72
* Return the file path at index from the list control using dir and file columns.
73
* @param event : list control event
74
* @param filepath : reference that will receive the path
75
* @param line : reference that will receive the line index
76
* @return true if successful.
78
bool GetFileLineFromListEvent(wxListEvent& event, wxString& filepath, long &line);
80
/** Dynamic events connection. */
81
virtual void ConnectEvents(wxEvtHandler* pEvtHandler);
83
/** Dynamic events disconnection. */
84
virtual void DisconnectEvents(wxEvtHandler* pEvtHandler);
86
wxListCtrl* m_pListLog;
69
* The SimpleListLog constructor does not set the provided columns on Linux.
70
* It is necessary to set columns after the ThreadSearchLoggerList constructor.
72
void SetListColumns();
74
/** GetFileLineFromListEvent
75
* Return the file path at index from the list control using dir and file columns.
76
* @param event : list control event
77
* @param filepath : reference that will receive the path
78
* @param line : reference that will receive the line index
79
* @return true if successful.
81
bool GetFileLineFromListEvent(wxListEvent& event, wxString& filepath, long &line);
84
* Return true if line is a result line. It is not the case for the
85
* first line of a new search without deleting previous results.
86
* @param index : item index in list control. If -1 is given (default
87
* value), first selected line will be processed.
88
* @return true if line is usable.
90
bool IsLineResultLine(long index = -1);
92
/** Dynamic events connection. */
93
virtual void ConnectEvents(wxEvtHandler* pEvtHandler);
95
/** Dynamic events disconnection. */
96
virtual void DisconnectEvents(wxEvtHandler* pEvtHandler);
98
/** Contextual menu event handler */
99
void OnLoggerListContextualMenu(wxContextMenuEvent& event);
101
/** Delete item menu event handler */
102
void OnDeleteListItem(wxCommandEvent& event);
104
/** Delete item menu event handler */
105
void OnDeleteAllListItems(wxCommandEvent& event);
107
/** Deletes an item from the List */
108
void DeleteListItem(long index);
110
/** Deletes all items from the List */
111
void DeleteListItems();
113
wxListCtrl* m_pListLog;
89
117
#endif // THREAD_SEARCH_LOGGER_LIST_H