Пример #1
0
 internal ExtendedHtmlEditorMashallingHandler(IHtmlMarshallingTarget editorContext, IContentSourceSite sourceSite, IHtmlEditorHost blogEditor, OpenLiveWriter.Interop.Com.IDropTarget unhandledDropTarget)
     : base(editorContext)
 {
     _insertionSite       = sourceSite;
     _blogEditor          = blogEditor;
     _unhandledDropTarget = unhandledDropTarget;
 }
 internal ExtendedHtmlEditorMashallingHandler(IHtmlMarshallingTarget editorContext, IContentSourceSite sourceSite, IHtmlEditorHost blogEditor, OpenLiveWriter.Interop.Com.IDropTarget unhandledDropTarget)
     : base(editorContext)
 {
     _insertionSite = sourceSite;
     _blogEditor = blogEditor;
     _unhandledDropTarget = unhandledDropTarget;
 }
        /// <summary>
        /// Method that is delegated to by the presentation editor's implementation of
        /// IDocHostCustomUI.GetDropTarget. Replaces the default drop target implementation
        /// with our own. Note that the main purpose of this method for us is to get a reference
        /// to the MSHTML drop target implementation. While in this method we do in fact replace
        /// their implementation with our own, this is probably redundant as we also disable
        /// their drop target (see below comment on Initialize). We replace their implementation
        /// in any case just so that if they have any internal state or behavior that depends
        /// upon knowing whether their drop target implementation is active then it can be
        /// set correctly.
        /// </summary>
        /// <param name="pDropTarget">default implementation</param>
        /// <param name="ppDropTarget">our implementation</param>
        /// <returns>S_OK to indicate that we replaced implementation, otherwise E_NOTIMPL</returns>
        public int GetDropTarget(OpenLiveWriter.Interop.Com.IDropTarget pDropTarget, out OpenLiveWriter.Interop.Com.IDropTarget ppDropTarget)
        {
            // Note: Drop target can be null after the user clicks on an <option> element.

            // save a reference to the mshtml drop target
            mshtmlDropTargetImpl = pDropTarget;

            // replace the mshtml implementation with our own (will delegate as necessary)
            ppDropTarget = this;

            // indicate that we replaced the implementation
            return(HRESULT.S_OK);
        }
Пример #4
0
 public UnhandledDropTarget(DataObjectMeister dataObject, DataFormatHandlerContext handlerContext, OpenLiveWriter.Interop.Com.IDropTarget unhandledDropTarget)
     : base(dataObject, handlerContext)
 {
     _unhandledDropTarget = unhandledDropTarget;
     _oleDataObject       = MshtmlEditorDragAndDropTarget.ExtractOleDataObject(DataMeister.IDataObject);
 }
Пример #5
0
 public EmlMessageHandler(DataObjectMeister dataObject, DataFormatHandlerContext handlerContext, OpenLiveWriter.Interop.Com.IDropTarget unhandledDropTarget)
     : base(dataObject, handlerContext, unhandledDropTarget)
 {
 }
 public UnhandledDropTarget(DataObjectMeister dataObject, DataFormatHandlerContext handlerContext, OpenLiveWriter.Interop.Com.IDropTarget unhandledDropTarget)
     : base(dataObject, handlerContext)
 {
     _unhandledDropTarget = unhandledDropTarget;
     _oleDataObject = MshtmlEditorDragAndDropTarget.ExtractOleDataObject(DataMeister.IDataObject);
 }