Alphabetical Class Index   File Members   Compound Members   File List  

HIOUtilityGDIOutput.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2000 by Tech Soft 3D, LLC.
3 // The information contained herein is confidential and proprietary to
4 // Tech Soft 3D, LLC., and considered a trade secret as defined under
5 // civil and criminal statutes. Tech Soft 3D shall pursue its civil
6 // and criminal remedies in the event of unauthorized use or misappropriation
7 // of its trade secrets. Use of this information by anyone other than
8 // authorized employees of Tech Soft 3D, LLC. is granted only under a
9 // written non-disclosure agreement, expressly prescribing the scope and
10 // manner of such use.
11 //
12 
16 #ifndef _HIO_UTILITY_GDIOUTPUT_H
17 #define _HIO_UTILITY_GDIOUTPUT_H
18 
19 #include "HTools.h"
20 #include "HIOManager.h"
21 #include "HMFCGlobals.h"
22 #include "utf_utils.h"
23 
24 // msw driver specific driver_option debug flags
25 
33 #define DEBUG_FORCE_FULL_COLOR 0x00000010
34 
39 #define DEBUG_NO_WINDOWS_HOOK 0x00000040
40 
46 #define DEBUG_SFB_COPY_TO_CLIPBOARD 0x00004000
47 
52 #define DEBUG_NO_RASTERS_IN_PRINTING 0x00020000
53 
58 #define DEBUG_PRINTING_MODE 0x00040000
59 
65 #define DEBUG_PRINT_NOT_FRAMEBUFFER_MODE 0x00020000
66 
67 
72 #define DEBUG_PRINT_NOT_RASTER_REDUCTION 0x00200000
73 
78 #define DEBUG_FORCE_SOFTWARE 0x01000000
79 
85 #define DEBUG_NO_PAINTERS_PANELLING 0x00000008
86 
91 class GDIExportInformation : public HOutputHandlerOptions {
92 public:
93 
94  /* Initialize the references in this structure to refer to the matching field
95  * in the parent class. This is for supporting legacy code prior to v15. */
97  : HOutputHandlerOptions(),
98  bForceGrayscale(m_ForceGrayscale),
99  bConserveMemory(m_bConserveMemory),
100  bUseWindowColor(m_bUseWindowColor),
101  Height(m_Window_Height),
102  Width(m_Window_Width),
103  image_dpi(m_Image_Dpi)
104  {
105  clipBoard = false;
106  rasterOutput = false;
107  windowID = 0;
108  deviceContext = attribDC = 0;
109  }
110 
112  HDC attribDC;
114  bool clipBoard;
115  void* windowID;
116 
120  float & Height;
121  float & Width;
122  int & image_dpi;
123 };
124 
126 
128 
148 #ifdef SWIG
149 class MVO_API HIOUtilityGDIOutput : public HOutputHandler
150 #else
151 class HMFC_API HIOUtilityGDIOutput : public HOutputHandler
152 #endif
153 {
154 
155 public:
156 
158  SetOutputOps(HOutputOpFileOutputByKey);
159  };
160  virtual ~HIOUtilityGDIOutput() {;};
161 
164  HIORegisterOutputType("emf", this);
165  }
166 
167  const char * GetOutputName() { return "HIOUtilityGDIOutput"; }
168 
172  const char * GetOutputTypesString() {return "emf";};
173 
180  HOutputHandlerStyle GetOutputStyle() {return HOutputHandlerStyleModel;};
181 
191  HFileOutputResult FileOutputByKey(const char * FileName, HC_KEY key, HOutputHandlerOptions * options){
192  return FileOutputByKey(H_WCS(FileName).encodedText(), key, options);
193  }
194  HFileOutputResult FileOutputByKey(unsigned short const * FileName, HC_KEY key, HOutputHandlerOptions * options){
195  H_UTF16 utf16;
196  utf16.encodedText((utf16_char const*) FileName);
197  return FileOutputByKey(H_WCS(utf16).encodedText(), key, options);
198  }
199  HFileOutputResult FileOutputByKey(const __wchar_t * FileName, HC_KEY key, HOutputHandlerOptions * options);
200 
210  HFileOutputResult DoClipBoard(const wchar_t * FileName, HC_KEY key, GDIExportInformation * options);
211 
221  HFileOutputResult DoPrinter(const wchar_t * FileName, HC_KEY key, GDIExportInformation * options);
222 
224  HFileOutputResult FileOutputFromImageKey(const char * FileName, HC_KEY key, HOutputHandlerOptions * options){return OutputNotHandled;};
225  HFileOutputResult FileOutputFromImageKey(unsigned short const * FileName, HC_KEY key, HOutputHandlerOptions * options){return OutputNotHandled;};
226  HFileOutputResult FileOutputFromImageKey(const __wchar_t * FileName, HC_KEY key, HOutputHandlerOptions * options){return OutputNotHandled;};
227 
228 private:
229 
230 };
231 
232 
233 
234 #endif
235 
236 
237 
HFileOutputResult FileOutputByKey(const char *FileName, HC_KEY key, HOutputHandlerOptions *options)
Definition: HIOUtilityGDIOutput.h:191
#define HOutputOpFileOutputByKey
float & Width
Legacy code! Please do not use this. See HOutputHandlerOptions.
Definition: HIOUtilityGDIOutput.h:121
bool rasterOutput
True if raster output is supported by device context.
Definition: HIOUtilityGDIOutput.h:113
bool & bUseWindowColor
Legacy code! Please do not use this. See HOutputHandlerOptions.
Definition: HIOUtilityGDIOutput.h:119
HFileOutputResult DoClipBoard(const wchar_t *FileName, HC_KEY key, GDIExportInformation *options)
HOutputHandlerStyle
HDC deviceContext
Windows Device Context.
Definition: HIOUtilityGDIOutput.h:111
Definition: HIOUtilityGDIOutput.h:91
void RegisterOutputHandlerTypes()
registers the 'emf' output type
Definition: HIOUtilityGDIOutput.h:163
HOutputHandlerStyle GetOutputStyle()
Definition: HIOUtilityGDIOutput.h:180
The HIOUtilityGDIOutput class should be used for exporting data to a Windows Printer or Clipboard Dev...
Definition: HIOUtilityGDIOutput.h:151
bool & bConserveMemory
Legacy code! Please do not use this. See HOutputHandlerOptions.
Definition: HIOUtilityGDIOutput.h:118
void * windowID
ID of window.
Definition: HIOUtilityGDIOutput.h:115
#define HIORegisterOutputType(type, output_object)
bool & bForceGrayscale
Legacy code! Please do not use this. See HOutputHandlerOptions.
Definition: HIOUtilityGDIOutput.h:117
HFileOutputResult FileOutputFromImageKey(const char *FileName, HC_KEY key, HOutputHandlerOptions *options)
Definition: HIOUtilityGDIOutput.h:224
const char * GetOutputTypesString()
Definition: HIOUtilityGDIOutput.h:172
HFileOutputResult DoPrinter(const wchar_t *FileName, HC_KEY key, GDIExportInformation *options)
int & image_dpi
Legacy code! Please do not use this. See HOutputHandlerOptions.
Definition: HIOUtilityGDIOutput.h:122
bool clipBoard
True if device context is a clipboard.
Definition: HIOUtilityGDIOutput.h:114
HDC attribDC
The attribute device context for the CDC object.
Definition: HIOUtilityGDIOutput.h:112
float & Height
Legacy code! Please do not use this. See HOutputHandlerOptions.
Definition: HIOUtilityGDIOutput.h:120