ThumbnailFilterPNG Class Reference

The filter will save out the PNG Thumbnail Bitmap. Overrides DoExport so dialogs are not put up but returns preview export options. More...

#include <prvwflt.h>

Inheritance diagram for ThumbnailFilterPNG:

PreviewFilterPNG PNGFilter MaskedFilter BaseBitmapFilter BitmapFilter Filter ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 ThumbnailFilterPNG ()
virtual BOOL DoExport (Operation *pOp, CCLexFile *pFile, PathName *pPath, Document *TheDocument, BOOL ShowOptions)
 Exports a document into a png file. Creates and attaches a DocView to the document before calling the DoExport function of the PNG filter, because it depends on a view being available. Unlike the preview filters no PreviewBitmapSize value is set in this function, so the caller should set it if something different then the default size is required.

Private Member Functions

 CC_DECLARE_DYNAMIC (ThumbnailFilterPNG)

Detailed Description

The filter will save out the PNG Thumbnail Bitmap. Overrides DoExport so dialogs are not put up but returns preview export options.

Author:
Stefan_Stoykov (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/6/97

Definition at line 270 of file prvwflt.h.


Constructor & Destructor Documentation

ThumbnailFilterPNG::ThumbnailFilterPNG  )  [inline]
 

Definition at line 275 of file prvwflt.h.

00275 : PreviewFilterPNG() {};


Member Function Documentation

ThumbnailFilterPNG::CC_DECLARE_DYNAMIC ThumbnailFilterPNG   )  [private]
 

BOOL ThumbnailFilterPNG::DoExport Operation pOp,
CCLexFile pFile,
PathName pPath,
Document TheDocument,
BOOL  ShowOptions
[virtual]
 

Exports a document into a png file. Creates and attaches a DocView to the document before calling the DoExport function of the PNG filter, because it depends on a view being available. Unlike the preview filters no PreviewBitmapSize value is set in this function, so the caller should set it if something different then the default size is required.

/

/*!

Author:
Stefan_Stoykov (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/6/97
See also:
BaseBitmapFilter::DoExport

Reimplemented from PreviewFilterPNG.

Definition at line 945 of file prvwflt.cpp.

00947 {
00948     // set ourselves up - this flags the BaseBitmapFilter to do resizing, which needs to be
00949     // done there because of Accusoft.
00950     SetPreviewBitmap(TRUE);
00951 
00952     // create a new view for the document
00953     DocView *pView = new DocView(TheDocument);
00954 
00955     if (pView && pView->Init())
00956     {
00957         // set the view as current, but remember the last current one
00958         View *pOldView = View::GetCurrent();
00959         pView->SetCurrent();
00960 
00961         // Export the thumbnail to the file by doing what our base class does
00962         BOOL ok = PNGFilter::DoExport(pOp, pFile, pPath, TheDocument, TRUE);
00963 
00964         // restore the last view
00965         if (pOldView != NULL)
00966             pOldView->SetCurrent();
00967         else
00968             View::SetNoCurrent();
00969 
00970         // delete our view
00971         delete pView;
00972 
00973         return ok;
00974     }
00975     else
00976         return FALSE; // view creation failed
00977 }


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:01:54 2007 for Camelot by  doxygen 1.4.4