1
/***************************************************************
2
* Name: ThreadSearchLoggerList
3
* Purpose: ThreadSearchLoggerList implements the
4
* ThreadSearchLoggerBase with a wxListCtrl.
5
* Author: Jerome ANTOINE
7
* Copyright: Jerome ANTOINE
9
**************************************************************/
11
#ifndef THREAD_SEARCH_LOGGER_LIST_H
12
#define THREAD_SEARCH_LOGGER_LIST_H
16
#include "ThreadSearchLoggerBase.h"
25
class ThreadSearchView;
26
class ThreadSearchEvent;
28
class ThreadSearchLoggerList : public wxEvtHandler, public ThreadSearchLoggerBase
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);
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;
89
#endif // THREAD_SEARCH_LOGGER_LIST_H