xap_Win32Dlg_PrintPreview.cpp File Reference

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <glib/gstdio.h>
#include <io.h>
#include "ut_assert.h"
#include "ut_string.h"
#include "ut_debugmsg.h"
#include "xap_Dialog_Id.h"
#include "xap_Win32Dlg_PrintPreview.h"
#include "xap_Frame.h"
#include "xap_App.h"
#include "xap_DialogFactory.h"
#include "gr_Win32Graphics.h"
#include "ut_Win32OS.h"
#include "fv_View.h"
#include <ole2.h>

Classes

struct  _GdiplusStartupInput
struct  EncoderParameter
struct  EncoderParameters
class  GR_Win32PrintPreviewGraphics

Defines

#define INITGUID
#define GDIPCONST   const
#define WINGDIPAPI   __stdcall
#define PixelFormatIndexed   0x00010000
#define PixelFormatGDI   0x00020000
#define PixelFormatAlpha   0x00040000
#define PixelFormatPAlpha   0x00080000
#define PixelFormatExtended   0x00100000
#define PixelFormatCanonical   0x00200000
#define PixelFormatUndefined   0
#define PixelFormatDontCare   0
#define PixelFormat1bppIndexed   (1 | ( 1 << 8) | PixelFormatIndexed | PixelFormatGDI)
#define PixelFormat4bppIndexed   (2 | ( 4 << 8) | PixelFormatIndexed | PixelFormatGDI)
#define PixelFormat8bppIndexed   (3 | ( 8 << 8) | PixelFormatIndexed | PixelFormatGDI)
#define PixelFormat16bppGrayScale   (4 | (16 << 8) | PixelFormatExtended)
#define PixelFormat16bppRGB555   (5 | (16 << 8) | PixelFormatGDI)
#define PixelFormat16bppRGB565   (6 | (16 << 8) | PixelFormatGDI)
#define PixelFormat16bppARGB1555   (7 | (16 << 8) | PixelFormatAlpha | PixelFormatGDI)
#define PixelFormat24bppRGB   (8 | (24 << 8) | PixelFormatGDI)
#define PixelFormat32bppRGB   (9 | (32 << 8) | PixelFormatGDI)
#define PixelFormat32bppARGB   (10 | (32 << 8) | PixelFormatAlpha | PixelFormatGDI | PixelFormatCanonical)
#define PixelFormat32bppPARGB   (11 | (32 << 8) | PixelFormatAlpha | PixelFormatPAlpha | PixelFormatGDI)
#define PixelFormat48bppRGB   (12 | (48 << 8) | PixelFormatExtended)
#define PixelFormat64bppARGB   (13 | (64 << 8) | PixelFormatAlpha | PixelFormatCanonical | PixelFormatExtended)
#define PixelFormat64bppPARGB   (14 | (64 << 8) | PixelFormatAlpha | PixelFormatPAlpha | PixelFormatExtended)
#define d(x)   G_STMT_START { } G_STMT_END
#define LOOKUP(func)
#define ASSERT_GDIP_SUCCESS(status, func)

Typedefs

typedef int GpStatus
typedef int PixelFormat
typedef void GpImage
typedef void GpBitmap
typedef void GpMetafile
typedef void GpGraphics
typedef struct _GdiplusStartupInput GdiplusStartupInput
typedef DWORD ARGB
typedef const gpointer
typedef GDIPCONST WCHAR * filename
typedef GDIPCONST WCHAR
GDIPCONST CLSID * 
clsidEncoder
typedef GDIPCONST WCHAR
GDIPCONST CLSID GDIPCONST
EncoderParameters
encoderParams
typedef GpImage ** image
typedef BOOL deleteEmf
typedef GpMetafile ** metafile
typedef GpBitmap ** bitmap
typedef INT height
typedef INT INT stride
typedef INT INT PixelFormat format
typedef INT INT PixelFormat BYTE * scan0
typedef guint *typedef guint
*typedef GpImage INT 
x
typedef guint *typedef guint
*typedef GpImage INT INT 
y
typedef GpGraphics ** graphics
typedef INT intention
typedef ARGB color
typedef float xdpi
typedef float float ydpi
typedef float * resolution

Enumerations

enum  EncoderParameterValueType {
  EncoderParameterValueTypeByte = 1, EncoderParameterValueTypeASCII = 2, EncoderParameterValueTypeShort = 3, EncoderParameterValueTypeLong = 4,
  EncoderParameterValueTypeRational = 5, EncoderParameterValueTypeLongRange = 6, EncoderParameterValueTypeUndefined = 7, EncoderParameterValueTypeRationalRange = 8,
  EncoderParameterValueTypePointer = 9
}
enum  EncoderValue {
  EncoderValueColorTypeCMYK, EncoderValueColorTypeYCCK, EncoderValueCompressionLZW, EncoderValueCompressionCCITT3,
  EncoderValueCompressionCCITT4, EncoderValueCompressionRle, EncoderValueCompressionNone, EncoderValueScanMethodInterlaced,
  EncoderValueScanMethodNonInterlaced, EncoderValueVersionGif87, EncoderValueVersionGif89, EncoderValueRenderProgressive,
  EncoderValueRenderNonProgressive, EncoderValueTransformRotate90, EncoderValueTransformRotate180, EncoderValueTransformRotate270,
  EncoderValueTransformFlipHorizontal, EncoderValueTransformFlipVertical, EncoderValueMultiFrame, EncoderValueLastFrame,
  EncoderValueFlush, EncoderValueFrameDimensionTime, EncoderValueFrameDimensionResolution, EncoderValueFrameDimensionPage
}

Functions

typedef GpStatus (WINGDIPAPI *GdiplusStartupFunc)(gpointer
static GpStatus gdip_init (void)

Variables

static GdiplusStartupFunc GdiplusStartup = 0
static GdipDisposeImageFunc GdipDisposeImage = 0
static GdipSaveImageToFileFunc GdipSaveImageToFile = 0
static GdipLoadImageFromFileFunc GdipLoadImageFromFile = 0
static GdipSaveAddImageFunc GdipSaveAddImage = 0
static GdipSaveAddFunc GdipSaveAdd = 0
static
GdipCreateMetafileFromEmfFunc 
GdipCreateMetafileFromEmf = 0
static
GdipCreateMetafileFromFileFunc 
GdipCreateMetafileFromFile = 0
static GdipCreateBitmapFromFileFunc GdipCreateBitmapFromFile = 0
static GdipDeleteGraphicsFunc GdipDeleteGraphics = 0
static
GdipCreateBitmapFromScan0Func 
GdipCreateBitmapFromScan0 = 0
static GdipGetImageWidthFunc GdipGetImageWidth = 0
static GdipGetImageHeightFunc GdipGetImageHeight = 0
static GdipDrawImageIFunc GdipDrawImageI = 0
static
GdipGetImageGraphicsContextFunc 
GdipGetImageGraphicsContext = 0
static GdipFlushFunc GdipFlush = 0
static GdipGraphicsClearFunc GdipGraphicsClear = 0
static GdipBitmapSetResolutionFunc GdipBitmapSetResolution = 0
static
GdipGetImageHorizontalResolutionFunc 
GdipGetImageHorizontalResolution = 0
static
GdipGetImageVerticalResolutionFunc 
GdipGetImageVerticalResolution = 0
static GDIPCONST CLSID tiff_clsid = { 0x557cf405, 0x1a04, 0x11d3, { 0x9a, 0x73, 0x0, 0x0, 0xf8, 0x1e, 0xf3, 0x2e } }
static GDIPCONST GUID EncoderSaveFlag = { 0x292266FC, 0xac40, 0x47bf, { 0x8c, 0xfc, 0xa8, 0x5b, 0x89, 0xa6,0x55, 0xde } }

Define Documentation

#define ASSERT_GDIP_SUCCESS ( status,
func   ) 

Value:

G_STMT_START { \
    GpStatus _gdip_status = (status); \
    if (_gdip_status != 0) { \
      g_warning ("%s failed with reason %d\n", #func, _gdip_status); \
    } \
  } G_STMT_END

Referenced by GR_Win32PrintPreviewGraphics::endPage(), GR_Win32PrintPreviewGraphics::endPrint(), and GR_Win32PrintPreviewGraphics::GR_Win32PrintPreviewGraphics().

#define d ( x   )     G_STMT_START { } G_STMT_END

Referenced by IE_Imp_MsWord_97::_appendObjectHdrFtr(), IE_Imp_MsWord_97::_appendSpanHdrFtr(), IE_Imp_MsWord_97::_appendStruxHdrFtr(), AP_Dialog_Tab::_doSpin(), AP_Dialog_Paragraph::_doSpin(), AP_Dialog_Tab::_doSpinValue(), IE_Imp_MsWord_97::_insertHeaderSection(), IE_Exp_RTF::_rtf_keyword_ifnotdefault(), IE_Exp_RTF::_rtf_keyword_ifnotdefault_twips(), IE_Exp_RTF::_write_charfmt(), IE_Exp_RTF::_write_tabdef(), IE_Imp_RTF::ApplySectionAttributes(), PD_Document::areDocumentContentsEqual(), PD_Document::areDocumentFormatsEqual(), PD_Document::areDocumentStylesheetsEqual(), GR_Win32PrintPreviewGraphics::clearArea(), GR_Win32PrintPreviewGraphics::clearFont(), GR_Win32PrintPreviewGraphics::createNewImage(), GR_XPRenderInfo::cut(), DECLARE_ABI_PLUGIN_METHOD(), Defun(), dGetVal(), GR_Win32PrintPreviewGraphics::drawChar(), GR_Win32PrintPreviewGraphics::drawChars(), GR_Win32PrintPreviewGraphics::drawGlyph(), GR_Win32PrintPreviewGraphics::drawImage(), GR_Win32PrintPreviewGraphics::drawLine(), GR_Win32PrintPreviewGraphics::endPage(), GR_Win32PrintPreviewGraphics::endPrint(), GR_Win32PrintPreviewGraphics::fillRect(), GR_Win32PrintPreviewGraphics::flush(), GR_Win32PrintPreviewGraphics::genImageFromRectangle(), GR_Win32PrintPreviewGraphics::getColor(), GR_Image::GetOffsetFromLeft(), GR_Image::GetOffsetFromRight(), GR_Win32Font::GR_Win32Font(), GR_Win32PrintPreviewGraphics::GR_Win32PrintPreviewGraphics(), GR_Win32PrintPreviewGraphics::invertRect(), fp_Line::layout(), fp_TableContainer::mapXYToPosition(), GR_Win32PrintPreviewGraphics::polygon(), GR_Win32PrintPreviewGraphics::polyLine(), GR_Win32PrintPreviewGraphics::queryProperties(), GOComponentView::render(), XAP_DialogFactory::requestDialog(), GR_Win32PrintPreviewGraphics::restoreRectangle(), s_props_append(), GR_Win32PrintPreviewGraphics::saveRectangle(), GR_Win32PrintPreviewGraphics::setClipRect(), GR_Win32PrintPreviewGraphics::setColor(), GR_Win32PrintPreviewGraphics::setFont(), GR_Win32PrintPreviewGraphics::setLineProperties(), GR_Win32PrintPreviewGraphics::setLineWidth(), IE_Imp_XHTML::startElement(), GR_Win32PrintPreviewGraphics::startPage(), GR_Win32PrintPreviewGraphics::startPrint(), GR_Graphics::tdu(), UT_Base64Decode(), UT_Base64Encode(), UT_convertToDimension(), UT_reformatDimensionString(), GR_Win32PrintPreviewGraphics::xorLine(), and GR_Win32PrintPreviewGraphics::~GR_Win32PrintPreviewGraphics().

#define GDIPCONST   const

#define INITGUID

#define LOOKUP ( func   ) 

Value:

G_STMT_START { \
    func = (func##Func) GetProcAddress (gdipluslib, #func); \
    if (!func) {\
      g_warning ("Couldn't load function: %s\n", #func); \
      return 18; \
    } \
  } G_STMT_END

Referenced by gdip_init().

#define PixelFormat16bppARGB1555   (7 | (16 << 8) | PixelFormatAlpha | PixelFormatGDI)

#define PixelFormat16bppGrayScale   (4 | (16 << 8) | PixelFormatExtended)

#define PixelFormat16bppRGB555   (5 | (16 << 8) | PixelFormatGDI)

#define PixelFormat16bppRGB565   (6 | (16 << 8) | PixelFormatGDI)

#define PixelFormat1bppIndexed   (1 | ( 1 << 8) | PixelFormatIndexed | PixelFormatGDI)

#define PixelFormat24bppRGB   (8 | (24 << 8) | PixelFormatGDI)

#define PixelFormat32bppARGB   (10 | (32 << 8) | PixelFormatAlpha | PixelFormatGDI | PixelFormatCanonical)

#define PixelFormat32bppPARGB   (11 | (32 << 8) | PixelFormatAlpha | PixelFormatPAlpha | PixelFormatGDI)

#define PixelFormat32bppRGB   (9 | (32 << 8) | PixelFormatGDI)

#define PixelFormat48bppRGB   (12 | (48 << 8) | PixelFormatExtended)

#define PixelFormat4bppIndexed   (2 | ( 4 << 8) | PixelFormatIndexed | PixelFormatGDI)

#define PixelFormat64bppARGB   (13 | (64 << 8) | PixelFormatAlpha | PixelFormatCanonical | PixelFormatExtended)

#define PixelFormat64bppPARGB   (14 | (64 << 8) | PixelFormatAlpha | PixelFormatPAlpha | PixelFormatExtended)

#define PixelFormat8bppIndexed   (3 | ( 8 << 8) | PixelFormatIndexed | PixelFormatGDI)

#define PixelFormatAlpha   0x00040000

#define PixelFormatCanonical   0x00200000

#define PixelFormatDontCare   0

#define PixelFormatExtended   0x00100000

#define PixelFormatGDI   0x00020000

#define PixelFormatIndexed   0x00010000

#define PixelFormatPAlpha   0x00080000

#define PixelFormatUndefined   0

#define WINGDIPAPI   __stdcall


Typedef Documentation

typedef DWORD ARGB

typedef INT INT PixelFormat BYTE GpBitmap ** bitmap

typedef GDIPCONST WCHAR GDIPCONST CLSID* clsidEncoder

typedef ARGB color

typedef BOOL deleteEmf

typedef GDIPCONST WCHAR* filename

typedef INT INT PixelFormat format

typedef void GpBitmap

typedef void GpGraphics

typedef void GpImage

typedef void GpMetafile

typedef const gpointer

typedef GpStatus

typedef GpGraphics** graphics

typedef INT height

typedef guint* typedef guint* typedef GpImage* image

typedef INT intention

typedef GpMetafile** metafile

typedef int PixelFormat

typedef float * resolution

typedef INT INT PixelFormat BYTE* scan0

typedef INT INT stride

typedef guint* typedef guint* typedef GpImage INT x

typedef float xdpi

typedef guint* typedef guint* typedef GpImage INT INT y

typedef float float ydpi


Enumeration Type Documentation

Enumerator:
EncoderParameterValueTypeByte 
EncoderParameterValueTypeASCII 
EncoderParameterValueTypeShort 
EncoderParameterValueTypeLong 
EncoderParameterValueTypeRational 
EncoderParameterValueTypeLongRange 
EncoderParameterValueTypeUndefined 
EncoderParameterValueTypeRationalRange 
EncoderParameterValueTypePointer 

Enumerator:
EncoderValueColorTypeCMYK 
EncoderValueColorTypeYCCK 
EncoderValueCompressionLZW 
EncoderValueCompressionCCITT3 
EncoderValueCompressionCCITT4 
EncoderValueCompressionRle 
EncoderValueCompressionNone 
EncoderValueScanMethodInterlaced 
EncoderValueScanMethodNonInterlaced 
EncoderValueVersionGif87 
EncoderValueVersionGif89 
EncoderValueRenderProgressive 
EncoderValueRenderNonProgressive 
EncoderValueTransformRotate90 
EncoderValueTransformRotate180 
EncoderValueTransformRotate270 
EncoderValueTransformFlipHorizontal 
EncoderValueTransformFlipVertical 
EncoderValueMultiFrame 
EncoderValueLastFrame 
EncoderValueFlush 
EncoderValueFrameDimensionTime 
EncoderValueFrameDimensionResolution 
EncoderValueFrameDimensionPage 


Function Documentation

static GpStatus gdip_init ( void   )  [static]

typedef GpStatus ( WINGDIPAPI *  GdiplusStartupFunc  ) 


Variable Documentation

GDIPCONST GUID EncoderSaveFlag = { 0x292266FC, 0xac40, 0x47bf, { 0x8c, 0xfc, 0xa8, 0x5b, 0x89, 0xa6,0x55, 0xde } } [static]

GdipBitmapSetResolutionFunc GdipBitmapSetResolution = 0 [static]

GdipCreateBitmapFromFileFunc GdipCreateBitmapFromFile = 0 [static]

Referenced by gdip_init().

GdipCreateBitmapFromScan0Func GdipCreateBitmapFromScan0 = 0 [static]

GdipCreateMetafileFromEmfFunc GdipCreateMetafileFromEmf = 0 [static]

GdipCreateMetafileFromFileFunc GdipCreateMetafileFromFile = 0 [static]

Referenced by gdip_init().

GdipDeleteGraphicsFunc GdipDeleteGraphics = 0 [static]

GdipDisposeImageFunc GdipDisposeImage = 0 [static]

GdipDrawImageIFunc GdipDrawImageI = 0 [static]

GdipFlushFunc GdipFlush = 0 [static]

GdipGetImageGraphicsContextFunc GdipGetImageGraphicsContext = 0 [static]

GdipGetImageHeightFunc GdipGetImageHeight = 0 [static]

GdipGetImageHorizontalResolutionFunc GdipGetImageHorizontalResolution = 0 [static]

Referenced by gdip_init().

GdipGetImageVerticalResolutionFunc GdipGetImageVerticalResolution = 0 [static]

Referenced by gdip_init().

GdipGetImageWidthFunc GdipGetImageWidth = 0 [static]

GdipGraphicsClearFunc GdipGraphicsClear = 0 [static]

GdipLoadImageFromFileFunc GdipLoadImageFromFile = 0 [static]

Referenced by gdip_init().

GdiplusStartupFunc GdiplusStartup = 0 [static]

Referenced by gdip_init(), and initGDIPlus().

GdipSaveAddFunc GdipSaveAdd = 0 [static]

GdipSaveAddImageFunc GdipSaveAddImage = 0 [static]

GdipSaveImageToFileFunc GdipSaveImageToFile = 0 [static]

GDIPCONST CLSID tiff_clsid = { 0x557cf405, 0x1a04, 0x11d3, { 0x9a, 0x73, 0x0, 0x0, 0xf8, 0x1e, 0xf3, 0x2e } } [static]


Generated on Sun Sep 7 00:06:41 2008 for AbiWord by  doxygen 1.5.5