Пример #1
0
 public RuntimeMutableModel(MainToolbarController controller, object command)
 {
     var ci = IdeApp.CommandService.GetCommandInfo (command, new CommandTargetRoute (controller.lastCommandTarget));
     Visible = ci.Visible;
     Enabled = ci.Enabled;
     DisplayString = FullDisplayString = RemoveUnderline (ci.Text);
 }
Пример #2
0
 public RuntimeModel(MainToolbarController controller, ActionCommand command)
     : this(controller)
 {
     Command = command.Id;
     image = command.Icon;
     tooltip = command.Description;
 }
Пример #3
0
 public RuntimeModel(MainToolbarController controller, ExecutionTarget target, bool fullText, SolutionItem project) : this(controller)
 {
     if (target == null)
     {
         throw new ArgumentNullException(nameof(target));
     }
     ExecutionTarget = target;
     this.fullText   = fullText;
     Project         = project;
 }
Пример #4
0
 public RuntimeModel(MainToolbarController controller, ExecutionTarget target, RuntimeModel parent) : this(controller, target)
 {
     if (parent == null)
     {
         HasParent = false;
     }
     else
     {
         HasParent          = true;
         parent.HasChildren = true;
         parent.AddChild(this);
     }
 }
Пример #5
0
			public RuntimeModel (MainToolbarController controller, ExecutionTarget target) : this (controller)
			{
				ExecutionTarget = target;
			}
Пример #6
0
			public RuntimeModel (MainToolbarController controller, ActionCommand command) : this (controller)
			{
				Command = command.Id;
			}
Пример #7
0
			RuntimeModel (MainToolbarController controller)
			{
				Controller = controller;
			}
Пример #8
0
			public RuntimeModel (MainToolbarController controller, ExecutionTarget target, bool fullText, SolutionItem project) : this (controller)
			{
				if (target == null)
					throw new ArgumentNullException (nameof (target));
				ExecutionTarget = target;
				this.fullText = fullText;
				Project = project;
			}
Пример #9
0
 public RuntimeModel(MainToolbarController controller, ActionCommand command) : this(controller)
 {
     Command = command.Id;
 }
Пример #10
0
 RuntimeModel(MainToolbarController controller)
 {
     Controller = controller;
 }
Пример #11
0
 public ButtonBarButton(MainToolbarController controller, string commandId) : this(controller)
 {
     CommandId = commandId;
 }
Пример #12
0
 public RuntimeModel(MainToolbarController controller, ExecutionTarget target) : this(controller)
 {
     ExecutionTarget = target;
     Enabled         = !(ExecutionTarget is ExecutionTargetGroup);
     Visible         = true;
 }
Пример #13
0
 public RuntimeModel(MainToolbarController controller, ExecutionTarget target) : this(controller)
 {
     ExecutionTarget = target;
 }
Пример #14
0
			public RuntimeModel (MainToolbarController controller, ExecutionTarget target) : this (controller)
			{
				ExecutionTarget = target;
				Enabled = !(ExecutionTarget is ExecutionTargetGroup);
				Visible = true;
			}
Пример #15
0
			public RuntimeModel (MainToolbarController controller, ExecutionTarget target, RuntimeModel parent) : this (controller, target)
			{
				if (parent == null)
					HasParent = false;
				else {
					HasParent = true;
					parent.HasChildren = true;
					parent.AddChild (this);
				}
			}
Пример #16
0
			public RuntimeMutableModel (MainToolbarController controller, object command)
			{
				var ci = IdeApp.CommandService.GetCommandInfo (command, new CommandTargetRoute (controller.lastCommandTarget));
				Visible = ci.Visible;
				Enabled = ci.Enabled;
				DisplayString = FullDisplayString = RemoveUnderline (ci.Text);
			}
Пример #17
0
		internal static void AttachMainToolbar (Gtk.VBox parent, MainToolbarController toolbar)
		{
			PlatformService.AttachMainToolbar (parent, toolbar.ToolbarView);
			toolbar.Initialize ();
		}
Пример #18
0
 public ButtonBarButton(MainToolbarController controller)
 {
     Controller = controller;
 }
Пример #19
0
		void CreateComponents ()
		{
			fullViewVBox = new VBox (false, 0);
			rootWidget = fullViewVBox;
			
			InstallMenuBar ();
			Realize ();
			toolbar = DesktopService.CreateMainToolbar (this);
			DesktopService.SetMainWindowDecorations (this);
			DesktopService.AttachMainToolbar (fullViewVBox, toolbar);
			toolbarFrame = new CommandFrame (IdeApp.CommandService);

			fullViewVBox.PackStart (toolbarFrame, true, true, 0);

			// Create the docking widget and add it to the window.
			dock = new DockFrame ();
			dock.LayoutChanged += LayoutChanged;

			dock.CompactGuiLevel = ((int)IdeApp.Preferences.WorkbenchCompactness.Value) + 1;
			IdeApp.Preferences.WorkbenchCompactness.Changed += delegate {
				dock.CompactGuiLevel = ((int)IdeApp.Preferences.WorkbenchCompactness.Value) + 1;
			};
			
			/* Side bar is experimental. Disabled for now
			HBox hbox = new HBox ();
			VBox sideBox = new VBox ();
			sideBox.PackStart (new SideBar (workbench, Orientation.Vertical), false, false, 0);
			hbox.PackStart (sideBox, false, false, 0);
			hbox.ShowAll ();
			sideBox.NoShowAll = true;
			hbox.PackStart (dock, true, true, 0);
			DockBar bar = dock.ExtractDockBar (PositionType.Left);
			bar.AlwaysVisible = true;
			sideBox.PackStart (bar, true, true, 0);
			toolbarFrame.AddContent (hbox);
			*/

			toolbarFrame.Add (dock);
			
			// Create the notebook for the various documents.
			tabControl = new SdiDragNotebook (this);

			DockNotebook.ActiveNotebookChanged += delegate {
				OnActiveWindowChanged (null, null);
			};

			Add (fullViewVBox);
			fullViewVBox.ShowAll ();
			bottomBar = new MonoDevelopStatusBar ();
			fullViewVBox.PackEnd (bottomBar, false, true, 0);
			bottomBar.ShowAll ();

			// In order to get the correct bar height we need to calculate the tab size using the
			// correct style (the style of the window). At this point the widget is not yet a child
			// of the window, so its style is not yet the correct one.
			tabControl.InitSize ();

			// The main document area
			documentDockItem = dock.AddItem ("Documents");
			documentDockItem.Behavior = DockItemBehavior.Locked;
			documentDockItem.Expand = true;
			documentDockItem.DrawFrame = false;
			documentDockItem.Label = GettextCatalog.GetString ("Documents");
			documentDockItem.Content = new DockNotebookContainer (tabControl, true);

			LoadDockStyles ();
			Styles.Changed += (sender, e) => LoadDockStyles ();

			// Add some hiden items to be used as position reference
			DockItem dit = dock.AddItem ("__left");
			dit.DefaultLocation = "Documents/Left";
			dit.Behavior = DockItemBehavior.Locked;
			dit.DefaultVisible = false;
			
			dit = dock.AddItem ("__right");
			dit.DefaultLocation = "Documents/Right";
			dit.Behavior = DockItemBehavior.Locked;
			dit.DefaultVisible = false;
			
			dit = dock.AddItem ("__top");
			dit.DefaultLocation = "Documents/Top";
			dit.Behavior = DockItemBehavior.Locked;
			dit.DefaultVisible = false;
			
			dit = dock.AddItem ("__bottom");
			dit.DefaultLocation = "Documents/Bottom";
			dit.Behavior = DockItemBehavior.Locked;
			dit.DefaultVisible = false;

			if (MonoDevelop.Core.Platform.IsMac)
				bottomBar.HasResizeGrip = true;
			else {
				if (GdkWindow != null && GdkWindow.State == Gdk.WindowState.Maximized)
					bottomBar.HasResizeGrip = false;
				SizeAllocated += delegate {
					if (GdkWindow != null)
						bottomBar.HasResizeGrip = GdkWindow.State != Gdk.WindowState.Maximized;
				};
			}

			// create DockItems for all the pads
			ExtensionNodeList padCodons = AddinManager.GetExtensionNodes (viewContentPath);
			foreach (ExtensionNode node in padCodons)
				ShowPadNode (node);

			try {
				if (System.IO.File.Exists (configFile)) {
					dock.LoadLayouts (configFile);
					foreach (string layout in dock.Layouts) {
						if (!layouts.Contains (layout) && !layout.EndsWith (fullViewModeTag))
							layouts.Add (layout);
					}
				}
			} catch (Exception ex) {
				LoggingService.LogError (ex.ToString ());
			}
		}
Пример #20
0
 public RuntimeModel(MainToolbarController controller, string displayText) : this(controller)
 {
     DisplayText = displayText;
 }
Пример #21
0
			public ButtonBarButton (MainToolbarController controller, string commandId) : this (controller)
			{
				CommandId = commandId;
			}
Пример #22
0
			public ButtonBarButton (MainToolbarController controller)
			{
				Controller = controller;
			}
Пример #23
0
			public RuntimeModel (MainToolbarController controller, string displayText) : this (controller)
			{
				DisplayText = displayText;
			}