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


C# Gtk.ForwardChars方法代码示例

本文整理汇总了C#中Gtk.ForwardChars方法的典型用法代码示例。如果您正苦于以下问题:C# Gtk.ForwardChars方法的具体用法?C# Gtk.ForwardChars怎么用?C# Gtk.ForwardChars使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Gtk的用法示例。


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

示例1: ApplyCJKToBlock

        void ApplyCJKToBlock(Gtk.TextIter start, Gtk.TextIter end)
        {
            NoteBuffer.GetBlockExtents (ref start,
                    ref end,
                    512 /* XXX */,
                    cjk_tag);

            Buffer.RemoveTag (cjk_tag, start, end);

            MatchCJK m = new MatchCJK (start.GetText (end));
            foreach (MatchCJK.CJKGroup g in m) {
                Gtk.TextIter start_cpy = start;
                start_cpy.ForwardChars (g.Start);

                end = start;
                end.ForwardChars (g.End);

                Buffer.ApplyTag (cjk_tag, start_cpy, end);
            }
        }
开发者ID:kanru,项目名称:tomboy-cjk-disable-spellcheck,代码行数:20,代码来源:CJKDisableSpellAddin.cs

示例2: ApplyEALToBlock

        void ApplyEALToBlock(Gtk.TextIter start, Gtk.TextIter end)
        {
            AddLanguageTag ();

            NoteBuffer.GetBlockExtents (ref start,
                    ref end,
                    512 /* XXX */,
                    eal_tag);
            Buffer.RemoveTag (eal_tag, start, end);

            MatchEAL m = new MatchEAL (start.GetText (end));
            foreach (MatchEAL.EALGroup g in m) {
                Gtk.TextIter start_cpy = start;
                start_cpy.ForwardChars (g.Start);

                end = start;
                end.ForwardChars (g.End);

                Buffer.ApplyTag (eal_tag, start_cpy, end);
            }
        }
开发者ID:villim,项目名称:EAL-No-Spell-Check,代码行数:21,代码来源:EALNoSpellCheck.cs

示例3: IncreaseDepth

		public void IncreaseDepth (ref Gtk.TextIter start)
		{
			if (!CanMakeBulletedList())
				return;

			Gtk.TextIter end;

			start = GetIterAtLineOffset (start.Line, 0);

			Gtk.TextIter line_end = GetIterAtLine (start.Line);
			line_end.ForwardToLineEnd ();

			end = start;
			end.ForwardChars (2);

			DepthNoteTag curr_depth = FindDepthTag (start);

			Undoer.FreezeUndo ();
			if (curr_depth == null) {
				// Insert a brand new bullet
				Gtk.TextIter next = start;
				next.ForwardSentenceEnd ();
				next.BackwardSentenceStart ();

				// Insert the bullet using the same direction
				// as the text on the line
				Pango.Direction direction = Pango.Direction.Ltr;
				if (next.Char.Length > 0 && next.Line == start.Line)
					direction = Pango.Global.UnicharDirection (next.Char[0]);

				InsertBullet (ref start, 0, direction);
			} else {
				// Remove the previous indent
				Delete (ref start, ref end);

				// Insert the indent at the new depth
				int nextDepth = curr_depth.Depth + 1;
				InsertBullet (ref start, nextDepth, curr_depth.Direction);
			}
			Undoer.ThawUndo ();

			ChangeTextDepth (this, new ChangeDepthEventArgs (start.Line, true));
		}
开发者ID:MatteoNardi,项目名称:Tomboy,代码行数:43,代码来源:NoteBuffer.cs

示例4: ApplyWikiwordToBlock

		void ApplyWikiwordToBlock (Gtk.TextIter start, Gtk.TextIter end)
		{
			NoteBuffer.GetBlockExtents (ref start,
			                            ref end,
			                            80 /* max wiki name */,
			                            broken_link_tag);

			Buffer.RemoveTag (broken_link_tag, start, end);

			for (Match match = regex.Match (start.GetText (end));
			                match.Success;
			                match = match.NextMatch ()) {
				System.Text.RegularExpressions.Group group = match.Groups [1];

				Gtk.TextIter start_cpy = start;
				start_cpy.ForwardChars (group.Index);

				end = start_cpy;
				end.ForwardChars (group.Length);

				if (Note.TagTable.HasLinkTag (start_cpy))
					break;

				Logger.Debug ("Highlighting wikiword: '{0}' at offset {1}",
							group,
							group.Index);

				if (Manager.Find (group.ToString ()) == null) {
					Buffer.ApplyTag (broken_link_tag, start_cpy, end);
				}
			}
		}
开发者ID:MatteoNardi,项目名称:Tomboy,代码行数:32,代码来源:Watchers.cs

示例5: ApplyUrlToBlock

		void ApplyUrlToBlock (Gtk.TextIter start, Gtk.TextIter end)
		{
			NoteBuffer.GetBlockExtents (ref start,
			                            ref end,
			                            256 /* max url length */,
			                            Note.TagTable.UrlTag);

			Buffer.RemoveTag (Note.TagTable.UrlTag, start, end);

			for (Match match = regex.Match (start.GetSlice (end));
			                match.Success;
			                match = match.NextMatch ()) {
				System.Text.RegularExpressions.Group group = match.Groups [1];

				/*
				Logger.Log ("Highlighting url: '{0}' at offset {1}",
				     group,
				     group.Index);
				*/

				Gtk.TextIter start_cpy = start;
				start_cpy.ForwardChars (group.Index);

				end = start_cpy;
				end.ForwardChars (group.Length);

				Buffer.ApplyTag (Note.TagTable.UrlTag, start_cpy, end);
			}
		}
开发者ID:MatteoNardi,项目名称:Tomboy,代码行数:29,代码来源:Watchers.cs


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