MakeBitmapExportOptions Class Reference

Allows "Create Bitmap Copy" to provide own defaults. More...

#include <makebmp.h>

Inheritance diagram for MakeBitmapExportOptions:

MaskedFilterExportOptions BitmapExportOptions OpParam CCObject SimpleCCObject List of all members.

Public Member Functions

 MakeBitmapExportOptions ()
 MakeBitmapExportOptions (const FilterType FilterID, const StringBase *pFilterName)
 Default constructor for a MakeBitmapExportOptions object (mainly to allow CreateBitmapCopy to store its own defaults).
virtual BOOL RetrieveDefaults ()
 Compares the contents of this and pOther objects See BitmapExportInfo for interface details: gets GIF specific preferences.
virtual BOOL SetAsDefaults () const
 Provides additional implementation to set GIF specific info as defaults See Also: BitmapExportInfo::SetAsDefaults().
BitmapExportOptionsMakeCopy ()
 Makes a copy object of this object See Also: BitmapExportOptions::CopyFrom(); BitmapExportOptions::MakeCopy();.
virtual BOOL CopyFrom (BitmapExportOptions *pOther)
 Sets the contents of this object from the passed object See Also: BitmapExportOptions::MakeCopy().

Static Public Member Functions

static BOOL Declare ()
 To declare preferences associated with these export options.

Static Protected Attributes

static DPI g_Dpi = 96.0
static BMP_DEPTH g_Depth = 8
static DITHER g_Dither = XARADITHER_ERROR_DIFFUSION
static PALETTE g_Palette = PAL_OPTIMISED
static BOOL g_TranspBkGnd = TRUE

Detailed Description

Allows "Create Bitmap Copy" to provide own defaults.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/10/96

Definition at line 145 of file makebmp.h.


Constructor & Destructor Documentation

MakeBitmapExportOptions::MakeBitmapExportOptions  )  [inline]
 

Definition at line 153 of file makebmp.h.

00153 {} // Do nothing for now

MakeBitmapExportOptions::MakeBitmapExportOptions const FilterType  FilterID,
const StringBase pFilterName
 

Default constructor for a MakeBitmapExportOptions object (mainly to allow CreateBitmapCopy to store its own defaults).

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
29/10/96

Definition at line 360 of file makebmp.cpp.

00361                                                                                    : 
00362                         MaskedFilterExportOptions(_R(IDD_EXPORTBMPOPTS), FilterID, pFilterName)
00363 {
00364 }


Member Function Documentation

BOOL MakeBitmapExportOptions::CopyFrom BitmapExportOptions pSource  )  [virtual]
 

Sets the contents of this object from the passed object See Also: BitmapExportOptions::MakeCopy().

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com> from Stefan code
Date:
2/7/97
Parameters:
pSource - the other BitmapExportOptions object to copy the data from [INPUTS]

Reimplemented from MaskedFilterExportOptions.

Definition at line 401 of file makebmp.cpp.

00402 {
00403     // copy the base class first
00404     if (!MaskedFilterExportOptions::CopyFrom(pSource))
00405         return FALSE;
00406 
00407     // must be the same class, otherwise the base class  function above returns FALSE
00408     MakeBitmapExportOptions *pOther = (MakeBitmapExportOptions *)pSource;
00409 
00410     return TRUE;
00411 }

BOOL MakeBitmapExportOptions::Declare  )  [static]
 

To declare preferences associated with these export options.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com> (from Will)
Date:
29/10/96
Returns:
TRUE if successfully declared preferences FALSE otherwise

Reimplemented from MaskedFilterExportOptions.

Definition at line 334 of file makebmp.cpp.

00335 {
00336     if (Camelot.DeclareSection("Filters", 10))
00337     {
00338         Camelot.DeclarePref( NULL, "CreateBitmapDPI", &g_Dpi, 1, 3000 );
00339         Camelot.DeclarePref( NULL, "CreateBitmapDepth", &g_Depth, 1, 32 );
00340         Camelot.DeclarePref( NULL, "CreateBitmapDither", (INT32*)&g_Dither, 0, XARADITHER_MAX );
00341         Camelot.DeclarePref( NULL, "CreateBitmapPalette", (INT32*)&g_Palette, 0, 1 );
00342         Camelot.DeclarePref( NULL, "CreateBitmapBkGnd", &g_TranspBkGnd, FALSE, TRUE );
00343     }
00344 
00345     // All ok
00346     return TRUE;
00347 }

BitmapExportOptions * MakeBitmapExportOptions::MakeCopy  ) 
 

Makes a copy object of this object See Also: BitmapExportOptions::CopyFrom(); BitmapExportOptions::MakeCopy();.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com> from Stefan code
Date:
2/7/97

Reimplemented from BitmapExportOptions.

Definition at line 376 of file makebmp.cpp.

00377 {
00378     // Get the runtime class info on this object
00379     CCRuntimeClass *pCCRuntimeClass = GetRuntimeClass();
00380 
00381     // Create another object of the same type
00382     MakeBitmapExportOptions *temp = (MakeBitmapExportOptions *) pCCRuntimeClass->CreateObject();
00383 
00384     if (temp != NULL)
00385         temp->CopyFrom(this); // copy the contents accross
00386     
00387     return temp;
00388 }

BOOL MakeBitmapExportOptions::RetrieveDefaults  )  [virtual]
 

Compares the contents of this and pOther objects See BitmapExportInfo for interface details: gets GIF specific preferences.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
29/10/96

Reimplemented from MaskedFilterExportOptions.

Definition at line 451 of file makebmp.cpp.

00452 {
00453     BOOL ok = FALSE;
00454 
00455     if (MaskedFilterExportOptions::RetrieveDefaults())
00456     {
00457         SetDPI(g_Dpi);
00458         SetDepth(g_Depth);
00459         SetDither(g_Dither);
00460         ok = TRUE;
00461     }
00462 
00463     return ok;
00464 }

BOOL MakeBitmapExportOptions::SetAsDefaults  )  const [virtual]
 

Provides additional implementation to set GIF specific info as defaults See Also: BitmapExportInfo::SetAsDefaults().

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
29/10/96

Reimplemented from MaskedFilterExportOptions.

Definition at line 477 of file makebmp.cpp.

00478 {
00479     BOOL ok = FALSE;
00480 
00481     if (MaskedFilterExportOptions::SetAsDefaults())
00482     {
00483         g_Dpi           = GetDPI();
00484         g_Depth         = GetDepth();
00485         g_Dither        = GetDither();
00486         g_TranspBkGnd   = WantTransparent();
00487         ok = TRUE;
00488     }
00489 
00490     return ok;
00491 }


Member Data Documentation

BMP_DEPTH MakeBitmapExportOptions::g_Depth = 8 [static, protected]
 

Definition at line 168 of file makebmp.h.

DITHER MakeBitmapExportOptions::g_Dither = XARADITHER_ERROR_DIFFUSION [static, protected]
 

Reimplemented from MaskedFilterExportOptions.

Definition at line 169 of file makebmp.h.

DPI MakeBitmapExportOptions::g_Dpi = 96.0 [static, protected]
 

Definition at line 167 of file makebmp.h.

PALETTE MakeBitmapExportOptions::g_Palette = PAL_OPTIMISED [static, protected]
 

Reimplemented from MaskedFilterExportOptions.

Definition at line 170 of file makebmp.h.

BOOL MakeBitmapExportOptions::g_TranspBkGnd = TRUE [static, protected]
 

Definition at line 171 of file makebmp.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:56:05 2007 for Camelot by  doxygen 1.4.4