public ElementControlBehavior(IHtmlEditorComponentContext editorContext)
     : base(editorContext)
 {
     controls = new BehaviorControlCollection(this);
     controls.ControlAdded += new BehaviorControlCollection.ControlEvent(controls_ControlAdded);
     controls.ControlRemoved += new BehaviorControlCollection.ControlEvent(controls_ControlRemoved);
 }
 public TableEditingContext(IHtmlEditorComponentContext editorContext)
 {
     // list of cell element behaviors (demand create if necessary)
     if (!editorContext.Cookies.Contains(CELL_ELEMENT_BEHAVIORS))
         editorContext.Cookies[CELL_ELEMENT_BEHAVIORS] = new ArrayList();
     _cellElementBehaviors = editorContext.Cookies[CELL_ELEMENT_BEHAVIORS] as ArrayList;
 }
        public SemanticHtmlGalleryCommand(CommandId commandId, IBlogPostEditingSite editingSite, TemplateHtmlDelegate templateHtmlDelegate, CommandManager commandManager, IHtmlEditorComponentContext componentContext)
            : base(commandId)
        {
            _editingSite      = editingSite;
            _componentContext = componentContext;

            _elements = new List <SemanticHtmlElementInfo>(7);
            _elements.Add(new SemanticHtmlElementInfo("p", _ELEMENT_TAG_ID.TAGID_P, Res.Get(StringId.Paragraph), SemanticHtmlPreviewManager.PreviewId_P, CommandId.ApplySemanticParagraph));
            _elements.Add(new SemanticHtmlElementInfo("h1", _ELEMENT_TAG_ID.TAGID_H1, Res.Get(StringId.Heading1), SemanticHtmlPreviewManager.PreviewId_H1, CommandId.ApplySemanticHeader1));
            _elements.Add(new SemanticHtmlElementInfo("h2", _ELEMENT_TAG_ID.TAGID_H2, Res.Get(StringId.Heading2), SemanticHtmlPreviewManager.PreviewId_H2, CommandId.ApplySemanticHeader2));
            _elements.Add(new SemanticHtmlElementInfo("h3", _ELEMENT_TAG_ID.TAGID_H3, Res.Get(StringId.Heading3), SemanticHtmlPreviewManager.PreviewId_H3, CommandId.ApplySemanticHeader3));
            _elements.Add(new SemanticHtmlElementInfo("h4", _ELEMENT_TAG_ID.TAGID_H4, Res.Get(StringId.Heading4), SemanticHtmlPreviewManager.PreviewId_H4, CommandId.ApplySemanticHeader4));
            _elements.Add(new SemanticHtmlElementInfo("h5", _ELEMENT_TAG_ID.TAGID_H5, Res.Get(StringId.Heading5), SemanticHtmlPreviewManager.PreviewId_H5, CommandId.ApplySemanticHeader5));
            _elements.Add(new SemanticHtmlElementInfo("h6", _ELEMENT_TAG_ID.TAGID_H6, Res.Get(StringId.Heading6), SemanticHtmlPreviewManager.PreviewId_H6, CommandId.ApplySemanticHeader6));

            _previewManager = new SemanticHtmlPreviewManager(_editingSite, templateHtmlDelegate, RibbonHelper.InGalleryImageWidth, RibbonHelper.InGalleryImageHeightWithoutLabel);

            _ids = new string[_elements.Count];
            for (int i = 0; i < _ids.Length; i++)
            {
                _ids[i] = _elements[i].HtmlId;

                int index = i;
                OverridableCommand command = new OverridableCommand(_elements[i].CommandId);
                command.Execute += (sender, e) => SelectedIndex = index;
                commandManager.Add(command);
            }
        }
 public ElementControlBehavior(IHtmlEditorComponentContext editorContext)
     : base(editorContext)
 {
     controls = new BehaviorControlCollection(this);
     controls.ControlAdded   += new BehaviorControlCollection.ControlEvent(controls_ControlAdded);
     controls.ControlRemoved += new BehaviorControlCollection.ControlEvent(controls_ControlRemoved);
 }
 public SmartContentElementBehavior(IHtmlEditorComponentContext editorContext, IBlogPostSidebarContext sidebarContext, IContentSourceSidebarContext contentSourceContext, SmartContentResizedListener resizedListener)
     : base(editorContext)
 {
     _editorContext = editorContext;
     _sidebarContext = sidebarContext;
     _contentSourceContext = contentSourceContext;
     _resizedListener = resizedListener;
 }
Example #6
0
 public SmartContentElementBehavior(IHtmlEditorComponentContext editorContext, IBlogPostSidebarContext sidebarContext, IContentSourceSidebarContext contentSourceContext, SmartContentResizedListener resizedListener)
     : base(editorContext)
 {
     _editorContext        = editorContext;
     _sidebarContext       = sidebarContext;
     _contentSourceContext = contentSourceContext;
     _resizedListener      = resizedListener;
 }
Example #7
0
 public ImagePropertiesSidebar(
     IHtmlEditorComponentContext editorContext,
     IBlogPostImageEditingContext imageEditingContext,
     CreateFileCallback createFileCallback)
 {
     _editorContext      = editorContext;
     _dataContext        = imageEditingContext;
     _createFileCallback = createFileCallback;
 }
Example #8
0
 public TableEditingContext(IHtmlEditorComponentContext editorContext)
 {
     // list of cell element behaviors (demand create if necessary)
     if (!editorContext.Cookies.Contains(CELL_ELEMENT_BEHAVIORS))
     {
         editorContext.Cookies[CELL_ELEMENT_BEHAVIORS] = new ArrayList();
     }
     _cellElementBehaviors = editorContext.Cookies[CELL_ELEMENT_BEHAVIORS] as ArrayList;
 }
 public ImagePropertiesSidebarHostControl(
     ISidebarContext sidebarContext,
     IHtmlEditorComponentContext editorContext,
     IBlogPostImageEditingContext imageEditingContext,
     CreateFileCallback createFileCallback)
 {
     // Instead of creating the image sidebar, we now create the manager for ribbon commands releated to image editing.
     _pictureEditingManager = new PictureEditingManager(editorContext, imageEditingContext, createFileCallback);
 }
 public InlineEditField(IHTMLElement element, ISmartContent smartContent, IHtmlEditorComponentContext editorContext, IHTMLElement smartContentElement, IUndoRedoExecutingChecker undoRedoCheck)
 {
     Debug.Assert(element != null, "Making an edit field with a null element.");
     _element = element;
     _smartContent = smartContent;
     _smartContentElement = smartContentElement;
     _editorContext = editorContext;
     _undoRedoCheck = undoRedoCheck;
 }
Example #11
0
 public ImagePropertiesSidebarHostControl(
     ISidebarContext sidebarContext,
     IHtmlEditorComponentContext editorContext,
     IBlogPostImageEditingContext imageEditingContext,
     CreateFileCallback createFileCallback)
 {
     // Instead of creating the image sidebar, we now create the manager for ribbon commands releated to image editing.
     _pictureEditingManager = new PictureEditingManager(editorContext, imageEditingContext, createFileCallback);
 }
Example #12
0
 public DisabledSmartContentElementBehavior(IHtmlEditorComponentContext editorContext, IContentSourceSidebarContext contentSourceContext)
     : base(editorContext)
 {
     _focusControl         = new FocusControl(this);
     _focusControl.Visible = false;
     _contentSourceContext = contentSourceContext;
     Controls.Add(_focusControl);
     _dragDropController = new SmartContentDragAndDropSource(editorContext);
 }
 public static void Initialize(IHtmlEditorComponentContext editorContext, IBlogPostImageDataContext dataContext, CreateFileCallback callback)
 {
     // initialize one form per-thread
     if ( _imagePropertyForm == null )
     {
         _imagePropertyForm = new ImageEditingPropertyForm() ;
         _imagePropertyForm.Init(editorContext, dataContext, callback);
     }
 }
Example #14
0
 public InlineEditField(IHTMLElement element, ISmartContent smartContent, IHtmlEditorComponentContext editorContext, IHTMLElement smartContentElement, IUndoRedoExecutingChecker undoRedoCheck)
 {
     Debug.Assert(element != null, "Making an edit field with a null element.");
     _element             = element;
     _smartContent        = smartContent;
     _smartContentElement = smartContentElement;
     _editorContext       = editorContext;
     _undoRedoCheck       = undoRedoCheck;
 }
 public ImagePropertiesSidebar(
     IHtmlEditorComponentContext editorContext,
     IBlogPostImageEditingContext imageEditingContext,
     CreateFileCallback createFileCallback)
 {
     _editorContext = editorContext;
     _dataContext = imageEditingContext;
     _createFileCallback = createFileCallback;
 }
 public DisabledSmartContentElementBehavior(IHtmlEditorComponentContext editorContext, IContentSourceSidebarContext contentSourceContext)
     : base(editorContext)
 {
     _focusControl = new FocusControl(this);
     _focusControl.Visible = false;
     _contentSourceContext = contentSourceContext;
     Controls.Add(_focusControl);
     _dragDropController = new SmartContentDragAndDropSource(editorContext);
 }
 public static void Initialize(IHtmlEditorComponentContext editorContext, IBlogPostImageDataContext dataContext, CreateFileCallback callback)
 {
     // initialize one form per-thread
     if (_imagePropertySidebar == null)
     {
         _imagePropertySidebar = new ImageEditingPropertySidebar();
         _imagePropertySidebar.Init(editorContext, dataContext, callback);
     }
 }
        public ExtendedEntrySplitterElementBehavior(IHtmlEditorComponentContext editorContext)
            : base(editorContext)
        {
            _splitter = new SplitterControl();
            _splitter.VirtualLocation = new Point(0, _verticalPadding);
            Controls.Add(_splitter);

            //keep the line width synchronized with the element's width
            ElementSizeChanged += new EventHandler(ExtendedEntrySplitterElementBehavior_ElementSizeChanged);
        }
Example #19
0
        public ExtendedEntrySplitterElementBehavior(IHtmlEditorComponentContext editorContext)
            : base(editorContext)
        {
            _splitter = new SplitterControl();
            _splitter.VirtualLocation = new Point(0, _verticalPadding);
            Controls.Add(_splitter);

            //keep the line width synchronized with the element's width
            ElementSizeChanged += new EventHandler(ExtendedEntrySplitterElementBehavior_ElementSizeChanged);
        }
        private void Init(IHtmlEditorComponentContext editorContext, IBlogPostImageDataContext dataContext, CreateFileCallback callback)
        {
            _editorContext = editorContext;
            _editorContext.SelectionChanged += new EventHandler(_editorContext_SelectionChanged);
            _imageDataContext = dataContext;

            _createFileCallback = callback;

            this.imagePropertyEditorControl.Init(dataContext);
        }
Example #21
0
        public PictureEditingManager(
            IHtmlEditorComponentContext editorContext,
            IBlogPostImageEditingContext imageEditingContext,
            CreateFileCallback createFileCallback)
        {
            _editorContext       = editorContext;
            _imageEditingContext = imageEditingContext;
            _createFileCallback  = createFileCallback;

            InitializeCommands();
        }
        public PictureEditingManager(
            IHtmlEditorComponentContext editorContext,
            IBlogPostImageEditingContext imageEditingContext,
            CreateFileCallback createFileCallback)
        {
            _editorContext = editorContext;
            _imageEditingContext = imageEditingContext;
            _createFileCallback = createFileCallback;

            InitializeCommands();
        }
        public TableEditingManager(IHtmlEditorComponentContext editorContext)
        {
            _editorContext = editorContext;

            if (!GlobalEditorOptions.SupportsFeature(ContentEditorFeature.Table))
            {
                _editorContext.SelectionChanged += new EventHandler(_editorContext_SelectionChanged);
                _selectionChangedHooked = true;
            }

            InitializeCommands();
        }
        public TableEditingManager(IHtmlEditorComponentContext editorContext)
        {
            _editorContext = editorContext;

            if (!GlobalEditorOptions.SupportsFeature(ContentEditorFeature.Table))
            {
                _editorContext.SelectionChanged += new EventHandler(_editorContext_SelectionChanged);
                _selectionChangedHooked          = true;
            }

            InitializeCommands();
        }
        private void Init(IHtmlEditorComponentContext editorContext, IBlogPostImageDataContext dataContext, CreateFileCallback callback)
        {
            _editorContext = editorContext ;
            _editorContext.SelectionChanged +=new EventHandler(_editorContext_SelectionChanged);
            _imageDataContext = dataContext;

            _createFileCallback = callback ;

            this.imagePropertyEditorControl1.Init(dataContext);

            base.Init(editorContext.MainFrameWindow, typeof(CommandViewImageProperties)) ;
        }
        private void Init(IHtmlEditorComponentContext editorContext, IBlogPostImageDataContext dataContext, CreateFileCallback callback)
        {
            _editorContext = editorContext;
            _editorContext.SelectionChanged += new EventHandler(_editorContext_SelectionChanged);
            _imageDataContext = dataContext;

            _createFileCallback = callback;

            this.imagePropertyEditorControl1.Init(dataContext);

            base.Init(editorContext.MainFrameWindow, typeof(CommandViewImageProperties));
        }
        public static SmartContentSelection SelectIfSmartContentElement(IHtmlEditorComponentContext editorComponentContext, IHTMLElement e, SmartContentState contentState)
        {
            if (e != null)
            {
                IHTMLElement smartContent = ContentSourceManager.GetContainingSmartContent(e);
                if (smartContent == null)
                    return null;

                return SelectElement(editorComponentContext, smartContent, contentState);
            }
            return null;
        }
Example #28
0
        protected ContentSelection(IHtmlEditorComponentContext editorComponentContext, IHTMLElement element, SmartContentState contentState)
        {
            _editorComponentContext = editorComponentContext;
            _markupServices         = editorComponentContext.MarkupServices;
            _element      = element;
            _contentState = contentState;

            _markupRange = _markupServices.CreateMarkupRange(_element, true);
            _markupRange.Start.Gravity = _POINTER_GRAVITY.POINTER_GRAVITY_Right;
            _markupRange.End.Gravity   = _POINTER_GRAVITY.POINTER_GRAVITY_Left;
            _markupRange.Start.Cling   = false;
            _markupRange.End.Cling     = false;
        }
Example #29
0
        public static SmartContentSelection SelectIfSmartContentElement(IHtmlEditorComponentContext editorComponentContext, IHTMLElement e, SmartContentState contentState)
        {
            if (e != null)
            {
                IHTMLElement smartContent = ContentSourceManager.GetContainingSmartContent(e);
                if (smartContent == null)
                {
                    return(null);
                }

                return(SelectElement(editorComponentContext, smartContent, contentState));
            }
            return(null);
        }
        public ResizableElementBehavior(IHtmlEditorComponentContext editorContext)
            : base(editorContext)
        {
            _dragBufferControl         = new BehaviorControl();
            _dragBufferControl.Visible = false;

            _resizerControl = new ResizerControl();
            _resizerControl.SizerModeChanged += new SizerModeEventHandler(resizerControl_SizerModeChanged);
            _resizerControl.Resized          += new EventHandler(resizerControl_Resized);
            _resizerControl.Visible           = false;

            Controls.Add(_dragBufferControl);
            Controls.Add(_resizerControl);

            _dragDropController = new SmartContentDragAndDropSource(editorContext);
        }
        public RibbonControl(IHtmlEditorComponentContext componentContext, IHtmlEditorCommandSource commandSource)
        {
            // Note that this code is *not* called within Mail.
            // Shared canvas commands/code need to go in ContentEditor.

            this.componentContext = componentContext;
            this.commandSource = commandSource;

            componentContext.CommandManager.BeginUpdate();

            componentContext.CommandManager.Add(CommandId.FileMenu, null);

            componentContext.CommandManager.Add(CommandId.HomeTab, null);

            componentContext.CommandManager.Add(new GroupCommand(CommandId.ClipboardGroup, componentContext.CommandManager.Get(CommandId.Paste)));
            componentContext.CommandManager.Add(new GroupCommand(CommandId.PublishGroup, componentContext.CommandManager.Get(CommandId.PostAndPublish)));
            componentContext.CommandManager.Add(new Command(CommandId.ParagraphGroup)); // Has it's own icon
            componentContext.CommandManager.Add(new GroupCommand(CommandId.InsertGroup, componentContext.CommandManager.Get(CommandId.InsertPictureFromFile)));

            componentContext.CommandManager.Add(CommandId.InsertTab, null);
            componentContext.CommandManager.Add(new GroupCommand(CommandId.BreaksGroup, componentContext.CommandManager.Get(CommandId.InsertHorizontalLine)));
            componentContext.CommandManager.Add(new GroupCommand(CommandId.TablesGroup, componentContext.CommandManager.Get(CommandId.InsertTable)));
            componentContext.CommandManager.Add(new GroupCommand(CommandId.MediaGroup, componentContext.CommandManager.Get(CommandId.InsertPictureFromFile)));
            componentContext.CommandManager.Add(new GroupCommand(CommandId.PluginsGroup, componentContext.CommandManager.Get(CommandId.PluginsGallery)));

            componentContext.CommandManager.Add(new Command(CommandId.BlogProviderTab));
            componentContext.CommandManager.Add(new GroupCommand(CommandId.BlogProviderBlogGroup, componentContext.CommandManager.Get(CommandId.ConfigureWeblog)));
            componentContext.CommandManager.Add(new GroupCommand(CommandId.BlogProviderThemeGroup, componentContext.CommandManager.Get(CommandId.UpdateWeblogStyle)));

            componentContext.CommandManager.Add(CommandId.PreviewTab, null);
            // Already added PublishGroup
            componentContext.CommandManager.Add(new GroupCommand(CommandId.BrowserGroup, componentContext.CommandManager.Get(CommandId.UpdateWeblogStyle)));
            // Already added TextEditingGroup
            componentContext.CommandManager.Add(new GroupCommand(CommandId.PreviewGroup, componentContext.CommandManager.Get(CommandId.ClosePreview)));

            componentContext.CommandManager.Add(CommandId.DebugTab, null);
            componentContext.CommandManager.Add(new Command(CommandId.GeneralDebugGroup));
            componentContext.CommandManager.Add(new Command(CommandId.DialogDebugGroup));
            componentContext.CommandManager.Add(new Command(CommandId.TextDebugGroup));
            componentContext.CommandManager.Add(new Command(CommandId.ValidateDebugGroup));

            componentContext.CommandManager.Add(new Command(CommandId.FormatMapGroup));
            componentContext.CommandManager.Add(new Command(CommandId.FormatMapPropertiesGroup));

            componentContext.CommandManager.EndUpdate();
        }
Example #32
0
        public RibbonControl(IHtmlEditorComponentContext componentContext, IHtmlEditorCommandSource commandSource)
        {
            // Note that this code is *not* called within Mail.
            // Shared canvas commands/code need to go in ContentEditor.

            this.componentContext = componentContext;
            this.commandSource    = commandSource;

            componentContext.CommandManager.BeginUpdate();

            componentContext.CommandManager.Add(CommandId.FileMenu, null);

            componentContext.CommandManager.Add(CommandId.HomeTab, null);

            componentContext.CommandManager.Add(new GroupCommand(CommandId.ClipboardGroup, componentContext.CommandManager.Get(CommandId.Paste)));
            componentContext.CommandManager.Add(new GroupCommand(CommandId.PublishGroup, componentContext.CommandManager.Get(CommandId.PostAndPublish)));
            componentContext.CommandManager.Add(new Command(CommandId.ParagraphGroup)); // Has it's own icon
            componentContext.CommandManager.Add(new GroupCommand(CommandId.InsertGroup, componentContext.CommandManager.Get(CommandId.InsertPictureFromFile)));

            componentContext.CommandManager.Add(CommandId.InsertTab, null);
            componentContext.CommandManager.Add(new GroupCommand(CommandId.BreaksGroup, componentContext.CommandManager.Get(CommandId.InsertHorizontalLine)));
            componentContext.CommandManager.Add(new GroupCommand(CommandId.TablesGroup, componentContext.CommandManager.Get(CommandId.InsertTable)));
            componentContext.CommandManager.Add(new GroupCommand(CommandId.MediaGroup, componentContext.CommandManager.Get(CommandId.InsertPictureFromFile)));
            componentContext.CommandManager.Add(new GroupCommand(CommandId.PluginsGroup, componentContext.CommandManager.Get(CommandId.PluginsGallery)));

            componentContext.CommandManager.Add(new Command(CommandId.BlogProviderTab));
            componentContext.CommandManager.Add(new GroupCommand(CommandId.BlogProviderBlogGroup, componentContext.CommandManager.Get(CommandId.ConfigureWeblog)));
            componentContext.CommandManager.Add(new GroupCommand(CommandId.BlogProviderThemeGroup, componentContext.CommandManager.Get(CommandId.UpdateWeblogStyle)));

            componentContext.CommandManager.Add(CommandId.PreviewTab, null);
            // Already added PublishGroup
            componentContext.CommandManager.Add(new GroupCommand(CommandId.BrowserGroup, componentContext.CommandManager.Get(CommandId.UpdateWeblogStyle)));
            // Already added TextEditingGroup
            componentContext.CommandManager.Add(new GroupCommand(CommandId.PreviewGroup, componentContext.CommandManager.Get(CommandId.ClosePreview)));

            componentContext.CommandManager.Add(CommandId.DebugTab, null);
            componentContext.CommandManager.Add(new Command(CommandId.GeneralDebugGroup));
            componentContext.CommandManager.Add(new Command(CommandId.DialogDebugGroup));
            componentContext.CommandManager.Add(new Command(CommandId.TextDebugGroup));
            componentContext.CommandManager.Add(new Command(CommandId.ValidateDebugGroup));

            componentContext.CommandManager.Add(new Command(CommandId.FormatMapGroup));
            componentContext.CommandManager.Add(new Command(CommandId.FormatMapPropertiesGroup));

            componentContext.CommandManager.EndUpdate();
        }
        public ResizableElementBehavior(IHtmlEditorComponentContext editorContext)
            : base(editorContext)
        {
            _dragBufferControl = new BehaviorControl();
            _dragBufferControl.Visible = false;

            _resizerControl = new ResizerControl();
            _resizerControl.SizerModeChanged += new SizerModeEventHandler(resizerControl_SizerModeChanged);
            _resizerControl.Resized += new EventHandler(resizerControl_Resized);
            _resizerControl.Visible = false;

            Controls.Add(_dragBufferControl);
            Controls.Add(_resizerControl);

            _dragDropController = new SmartContentDragAndDropSource(editorContext);

        }
Example #34
0
        public TableColumnSizeEditor(IHTMLTable table, IHtmlEditorComponentContext editorContext, IHTMLPaintSiteRaw paintSite)
        {
            Debug.Assert(((IHTMLElement)table).offsetHeight > 0 && ((IHTMLElement)table).offsetWidth > 0,
                         "TableColumnSizeEditor unexpectedly attached to a table with no height and/or width!");

            // save references
            _table         = table;
            _editorContext = editorContext;
            _paintSite     = paintSite;

            // initialize sizing
            _sizingOperation = new SizingOperation(_editorContext, _table);

            // initialize table editing context
            _tableEditingContext = new TableEditingContext(editorContext);

            // subscribe to events
            _editorContext.PreHandleEvent += new OpenLiveWriter.Mshtml.HtmlEditDesignerEventHandler(_editorContext_PreHandleEvent);
        }
        public TableColumnSizeEditor(IHTMLTable table, IHtmlEditorComponentContext editorContext, IHTMLPaintSiteRaw paintSite)
        {
            Debug.Assert(((IHTMLElement)table).offsetHeight > 0 && ((IHTMLElement)table).offsetWidth > 0,
                         "TableColumnSizeEditor unexpectedly attached to a table with no height and/or width!");

            // save references
            _table = table;
            _editorContext = editorContext;
            _paintSite = paintSite;

            // initialize sizing
            _sizingOperation = new SizingOperation(_editorContext, _table);

            // initialize table editing context
            _tableEditingContext = new TableEditingContext(editorContext);

            // subscribe to events
            _editorContext.PreHandleEvent += new OpenLiveWriter.Mshtml.HtmlEditDesignerEventHandler(_editorContext_PreHandleEvent);
        }
Example #36
0
        protected static ContentSelection SelectElementCore(IHtmlEditorComponentContext editorComponentContext, IHTMLElement e, ContentSelection smartContentSelection)
        {
            Debug.Assert(e.sourceIndex > -1, "Cannot select an unpositioned element");
            if (e.sourceIndex > -1) //avoid unhandled exception reported by bug 291968
            {
                //suspend selection change events while the selection object is replaced
                editorComponentContext.BeginSelectionChange();
                try
                {
                    //clear the DOM selection so that whatever is currently selected gets unselected.
                    editorComponentContext.EmptySelection();

                    //select the newly smart content element
                    editorComponentContext.Selection = smartContentSelection;
                    return(smartContentSelection);
                }
                finally
                {
                    editorComponentContext.EndSelectionChange();
                }
            }
            return(null);
        }
        public HtmlEditorSidebarHost(IHtmlEditorComponentContext editorContext)
        {
            // save reference to context
            _editorContext = editorContext;
            _editorContext.SelectionChanged     += new EventHandler(_editorContext_SelectionChanged);
            _editorContext.DocumentEvents.Click += new OpenLiveWriter.Mshtml.HtmlEventHandler(DocumentEvents_Click);

            base.BackColor = UIPaint.Instance.FrameGradientLight;

            // initialize
            InitializeDockPadding();
            InitializeControls();
            //AdjustLayoutForLargeFonts() ;

            // default visibility to previous value
            Visible = false;

            //create the UI theme
            _uiTheme       = new SidebarUITheme(this);
            AccessibleName = Res.Get(StringId.SidebarPanel);

            // Create an automation ID
            Name = "SidebarPanel";
        }
        public HtmlEditorSidebarHost(IHtmlEditorComponentContext editorContext)
        {
            // save reference to context
            _editorContext = editorContext;
            _editorContext.SelectionChanged += new EventHandler(_editorContext_SelectionChanged);
            _editorContext.DocumentEvents.Click += new OpenLiveWriter.Mshtml.HtmlEventHandler(DocumentEvents_Click);

            base.BackColor = UIPaint.Instance.FrameGradientLight;

            // initialize
            InitializeDockPadding();
            InitializeControls();
            //AdjustLayoutForLargeFonts() ;

            // default visibility to previous value
            Visible = false;

            //create the UI theme
            _uiTheme = new SidebarUITheme(this);
            AccessibleName = Res.Get(StringId.SidebarPanel);

            // Create an automation ID
            Name = "SidebarPanel";
        }
 public SmartContentDragAndDropSource(IHtmlEditorComponentContext context)
     : base(context)
 {
 }
 public Undo(IHtmlEditorComponentContext editorContext)
 {
     _editorContext = editorContext;
     editorContext.MarkupServices.BeginUndoUnit(Guid.NewGuid().ToString());
 }
        protected ContentSelection(IHtmlEditorComponentContext editorComponentContext, IHTMLElement element, SmartContentState contentState)
        {
            _editorComponentContext = editorComponentContext;
            _markupServices = editorComponentContext.MarkupServices;
            _element = element;
            _contentState = contentState;

            _markupRange = _markupServices.CreateMarkupRange(_element, true);
            _markupRange.Start.Gravity = _POINTER_GRAVITY.POINTER_GRAVITY_Right;
            _markupRange.End.Gravity = _POINTER_GRAVITY.POINTER_GRAVITY_Left;
            _markupRange.Start.Cling = false;
            _markupRange.End.Cling = false;
        }
 public ImageEditingElementBehavior(IHtmlEditorComponentContext editorContext)
     : base(editorContext)
 {
 }
Example #43
0
 public static SmartContentSelection SelectIfSmartContentElement(IHtmlEditorComponentContext editorComponentContext, IHTMLElement e)
 {
     return(SelectIfSmartContentElement(editorComponentContext, e, SmartContentState.Enabled));
 }
 public ExtendedEntrySweeper(IHtmlEditorComponentContext editorContext, IHTMLDocument3 document, IHTMLElement extendedEntry)
 {
     _editorContext = editorContext;
     _realExtendedEntry = extendedEntry;
     _document = document;
 }
Example #45
0
 public ExtendedEntrySweeper(IHtmlEditorComponentContext editorContext, IHTMLDocument3 document, IHTMLElement extendedEntry)
 {
     _editorContext     = editorContext;
     _realExtendedEntry = extendedEntry;
     _document          = document;
 }
 public PostBodyEditingElementBehavior(BlogPostHtmlEditorControl editor, IHtmlEditorComponentContext editorContext, IHTMLElement prevEditableRegion, IHTMLElement nextEditableRegion)
     : base(editorContext, prevEditableRegion, nextEditableRegion)
 {
     _editor = editor;
 }
 protected virtual void AttachBehaviors(IHtmlEditorComponentContext context)
 {
 }
Example #48
0
 public static DisabledImageSelection SelectElement(IHtmlEditorComponentContext editorComponentContext, IHTMLElement e)
 {
     return((DisabledImageSelection)SelectElementCore(editorComponentContext, e, new DisabledImageSelection(editorComponentContext, e)));
 }
Example #49
0
 protected DisabledImageSelection(IHtmlEditorComponentContext editorComponentContext, IHTMLElement element)
     : base(editorComponentContext, element, SmartContentState.Disabled)
 {
 }
Example #50
0
        public static SmartContentSelection SelectElement(IHtmlEditorComponentContext editorComponentContext, IHTMLElement e, SmartContentState contentState)
        {
            SmartContentSelection selection = (SmartContentSelection)SelectElementCore(editorComponentContext, e, new SmartContentSelection(editorComponentContext, e, contentState));

            return(selection);
        }
 public DebugElementBehavior(IHtmlEditorComponentContext editorContext, IHTMLElement prevEditableRegion, IHTMLElement nextEditableRegion)
     : base(editorContext, prevEditableRegion, nextEditableRegion)
 {
 }
 public DisabledImageDragAndDropSource(IHtmlEditorComponentContext context)
     : base(context)
 {
 }
 /// <summary>
 /// Initialize with editor context
 /// </summary>
 /// <param name="context">editor context</param>
 public BehaviorDragAndDropSource(IHtmlEditorComponentContext context)
 {
     // store reference to context
     EditorContext = context;
 }
Example #54
0
 public TableEditingElementBehavior(IHtmlEditorComponentContext editorContext, TableEditingManager tableEditingManager)
     : base(editorContext)
 {
     _tableEditingManager = tableEditingManager;
 }
 public static DisabledImageSelection SelectElement(IHtmlEditorComponentContext editorComponentContext, IHTMLElement e)
 {
     return (DisabledImageSelection)SelectElementCore(editorComponentContext, e, new DisabledImageSelection(editorComponentContext, e));
 }
 public SizingOperation(IHtmlEditorComponentContext editorContext, IHTMLTable table)
 {
     _editorContext = editorContext;
     _table = table;
 }
 protected DisabledImageSelection(IHtmlEditorComponentContext editorComponentContext, IHTMLElement element)
     : base(editorComponentContext, element, SmartContentState.Disabled)
 {
 }
Example #58
0
 protected SmartContentSelection(IHtmlEditorComponentContext editorComponentContext, IHTMLElement element, SmartContentState contentState)
     : base(editorComponentContext, element, contentState)
 {
 }
 public TableCellEditingElementBehavior(IHtmlEditorComponentContext editorContext)
     : base(editorContext)
 {
 }
 public PropertiesEditingElementBehavior(IHtmlEditorComponentContext editorContext)
     : base(editorContext)
 {
 }