Source/GenericItemContainer.cs

(开头部分) 76KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

namespace DevComponents.DotNetBar
{
    using System;
	using System.Drawing;
	using System.Collections;
    using System.Windows.Forms;
	
	/// <summary>
    ///  Defines the generic container item that is used by toolbar, menu bar and other control for item layout.
    /// </summary>
    [System.ComponentModel.ToolboxItem(false),System.ComponentModel.DesignTimeVisible(false)]
    public class GenericItemContainer:ImageItem, IDesignTimeProvider
    {
        #region Private Variables
        protected int m_PaddingLeft, m_PaddingTop, m_PaddingBottom, m_PaddingRight, m_ItemSpacing;
        private int m_FirstItemSpacing = 0;
		protected eBorderType m_BorderType;
		protected internal Color m_BackgroundColor;
		protected bool m_WrapItems;
		protected DisplayMoreItem m_MoreItems;
		private bool m_MoreItemsOnMenu;
		private bool m_EqualButtonSize;
		private int m_DisplayedItems=0;

		//private bool m_Stretch;
		private bool m_SystemContainer;
		private bool m_HaveCustomizeItem=false;

		private eLayoutType m_LayoutType=eLayoutType.Toolbar;

		private bool m_Scroll=false;  // Indicates whether we use scrolling in container. Applies only to the "Task List" container.
		private int m_ScrollTopPosition=0; // Indicates the first visible item from the top when scroll is used.
		private bool m_TopScroll=false, m_BottomScroll=false;
		private ScrollButton m_TopScrollButton=null,m_BottomScrollButton=null;

		// Used to eat the mouse move messages when user is using the keyboard to browse through the
		// top level menus. The problem was that on each repaint the mouse move was fired even though the
		// mouse did not move at all. So if mouse was over an menu item it was not possible to switch to the
		// new menu item becouse mouse was "holding" the focus.
		private bool m_IgnoreDuplicateMouseMove=false;
		private System.Windows.Forms.MouseEventArgs m_LastMouseMoveEvent=null;
		private int m_MinWidth=0, m_MinHeight=0;
		private bool m_Painting=false;
		private bool m_EventHeight=true;
		private bool m_UseMoreItemsButton=true;
        private eContainerVerticalAlignment m_ToolbarItemsAlign = eContainerVerticalAlignment.Bottom;
        private bool m_TrackSubItemsImageSize = true;
        #endregion

        #region Events
        /// <summary>
        /// Occurs when new item is added to the container.
        /// </summary>
        internal EventHandler ItemAdded;
        #endregion

        public GenericItemContainer()
        {
			// We contain other controls
			m_IsContainer=true;
后面还有 2470 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。