Alphabetical Class Index   File Members   Compound Members   File List  

HIOUtilityGDIOutput.h

Go to the documentation of this file.
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 
00016 #ifndef _HIO_UTILITY_GDIOUTPUT_H
00017 #define _HIO_UTILITY_GDIOUTPUT_H
00018 
00019 #include "HTools.h"
00020 #include "HIOManager.h"
00021 #include "HMFCGlobals.h"
00022 #include "utf_utils.h"
00023 
00024 // msw driver specific driver_option debug flags
00025 
00033 #define DEBUG_FORCE_FULL_COLOR              0x00000010
00034 
00039 #define DEBUG_NO_WINDOWS_HOOK               0x00000040 
00040 
00046 #define DEBUG_SFB_COPY_TO_CLIPBOARD         0x00004000
00047 
00052 #define DEBUG_NO_RASTERS_IN_PRINTING        0x00020000
00053 
00058 #define DEBUG_PRINTING_MODE                 0x00040000
00059 
00065 #define DEBUG_PRINT_NOT_FRAMEBUFFER_MODE    0x00020000
00066 
00067 
00072 #define DEBUG_PRINT_NOT_RASTER_REDUCTION    0x00200000
00073 
00078 #define DEBUG_FORCE_SOFTWARE                0x01000000
00079 
00085 #define DEBUG_NO_PAINTERS_PANELLING 0x00000008
00086 
00091 class GDIExportInformation : public HOutputHandlerOptions {
00092 public:
00093 
00094     /* Initialize the references in this structure to refer to the matching field
00095      * in the parent class.  This is for supporting legacy code prior to v15. */
00096     GDIExportInformation()
00097         : HOutputHandlerOptions(),
00098         bForceGrayscale(m_ForceGrayscale),
00099         bConserveMemory(m_bConserveMemory),
00100         bUseWindowColor(m_bUseWindowColor),
00101         Height(m_Window_Height),
00102         Width(m_Window_Width),
00103         image_dpi(m_Image_Dpi)
00104     {               
00105         clipBoard = false;
00106         rasterOutput = false;
00107         windowID = 0;
00108         deviceContext = attribDC = 0;
00109     }
00110 
00111     HDC deviceContext;    
00112     HDC attribDC;         
00113     bool rasterOutput;    
00114     bool clipBoard;       
00115     void* windowID;       
00116 
00117     bool & bForceGrayscale; 
00118     bool & bConserveMemory; 
00119     bool & bUseWindowColor; 
00120     float & Height;       
00121     float & Width;        
00122     int & image_dpi;          
00123 };
00124 
00125 typedef GDIExportInformation GDIExportInfo;
00126 
00128 
00148 #ifdef SWIG
00149 class MVO_API HIOUtilityGDIOutput : public HOutputHandler
00150 #else
00151 class HMFC_API HIOUtilityGDIOutput : public HOutputHandler
00152 #endif
00153 {
00154 
00155 public:
00156 
00157     HIOUtilityGDIOutput() {
00158         SetOutputOps(HOutputOpFileOutputByKey);
00159     };
00160     virtual ~HIOUtilityGDIOutput() {;};
00161 
00163     void RegisterOutputHandlerTypes() {
00164         HIORegisterOutputType("emf", this);
00165     }
00166 
00167     const char * GetOutputName() { return "HIOUtilityGDIOutput"; }
00168 
00172     const char * GetOutputTypesString() {return "emf";};
00173 
00180     HOutputHandlerStyle GetOutputStyle() {return HOutputHandlerStyleModel;};
00181 
00191     HFileOutputResult FileOutputByKey(const char * FileName, HC_KEY key, HOutputHandlerOptions * options){
00192         return FileOutputByKey(H_WCS(FileName).encodedText(), key, options);
00193     }
00194     HFileOutputResult FileOutputByKey(unsigned short const * FileName, HC_KEY key, HOutputHandlerOptions * options){
00195         H_UTF16 utf16;
00196         utf16.encodedText((utf16_char const*) FileName);
00197         return FileOutputByKey(H_WCS(utf16).encodedText(), key, options);
00198     }
00199     HFileOutputResult FileOutputByKey(const __wchar_t * FileName, HC_KEY key, HOutputHandlerOptions * options);
00200 
00210     HFileOutputResult DoClipBoard(const wchar_t * FileName, HC_KEY key, GDIExportInformation * options);
00211 
00221     HFileOutputResult DoPrinter(const wchar_t * FileName, HC_KEY key, GDIExportInformation * options);
00222     
00224     HFileOutputResult FileOutputFromImageKey(const char * FileName, HC_KEY key, HOutputHandlerOptions * options){return OutputNotHandled;};
00225     HFileOutputResult FileOutputFromImageKey(unsigned short const * FileName, HC_KEY key, HOutputHandlerOptions * options){return OutputNotHandled;};
00226     HFileOutputResult FileOutputFromImageKey(const __wchar_t * FileName, HC_KEY key, HOutputHandlerOptions * options){return OutputNotHandled;};
00227 
00228 private:
00229 
00230 };
00231 
00232 
00233 
00234 #endif
00235 
00236 
00237