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


C# Pango.FontDescription类代码示例

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


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

示例1: HandleOnItemSelected

		void HandleOnItemSelected (object sender, SettingCollection sc)
		{
			_current_sc = sc;
			foreach(Widget w in vbox3.AllChildren) {
				vbox3.Remove (w);
				w.Dispose();
			}

			Label title = new Label (sc.Heading + " settings");
			Pango.FontDescription tpf = new Pango.FontDescription ();
			tpf.Weight = Pango.Weight.Bold;
			title.ModifyFont (tpf);
			vbox3.Add (title);
			vbox3.Add (new HSeparator());

			for(int i = sc.Settings.Length -1;i > -1; i --)  {
				isettings_viewer v = _scf.get_control(sc.Settings[i].Type);
				v.set_setting(sc.Settings[i]);
				vbox3.Add((Widget)v);
				vbox3.Add (new HSeparator ());
			}
			HSeparator h = new HSeparator();
			h.HeightRequest = 300;
			vbox3.Add (h);
			vbox3.ShowAll ();
		}
开发者ID:Meticulus,项目名称:tactical,代码行数:26,代码来源:preference_dialog.cs

示例2: Shell

		public Shell(MainWindow container) : base()
		{
			this.container = container;
			WrapMode = WrapMode.Word;
			CreateTags ();

			Pango.FontDescription font_description = new Pango.FontDescription();
			font_description.Family = "Monospace";
			ModifyFont(font_description);
			
			TextIter end = Buffer.EndIter;
			Buffer.InsertWithTagsByName (ref end, "Mono C# Shell, type 'help;' for help\n\nEnter statements or expressions below.\n", "Comment");
			ShowPrompt (false);
			
			Evaluator.Init (new string [0]);
			Evaluator.SetInteractiveBaseClass (typeof (InteractiveGraphicsBase));
			Evaluator.Run ("LoadAssembly (\"System.Drawing\");");
			Evaluator.Run ("using System; using System.Linq; using System.Collections; using System.Collections.Generic; using System.Drawing;");

			if (!MainClass.Debug){
				GuiStream error_stream = new GuiStream ("Error", (x, y) => Output (x, y));
				StreamWriter gui_output = new StreamWriter (error_stream);
				gui_output.AutoFlush = true;
				Console.SetError (gui_output);

				GuiStream stdout_stream = new GuiStream ("Stdout", (x, y) => Output (x, y));
				gui_output = new StreamWriter (stdout_stream);
				gui_output.AutoFlush = true;
				Console.SetOut (gui_output);
			}
		}
开发者ID:nolanlum,项目名称:mono-tools,代码行数:31,代码来源:Shell.cs

示例3: filter_file_array_viewer

		public filter_file_array_viewer ()
		{
			this.Build ();
			this.nodeview1.AppendColumn("Condition Name",new CellRendererText(), delegate(TreeViewColumn tree_column, CellRenderer cell, ITreeNode node) {
				if(node == null)return;
				((CellRendererText)cell).Text = ((filter_file_node)node).ff.Name;
			});
			this.nodeview1.AppendColumn("File",new CellRendererText(), delegate(TreeViewColumn tree_column, CellRenderer cell, ITreeNode node) {
				if(node == null)return;
				((CellRendererText)cell).Text = ((filter_file_node)node).ff.target;
			});
			this.nodeview1.NodeStore = new Gtk.NodeStore (typeof(filter_file_node));

			MenuItem new_menu = new MenuItem("New");
			new_menu.ButtonPressEvent += handle_new;
			_cm.Add(new_menu);
			MenuItem delete_menu = new MenuItem("Delete");
			delete_menu.ButtonPressEvent += handle_delete;
			_cm.Add(delete_menu);
			_cm.ShowAll ();
			this.nodeview1.ButtonPressEvent += HandleButtonPressEvent;

			this.desc_label.SetSizeRequest (315, 100);
			this.desc_label.SetAlignment (0, 0);
			this.desc_label.LineWrap = true;
			this.desc_label.SingleLineMode = false;
			this.desc_label.SetPadding (10, 2);
			Pango.FontDescription pf2 = new Pango.FontDescription ();
			//pf2.Style = Pango.Style.Italic;
			pf2.Weight = Pango.Weight.Light;
			this.desc_label.ModifyFont (pf2);
		}
开发者ID:Meticulus,项目名称:tactical,代码行数:32,代码来源:filter_file_array_viewer.cs

示例4: CodeSegmentPreviewWindow

		public CodeSegmentPreviewWindow (TextEditor editor, bool hideCodeSegmentPreviewInformString, ISegment segment, int width, int height) : base (Gtk.WindowType.Popup)
		{
			this.HideCodeSegmentPreviewInformString = hideCodeSegmentPreviewInformString;
			this.editor = editor;
			this.AppPaintable = true;
			layout = PangoUtil.CreateLayout (this);
			informLayout = PangoUtil.CreateLayout (this);
			informLayout.SetText (CodeSegmentPreviewInformString);
			
			fontDescription = Pango.FontDescription.FromString (editor.Options.FontName);
			fontDescription.Size = (int)(fontDescription.Size * 0.8f);
			layout.FontDescription = fontDescription;
			layout.Ellipsize = Pango.EllipsizeMode.End;
			// setting a max size for the segment (40 lines should be enough), 
			// no need to markup thousands of lines for a preview window
			int startLine = editor.Document.OffsetToLineNumber (segment.Offset);
			int endLine = editor.Document.OffsetToLineNumber (segment.EndOffset);
			const int maxLines = 40;
			bool pushedLineLimit = endLine - startLine > maxLines;
			if (pushedLineLimit)
				segment = new Segment (segment.Offset, editor.Document.GetLine (startLine + maxLines).Offset - segment.Offset);
			layout.Ellipsize = Pango.EllipsizeMode.End;
			layout.SetMarkup (editor.Document.SyntaxMode.GetMarkup (editor.Document,
			                                                        editor.Options,
			                                                        editor.ColorStyle,
			                                                        segment.Offset,
			                                                        segment.Length,
			                                                        true) + (pushedLineLimit ? Environment.NewLine + "..." : ""));
			CalculateSize ();
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:30,代码来源:CodeSegmentPreviewWindow.cs

示例5: SetFonts

 private void SetFonts()
 {
     Pango.FontDescription desc = new Pango.FontDescription();
     desc.Family = "Sans";
     desc.Size = (int)(20 * Pango.Scale.PangoScale);
     desc.Weight = Pango.Weight.Normal;
     label1.ModifyFont(desc);
 }
开发者ID:Luigifan,项目名称:LuaScriptsManager,代码行数:8,代码来源:FirstRunWidget.cs

示例6: MessageBubbleCache

		public MessageBubbleCache (TextEditor editor)
		{
			this.editor = editor;
			errorPixbuf = ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.Error, Gtk.IconSize.Menu);
			warningPixbuf = ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.Warning, Gtk.IconSize.Menu);
			
			editor.EditorOptionsChanged += HandleEditorEditorOptionsChanged;
			fontDescription = FontService.GetFontDescription ("MessageBubbles");
		}
开发者ID:harishamdani,项目名称:monodevelop,代码行数:9,代码来源:MessageBubbleCache.cs

示例7: TypeView

        public TypeView(MainWindow container)
            : base()
        {
            WrapMode = Gtk.WrapMode.None;
            CreateTags ();

            Pango.FontDescription font_description = new Pango.FontDescription();
            font_description.Family = "Monospace";
            ModifyFont(font_description);
            this.container = container;
        }
开发者ID:alfredodev,项目名称:mono-tools,代码行数:11,代码来源:TypeView.cs

示例8: HandleCustomOutputPadFontChanged

		void HandleCustomOutputPadFontChanged (object sender, EventArgs e)
		{
			if (customFont != null) {
				customFont.Dispose ();
				customFont = null;
			}

			customFont = Pango.FontDescription.FromString (IdeApp.Preferences.CustomOutputPadFont);

			view.SetFont (customFont);
		}
开发者ID:kthguru,项目名称:monodevelop,代码行数:11,代码来源:ImmediatePad.cs

示例9: MessageBubbleCache

		public MessageBubbleCache (TextEditor editor)
		{
			this.editor = editor;
			errorPixbuf = ImageService.GetPixbuf ("md-bubble-error", Gtk.IconSize.Menu);
			warningPixbuf = ImageService.GetPixbuf ("md-bubble-warning", Gtk.IconSize.Menu);
			
			editor.EditorOptionsChanged += HandleEditorEditorOptionsChanged;
			editor.LeaveNotifyEvent += HandleLeaveNotifyEvent;
			editor.MotionNotifyEvent += HandleMotionNotifyEvent;
			editor.TextArea.BeginHover += HandleBeginHover;
			fontDescription = FontService.GetFontDescription ("MessageBubbles");
		}
开发者ID:xiexin36,项目名称:monodevelop,代码行数:12,代码来源:MessageBubbleCache.cs

示例10: Initialize

		public void Initialize (IPadWindow container)
		{
			customFont = Pango.FontDescription.FromString (IdeApp.Preferences.CustomOutputPadFont);

			view = new ConsoleView ();
			view.ConsoleInput += OnViewConsoleInput;
			view.SetFont (customFont);
			view.ShadowType = Gtk.ShadowType.None;
			view.ShowAll ();

			IdeApp.Preferences.CustomOutputPadFontChanged += HandleCustomOutputPadFontChanged;
		}
开发者ID:kthguru,项目名称:monodevelop,代码行数:12,代码来源:ImmediatePad.cs

示例11: int_settings_viewer

		public int_settings_viewer ()
		{
			this.Build ();
			this.desc_label.SetSizeRequest (315, 100);
			this.desc_label.SetAlignment (0, 0);
			this.desc_label.LineWrap = true;
			this.desc_label.SingleLineMode = false;
			this.desc_label.SetPadding (10, 2);
			Pango.FontDescription pf2 = new Pango.FontDescription ();
			//pf2.Style = Pango.Style.Italic;
			pf2.Weight = Pango.Weight.Light;
			this.desc_label.ModifyFont (pf2);
		}
开发者ID:Meticulus,项目名称:tactical,代码行数:13,代码来源:int_settings_viewer.cs

示例12: MessageBubbleCache

		public MessageBubbleCache (MonoTextEditor editor)
		{
			this.editor = editor;
			
			editor.EditorOptionsChanged += HandleEditorEditorOptionsChanged;
			editor.TextArea.LeaveNotifyEvent += HandleLeaveNotifyEvent;
			editor.TextArea.MotionNotifyEvent += HandleMotionNotifyEvent;
			editor.TextArea.BeginHover += HandleBeginHover;
			editor.VAdjustment.ValueChanged += HandleValueChanged;
			editor.HAdjustment.ValueChanged += HandleValueChanged;
			fontDescription = FontService.GetFontDescription ("Pad");
			tooltipFontDescription = FontService.GetFontDescription ("Pad").CopyModified (weight: Pango.Weight.Bold);
			errorCountFontDescription = FontService.GetFontDescription ("Pad").CopyModified (weight: Pango.Weight.Bold);
		}
开发者ID:kdubau,项目名称:monodevelop,代码行数:14,代码来源:MessageBubbleCache.cs

示例13: MessageBubbleCache

		public MessageBubbleCache (MonoTextEditor editor)
		{
			this.editor = editor;
			errorPixbuf = Xwt.Drawing.Image.FromResource ("gutter-error-15.png");
			warningPixbuf = Xwt.Drawing.Image.FromResource ("gutter-warning-15.png");
			
			editor.EditorOptionsChanged += HandleEditorEditorOptionsChanged;
			editor.TextArea.LeaveNotifyEvent += HandleLeaveNotifyEvent;
			editor.TextArea.MotionNotifyEvent += HandleMotionNotifyEvent;
			editor.TextArea.BeginHover += HandleBeginHover;
			editor.VAdjustment.ValueChanged += HandleValueChanged;
			editor.HAdjustment.ValueChanged += HandleValueChanged;
			fontDescription = FontService.GetFontDescription ("Pad");
			tooltipFontDescription = FontService.GetFontDescription ("Pad").CopyModified (weight: Pango.Weight.Bold);
			errorCountFontDescription = FontService.GetFontDescription ("Pad").CopyModified (weight: Pango.Weight.Bold);
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:16,代码来源:MessageBubbleCache.cs

示例14: MessageBubbleCache

		public MessageBubbleCache (TextEditor editor)
		{
			this.editor = editor;
			errorPixbuf = Xwt.Drawing.Image.FromResource ("gutter-error-light-15.png");
			warningPixbuf = Xwt.Drawing.Image.FromResource ("gutter-warning-light-15.png");
			
			editor.EditorOptionsChanged += HandleEditorEditorOptionsChanged;
			editor.TextArea.LeaveNotifyEvent += HandleLeaveNotifyEvent;
			editor.TextArea.MotionNotifyEvent += HandleMotionNotifyEvent;
			editor.TextArea.BeginHover += HandleBeginHover;
			editor.VAdjustment.ValueChanged += HandleValueChanged;
			editor.HAdjustment.ValueChanged += HandleValueChanged;
			fontDescription = FontService.GetFontDescription ("MessageBubbles");
			tooltipFontDescription = FontService.GetFontDescription ("MessageBubbleTooltip");
			errorCountFontDescription = FontService.GetFontDescription ("MessageBubbleCounter");
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:16,代码来源:MessageBubbleCache.cs

示例15: Initialize

		public void Initialize (IPadWindow container)
		{
			var fontName = IdeApp.Preferences.CustomOutputPadFont;

			if (string.IsNullOrEmpty (fontName))
				fontName = DesktopService.DefaultMonospaceFont;

			customFont = Pango.FontDescription.FromString (fontName);

			view = new ConsoleView ();
			view.ConsoleInput += OnViewConsoleInput;
			view.SetFont (customFont);
			view.ShadowType = Gtk.ShadowType.None;
			view.ShowAll ();

			IdeApp.Preferences.CustomOutputPadFontChanged += HandleCustomOutputPadFontChanged;
		}
开发者ID:paulkeast,项目名称:monodevelop,代码行数:17,代码来源:ImmediatePad.cs


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