~ubuntu-branches/ubuntu/maverick/freecad/maverick

« back to all changes in this revision

Viewing changes to src/Gui/GuiConsole.h

  • Committer: Bazaar Package Importer
  • Author(s): Teemu Ikonen
  • Date: 2009-07-16 18:37:41 UTC
  • Revision ID: james.westby@ubuntu.com-20090716183741-oww9kcxqrk991i1n
Tags: upstream-0.8.2237
Import upstream version 0.8.2237

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (c) 2004 J�rgen Riegel <juergen.riegel@web.de>              *
 
3
 *                                                                         *
 
4
 *   This file is part of the FreeCAD CAx development system.              *
 
5
 *                                                                         *
 
6
 *   This library is free software; you can redistribute it and/or         *
 
7
 *   modify it under the terms of the GNU Library General Public           *
 
8
 *   License as published by the Free Software Foundation; either          *
 
9
 *   version 2 of the License, or (at your option) any later version.      *
 
10
 *                                                                         *
 
11
 *   This library  is distributed in the hope that it will be useful,      *
 
12
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 
13
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 
14
 *   GNU Library General Public License for more details.                  *
 
15
 *                                                                         *
 
16
 *   You should have received a copy of the GNU Library General Public     *
 
17
 *   License along with this library; see the file COPYING.LIB. If not,    *
 
18
 *   write to the Free Software Foundation, Inc., 59 Temple Place,         *
 
19
 *   Suite 330, Boston, MA  02111-1307, USA                                *
 
20
 *                                                                         *
 
21
 ***************************************************************************/
 
22
 
 
23
 
 
24
#ifndef GUI_GUICONSOLE_H
 
25
#define GUI_GUICONSOLE_H
 
26
 
 
27
 
 
28
#include <Base/Console.h>
 
29
 
 
30
namespace Gui {
 
31
 
 
32
/** The console window class
 
33
 *  This class opens a console window when instanciated 
 
34
 *  and redirect the stdio streams to it as long it exists. 
 
35
 *  This is for Windows only!
 
36
 *  After instanciation it automaticly register itself at
 
37
 *  the FCConsole class and gets all the FCConsoleObserver
 
38
 *  massages. The class must not used directly! Only the 
 
39
 *  over the FCConsole class is allowed!
 
40
 *  @see FCConsole
 
41
 *  \author J�rgen Riegel
 
42
 */
 
43
class GuiExport GUIConsole :public Base::ConsoleObserver
 
44
{
 
45
public:
 
46
  /// Constructor
 
47
  GUIConsole(void);
 
48
  /// Destructor
 
49
  virtual ~GUIConsole(void);
 
50
  //@{
 
51
    /** Observer implementation */
 
52
  virtual void Warning(const char *sWarn);
 
53
  virtual void Message(const char *sMsg);
 
54
  virtual void Error  (const char *sErr);
 
55
  virtual void Log    (const char *sErr);
 
56
  const char* Name(void){return "GUIConsole";}
 
57
  //@}
 
58
 
 
59
protected:
 
60
  static const unsigned int s_nMaxLines;
 
61
  static unsigned int       s_nRefCount;
 
62
};
 
63
 
 
64
} // namespace Gui
 
65
 
 
66
#endif // GUI_GUICONSOLE_H
 
67