当前位置: 首页>>代码示例>>C#>>正文


C# Docking.DockFrame类代码示例

本文整理汇总了C#中MonoDevelop.Components.Docking.DockFrame的典型用法代码示例。如果您正苦于以下问题:C# DockFrame类的具体用法?C# DockFrame怎么用?C# DockFrame使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DockFrame类属于MonoDevelop.Components.Docking命名空间,在下文中一共展示了DockFrame类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DockItemContainer

		public DockItemContainer (DockFrame frame, DockItem item)
		{
			this.item = item;

			mainBox = new VBox ();
			Add (mainBox);

			mainBox.ResizeMode = Gtk.ResizeMode.Queue;
			mainBox.Spacing = 0;
			
			ShowAll ();
			
			mainBox.PackStart (item.GetToolbar (PositionType.Top).Container, false, false, 0);
			
			HBox hbox = new HBox ();
			hbox.Show ();
			hbox.PackStart (item.GetToolbar (PositionType.Left).Container, false, false, 0);
			
			contentBox = new HBox ();
			contentBox.Show ();
			hbox.PackStart (contentBox, true, true, 0);
			
			hbox.PackStart (item.GetToolbar (PositionType.Right).Container, false, false, 0);
			
			mainBox.PackStart (hbox, true, true, 0);
			
			mainBox.PackStart (item.GetToolbar (PositionType.Bottom).Container, false, false, 0);
		}
开发者ID:wickedshimmy,项目名称:monodevelop,代码行数:28,代码来源:DockItemContainer.cs

示例2: AutoHideBox

		public AutoHideBox (DockFrame frame, DockItem item, Gtk.PositionType pos, int size)
		{
			this.position = pos;
			this.frame = frame;
			this.targetSize = size;
			horiz = pos == PositionType.Left || pos == PositionType.Right;
			startPos = pos == PositionType.Top || pos == PositionType.Left;
			Events = Events | Gdk.EventMask.EnterNotifyMask | Gdk.EventMask.LeaveNotifyMask;
			
			Box fr;
			CustomFrame cframe = new CustomFrame ();
			switch (pos) {
				case PositionType.Left: cframe.SetMargins (1, 1, 0, 1); break;
				case PositionType.Right: cframe.SetMargins (1, 1, 1, 0); break;
				case PositionType.Top: cframe.SetMargins (0, 1, 1, 1); break;
				case PositionType.Bottom: cframe.SetMargins (1, 0, 1, 1); break;
			}
			EventBox sepBox = new EventBox ();
			cframe.Add (sepBox);
			
			if (horiz) {
				fr = new HBox ();
				sepBox.Realized += delegate { sepBox.GdkWindow.Cursor = resizeCursorW; };
				sepBox.WidthRequest = gripSize;
			} else {
				fr = new VBox ();
				sepBox.Realized += delegate { sepBox.GdkWindow.Cursor = resizeCursorH; };
				sepBox.HeightRequest = gripSize;
			}
			
			sepBox.Events = EventMask.AllEventsMask;
			
			if (pos == PositionType.Left || pos == PositionType.Top)
				fr.PackEnd (cframe, false, false, 0);
			else
				fr.PackStart (cframe, false, false, 0);

			Add (fr);
			ShowAll ();
			Hide ();
			
			scrollable = new ScrollableContainer ();
			scrollable.ScrollMode = false;
			scrollable.Show ();

			if (item.Widget.Parent != null) {
				((Gtk.Container)item.Widget.Parent).Remove (item.Widget);
			}

			item.Widget.Show ();
			scrollable.Add (item.Widget);
			fr.PackStart (scrollable, true, true, 0);
			
			sepBox.ButtonPressEvent += OnSizeButtonPress;
			sepBox.ButtonReleaseEvent += OnSizeButtonRelease;
			sepBox.MotionNotifyEvent += OnSizeMotion;
			sepBox.ExposeEvent += OnGripExpose;
			sepBox.EnterNotifyEvent += delegate { insideGrip = true; sepBox.QueueDraw (); };
			sepBox.LeaveNotifyEvent += delegate { insideGrip = false; sepBox.QueueDraw (); };
		}
开发者ID:JamesChan,项目名称:monodevelop,代码行数:60,代码来源:AutoHideBox.cs

示例3: DockContainer

        public DockContainer(DockFrame frame)
        {
            Mono.TextEditor.GtkWorkarounds.FixContainerLeak (this);

            this.Events = EventMask.ButtonPressMask | EventMask.ButtonReleaseMask | EventMask.PointerMotionMask | EventMask.LeaveNotifyMask;
            this.frame = frame;
        }
开发者ID:Kalnor,项目名称:monodevelop,代码行数:7,代码来源:DockContainer.cs

示例4: Initialize

        public void Initialize(DockFrame workspace, Menu padMenu)
        {
            var layers = new LayersListWidget ();
            DockItem layers_item = workspace.AddItem ("Layers");
            DockItemToolbar layers_tb = layers_item.GetToolbar (PositionType.Bottom);

            layers_item.Label = Catalog.GetString ("Layers");
            layers_item.Content = layers;
            layers_item.Icon = PintaCore.Resources.GetIcon ("Menu.Layers.MergeLayerDown.png");
            layers_item.Behavior |= DockItemBehavior.CantClose;

            layers_tb.Add (PintaCore.Actions.Layers.AddNewLayer.CreateDockToolBarItem ());
            layers_tb.Add (PintaCore.Actions.Layers.DeleteLayer.CreateDockToolBarItem ());
            layers_tb.Add (PintaCore.Actions.Layers.DuplicateLayer.CreateDockToolBarItem ());
            layers_tb.Add (PintaCore.Actions.Layers.MergeLayerDown.CreateDockToolBarItem ());
            layers_tb.Add (PintaCore.Actions.Layers.MoveLayerUp.CreateDockToolBarItem ());
            layers_tb.Add (PintaCore.Actions.Layers.MoveLayerDown.CreateDockToolBarItem ());

            Gtk.ToggleAction show_layers = padMenu.AppendToggleAction ("Layers", Catalog.GetString ("Layers"), null, "Menu.Layers.MergeLayerDown.png");
            show_layers.Activated += delegate { layers_item.Visible = show_layers.Active; };
            layers_item.VisibleChanged += delegate { show_layers.Active = layers_item.Visible; };

            show_layers.Active = layers_item.Visible;

            PintaCore.Workspace.ActiveDocumentChanged += delegate { layers.Reset (); };
        }
开发者ID:JoeyScarr,项目名称:Pinta,代码行数:26,代码来源:LayersPad.cs

示例5: MainWindow

        /// <summary>
        /// Initializes a new instance of the <see cref="TraceLab.UI.GTK.MainWindow"/> class.
        /// </summary>
        public MainWindow(ApplicationContext dataContext)
        {
            m_applicationContext = dataContext;

            // Init dock frame
            m_dockFrame = new DockFrame();
            m_dockFrame.CompactGuiLevel = 5;

            // Init component info panel
            m_infoPanelFactory = new InfoPanelFactory(m_applicationContext, m_dockFrame);

            //build the window
            CreateWindow();
            
            //set window application view model to all UI panels in current chrome
            //note, that application vm should not be set before m_windowShell.ShowAll is called
            SetApplicationViewModel(m_applicationContext.Application);
            
            // initiate action handlers for all actions in application
            new ActionHandlers(dataContext);
            
            //attach handler to closing event of a main window
            this.WindowShell.DeleteEvent += MainWindow_DeleteEvent;
            
            m_mainWindowCounter++;
        }
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:29,代码来源:MainWindow.cs

示例6: Initialize

        public void Initialize(DockFrame dockframe){
            m_dockFrame = dockframe;
            m_experimentPad = m_dockFrame.AddItem ("ExperimentPad");
            m_experimentPad.Label = Catalog.GetString ("ExperimentPad");
            m_experimentPad.Behavior = DockItemBehavior.Locked;
            m_experimentPad.Expand = true;
            m_experimentPad.DrawFrame = false;

            m_initialized = true;
        }
开发者ID:CoEST,项目名称:TraceLab,代码行数:10,代码来源:ExperimentCanvasPad.cs

示例7: Initialize

        /// <summary>
        /// Initialize the window pad in the given dock frame.
        /// </summary>
        /// <param name='dockFrame'>
        /// Dock frame.
        /// </param>
        public void Initialize(DockFrame dockFrame)
        {
            m_dockFrame = dockFrame;
            DockItem workspaceDockingWindow = m_dockFrame.AddItem("Workspace");
            workspaceDockingWindow.Label = Catalog.GetString("Workspace");
            workspaceDockingWindow.DefaultLocation = "ComponentsLibrary/Center";
            workspaceDockingWindow.Behavior |= DockItemBehavior.CantClose;

            workspaceDockingWindow.Content = CreateWorkspaceView();

            m_initialized = true;
        }
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:18,代码来源:WorkspaceWindowPad.cs

示例8: TabStrip

		public TabStrip (DockFrame frame)
		{
			VBox vbox = new VBox ();
			box = new TabStripBox () { TabStrip = this };
			vbox.PackStart (box, false, false, 0);
		//	vbox.PackStart (bottomFiller, false, false, 0);
			Add (vbox);
			ShowAll ();
			bottomFiller.Hide ();
			BottomPadding = 3;
			WidthRequest = 0;
			box.Removed += HandleRemoved;
		}
开发者ID:vvarshne,项目名称:monodevelop,代码行数:13,代码来源:TabStrip.cs

示例9: PlaceholderWindow

		public PlaceholderWindow (DockFrame frame): base (Gtk.WindowType.Popup)
		{
			SkipTaskbarHint = true;
			Decorated = false;
			TransientFor = (Gtk.Window) frame.Toplevel;
			TypeHint = WindowTypeHint.Utility;
			
			// Create the mask for the arrow
			
			Realize ();
			redgc = new Gdk.GC (GdkWindow);
	   		redgc.RgbFgColor = frame.Style.Background (StateType.Selected);
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:13,代码来源:PlaceholderWindow.cs

示例10: Initialize

        /// <summary>
        /// Initialize the window pad in the given dock frame.
        /// </summary>
        /// <param name='dockFrame'>
        /// Dock frame.
        /// </param>
        public void Initialize(DockFrame dockFrame)
        {
            if (this.dockFrame != null)
                throw new ApplicationException ("This DockPad has already been initialized");
            if (dockFrame == null)
                throw new ArgumentNullException ("Provided DockFrame is null");
            this.dockFrame = dockFrame;

            DockItem componentLibraryDock = dockFrame.AddItem("ComponentsLibrary");
            componentLibraryDock.Label = Catalog.GetString("Components Library");
            componentLibraryDock.Behavior |= DockItemBehavior.CantClose;
            componentLibraryDock.DefaultWidth = 200;
            componentLibraryDock.Content = widget;
        }
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:20,代码来源:ComponentsLibraryPad.cs

示例11: TabStrip

		public TabStrip (DockFrame frame)
		{
			this.frame = frame;
			frame.ShadedContainer.Add (this);
			VBox vbox = new VBox ();
			box = new HBox ();
			vbox.PackStart (box, false, false, 0);
			vbox.PackStart (bottomFiller, false, false, 0);
			AppendPage (vbox, null);
			ShowBorder = false;
			ShowTabs = false;
			ShowAll ();
			bottomFiller.Hide ();
			BottomPadding = 3;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:15,代码来源:TabStrip.cs

示例12: DockItemTitleTab

		public DockItemTitleTab (DockItem item, DockFrame frame)
		{
			this.item = item;
			this.frame = frame;
			this.VisibleWindow = false;
			UpdateVisualStyle ();
			NoShowAll = true;


			Events |= Gdk.EventMask.EnterNotifyMask | Gdk.EventMask.LeaveNotifyMask | Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask | Gdk.EventMask.PointerMotionMask;
			KeyPressEvent += HeaderKeyPress;
			KeyReleaseEvent += HeaderKeyRelease;

			this.SubscribeLeaveEvent (OnLeave);
		}
开发者ID:segaman,项目名称:monodevelop,代码行数:15,代码来源:DockItemTitleTab.cs

示例13: Initialize

        public void Initialize(DockFrame workspace, Menu padMenu)
        {
            DockItem toolbox_item = workspace.AddItem ("Toolbox");
            ToolBoxWidget toolbox = new ToolBoxWidget () { Name = "toolbox" };

            toolbox_item.Label = Catalog.GetString ("Tools");
            toolbox_item.Content = toolbox;
            toolbox_item.Icon = PintaCore.Resources.GetIcon ("Tools.Pencil.png");
            toolbox_item.Behavior |= DockItemBehavior.CantClose;
            toolbox_item.DefaultWidth = 65;

            Gtk.ToggleAction show_toolbox = padMenu.AppendToggleAction ("Tools", Catalog.GetString ("Tools"), null, "Tools.Pencil.png");
            show_toolbox.Activated += delegate { toolbox_item.Visible = show_toolbox.Active; };
            toolbox_item.VisibleChanged += delegate { show_toolbox.Active = toolbox_item.Visible; };

            show_toolbox.Active = toolbox_item.Visible;
        }
开发者ID:jobernolte,项目名称:Pinta,代码行数:17,代码来源:ToolBoxPad.cs

示例14: Initialize

        /// <summary>
        /// Initialize the window pad in the given dock frame.
        /// </summary>
        /// <param name='dockFrame'>
        /// Dock frame.
        /// </param>
        public void Initialize(DockFrame dockFrame)
        {
            m_dockFrame = dockFrame;
            DockItem componentLibraryDockingWindow = m_dockFrame.AddItem("ComponentsLibrary");
            componentLibraryDockingWindow.Label = Catalog.GetString("Components Library");
            componentLibraryDockingWindow.Behavior |= DockItemBehavior.CantClose;
            componentLibraryDockingWindow.DefaultWidth = 200;

            componentLibraryDockingWindow.Content = CreateComponentsTreeView();

            //DockItemToolbar libraryToolbar = componentLibraryDockingWindow.GetToolbar(PositionType.Top);
            //libraryToolbar.Add(ApplicationUICore.Actions.ComponentLibrary.Rescan.CreateDockToolBarItem());

            EnableDrag();

            m_initialized = true;
        }
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:23,代码来源:ComponentsLibraryPad.cs

示例15: Initialize

        public void Initialize(DockFrame workspace, Menu padMenu)
        {
            var history = new HistoryTreeView ();
            DockItem history_item = workspace.AddItem ("History");
            DockItemToolbar history_tb = history_item.GetToolbar (PositionType.Bottom);

            history_item.Label = Catalog.GetString ("History");
            history_item.DefaultLocation = "Images/Bottom";
            history_item.Content = history;
            history_item.Icon = PintaCore.Resources.GetIcon ("Menu.Layers.DuplicateLayer.png");

            history_tb.Add (PintaCore.Actions.Edit.Undo.CreateDockToolBarItem ());
            history_tb.Add (PintaCore.Actions.Edit.Redo.CreateDockToolBarItem ());
            Gtk.ToggleAction show_history = padMenu.AppendToggleAction ("History", Catalog.GetString ("History"), null, "Menu.Layers.DuplicateLayer.png");
            show_history.Activated += delegate { history_item.Visible = show_history.Active; };
            history_item.VisibleChanged += delegate { show_history.Active = history_item.Visible; };

            show_history.Active = history_item.Visible;
        }
开发者ID:jobernolte,项目名称:Pinta,代码行数:19,代码来源:HistoryPad.cs


注:本文中的MonoDevelop.Components.Docking.DockFrame类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。