• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Pango.FontDescription类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: boolean_setting_viewer

		public boolean_setting_viewer ()
		{
			this.Build ();
			this.SetSizeRequest (100, 150);
			this.checkbutton1.SetSizeRequest (100, 40);
			this.checkbutton1.ModifyBg (StateType.Prelight);
			this.checkbutton1.Clicked += HandleClicked;
			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,代码行数:17,代码来源:boolean_setting_viewer.cs


示例17: MoreMenu

        public MoreMenu(FillIconViewDelegate fillIconView)
        {
            // Move all this to a new class, derived from Gtk.Menu

            this.ModifyBg(StateType.Normal, new Gdk.Color(255, 255, 255));

            Pango.FontDescription font = new Pango.FontDescription();
            //font.Family = "Arial";
            font.AbsoluteSize = 15 * Pango.Scale.PangoScale;

            MenuItem im = new MenuItem("Items");
            foreach(Widget w in im.AllChildren)
            {
                w.ModifyFg(StateType.Normal, new Gdk.Color(0, 0, 0));
                w.ModifyFont(font);
            }
            im.Activated += delegate(object sender, EventArgs e)
            {
                fillIconView("items");
            };
            this.Append(im);

            im = new MenuItem("Basic shapes");
            foreach(Widget w in im.AllChildren)
            {
                w.ModifyFg(StateType.Normal, new Gdk.Color(0, 0, 0));
                w.ModifyFont(font);
            }
            im.Activated += delegate(object sender, EventArgs e)
            {
                fillIconView("basic-shapes");
            };
            this.Append(im);

            im = new MenuItem("Custom");
            foreach(Widget w in im.AllChildren)
            {
                w.ModifyFg(StateType.Normal, new Gdk.Color(0, 0, 0));
                w.ModifyFont(font);
            }
            im.Activated += delegate(object sender, EventArgs e)
            {
                fillIconView("custom");
            };
            this.Append(im);
        }
开发者ID:physalis,项目名称:MeeGen,代码行数:46,代码来源:MoreMenu.cs


示例18: StatusPanel

        public StatusPanel(WizardDialog wizard)
        {
            smallFont  = Style.FontDescription;
            smallFont.Size = (int) (smallFont.Size * 0.75);
            //			normalFont = Style.FontDescription;
            boldFont   = Style.FontDescription;
            boldFont.Weight = Pango.Weight.Bold;

            this.wizard = wizard;
            SetSizeRequest (198, 400);

            bitmap = Runtime.Gui.Resources.GetBitmap ("GeneralWizardBackground");

            AddEvents ((int) (Gdk.EventMask.ExposureMask));
            ExposeEvent += new Gtk.ExposeEventHandler (OnPaint);
            Realized += new EventHandler (OnRealized);
        }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:17,代码来源:StatusPanel.cs


示例19: MainWindow

        public MainWindow()
            : base(Gtk.WindowType.Toplevel)
        {
            // Prepare window
            this.Build();
            this.DeactivateGui();

            // Prepare tree views
            this.tvwDocument = new GtkUtil.TableTextView( this.tvDocument, HeaderDocumentEn.Count );
            this.tvwDocument.Headers = HeaderDocumentEn;
            this.tvDocument.ButtonReleaseEvent += (sender, e) => this.OnQuestionFocusChangedTo();
            this.tvwDocument.SetEditable( 1, false );
            this.tvwAnswers  = new GtkUtil.TableTextView( this.tvAnswers, HeaderDocumentEn.Count );
            this.tvwAnswers.Headers = HeaderAnswersEn;
            this.tvwAnswers.tableChanged += this.OnAnswerChanged;

            // Prepare the txtDocument TextView
            Pango.FontDescription font = new Pango.FontDescription();
            font.Family = "Monospace";
            this.txtDocument.ModifyFont( font );
        }
开发者ID:Baltasarq,项目名称:Testy,代码行数:21,代码来源:MainWindowLogic.cs


示例20: CodeSegmentPreviewWindow

		public CodeSegmentPreviewWindow (TextEditor editor, bool hideCodeSegmentPreviewInformString, TextSegment segment, int width, int height, bool removeIndent = true) : base (Gtk.WindowType.Popup)
		{
			this.HideCodeSegmentPreviewInformString = hideCodeSegmentPreviewInformString;
			this.Segment = segment;
			this.editor = editor;
			this.AppPaintable = true;
			this.SkipPagerHint = this.SkipTaskbarHint = true;
			this.TypeHint = WindowTypeHint.Menu;
			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
			SetSegment (segment, removeIndent);
			CalculateSize (width);
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:21,代码来源:CodeSegmentPreviewWindow.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Pango.Layout类代码示例发布时间:2022-05-24
下一篇:
C# Pango类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap