예제 #1
0
        VBox CreateCategory(string categoryName, string categoryContentMarkup)
        {
            var vbox = new VBox();

            vbox.Spacing = 2;

            var catLabel = new MonoDevelop.Components.FixedWidthWrapLabel();

            catLabel.Text = categoryName;
            catLabel.ModifyFg(StateType.Normal, (HslColor)foreColor);

            vbox.PackStart(catLabel, false, true, 0);

            var contentLabel = new MonoDevelop.Components.FixedWidthWrapLabel();

            contentLabel.MaxWidth           = Math.Max(440, this.Allocation.Width);
            contentLabel.Wrap               = Pango.WrapMode.WordChar;
            contentLabel.BreakOnCamelCasing = true;
            contentLabel.BreakOnPunctuation = true;
            contentLabel.Markup             = categoryContentMarkup.Trim();
            contentLabel.ModifyFg(StateType.Normal, (HslColor)foreColor);

            vbox.PackStart(contentLabel, true, true, 0);

            return(vbox);
        }
예제 #2
0
        public ParameterInformationWindow()
        {
            TypeHint             = Gdk.WindowTypeHint.Tooltip;
            this.SkipTaskbarHint = true;
            this.SkipPagerHint   = true;
            this.AllowShrink     = false;
            this.AllowGrow       = false;
            this.CanFocus        = false;
            this.CanDefault      = false;
            WindowTransparencyDecorator.Attach(this);

            headlabel        = new MonoDevelop.Components.FixedWidthWrapLabel();
            headlabel.Indent = -20;

            headlabel.FontDescription = FontService.GetFontDescription("Editor").CopyModified(1.1);

            headlabel.Wrap = Pango.WrapMode.WordChar;
            headlabel.BreakOnCamelCasing = false;
            headlabel.BreakOnPunctuation = false;
            descriptionBox.Spacing       = 4;
            VBox vb = new VBox(false, 0);

            vb.PackStart(headlabel, true, true, 0);
            vb.PackStart(descriptionBox, true, true, 0);

            HBox hb = new HBox(false, 0);

            hb.PackStart(vb, true, true, 0);

            vb2.Spacing = 4;
            vb2.PackStart(hb, true, true, 0);
            ContentBox.Add(vb2);
            ShowAll();
            DesktopService.RemoveWindowShadow(this);
        }
		public ParameterInformationWindow ()
		{
			TypeHint = Gdk.WindowTypeHint.Tooltip;
			this.SkipTaskbarHint = true;
			this.SkipPagerHint = true;
			this.AllowShrink = false;
			this.AllowGrow = false;
			this.CanFocus = false;
			this.CanDefault = false;
			WindowTransparencyDecorator.Attach (this);

			headlabel = new MonoDevelop.Components.FixedWidthWrapLabel ();
			headlabel.Indent = -20;

			headlabel.FontDescription = FontService.GetFontDescription ("Editor").CopyModified (1.1);
			
			headlabel.Wrap = Pango.WrapMode.WordChar;
			headlabel.BreakOnCamelCasing = false;
			headlabel.BreakOnPunctuation = false;
			descriptionBox.Spacing = 4;
			VBox vb = new VBox (false, 0);
			vb.PackStart (headlabel, true, true, 0);
			vb.PackStart (descriptionBox, true, true, 0);
			
			HBox hb = new HBox (false, 0);
			hb.PackStart (vb, true, true, 0);
			
			vb2.Spacing = 4;
			vb2.PackStart (hb, true, true, 0);
			ContentBox.Add (vb2);
			ShowAll ();
			DesktopService.RemoveWindowShadow (this);
		}
예제 #4
0
        public ParameterInformationWindow()
        {
            WindowTransparencyDecorator.Attach(this);

            headlabel        = new MonoDevelop.Components.FixedWidthWrapLabel();
            headlabel.Indent = -20;

            headlabel.Wrap = Pango.WrapMode.WordChar;
            headlabel.BreakOnCamelCasing = false;
            headlabel.BreakOnPunctuation = false;
            descriptionBox.Spacing       = 4;
            VBox vb = new VBox(false, 0);

            vb.PackStart(headlabel, true, true, 0);
            vb.PackStart(descriptionBox, true, true, 0);

            HBox hb = new HBox(false, 0);

            hb.PackStart(vb, true, true, 0);

            vb2.Spacing = 4;
            vb2.PackStart(hb, true, true, 0);
            Content = BackendHost.ToolkitEngine.WrapWidget(vb2, Xwt.NativeWidgetSizing.DefaultPreferredSize);

            UpdateStyle();
            Styles.Changed += HandleThemeChanged;
            IdeApp.Preferences.ColorScheme.Changed += HandleThemeChanged;

            vb2.ShowAll();
            //DesktopService.RemoveWindowShadow (this);
            Content.BoundsChanged += Content_BoundsChanged;
        }
        void ShowOverload()
        {
            ClearDescriptions();

            if (current_overload >= 0 && current_overload < overloads.Count)
            {
                var o = overloads[current_overload];
                headlabel.BreakOnCamelCasing = false;
                headlabel.BreakOnPunctuation = false;
                headlabel.Markup             = o.SignatureMarkup;
                headlabel.Visible            = true;

                if (Theme.DrawPager && overloads.Count > 1)
                {
                    headlabel.WidthRequest = headlabel.RealWidth + 70;
                }
                else
                {
                    headlabel.WidthRequest = -1;
                }
                foreach (var cat in o.Categories)
                {
                    descriptionBox.PackStart(CreateCategory(cat.Item1, cat.Item2), true, true, 4);
                }

                if (!string.IsNullOrEmpty(o.SummaryMarkup))
                {
                    descriptionBox.PackStart(CreateCategory(GettextCatalog.GetString("Summary"), o.SummaryMarkup), true, true, 4);
                }
                if (!string.IsNullOrEmpty(o.FooterMarkup))
                {
                    var contentLabel = new MonoDevelop.Components.FixedWidthWrapLabel();
                    contentLabel.Wrap = Pango.WrapMode.WordChar;
                    contentLabel.BreakOnCamelCasing = true;
                    contentLabel.MaxWidth           = 400;
                    contentLabel.BreakOnPunctuation = true;
                    contentLabel.Markup             = o.FooterMarkup.Trim();
                    contentLabel.ModifyFg(StateType.Normal, (HslColor)foreColor);

                    descriptionBox.PackEnd(contentLabel, true, true, 4);
                }

                if (string.IsNullOrEmpty(o.SummaryMarkup) && string.IsNullOrEmpty(o.FooterMarkup) && !o.Categories.Any())
                {
                    descriptionBox.Hide();
                }
                else
                {
                    descriptionBox.ShowAll();
                }
                Theme.CurrentPage = current_overload;
                QueueResize();
            }
        }
예제 #6
0
        private void CreateSignatureTextView()
        {
            IEditorOptions options = _componentContext.EditorOptionsFactoryService.CreateOptions();

            _signatureTextBuffer         = _componentContext.TextBufferFactoryService.CreateTextBuffer();
            _signatureWpfTextView        = new MonoDevelop.Components.FixedWidthWrapLabel();
            _signatureWpfTextView.Indent = -20;

            _signatureWpfTextView.Wrap = Pango.WrapMode.WordChar;
            _signatureWpfTextView.BreakOnCamelCasing = false;
            _signatureWpfTextView.BreakOnPunctuation = false;
        }
예제 #7
0
        public DeclarationViewWindow() : base()
        {
            this.AllowShrink = false;
            this.AllowGrow   = false;

            EnableTransparencyControl = true;

            headlabel                    = new MonoDevelop.Components.FixedWidthWrapLabel();
            headlabel.Indent             = -20;
            headlabel.Wrap               = Pango.WrapMode.WordChar;
            headlabel.BreakOnCamelCasing = true;
            headlabel.BreakOnPunctuation = true;

            bodylabel      = new MonoDevelop.Components.FixedWidthWrapLabel();
            bodylabel.Wrap = Pango.WrapMode.WordChar;
            bodylabel.BreakOnCamelCasing = true;
            bodylabel.BreakOnPunctuation = true;

            VBox vb = new VBox(false, 0);

            vb.PackStart(headlabel, true, true, 0);
            vb.PackStart(bodylabel, true, true, 3);

            left  = new Arrow(ArrowType.Left, ShadowType.None);
            right = new Arrow(ArrowType.Right, ShadowType.None);

            HBox hb = new HBox(false, 0);

            hb.Spacing = 4;
            hb.PackStart(left, false, true, 0);
            hb.PackStart(vb, true, true, 0);
            hb.PackStart(right, false, true, 0);

            helplabel        = new Label(string.Empty);
            helplabel.Xalign = 1;

            helpbox = new VBox(false, 0);
            helpbox.PackStart(new HSeparator(), false, true, 0);
            helpbox.PackStart(helplabel, false, true, 0);
            helpbox.BorderWidth = 2;

            VBox vb2 = new VBox(false, 0);

            vb2.Spacing = 4;
            vb2.PackStart(hb, true, true, 0);
            vb2.PackStart(helpbox, false, true, 0);

            this.Add(vb2);

            ShowAll();
        }
        public TooltipInformationWindow() : base()
        {
            TypeHint             = Gdk.WindowTypeHint.Tooltip;
            this.SkipTaskbarHint = true;
            this.SkipPagerHint   = true;
            if (IdeApp.Workbench != null)
            {
                this.TransientFor = IdeApp.Workbench.RootWindow;
            }
            this.AllowShrink = false;
            this.AllowGrow   = false;
            this.CanFocus    = false;
            this.CanDefault  = false;
            this.Events     |= Gdk.EventMask.EnterNotifyMask;

            headlabel        = new MonoDevelop.Components.FixedWidthWrapLabel();
            headlabel.Indent = -20;
            var des = FontService.GetFontDescription("Editor").Copy();

            des.Size = des.Size * 9 / 10;
            headlabel.FontDescription = des;
//			headlabel.MaxWidth = 400;
            headlabel.Wrap = Pango.WrapMode.WordChar;
            headlabel.BreakOnCamelCasing = true;
//			headlabel.BreakOnPunctuation = true;
            descriptionBox.Spacing = 4;
            VBox vb = new VBox(false, 8);

            vb.PackStart(headlabel, true, true, 0);
            vb.PackStart(descriptionBox, true, true, 0);

            HBox hb = new HBox(false, 0);

            hb.PackStart(vb, true, true, 0);
            WindowTransparencyDecorator.Attach(this);

            vb2.Spacing = 4;
            vb2.PackStart(hb, true, true, 0);
            ContentBox.Add(vb2);
            var scheme = Mono.TextEditor.Highlighting.SyntaxModeService.GetColorStyle(IdeApp.Preferences.ColorScheme);

            Theme.SetSchemeColors(scheme);
            foreColor = scheme.PlainText.Foreground;
            headlabel.ModifyFg(StateType.Normal, (HslColor)foreColor);
            ShowAll();
            DesktopService.RemoveWindowShadow(this);
        }
		public ParameterInformationWindow ()
		{
			TypeHint = Gdk.WindowTypeHint.Tooltip;
			this.SkipTaskbarHint = true;
			this.SkipPagerHint = true;
			if (IdeApp.Workbench != null)
				this.TransientFor = IdeApp.Workbench.RootWindow;
			this.AllowShrink = false;
			this.AllowGrow = false;
			this.CanFocus = false;
			this.CanDefault = false;
			Mono.TextEditor.PopupWindow.WindowTransparencyDecorator.Attach (this);

			headlabel = new MonoDevelop.Components.FixedWidthWrapLabel ();
			headlabel.Indent = -20;
			var des = FontService.GetFontDescription ("Editor");
			
			headlabel.FontDescription = des;
			
			headlabel.Wrap = Pango.WrapMode.WordChar;
			headlabel.BreakOnCamelCasing = false;
			headlabel.BreakOnPunctuation = false;
			descriptionBox.Spacing = 4;
			VBox vb = new VBox (false, 0);
			vb.PackStart (headlabel, true, true, 0);
			vb.PackStart (descriptionBox, true, true, 0);
			
			HBox hb = new HBox (false, 0);
			hb.PackStart (vb, true, true, 0);
			
			
			vb2.Spacing = 4;
			vb2.PackStart (hb, true, true, 0);
			ContentBox.Add (vb2);
			var scheme = Mono.TextEditor.Highlighting.SyntaxModeService.GetColorStyle (IdeApp.Preferences.ColorScheme);
			Theme.SetSchemeColors (scheme);

			foreColor = scheme.PlainText.Foreground;
			headlabel.ModifyFg (StateType.Normal, foreColor.ToGdkColor ());
			ShowAll ();
			DesktopService.RemoveWindowShadow (this);

		}
        public ParameterInformationWindow()
        {
            TypeHint             = Gdk.WindowTypeHint.Tooltip;
            this.SkipTaskbarHint = true;
            this.SkipPagerHint   = true;
            this.AllowShrink     = false;
            this.AllowGrow       = false;
            this.CanFocus        = false;
            this.CanDefault      = false;
            Mono.TextEditor.PopupWindow.WindowTransparencyDecorator.Attach(this);

            headlabel        = new MonoDevelop.Components.FixedWidthWrapLabel();
            headlabel.Indent = -20;

            headlabel.FontDescription = FontService.GetFontDescription("Editor").CopyModified(1.1);

            headlabel.Wrap = Pango.WrapMode.WordChar;
            headlabel.BreakOnCamelCasing = false;
            headlabel.BreakOnPunctuation = false;
            descriptionBox.Spacing       = 4;
            VBox vb = new VBox(false, 0);

            vb.PackStart(headlabel, true, true, 0);
            vb.PackStart(descriptionBox, true, true, 0);

            HBox hb = new HBox(false, 0);

            hb.PackStart(vb, true, true, 0);


            vb2.Spacing = 4;
            vb2.PackStart(hb, true, true, 0);
            ContentBox.Add(vb2);
            var scheme = Mono.TextEditor.Highlighting.SyntaxModeService.GetColorStyle(IdeApp.Preferences.ColorScheme);

            Theme.SetSchemeColors(scheme);

            foreColor = scheme.PlainText.Foreground;
            headlabel.ModifyFg(StateType.Normal, foreColor.ToGdkColor());
            ShowAll();
            DesktopService.RemoveWindowShadow(this);
        }
		VBox CreateCategory (string categoryName, string categoryContentMarkup)
		{
			var vbox = new VBox ();
			
			vbox.Spacing = 2;
			
			var catLabel = new MonoDevelop.Components.FixedWidthWrapLabel ();
			catLabel.Text = categoryName;
			catLabel.ModifyFg (StateType.Normal, (HslColor)foreColor);
			
			vbox.PackStart (catLabel, false, true, 0);
			
			var contentLabel = new MonoDevelop.Components.FixedWidthWrapLabel ();
			contentLabel.MaxWidth = Math.Max (440, this.Allocation.Width);
			contentLabel.Wrap = Pango.WrapMode.WordChar;
			contentLabel.BreakOnCamelCasing = true;
			contentLabel.BreakOnPunctuation = true;
			contentLabel.Markup = categoryContentMarkup.Trim ();
			contentLabel.ModifyFg (StateType.Normal, (HslColor)foreColor);
			
			vbox.PackStart (contentLabel, true, true, 0);
			
			return vbox;
		}
		public DeclarationViewWindow () : base ()
		{
			this.AllowShrink = false;
			this.AllowGrow = false;
			
			EnableTransparencyControl = true;
			
			headlabel = new MonoDevelop.Components.FixedWidthWrapLabel ();
			headlabel.Indent = -20;
			headlabel.Wrap = Pango.WrapMode.WordChar;
			headlabel.BreakOnCamelCasing = true;
			headlabel.BreakOnPunctuation = true;
			
			bodylabel = new MonoDevelop.Components.FixedWidthWrapLabel ();
			bodylabel.Wrap = Pango.WrapMode.WordChar;
			bodylabel.BreakOnCamelCasing = true;
			bodylabel.BreakOnPunctuation = true;
			
			VBox vb = new VBox (false, 0);
			vb.PackStart (headlabel, true, true, 0);
			vb.PackStart (bodylabel, true, true, 3);

			left = new Arrow (ArrowType.Left, ShadowType.None);
			right = new Arrow (ArrowType.Right, ShadowType.None);

			HBox hb = new HBox (false, 0);
			hb.Spacing = 4;
			hb.PackStart (left, false, true, 0);
			hb.PackStart (vb, true, true, 0);
			hb.PackStart (right, false, true, 0);

			helplabel = new Label (string.Empty);
			helplabel.Xalign = 1;
			
			helpbox = new VBox (false, 0);
			helpbox.PackStart (new HSeparator (), false, true, 0);
			helpbox.PackStart (helplabel, false, true, 0);
			helpbox.BorderWidth = 2;
			
			VBox vb2 = new VBox (false, 0);
			vb2.Spacing = 4;
			vb2.PackStart (hb, true, true, 0);
			vb2.PackStart (helpbox, false, true, 0);
			
			this.Add (vb2);
			
			ShowAll ();
		}
		void ShowOverload ()
		{
			ClearDescriptions ();

			if (current_overload >= 0 && current_overload < overloads.Count) {
				var o = overloads[current_overload];
				headlabel.Markup = o.SignatureMarkup;
				headlabel.Visible = true;
				int x, y;
				GetPosition (out x, out y);
				var geometry = DesktopService.GetUsableMonitorGeometry (Screen, Screen.GetMonitorAtPoint (x, y));
				headlabel.MaxWidth = Math.Max (geometry.Width / 5, 480);

				if (Theme.DrawPager && overloads.Count > 1) {
					headlabel.WidthRequest = headlabel.RealWidth + 70;
				} else {
					headlabel.WidthRequest = -1;
				}
				foreach (var cat in o.Categories) {
					descriptionBox.PackStart (CreateCategory (cat.Item1, cat.Item2), true, true, 4);
				}

				if (!string.IsNullOrEmpty (o.SummaryMarkup)) {
					descriptionBox.PackStart (CreateCategory (GettextCatalog.GetString ("Summary"), o.SummaryMarkup), true, true, 4);
				}
				if (!string.IsNullOrEmpty (o.FooterMarkup)) {

					var contentLabel = new FixedWidthWrapLabel ();
					contentLabel.Wrap = Pango.WrapMode.WordChar;
					contentLabel.BreakOnCamelCasing = false;
					contentLabel.BreakOnPunctuation = false;
					contentLabel.MaxWidth = 400;
					contentLabel.Markup = o.FooterMarkup.Trim ();
					contentLabel.ModifyFg (StateType.Normal, (HslColor)foreColor);

					descriptionBox.PackEnd (contentLabel, true, true, 4);
				}

				if (string.IsNullOrEmpty (o.SummaryMarkup) && string.IsNullOrEmpty (o.FooterMarkup) && !o.Categories.Any ()) {
					descriptionBox.Hide ();
				} else {
					descriptionBox.ShowAll ();
				}
				Theme.CurrentPage = current_overload;
				QueueResize ();
			}
		}
		public TooltipInformationWindow () : base ()
		{
			TypeHint = Gdk.WindowTypeHint.Tooltip;
			this.SkipTaskbarHint = true;
			this.SkipPagerHint = true;
			this.AllowShrink = false;
			this.AllowGrow = false;
			this.CanFocus = false;
			this.CanDefault = false;
			this.Events |= Gdk.EventMask.EnterNotifyMask; 
			
			headLabel = new FixedWidthWrapLabel ();
			headLabel.Indent = -20;
			headLabel.Wrap = Pango.WrapMode.WordChar;
			headLabel.BreakOnCamelCasing = false;
			headLabel.BreakOnPunctuation = false;

			descriptionBox.Spacing = 4;

			VBox vb = new VBox (false, 8);
			vb.PackStart (headLabel, true, true, 4);
			vb.PackStart (descriptionBox, true, true, 4);

			HBox hb = new HBox (false, 4);
			hb.PackStart (vb, true, true, 6);

			WindowTransparencyDecorator.Attach (this);

			vb2.Spacing = 4;
			vb2.PackStart (hb, true, true, 0);
			ContentBox.Add (vb2);

			vb2.ShowAll ();
			SetDefaultScheme ();
			Styles.Changed += HandleSkinChanged;
			IdeApp.Preferences.ColorScheme.Changed += HandleSkinChanged;
		}
		internal static VBox CreateCategory (string categoryName, string categoryContentMarkup, Cairo.Color foreColor, Pango.FontDescription font)
		{
			var vbox = new VBox ();

			vbox.Spacing = 8;

			if (categoryName != null) {
				var catLabel = new FixedWidthWrapLabel ();
				catLabel.Markup = categoryName;
				catLabel.ModifyFg (StateType.Normal, foreColor.ToGdkColor ());
				catLabel.FontDescription = font.Copy ();
				catLabel.FontDescription.Weight = Pango.Weight.Bold;
				catLabel.FontDescription.Size = catLabel.FontDescription.Size + (int)(1 * Pango.Scale.PangoScale);
				vbox.PackStart (catLabel, false, true, 0);
			}

			var contentLabel = new FixedWidthWrapLabel ();
			HBox hbox = new HBox ();

			// hbox.PackStart (new Label(), false, true, 10);


			contentLabel.Wrap = Pango.WrapMode.WordChar;
			contentLabel.Spacing = 1;
			contentLabel.BreakOnCamelCasing = false;
			contentLabel.BreakOnPunctuation = false;
			contentLabel.MaxWidth = 400;
			contentLabel.Markup = categoryContentMarkup.Trim ();
			contentLabel.ModifyFg (StateType.Normal, foreColor.ToGdkColor ());
			contentLabel.FontDescription = font;

			hbox.PackStart (contentLabel, true, true, 0);
			vbox.PackStart (hbox, true, true, 0);

			return vbox;
		}
		void ShowOverload ()
		{
			ClearDescriptions ();

			if (current_overload >= 0 && current_overload < overloads.Count) {
				var o = overloads[current_overload];
				headLabel.Markup = o.SignatureMarkup;
				headLabel.Visible = !string.IsNullOrEmpty (o.SignatureMarkup);
				int x, y;
				GetPosition (out x, out y);
				var geometry = DesktopService.GetUsableMonitorGeometry (Screen.Number, Screen.GetMonitorAtPoint (x, y));
				headLabel.MaxWidth = Math.Max ((int)geometry.Width / 5, 480);

				if (Theme.DrawPager && overloads.Count > 1) {
					headLabel.WidthRequest = headLabel.RealWidth + 70;
				} else {
					headLabel.WidthRequest = -1;
				}
				foreach (var cat in o.Categories) {
					descriptionBox.PackStart (CreateCategory (GetHeaderMarkup (cat.Item1), cat.Item2, foreColor, Theme.Font), true, true, 4);
				}

				if (!string.IsNullOrEmpty (o.SummaryMarkup)) {
					descriptionBox.PackStart (CreateCategory (GetHeaderMarkup (GettextCatalog.GetString ("Summary")), o.SummaryMarkup, foreColor, Theme.Font), true, true, 4);
				}
				if (!string.IsNullOrEmpty (o.FooterMarkup)) {

					var contentLabel = new FixedWidthWrapLabel ();
					contentLabel.Wrap = Pango.WrapMode.WordChar;
					contentLabel.BreakOnCamelCasing = false;
					contentLabel.BreakOnPunctuation = false;
					contentLabel.MaxWidth = 400;
					contentLabel.Markup = o.FooterMarkup.Trim ();
					contentLabel.ModifyFg (StateType.Normal, foreColor.ToGdkColor ());
					contentLabel.FontDescription = Theme.Font;

					descriptionBox.PackEnd (contentLabel, true, true, 4);
				}

				if (string.IsNullOrEmpty (o.SummaryMarkup) && string.IsNullOrEmpty (o.FooterMarkup) && !o.Categories.Any ()) {
					descriptionBox.Hide ();
				} else {
					descriptionBox.ShowAll ();
				}
				Theme.CurrentPage = current_overload;
				// if the target is not on the left or top side, we may loose the arrow alignment on our target
				// and must reposition
				if (!CurrentPosition.HasFlag (PopupPosition.Left) &&
				    !CurrentPosition.HasFlag (PopupPosition.Top))
					RepositionWindow ();
				else
					QueueResize ();
			}
		}
		void ShowOverload ()
		{
			ClearDescriptions ();

			if (current_overload >= 0 && current_overload < overloads.Count) {
				var o = overloads[current_overload];
				headlabel.Markup = o.SignatureMarkup;
				headlabel.Visible = true;
				if (Theme.DrawPager && overloads.Count > 1) {
					headlabel.WidthRequest = headlabel.RealWidth + 70;
				} else {
					headlabel.WidthRequest = -1;
				}
				foreach (var cat in o.Categories) {
					descriptionBox.PackStart (CreateCategory (cat.Item1, cat.Item2), true, true, 4);
				}

				if (!string.IsNullOrEmpty (o.SummaryMarkup)) {
					descriptionBox.PackStart (CreateCategory (GettextCatalog.GetString ("Summary"), o.SummaryMarkup), true, true, 4);
				}
				if (!string.IsNullOrEmpty (o.FooterMarkup)) {

					var contentLabel = new MonoDevelop.Components.FixedWidthWrapLabel ();
					contentLabel.Wrap = Pango.WrapMode.WordChar;
					contentLabel.BreakOnCamelCasing = true;
					contentLabel.MaxWidth = 400;
					contentLabel.BreakOnPunctuation = true;
					contentLabel.Markup = o.FooterMarkup.Trim ();
					contentLabel.ModifyFg (StateType.Normal, (HslColor)foreColor);

					descriptionBox.PackEnd (contentLabel, true, true, 4);
				}

				if (string.IsNullOrEmpty (o.SummaryMarkup) && string.IsNullOrEmpty (o.FooterMarkup) && !o.Categories.Any ()) {
					descriptionBox.Hide ();
				} else {
					descriptionBox.ShowAll ();
				}
				Theme.CurrentPage = current_overload;
				QueueResize ();
			}
		}
		internal static VBox CreateCategory (string categoryName, string categoryContentMarkup, Cairo.Color foreColor)
		{
			var vbox = new VBox ();

			vbox.Spacing = 8;

			if (categoryName != null) {
				var catLabel = new FixedWidthWrapLabel ();
				catLabel.Markup = categoryName;
				catLabel.ModifyFg (StateType.Normal, foreColor.ToGdkColor ());
				catLabel.FontDescription = FontService.GetFontDescription ("Editor");
				vbox.PackStart (catLabel, false, true, 0);
			}

			var contentLabel = new FixedWidthWrapLabel ();
			HBox hbox = new HBox ();

			// hbox.PackStart (new Label(), false, true, 10);


			contentLabel.Wrap = Pango.WrapMode.WordChar;
			contentLabel.BreakOnCamelCasing = false;
			contentLabel.BreakOnPunctuation = false;
			contentLabel.MaxWidth = 400;
			contentLabel.Markup = categoryContentMarkup.Trim ();
			contentLabel.ModifyFg (StateType.Normal, foreColor.ToGdkColor ());
			contentLabel.FontDescription = FontService.GetFontDescription ("Editor");

			hbox.PackStart (contentLabel, true, true, 0);
			vbox.PackStart (hbox, true, true, 0);

			return vbox;
		}
		VBox CreateCategory (string categoryName, string categoryContentMarkup)
		{
			var vbox = new VBox ();

			vbox.Spacing = 2;

			var catLabel = new FixedWidthWrapLabel ();
			catLabel.Text = categoryName;
			catLabel.ModifyFg (StateType.Normal, (HslColor)foreColor);

			vbox.PackStart (catLabel, false, true, 0);

			var contentLabel = new FixedWidthWrapLabel ();
			contentLabel.Wrap = Pango.WrapMode.WordChar;
			contentLabel.BreakOnCamelCasing = false;
			contentLabel.BreakOnPunctuation = false;
			contentLabel.MaxWidth = 400;
			contentLabel.Markup = categoryContentMarkup.Trim ();
			contentLabel.ModifyFg (StateType.Normal, (HslColor)foreColor);

			vbox.PackStart (contentLabel, true, true, 0);

			return vbox;
		}
예제 #20
0
		public TooltipInformationWindow () : base ()
		{
			TypeHint = Gdk.WindowTypeHint.Tooltip;
			this.SkipTaskbarHint = true;
			this.SkipPagerHint = true;
			if (IdeApp.Workbench != null)
				this.TransientFor = IdeApp.Workbench.RootWindow;
			this.AllowShrink = false;
			this.AllowGrow = false;
			this.CanFocus = false;
			this.CanDefault = false;
			this.Events |= Gdk.EventMask.EnterNotifyMask; 
			
			headLabel = new FixedWidthWrapLabel ();
			headLabel.Indent = -20;
			headLabel.FontDescription = FontService.GetFontDescription ("Editor(TooltipSource)");;
			headLabel.Wrap = Pango.WrapMode.WordChar;
			headLabel.BreakOnCamelCasing = false;
			headLabel.BreakOnPunctuation = false;

			descriptionBox.Spacing = 4;

			VBox vb = new VBox (false, 8);
			vb.PackStart (headLabel, true, true, 4);
			vb.PackStart (descriptionBox, true, true, 4);

			HBox hb = new HBox (false, 4);
			hb.PackStart (vb, true, true, 6);

			WindowTransparencyDecorator.Attach (this);

			vb2.Spacing = 4;
			vb2.PackStart (hb, true, true, 0);
			ContentBox.Add (vb2);

			SetDefaultScheme ();

			ShowAll ();
			DesktopService.RemoveWindowShadow (this);
		}