### IDMSourcePrepareEvent

  The IDMSourcePrepareEvent class represents objects that the target sends to the source when rendering preparation is required for a drag item prior to source rendering for the item. Objects of this class are constructed by the source handler, IDMSourceHandler. An object of this class is constructed for each drag item when source preparation is required.

  Objects of this class provide all of the attributes inherited from IDMSourceRenderEvent. In addition, functions are provided to return the following information to the target:

  - An alternate source window with which the target can communicate during rendering
  - Two result flags indicating whether the target does the following:
    - Performs the rendering
    - Retries the rendering with a different rendering mechanism and format

### IDMSourcePrepareEvent - Member Functions and Data by Group

### Constructors & Destructor

You can construct and destruct objects of this class.

~IDMSourcePrepareEvent

      public:
      virtual ~IDMSourcePrepareEvent()

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

IDMSourcePrepareEvent

      public:
      IDMSourcePrepareEvent(const IEvent& event)

  Constructs objects of this class from a generic IEvent object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Alternate Window

Use these members to set and query the alternate source window. For example, the alternate source window can be used to implement source rendering on a secondary thread.

alternateWindow

      public:
      virtual IWindow* alternateWindow() const

  Returns a pointer to the alternate source window object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

alternateWindowHandle

      public:
      virtual IWindowHandle alternateWindowHandle() const

  Returns the handle of the alternate source window object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

setAlternateWindowHandle

      public:
      IDMSourcePrepareEvent&
        setAlternateWindowHandle( const IWindowHandle& window )

  Sets the handle of the alternate source window object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Rendering

Use these members to provide the render preparation support. The results of the preparation are returned to the target.

noSourceRendering

      public:
      bool noSourceRendering() const

  Returns true if only the target can perform the rendering. The default is false.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

setNoSourceRendering

      public:
      IDMSourcePrepareEvent& setNoSourceRendering(bool flag)

  Sets the no-source-rendering flag that indicates that only the target can perform the rendering.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

setTargetCanRetry

      public:
      IDMSourcePrepareEvent& setTargetCanRetry(bool flag)

  Sets the retry flag that indicates if the target can retry a failed rendering with a different rendering mechanism and format.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

targetCanRetry

      public:
      bool targetCanRetry() const

  Returns true if the target can retry a failed rendering with a different rendering mechanism and format. The default is false.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### IDMSourcePrepareEvent - Inherited Member Functions and Data

#### Inherited Public Functions

  IDMEvent

  -     virtual ~IDMEvent()

  -     IDMEvent(const IEvent& event)

  IDMSourceRenderEvent

  -     virtual ~IDMSourceRenderEvent()

  -     virtual bool canRetry() const

  -     virtual IDM::RenderCompletion completion() const

  -     virtual IDMItem::Handle dragItem() const

  -     IDMSourceRenderEvent(const IEvent& event)

  -     virtual IString selectedFormat() const

  -     virtual IString selectedMechanism() const

  -     virtual IDMSourceRenderEvent&
          setCompletion( IDM::RenderCompletion code )

  -     virtual IDMSourceRenderEvent&
          setRetry( bool allowRetry = true )

  -     virtual IDMSourceRenderEvent&
          setTargetInfo( unsigned long info )

  -     virtual unsigned long targetInfo() const

  -     virtual IString targetName() const

  -     virtual IWindow* targetWindow() const

  -     virtual IWindowHandle targetWindowHandle() const

  IEvent

  -     virtual ~IEvent()

  -     IWindowHandle controlHandle() const

  -     virtual IWindow* controlWindow() const

  -     IEvent& decrementOwnerLevels()

  -     virtual IWindow* dispatchingWindow() const

  -     unsigned long eventId() const

  -     IWindowHandle handle() const

  -     IEvent( const IWindowHandle& handle,
                unsigned long eventId,
                const IEventParameter1& parameter1,
                const IEventParameter2& parameter2 )

  -     IEvent(const IEvent& event)

  -     IEvent( IWindow* window,
                unsigned long eventId,
                const IEventParameter1& parameter1,
                const IEventParameter2& parameter2 )

  -     IEvent& operator =(const IEvent& event)

  -     IEventParameter1 parameter1() const

  -     IEventParameter2 parameter2() const

  -     bool passToOwner() const

  -     IEventResult result() const

  -     IEvent& setControlHandle(const IWindowHandle& handle)

  -     IEvent& setDispatchingHandle(const IWindowHandle& handle)

  -     IEvent& setDispatchingWindow(IWindow* window)

  -     IEvent& setHandle(const IWindowHandle& handle)

  -     IEvent& setNumberOfLevels(int levels = - 1)

  -     IEvent& setPassToOwner(bool passOn = true)

  -     IEvent& setResult(const IEventResult& eventResult)

  -     IEvent& setResult(bool eventResult)

  -     virtual IWindow* window() const

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  - None

#### Inherited Protected Data

  - None