Example #1
0
		protected override Region GetTabsRegion(TabsCollection tabs, TabItem lastTab)
		{
			bool bFirstVisible=true;
			Region tabRegion=new Region();
			tabRegion.MakeEmpty();
			foreach(TabItem tab in tabs)
			{
				if(!tab.Visible)
					continue;				
				GraphicsPath path=GetTabItemPath(tab,bFirstVisible,(tab==lastTab));
				tabRegion.Union(path);
				bFirstVisible=false;
			}
			return tabRegion;
		}
Example #2
0
		protected virtual Region GetTabsRegion(TabsCollection tabs, TabItem lastTab)
		{
			return null;
		}
Example #3
0
		protected virtual TabItem GetLastVisibleTab(TabsCollection tabs)
		{
			int c=tabs.Count-1;
			for(int i=c;i>=0;i--)
			{
				if(tabs[i].Visible)
					return tabs[i];
			}

			return null;
		}
Example #4
0
		/// <summary>
		/// Default constructor.
		/// </summary>
		public TabStrip()
		{
			if(!ColorFunctions.ColorsLoaded)
			{
				NativeFunctions.RefreshSettings();
				NativeFunctions.OnDisplayChange();
				ColorFunctions.LoadColors();
			}
			m_Tabs=new TabsCollection(this);
			this.SetStyle(ControlStyles.Selectable,true);
			this.SetStyle(ControlStyles.UserPaint,true);
			this.SetStyle(ControlStyles.Opaque,true);
            this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
			this.SetStyle(DisplayHelp.DoubleBufferFlag,true);
            this.SetStyle(ControlStyles.AllPaintingInWmPaint,true);
			this.SetStyle(ControlStyles.ResizeRedraw,true);

			m_TabSystemBox=new TabSystemBox(this);
			m_TabSystemBox.Back+=new EventHandler(this.OnTabBack);
			m_TabSystemBox.Close+=new EventHandler(this.OnTabClose);
			m_TabSystemBox.Forward+=new EventHandler(this.OnTabForward);

			m_ColorScheme=new TabColorScheme(m_Style);
			m_ColorScheme.ColorChanged+=new EventHandler(this.ColorSchemeChanged);

            StyleManager.Register(this);
		}