ALBA
albaWXLog.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaWXLog
5 Authors: Silvano Imboden
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16#ifndef __albaWXLog_H__
17#define __albaWXLog_H__
18//----------------------------------------------------------------------------
19// Include:
20//----------------------------------------------------------------------------
21
22//----------------------------------------------------------------------------
23// albaWXLog :
24//----------------------------------------------------------------------------
26class ALBA_EXPORT albaWXLog : public wxLog
27{
28public:
29 albaWXLog(wxTextCtrl *pTextCtrl);
31
33 int SetFileName(wxString filename);
34
36 void LogToFile(bool on);
37
38private:
40 virtual void DoLogText(const wxString& msg);
41
42 // the control we use
43 wxTextCtrl *m_PTextCtrl;
44 FILE *m_Fp;
45 bool m_LogToFile;
46};
47#endif
albaWXLog(wxTextCtrl *pTextCtrl)
void LogToFile(bool on)
Set the flag to rodirect the log on a file.
int SetFileName(wxString filename)
Set the filename for the log file.