Update lua versions
[ryzomcore.git] / nel / tools / misc / log_analyser / log_analyserDlg.h
blob2688b2886e562b6f6cbc2f7ab078e4c813fde831
1 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 // log_analyserDlg.h : header file
21 #include "FilterDialog.h"
22 #include "ViewDialog.h"
23 #include "LogSessions.h"
24 #include "PlugInSelector.h"
25 #include <vector>
26 #include <map>
28 #if !defined(AFX_LOG_ANALYSERDLG_H__667551B0_360A_43CD_846F_7D02803A822A__INCLUDED_)
29 #define AFX_LOG_ANALYSERDLG_H__667551B0_360A_43CD_846F_7D02803A822A__INCLUDED_
31 #if _MSC_VER > 1000
32 #pragma once
33 #endif // _MSC_VER > 1000
36 struct TStampedLine
38 int Index;
39 CString Line;
43 class CLAEdit : public CEdit
45 protected:
47 //{{AFX_MSG(CLAEdit)
48 afx_msg void OnKeyDown( UINT nChar, UINT nRepCnt, UINT nFlags );
49 //}}AFX_MSG
50 DECLARE_MESSAGE_MAP()
54 /////////////////////////////////////////////////////////////////////////////
55 // CLog_analyserDlg dialog
57 class CLog_analyserDlg : public CDialog
59 // Construction
60 public:
61 CLog_analyserDlg(CWnd* pParent = NULL); // standard constructor
63 ///
64 void addView( std::vector<CString>& pathNames );
66 ///
67 CViewDialog * onAddCommon( const std::vector<CString>& filenames );
69 ///
70 void loadPluginConfiguration();
72 ///
73 bool addPlugIn( const std::string& dllName );
75 ///
76 void displayCurrentLine( const CString& line );
78 ///
79 bool selectText( int lineNum, int colNum, int length );
81 ///
82 void memorizeFileList( const CString& str ) { MemorizedFileList = str; }
84 ///
85 void displayFileList();
87 ///
88 void insertTraceLine( int index, char *traceLine );
90 ///
91 void getLogSeries( const CString& filenameStr, std::vector<CString>& filenameList );
93 ///
94 bool isLogSeriesEnabled() const { return ((CButton*)GetDlgItem( IDC_CheckAllFileSeries ))->GetCheck() == 1; }
96 ///
97 void resizeViews();
99 ///
100 void beginResizeView( int index );
103 CViewDialog *getCurrentView() { return CurrentView; }
105 ///
106 void setCurrentView( int index ) { if ( index==-1 ) CurrentView=NULL; else CurrentView = Views[index]; }
108 //{{AFX_MSG(CLog_analyserDlg)
109 afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
110 //}}AFX_MSG
113 CFilterDialog FilterDialog;
114 bool Trace;
115 int ResizeViewInProgress;
116 std::vector<CString> Plugins;
118 // Dialog Data
119 //{{AFX_DATA(CLog_analyserDlg)
120 enum { IDD = IDD_LOG_ANALYSER_DIALOG };
121 CScrollBar m_ScrollBar;
122 CLAEdit m_Edit;
123 //}}AFX_DATA
125 // ClassWizard generated virtual function overrides
126 //{{AFX_VIRTUAL(CLog_analyserDlg)
127 protected:
128 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
129 //}}AFX_VIRTUAL
131 std::vector<CViewDialog*> Views;
132 CViewDialog* CurrentView;
134 CLogSessions LogSessionsDialog;
135 CPlugInSelector PlugInSelectorDialog;
137 std::multimap<int, TStampedLine> TraceMap;
139 CString MemorizedFileList;
141 TAnalyseFunc AnalyseFunc;
143 // Implementation
144 protected:
145 HICON m_hIcon;
147 // Generated message map functions
148 //{{AFX_MSG(CLog_analyserDlg)
149 virtual BOOL OnInitDialog();
150 afx_msg void OnPaint();
151 afx_msg HCURSOR OnQueryDragIcon();
152 afx_msg void OnAddView();
153 afx_msg void OnAddtraceview();
154 afx_msg void OnComputeTraces();
155 afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
156 afx_msg void OnReset();
157 afx_msg void OnSize(UINT nType, int cx, int cy);
158 afx_msg void OnDestroy();
159 afx_msg void OnHelpBtn();
160 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
161 afx_msg void OnDropFiles( HDROP hDropInfo );
162 afx_msg void OnDispLineHeaders();
163 afx_msg void OnAnalyse();
164 //}}AFX_MSG
165 DECLARE_MESSAGE_MAP()
170 /// Smart sprintf() (from NeL)
171 int smprintf( char *buffer, size_t count, const char *format, ... );
174 //{{AFX_INSERT_LOCATION}}
175 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
177 #endif // !defined(AFX_LOG_ANALYSERDLG_H__667551B0_360A_43CD_846F_7D02803A822A__INCLUDED_)