#include "camtypes.h"
#include "camelot.h"
#include "filedlgs.h"
#include "camframe.h"
#include "native.h"
#include "nativeps.h"
#include "helpuser.h"
#include "bmapprev.h"
#include "bmpfiltr.h"
#include "palman.h"
#include "webparam.h"
#include "xarprefs.h"
#include "webprefs.h"
#include "webfiltr.h"
#include "ctrlhelp.h"
#include "bitfilt.h"
#include "dlgcol.h"
#include "dlgview.h"
#include "osrndrgn.h"
#include "nodebmp.h"
#include "bitmpinf.h"
#include "oilbitmap.h"
#include "webaddr.h"
#include "aprps.h"
#include "exjpeg.h"
#include "ngprop.h"
#include "menuops.h"
#include "progress.h"
#include "qualattr.h"
Go to the source code of this file.
Defines | |
#define | MAX_ALLOWED_NAME_LENGTH 60 |
#define | NumberOfNames 60 |
#define | OFN_EXPLORER 0 |
Creates a base class file dialog, installing a hook etc. | |
Functions | |
void | FixFPControlRegister () |
IMPLEMENT_CLASS (BaseFileDialog, wxFileDialog) | |
IMPLEMENT_CLASS (OpenFileDialog, BaseFileDialog) | |
IMPLEMENT_CLASS (SaveFileDialog, BaseFileDialog) | |
IMPLEMENT_CLASS (SaveTemplateDialog, SaveFileDialog) | |
IMPLEMENT_CLASS (ImportFileDialog, BaseFileDialog) | |
IMPLEMENT_CLASS (ExportFileDialog, BaseFileDialog) | |
IMPLEMENT_CLASS (GIFExportFileDialog, ExportFileDialog) | |
ON_BN_CLICKED (_R(ID_CC_HELP_BUTTON), BaseFileDialog::OnHelp) ON_BN_CLICKED(_R(IDC_SHOWPREVIEW) | |
BaseFileDialog::OnShowPreviewBitmap BaseFileDialog::OnShowPreviewBitmap | ON_BN_CLICKED (_R(IDC_FILEDLG_OPTIONS), BaseFileDialog::OnOptions) ON_BN_CLICKED(_R(ID_CC_HELP_BUTTON) |
BaseFileDialog::OnShowPreviewBitmap BaseFileDialog::OnShowPreviewBitmap BaseFileDialog::OnHelp | ON_BN_CLICKED (_R(IDC_SHOWPREVIEW), BaseFileDialog::OnShowPreviewBitmap) ON_BN_CLICKED(_R(IDC_USEASDEFAULT) |
RenderRegion * | CreateOSRenderRegion (DocRect *pRequiredSize, ReDrawInfoType *ExtraInfo, BOOL UseSelViewColContext) |
Simplifies the creation of a render region as used in a dialog box. It will create a render region, scaled to the correct size etc and deal with all the Creation, initialisation etc of the region. StartRender is also called, so if this function does not return NULL you are able to start drawing into it. You MUST call DestroyOSRenderRegion when you have draw everything that you need to as this calls StopRender (which does the blit to the screen) as well as deleting the render region for you. | |
BOOL | DestroyOSRenderRegion (RenderRegion *pRender) |
Deinitialises the render region and deletes it. | |
Variables | |
const DWORD | FCIDM_SHVIEW_THUMBNAIL = 0x702D |
const INT32 | MaxWebName = 40 |
|
Definition at line 170 of file filedlgs.cpp. |
|
Definition at line 172 of file filedlgs.cpp. |
|
Creates a base class file dialog, installing a hook etc.
Definition at line 278 of file filedlgs.cpp. |
|
Simplifies the creation of a render region as used in a dialog box. It will create a render region, scaled to the correct size etc and deal with all the Creation, initialisation etc of the region. StartRender is also called, so if this function does not return NULL you are able to start drawing into it. You MUST call DestroyOSRenderRegion when you have draw everything that you need to as this calls StopRender (which does the blit to the screen) as well as deleting the render region for you.
Notes: Use GRenderRegions when you want fast redraw, grad fills, and transparency. If only simple rendering is required, think about perhaps using an OSRenderRegion instead.
Definition at line 2101 of file filedlgs.cpp. 02103 { 02104 // Make a new dialog view 02105 DialogView *pDialogView = new DialogView; 02106 if (pDialogView == NULL) 02107 // Error - return failure. 02108 return NULL; 02109 02110 // Initialise the DialogView 02111 if (!pDialogView->Init()) 02112 { 02113 // Error - return failure. 02114 delete pDialogView; 02115 return NULL; 02116 } 02117 02118 // Pixelise the rectangle 02119 pRequiredSize->lo.Pixelise(pDialogView); 02120 pRequiredSize->hi.Pixelise(pDialogView); 02121 DocRect ClipRect = *pRequiredSize; 02122 02123 // Get some default params for the render region 02124 FIXED16 Scale(1); 02125 02126 // Ok, go and scale things 02127 INT32 ReqDx = ClipRect.Width(); 02128 INT32 ReqDy = ClipRect.Height(); 02129 02130 // Work out the scale factors 02131 FIXED16 XScale = FIXED16(double(ExtraInfo->dx) / double(ReqDx)); 02132 FIXED16 YScale = FIXED16(double(ExtraInfo->dy) / double(ReqDy)); 02133 02134 // Build the matricies 02135 // One to shift everything to the correct side of the X axis 02136 Matrix Translate(0, -ExtraInfo->dy); 02137 02138 // One to scale everything into the window 02139 Matrix ScaleIt(XScale, YScale); 02140 02141 // One to translate everything to the origin 02142 Matrix ToOrigin(-ClipRect.lo.x, -ClipRect.lo.y); 02143 02144 // Combine them all 02145 ToOrigin *= ScaleIt; 02146 ToOrigin *= Translate; 02147 02148 // If the caller wants to use the same colour separation options (ColourPlate) as the 02149 // currently selected view, then copy the ColourPlate across to the new DialogView 02150 if (UseSelViewColContext && DocView::GetSelected() != NULL) 02151 pDialogView->SetColourPlate(DocView::GetSelected()->GetColourPlate()); 02152 02153 // Make a render region for the screen, asking specifically for an OSRenderRegion, 02154 // and none of this sneaky & cunning diverting it back into being a GRenderRegion! 02155 // RenderRegion* pRender = OSRenderRegion::Create(ClipRect, ToOrigin, Scale, 02156 // RENDERTYPE_SCREEN, NULL, TRUE); 02157 RenderRegion* pRender = OSRenderRegion::Create(ClipRect, ToOrigin, Scale, 02158 RENDERTYPE_SCREEN, NULL, FALSE, TRUE); 02159 // Penultimate param FALSE so that a GDRAW render region is used... 02160 // Last param TRUE so that the render bitmap is forced into 32BPP mode 02161 // (this fixes problems with palettes when drawing the preview in 256 colour mode) 02162 02163 if (pRender != NULL) 02164 { 02165 // Try and create the bitmap etc 02166 if (pRender->AttachDevice(pDialogView, ExtraInfo->pDC, NULL)) 02167 { 02168 // Try and start the render region 02169 if (pRender->StartRender()) 02170 { 02171 return pRender; 02172 } 02173 } 02174 02175 // Failed to attach and start the render region so free up the region 02176 delete pRender; 02177 } 02178 02179 // Something went wrong, fail 02180 delete pDialogView; 02181 return NULL; 02182 }
|
|
Deinitialises the render region and deletes it.
Definition at line 2206 of file filedlgs.cpp. 02207 { 02208 // Test for preconditions 02209 ERROR2IF(pRender==NULL, FALSE, "DestroyOSRenderRegion was passed a NULL render region"); 02210 02211 // Blit to the screen 02212 pRender->StopRender(); 02213 02214 // and delete the render region and its (dialog) view 02215 // these are deleted in this order because the RenderRegion destructor may 02216 // call functions on its RenderView 02217 View* pView = pRender->GetRenderView(); 02218 delete pRender; 02219 delete pView; 02220 02221 // It worked 02222 return TRUE; 02223 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 174 of file filedlgs.cpp. |
|
Definition at line 2673 of file filedlgs.cpp. |