00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 #ifndef SO_TO_PDF_ACTION_H
00026 #define SO_TO_PDF_ACTION_H
00027 
00028 #include <HardCopy/SoToU3DAction.h>
00029 
00030 #include <Inventor/SbColor.h>
00031 #include <Inventor/actions/SoSubAction.h>
00032 #include <HardCopy/SoHardCopy.h>
00033 
00034 class SoToPDFActionPrivate;
00035 
00133 class  SoToPDFAction : public SoToU3DAction
00134 {
00135   SO_ACTION_HEADER(SoToPDFAction);
00136 
00137 public:
00138 
00139   
00140 
00141 
00142   SoToPDFAction();
00143 
00144   
00145 
00146 
00147   virtual ~SoToPDFAction();
00148 
00154   SoNONUNICODE bool openFile(const char* filename);
00155 
00159   bool openFile( const SbString& filename );
00160 
00164   bool closeFile();
00165 
00175   SoNONUNICODE void setPassword(const char* writePass, const char* readPass = NULL);
00176 
00184   void setPassword( const SbString& writePass, const SbString& readPass = "" );
00185 
00192   SoNONUNICODE void setTitle(const char* title);
00193 
00198   void setTitle(const SbString& title);
00199 
00206   SoNONUNICODE void setText(const char* text);
00207 
00212   void setText(const SbString& text);
00213 
00218   void setLandscape( const SbBool enable );
00219 
00220 private:
00224   static void initClass();
00225   static void exitClass();
00226 
00227   static bool writeFile(
00228     const SbString& pdfOutput, 
00229     const SbString& writePass, 
00230     const SbString& readPass, 
00231     const SbString& title, 
00232     const SbString& text, 
00233     const SbString& u3dInput,
00234     const SbString& u3dView,
00235     bool hasPerspective,
00236     float fov,
00237     float focalDistance,
00238     bool hasLights,
00239     const SbColor& background,
00240     bool landscape = false);
00241 
00242 private:
00243 
00244   SoToPDFActionPrivate* m_private;
00245 };
00246 
00247 #endif // SO_TO_PDF_ACTION_H
00248 
00249 
00250