1 // Created on: 1992-04-07
2 // Created by: Remi LEQUETTE
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2012 OPEN CASCADE SAS
6 // The content of this file is subject to the Open CASCADE Technology Public
7 // License Version 6.5 (the "License"). You may not use the content of this file
8 // except in compliance with the License. Please obtain a copy of the License
9 // at http://www.opencascade.org and read it completely before using this file.
11 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 // The Original Code and all software distributed under the License is
15 // distributed on an "AS IS" basis, without warranty of any kind, and the
16 // Initial Developer hereby disclaims all such warranties, including without
17 // limitation, any warranties of merchantability, fitness for a particular
18 // purpose or non-infringement. Please see the License for the specific terms
19 // and conditions governing the rights and limitations under the License.
22 // JR 21 Oct 1999 : Change for Draw_Init_Appli which is in main and is
23 // called from Draw ===> undefined symbol on UNIX
24 // ===> duplication of code on NT :
25 // One argument added to DrawAppli : Draw_Init_Appli ===>
26 // Draw_Appli of Draw/TKDraw may call Draw_Init_Appli
28 #ifndef Draw_Appli_HeaderFile
29 #define Draw_Appli_HeaderFile
32 #include <Draw_Viewer.hxx>
35 typedef void (*FDraw_InitAppli)(Draw_Interpretor&);
39 //extern void Draw_Appli(HINSTANCE,HINSTANCE,LPSTR,int);
40 Standard_EXPORT void Draw_Appli(HINSTANCE,HINSTANCE,LPSTR,int,
41 const FDraw_InitAppli Draw_InitAppli);
43 extern void Draw_Appli(Standard_Integer argc, char** argv,
44 const FDraw_InitAppli Draw_InitAppli);
49 #if defined(WNT) && !defined(HAVE_NO_DLL)
52 # define __Draw_API __declspec ( dllexport )
54 # define __Draw_API __declspec ( dllimport )
63 extern Draw_Viewer dout;
64 extern Standard_Boolean Draw_Batch;
67 class Draw_SaveAndRestore {
71 // __Draw_API Draw_SaveAndRestore
72 Standard_EXPORT Draw_SaveAndRestore
74 Standard_Boolean (*test)(const Handle(Draw_Drawable3D)&),
75 void (*save)(const Handle(Draw_Drawable3D)&, ostream&),
76 Handle(Draw_Drawable3D) (*restore) (istream&),
77 Standard_Boolean display = Standard_True);
80 const char* Name() const {return myName;}
81 Standard_Boolean Test(const Handle(Draw_Drawable3D)&d);
82 void Save(const Handle(Draw_Drawable3D)& d, ostream& os) const;
83 Handle(Draw_Drawable3D) Restore(istream&) const;
84 Standard_Boolean Disp() const {return myDisplay;}
85 Draw_SaveAndRestore* Next() {return myNext;}
90 Standard_Boolean (*myTest)(const Handle(Draw_Drawable3D)&);
91 void (*mySave)(const Handle(Draw_Drawable3D)&, ostream&);
92 Handle(Draw_Drawable3D) (*myRestore) (istream&);
93 Standard_Boolean myDisplay;
94 Draw_SaveAndRestore* myNext;