MonoDevelop.Ide.CodeCompletion.TooltipInformationWindow.CreateCategory C# (CSharp) Method

CreateCategory() static private method

static private CreateCategory ( string categoryName, string categoryContentMarkup, Cairo foreColor, Pango font ) : Gtk.VBox
categoryName string
categoryContentMarkup string
foreColor Cairo
font Pango
return Gtk.VBox
		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;
		}

Usage Example

Exemplo n.º 1
0
 VBox CreateCategory(string categoryName, string categoryContentMarkup)
 {
     return(TooltipInformationWindow.CreateCategory(categoryName, categoryContentMarkup, foreColor, Theme.Font.ToPangoFont()));
 }
All Usage Examples Of MonoDevelop.Ide.CodeCompletion.TooltipInformationWindow::CreateCategory