00001 // 00002 // Copyright (c) 2000 by Tech Soft 3D, LLC. 00003 // The information contained herein is confidential and proprietary to 00004 // Tech Soft 3D, LLC., and considered a trade secret as defined under 00005 // civil and criminal statutes. Tech Soft 3D shall pursue its civil 00006 // and criminal remedies in the event of unauthorized use or misappropriation 00007 // of its trade secrets. Use of this information by anyone other than 00008 // authorized employees of Tech Soft 3D, LLC. is granted only under a 00009 // written non-disclosure agreement, expressly prescribing the scope and 00010 // manner of such use. 00011 // 00012 // $Id: fc0e33caf1f494e3229a5b95240fc2d33074ddaa $ 00013 // 00014 00015 #ifndef _HIOUTILITYPDF_H 00016 #define _HIOUTILITYPDF_H 00017 00018 #ifdef H_PACK_8 00019 #pragma pack(push) 00020 #pragma pack(8) 00021 #endif 00022 00023 #include "HTools.h" 00024 #include "HIOManager.h" 00025 #include "HDB.h" 00026 #include <string> 00027 #include <map> 00028 #include "vlist.h" 00029 00030 00031 00038 class MVO_API HU3DOptions 00039 { 00040 public: 00042 HU3DOptions() {Reset();}; 00044 void Reset(){ 00045 m_bExportLines = m_bExportAnnotations = false; 00046 }; 00047 00049 bool m_bExportLines; 00051 bool m_bExportAnnotations; 00052 00054 bool ExportLines() const {return m_bExportLines;}; 00056 void ExportLines(bool onoff) {m_bExportLines = onoff;}; 00058 bool ExportAnnotations() const {return m_bExportAnnotations;}; 00060 void ExportAnnotations(bool onoff) {m_bExportAnnotations = onoff;}; 00061 }; 00062 00063 00066 class MVO_API HIOUtilityPDF: public HOutputHandler 00067 { 00068 public: 00070 HIOUtilityPDF() { 00071 SetOutputOps(HOutputOpFileOutputByKey); 00072 }; 00073 00074 ~HIOUtilityPDF() {;}; 00075 00078 const char * GetOutputName() { return "HIOUtilityPDF"; } 00079 00081 void RegisterOutputHandlerTypes() { 00082 HC_Begin_Segment_Search("/driver/pdf");{ 00083 char seg[100]; 00084 while(HC_Find_Segment(seg)){ 00085 if(strieq(seg, "/driver/pdf")){ 00086 HIORegisterOutputType("pdf",this); 00087 break; 00088 } 00089 } 00090 }HC_End_Segment_Search(); 00091 }; 00092 00094 const char * GetOutputTypesString() {return "pdf";}; 00096 HOutputHandlerStyle GetOutputStyle() {return HOutputHandlerStyleHardcopy;}; 00097 00099 const char * GetOutputDefaultHSRA() {return "painters";}; 00100 00104 bool Has3dSupport(){ 00105 return (HDB::GetHIOManager()->GetOutputHandler("u3d") != (HOutputHandler*)0); 00106 } 00107 00114 HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options); 00115 00116 #ifdef _MSC_VER 00117 HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options){ 00118 H_UTF16 utf16; 00119 utf16.encodedText((utf16_char const*) filename); 00120 return FileOutputByKey(H_WCS(utf16).encodedText(), key, options); 00121 } 00122 #endif 00123 00124 HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options){ 00125 return FileOutputByKey(H_WCS(filename).encodedText(), key, options); 00126 } 00127 00128 protected: 00135 HFileOutputResult FileOutputByKey2D(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options); 00136 HFileOutputResult FileOutputByKey2D(const char * filename, HC_KEY key, HOutputHandlerOptions * options){ 00137 return FileOutputByKey2D((__wchar_t*)H_WCS(filename).encodedText(), key, options); 00138 } 00139 00140 00141 }; 00142 00143 00144 00145 00146 00147 00148 00149 #ifdef H_PACK_8 00150 #pragma pack(pop) 00151 #endif 00152 00153 #endif