OCC22250 Windows lost focus with DRAWEXE launched in 'virtual windows' mode
[occt.git] / src / Draw / Draw_Printer.cxx
CommitLineData
7fd59977 1// File: Draw_Printer.cxx
2// Created: Tue Jul 31 19:26:55 2007
3// Author: OCC Team
4// Copyright: Open CASCADE S.A. 2007
5
6#include <Draw_Printer.ixx>
7
8#include <TCollection_AsciiString.hxx>
9#include <TCollection_ExtendedString.hxx>
10
11//=======================================================================
12//function : Draw_Printer
13//purpose :
14//=======================================================================
15
16Draw_Printer::Draw_Printer (const Draw_Interpretor& theTcl)
17: myTcl((Standard_Address)&theTcl)
18{
19}
20
21//=======================================================================
22//function : Send
23//purpose :
24//=======================================================================
25
26void Draw_Printer::Send (const TCollection_ExtendedString& theString,
27 const Message_Gravity /*theGravity*/,
28 const Standard_Boolean putEndl) const
29{
30 if ( ! myTcl )
31 return;
32 (*(Draw_Interpretor*)myTcl) << theString;
33 if ( putEndl )
34 (*(Draw_Interpretor*)myTcl) << '\n';
35}
36
37//=======================================================================
38//function : Send
39//purpose :
40//=======================================================================
41
42void Draw_Printer::Send (const Standard_CString theString,
43 const Message_Gravity /*theGravity*/,
44 const Standard_Boolean putEndl) const
45{
46 if ( ! myTcl )
47 return;
48 (*(Draw_Interpretor*)myTcl) << theString;
49 if ( putEndl )
50 (*(Draw_Interpretor*)myTcl) << '\n';
51}
52
53//=======================================================================
54//function : Send
55//purpose :
56//=======================================================================
57
58void Draw_Printer::Send (const TCollection_AsciiString& theString,
59 const Message_Gravity /*theGravity*/,
60 const Standard_Boolean putEndl) const
61{
62 if ( ! myTcl )
63 return;
64 (*(Draw_Interpretor*)myTcl) << theString;
65 if ( putEndl )
66 (*(Draw_Interpretor*)myTcl) << '\n';
67}