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);
64
void SyncLoggerToPreview();
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);
83
/** Dynamic events connection. */
84
virtual void ConnectEvents(wxEvtHandler* pEvtHandler);
86
/** Dynamic events disconnection. */
87
virtual void DisconnectEvents(wxEvtHandler* pEvtHandler);
89
void OnMouseWheelEvent(wxMouseEvent& event);
91
wxListCtrl* m_pListLog;
92
long m_LastLeftMouseClickIndex;
95
#endif // THREAD_SEARCH_LOGGER_LIST_H