internal void Add(DockPane pane, DockPane paneBefore) { if (paneBefore == null) Add(pane); else InnerList.Insert(IndexOf(paneBefore), pane); }
internal int Add(DockPane pane) { if (InnerList.Contains(pane)) return InnerList.IndexOf(pane); return InnerList.Add(pane); }
internal void AddAt(DockPane pane, int index) { if (index < 0 || index > InnerList.Count - 1) return; if (Contains(pane)) return; InnerList.Insert(index, pane); }
/// <include file='CodeDoc/DockPaneCaptionBase.xml' path='//CodeDoc/Class[@name="DockPaneCaptionBase"]/Construct[@name="(DockPane)"]/*'/> protected internal DockPaneCaptionBase(DockPane pane) { m_dockPane = pane; SetStyle(ControlStyles.ResizeRedraw, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.DoubleBuffer, true); SetStyle(ControlStyles.Selectable, false); }
/// <include file='CodeDoc/DockPaneStripVS2003.xml' path='//CodeDoc/Class[@name="DockPaneStripVS2003"]/Construct[@name="(DockPane)"]/*'/> protected internal DockPaneStripVS2003(DockPane pane) : base(pane) { SetStyle(ControlStyles.ResizeRedraw, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.DoubleBuffer, true); SuspendLayout(); Font = SystemInformation.MenuFont; BackColor = Color.WhiteSmoke; m_components = new Container(); m_toolTip = new ToolTip(Components); m_buttonClose = new InertButton(ImageCloseEnabled, ImageCloseDisabled); m_buttonScrollLeft = new InertButton(ImageScrollLeftEnabled, ImageScrollLeftDisabled); m_buttonScrollRight = new InertButton(ImageScrollRightEnabled, ImageScrollRightDisabled); m_buttonClose.ToolTipText = ToolTipClose; m_buttonClose.Anchor = AnchorStyles.Top | AnchorStyles.Right; m_buttonClose.Click += new EventHandler(Close_Click); m_buttonScrollLeft.Enabled = false; m_buttonScrollLeft.ToolTipText = ToolTipScrollLeft; m_buttonScrollLeft.Anchor = AnchorStyles.Top | AnchorStyles.Right; m_buttonScrollLeft.Click += new EventHandler(ScrollLeft_Click); m_buttonScrollRight.Enabled = false; m_buttonScrollRight.ToolTipText = ToolTipScrollRight; m_buttonScrollRight.Anchor = AnchorStyles.Top | AnchorStyles.Right; m_buttonScrollRight.Click += new EventHandler(ScrollRight_Click); Controls.AddRange(new Control[] { m_buttonClose, m_buttonScrollLeft, m_buttonScrollRight }); ResumeLayout(); }
/// <include file='CodeDoc/DockPaneCaptionVS2003.xml' path='//CodeDoc/Class[@name="DockPaneCaptionVS2003"]/Construct[@name="(DockPane)"]/*'/> protected internal DockPaneCaptionVS2003(DockPane pane) : base(pane) { SuspendLayout(); Font = SystemInformation.MenuFont; m_buttonClose = new InertButton(ImageCloseEnabled, ImageCloseDisabled); m_buttonAutoHide = new InertButton(); m_buttonClose.ToolTipText = ToolTipClose; m_buttonClose.Anchor = AnchorStyles.Top | AnchorStyles.Right; m_buttonClose.Click += new EventHandler(this.Close_Click); m_buttonAutoHide.ToolTipText = ToolTipAutoHide; m_buttonAutoHide.Anchor = AnchorStyles.Top | AnchorStyles.Right; m_buttonAutoHide.Click += new EventHandler(AutoHide_Click); Controls.AddRange(new Control[] { m_buttonClose, m_buttonAutoHide }); ResumeLayout(); }
internal NestedDockingStatus(DockPane pane) { m_dockPane = pane; }
internal void SetDisplayingStatus(bool isDisplaying, DockPane displayingPrevPane, DockAlignment displayingAlignment, double displayingProportion) { m_isDisplaying = isDisplaying; m_displayingPrevPane = displayingPrevPane; m_displayingAlignment = displayingAlignment; m_displayingProportion = displayingProportion; }
internal void SetStatus(DockList list, DockPane prevPane, DockAlignment alignment, double proportion) { m_dockList = list; m_prevPane = prevPane; m_alignment = alignment; m_proportion = proportion; }
/// <include file='CodeDoc/DockPaneStripBase.xml' path='//CodeDoc/Class[@name="DockPaneStripBase"]/Construct[@name="(DockPane)"]/*'/> protected internal DockPaneStripBase(DockPane pane) { m_dockPane = pane; SetStyle(ControlStyles.Selectable, false); }
internal void Add(DockPane pane) { if (pane == null) return; DockList oldDockList = (pane.DockListContainer == null) ? null : pane.DockListContainer.DockList; if (oldDockList != null) oldDockList.InternalRemove(pane); InnerList.Add(pane); if (oldDockList != null) oldDockList.CheckFloatWindowDispose(); }
public DockPane CreateDockPane(DockContent content, DockPane prevPane, DockAlignment alignment, double proportion, bool show) { return new DockPane(content, prevPane, alignment, proportion, show); }
public FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane) { return new FloatWindow(dockPanel, pane); }
private void InternalAddToDockList(IDockListContainer container, DockPane prevPane, DockAlignment alignment, double proportion) { if ((container.DockState == DockState.Float) != IsFloat) throw new InvalidOperationException(ResourceHelper.GetString("DockPane.AddToDockList.InvalidContainer")); int count = container.DockList.Count; if (container.DockList.Contains(this)) count --; if (prevPane == null && count > 0) throw new InvalidOperationException(ResourceHelper.GetString("DockPane.AddToDockList.NullPrevPane")); if (prevPane != null && !container.DockList.Contains(prevPane)) throw new InvalidOperationException(ResourceHelper.GetString("DockPane.AddToDockList.NoPrevPane")); if (prevPane == this) throw new InvalidOperationException(ResourceHelper.GetString("DockPane.AddToDockList.SelfPrevPane")); IDockListContainer oldContainer = DockListContainer; DockState oldDockState = DockState; container.DockList.Add(this); NestedDockingStatus.SetStatus(container.DockList, prevPane, alignment, proportion); if (DockHelper.IsDockWindowState(DockState)) m_dockState = container.DockState; RefreshStateChange(oldContainer, oldDockState); }
private void InternalConstruct(DockContent content, DockState dockState, bool flagBounds, Rectangle floatWindowBounds, DockPane prevPane, DockAlignment alignment, double proportion, bool show) { if (dockState == DockState.Hidden || dockState == DockState.Unknown) throw new ArgumentException(ResourceHelper.GetString("DockPane.DockState.InvalidState")); if (content == null) throw new ArgumentNullException(ResourceHelper.GetString("DockPane.Constructor.NullContent")); if (content.DockPanel == null) throw new ArgumentException(ResourceHelper.GetString("DockPane.Constructor.NullDockPanel")); SuspendLayout(); SetStyle(ControlStyles.ResizeRedraw, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.DoubleBuffer, true); SetStyle(ControlStyles.Selectable, true); m_isFloat = (dockState == DockState.Float); m_contents = new DockContentCollection(); m_displayingContents = new DockContentCollection(this); m_tabs = new DockPaneTabCollection(this); m_dockPanel = content.DockPanel; m_dockPanel.AddPane(this); m_splitter = new DockPaneSplitter(this); m_nestedDockingStatus = new NestedDockingStatus(this); m_autoHidePane = DockPanel.AutoHidePaneFactory.CreateAutoHidePane(this); m_captionControl = DockPanel.DockPaneCaptionFactory.CreateDockPaneCaption(this); m_tabStripControl = DockPanel.DockPaneStripFactory.CreateDockPaneStrip(this); Controls.AddRange(new Control[] { m_captionControl, m_tabStripControl }); if (flagBounds) FloatWindow = DockPanel.FloatWindowFactory.CreateFloatWindow(DockPanel, this, floatWindowBounds); else if (prevPane != null) AddToDockList(prevPane.DockListContainer, prevPane, alignment, proportion); SetDockState(dockState); if (show) content.Pane = this; else if (this.IsFloat) content.FloatPane = this; else content.PanelPane = this; ResumeLayout(); }
/// <include file='CodeDoc\DockList.xml' path='//CodeDoc/Class[@name="DockList"]/Method[@name="GetDefaultPrevPane(DockPane)"]/*'/> public DockPane GetDefaultPrevPane(DockPane pane) { for (int i=Count-1; i>=0; i--) if (this[i] != pane) return this[i]; return null; }
/// <include file='CodeDoc\DockList.xml' path='//CodeDoc/Class[@name="DockList"]/Method[@name="IndexOf(DockPane)"]/*'/> public int IndexOf(DockPane pane) { return InnerList.IndexOf(pane); }
/// <include file='CodeDoc\DockList.xml' path='//CodeDoc/Class[@name="DockList"]/Method[@name="Contains(DockPane)"]/*'/> public bool Contains(DockPane pane) { return InnerList.Contains(pane); }
private void InternalRemove(DockPane pane) { if (!Contains(pane)) return; NestedDockingStatus statusPane = pane.NestedDockingStatus; DockPane lastNestedPane = null; for (int i=Count - 1; i> IndexOf(pane); i--) { if (this[i].NestedDockingStatus.PrevPane == pane) { lastNestedPane = this[i]; break; } } if (lastNestedPane != null) { int indexLastNestedPane = IndexOf(lastNestedPane); InnerList.Remove(lastNestedPane); InnerList[IndexOf(pane)] = lastNestedPane; NestedDockingStatus lastNestedDock = lastNestedPane.NestedDockingStatus; lastNestedDock.SetStatus(this, statusPane.PrevPane, statusPane.Alignment, statusPane.Proportion); for (int i=indexLastNestedPane - 1; i>IndexOf(lastNestedPane); i--) { NestedDockingStatus status = this[i].NestedDockingStatus; if (status.PrevPane == pane) status.SetStatus(this, lastNestedPane, status.Alignment, status.Proportion); } } else InnerList.Remove(pane); statusPane.SetStatus(null, null, DockAlignment.Left, 0.5); statusPane.SetDisplayingStatus(false, null, DockAlignment.Left, 0.5); statusPane.SetDisplayingBounds(Rectangle.Empty, Rectangle.Empty, Rectangle.Empty); }
internal void Remove(DockPane pane) { InternalRemove(pane); CheckFloatWindowDispose(); }
public AutoHidePane CreateAutoHidePane(DockPane pane) { return new AutoHidePane(pane); }
private void SetActivePane() { DockPane value = (ActiveContent == null ? null : ActiveContent.Pane); if (value == m_activePane) return; if (m_activePane != null) if (m_activePane.IsActivated) DockPanel.Focus(); m_activePane = value; }
public DockPaneCaptionBase CreateDockPaneCaption(DockPane pane) { return new DockPaneCaptionVS2003(pane); }
private void SetVisibleContentsToPane(DockPane pane, DockContent activeContent) { for (int i=0; i<DisplayingContents.Count; i++) { DockContent content = DisplayingContents[i]; if (content.IsDockStateValid(pane.DockState)) { content.Pane = pane; i--; } } if (activeContent != null && pane.DisplayingContents.Contains(activeContent)) pane.ActiveContent = activeContent; }
public DockPaneStripBase CreateDockPaneStrip(DockPane pane) { return new DockPaneStripVS2003(pane); }
/// <include file='CodeDoc\DockPane.xml' path='//CodeDoc/Class[@name="DockPane"]/Method[@name="AddToDockList(IDockListContainer, DockPane, DockAlignment, double)"]/*'/> public DockPane AddToDockList(IDockListContainer container, DockPane prevPane, DockAlignment alignment, double proportion) { if (container == null) throw new InvalidOperationException(ResourceHelper.GetString("DockPane.AddToDockList.NullContainer")); if (container.IsFloat == this.IsFloat) { InternalAddToDockList(container, prevPane, alignment, proportion); return this; } DockContent firstContent = GetFirstContent(container.DockState); if (firstContent == null) return null; DockPane pane; DockPanel.DummyContent.DockPanel = DockPanel; if (container.IsFloat) pane = DockPanel.DockPaneFactory.CreateDockPane(DockPanel.DummyContent, (FloatWindow)container, true); else pane = DockPanel.DockPaneFactory.CreateDockPane(DockPanel.DummyContent, container.DockState, true); pane.AddToDockList(container, prevPane, alignment, proportion); SetVisibleContentsToPane(pane); DockPanel.DummyContent.DockPanel = null; return pane; }
public FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane, Rectangle bounds) { return new FloatWindow(dockPanel, pane, bounds); }
/// <include file='CodeDoc\DockPane.xml' path='//CodeDoc/Class[@name="DockPane"]/Constructor[@name="(DockContent, DockPane, DockAlignment, double, bool)"]/*'/> public DockPane(DockContent content, DockPane prevPane, DockAlignment alignment, double proportion, bool show) { if (prevPane == null) throw(new ArgumentNullException()); InternalConstruct(content, prevPane.DockState, false, Rectangle.Empty, prevPane, alignment, proportion, show); }
private void SetVisibleContentsToPane(DockPane pane) { SetVisibleContentsToPane(pane, ActiveContent); }
public DockPaneSplitter(DockPane pane) { SetStyle(ControlStyles.Selectable, false); m_pane = pane; }