### IDMSourceRenderEvent

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

  In addition to the standard IEvent attributes of event and window identifiers, objects of this class also have the following attributes:

  - An associated drag item object
  - An alternate window handle
  - A target window handle
  - A rendering mechanism and format (RMF) selected by the target
  - A target name
  - Target-defined information

### IDMSourceRenderEvent - Member Functions and Data by Group

### Constructors & Destructor

You can construct and destruct objects of this class.

~IDMSourceRenderEvent

      public:
      virtual ~IDMSourceRenderEvent()

Supported Platforms

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

IDMSourceRenderEvent

      public:
      IDMSourceRenderEvent(const IEvent& event)

  Constructs objects of this class from a generic IEvent object.

Exception

  IInvalidRequest | The object for the source render event was not created. The drag transfer information may be invalid.

Supported Platforms

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

### Rendering

Use these members to set and query attributes related to source rendering.

alternateWindow

      public:
      virtual IWindow* alternateWindow() const

  Returns a pointer to the alternate source window object. For example, the alternate window can be used to implement source rendering on a secondary thread.

Supported Platforms

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

alternateWindowHandle

      public:
      virtual IWindowHandle alternateWindowHandle() const

  Returns the handle of the alternate source window object. For example, the alternate window can be used to implement source rendering on a secondary thread.

Supported Platforms

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

canRetry

      public:
      virtual bool canRetry() const

  Returns true if the renderer processing the event can retry processing the event if a failure occurs. This flag is passed to the target renderer by IDMSourceRenderer::informTargetOfCompletion. The default is false.

Supported Platforms

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

completion

      public:
      virtual IDM::RenderCompletion completion() const

  Returns the flag that indicates if the rendering completed. This flag is passed to the target renderer by IDMSourceRenderer::informTargetOfCompletion. The default is IDM::renderOk.

Supported Platforms

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

dragItem

      public:
      virtual IDMItem::Handle dragItem() const

  Returns the handle of the drag item that is being rendered.

Supported Platforms

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

selectedFormat

      public:
      virtual IString selectedFormat() const

  Returns the selected rendering format.

Supported Platforms

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

selectedMechanism

      public:
      virtual IString selectedMechanism() const

  Returns the selected rendering mechanism.

Supported Platforms

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

setCompletion

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

  Sets the completion flag that indicates if the rendering completed successfully.

Supported Platforms

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

setRetry

      public:
      virtual IDMSourceRenderEvent&
        setRetry( bool allowRetry = true )

  Sets the flag that indicates that the renderer processing the event can retry a failed rendering.

Supported Platforms

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

setTargetInfo

      public:
      virtual IDMSourceRenderEvent&
        setTargetInfo( unsigned long info )

  Sets information that is passed to the target renderer.

Supported Platforms

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

targetInfo

      public:
      virtual unsigned long targetInfo() const

  Returns the target-defined information.
  Note: This is an extra member the source and target can use to pass additional information to each other. You can use it to implement the specialized behavior for user-defined rendering mechanisms and formats.

Supported Platforms

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

targetName

      public:
      virtual IString targetName() const

  Returns the target render-to name. For example, the source can use this member to indicate to the target where it has placed the data it has rendered (that is, the name of a shared memory segment or file).

Supported Platforms

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

targetWindow

      public:
      virtual IWindow* targetWindow() const

  Returns a pointer to the target window object.

Supported Platforms

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

targetWindowHandle

      public:
      virtual IWindowHandle targetWindowHandle() const

  Returns the handle of the target window object.

Supported Platforms

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

### IDMSourceRenderEvent - Inherited Member Functions and Data

#### Inherited Public Functions

  IDMEvent

  -     virtual ~IDMEvent()

  -     IDMEvent(const IEvent& event)

  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