OpAsynchBitmapImport Class Reference

This operation will attempt to download and import a bitmap located on a web server. More...

#include <inetop.h>

Inheritance diagram for OpAsynchBitmapImport:

DownloadOp Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 OpAsynchBitmapImport ()
virtual ~OpAsynchBitmapImport ()
virtual BOOL OnDocChangingMsg (Document *pChangingDoc, DocChangingMsg::DocState State)
 Notifies us if the document we intend to import into is about to be destroyed, in which case we should abort the operation.

Static Public Member Functions

static BOOL Init ()
 Creates an OpDescriptor for an AsynchBitmapImport operation.

Protected Member Functions

virtual void OnDownloadSuccess ()
 
  • Performs - if required - the actual import using the bitmap file just downloaded.


Detailed Description

This operation will attempt to download and import a bitmap located on a web server.

Author:
Adrian_Stoicar (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/06/97
See also:
DownloadOp

Definition at line 297 of file inetop.h.


Constructor & Destructor Documentation

OpAsynchBitmapImport::OpAsynchBitmapImport  )  [inline]
 

Definition at line 302 of file inetop.h.

00302 {};

virtual OpAsynchBitmapImport::~OpAsynchBitmapImport  )  [inline, virtual]
 

Definition at line 303 of file inetop.h.

00303 {}; 


Member Function Documentation

BOOL OpAsynchBitmapImport::Init void   )  [static]
 

Creates an OpDescriptor for an AsynchBitmapImport operation.

> BOOL OpAsynchBitmapImport::Init()

Author:
Adrian_Stoicar (Xara Group Ltd) <camelotdev@xara.com>
Date:
4/04/97
Returns:
FALSE if it fails (due to lack of memory)
See also:

Reimplemented from DownloadOp.

Definition at line 2259 of file inetop.cpp.

02260 {  
02261     return RegisterOpDescriptor(
02262         0,                              // Tool ID
02263         _R(IDS_OPASYNCHBITMAPIMPORT),               // String resource ID
02264         CC_RUNTIME_CLASS(OpAsynchBitmapImport), // Runtime class
02265         OPTOKEN_ASYNCHBITMAPIMPORT,         // Token string
02266         DownloadOp::GetState,           // GetState function
02267         0,                              // Help ID
02268         0,                              // Bubble ID
02269         0,                              // Resource ID
02270         0                               // Control ID
02271     );
02272 }   

BOOL OpAsynchBitmapImport::OnDocChangingMsg Document pChangingDoc,
DocChangingMsg::DocState  State
[virtual]
 

Notifies us if the document we intend to import into is about to be destroyed, in which case we should abort the operation.

Author:
Adrian_Stoicar (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/01/97
Returns:
-
See also:
MessageHandler::OnDocChangingMsg()

Reimplemented from MessageHandler.

Definition at line 2331 of file inetop.cpp.

02332 {
02333     AsynchBitmapImportParam* pImportParam = (AsynchBitmapImportParam*) pParam;
02334     if (pChangingDoc == pImportParam->pTargetDoc && State == DocChangingMsg::ABOUTTODIE)
02335     {
02336         // We end the operation, but don't abort the clipart download - it's up to the user to do that
02337         FailAndExecute(); 
02338         End();
02339     }
02340     return TRUE;
02341 }

void OpAsynchBitmapImport::OnDownloadSuccess  )  [protected, virtual]
 

  • Performs - if required - the actual import using the bitmap file just downloaded.

Author:
Adrian_Stoicar (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/01/97
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Reimplemented from DownloadOp.

Definition at line 2288 of file inetop.cpp.

02289 {
02290     AsynchBitmapImportParam* pImportParam =  (AsynchBitmapImportParam*) pParam;
02291 
02292     OpDescriptor* pOpDesc = OpDescriptor::FindOpDescriptor(CC_RUNTIME_CLASS(OpBitmapImport));
02293 
02294     if (pOpDesc != 0)
02295     {
02296         BitmapImportParam Param;
02297 
02298         Param.File              = &pImportParam->file;
02299         Param.Result            = TRUE;
02300         Param.FillType          = pImportParam->FillType;
02301         Param.pTargetDoc        = pImportParam->pTargetDoc;
02302         Param.TagObjectToFill   = pImportParam->TagObjectToFill;
02303         Param.TagObjectValid    = pImportParam->TagObjectValid;
02304         Param.pObject           = pImportParam->pObject;
02305         Param.pObjectValid      = pImportParam->pObjectValid;
02306         Param.pSpread           = pImportParam->pSpread;
02307         Param.DropPos           = pImportParam->DropPos;
02308 
02309         // Do it...
02310         pOpDesc->Invoke((OpParam *) &Param);
02311 
02312         if (!Param.Result)
02313             ERROR3("Problem importing file from internet");
02314     }
02315 }


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