English 中文(简体)
缩略语
原标题:GTK TextView - creating a static display format

我正试图模拟一批硬件,这些硬件有静态布道。

为此,我想用一个案文。 我的展览有10个栏,有25栏。 因此,我估计,案文应足够容易。

基本上,我要说:sert/replace string S at row X,从Y栏“开始。 i 可能只需要更新一个特定的行文,甚至需要一个行文中的单列。

I have not been successful at getting this to work though. the best I have been able to do is to fill the TextView with 10 lines of 25 spaces when i create it, and then use the get_iter_at_line_offset to get the iterator of a line, and then push the new text onto that line.

但这将开始将案文改成行,而不是取代现有的案文。

I need both row and column control (i.e. need to be able to set text at a specific (X,Y) coordinate).

假设这一点,我一定会使用标记。

谁能给我一个快速的例子,说明如何做到这一点? 不幸的是,关于此类事项的文件很少。

问题回答

您不得不在具体行文X上接手,然后使用电码<>forward_chars()推进Y质。 然后删除你所取代的特性编号,最后插入你希望插入的案文。 我认为,如果你改变缓冲器,那么你可以与主持人一道这样做,但当你删除案文时,你的一名使者被重新认证,以指明案文的位置。

如果你重新瞄准TK+3.x,你应真正研究如何利用开罗。 既然你实际上不需要一种文字缓冲,那么,这似乎就好像是过分的,也是滥用GtkTextView的错误。

http://developer.gnome.org/gtk3/stable/gtk-migating-2-to-3.html#id1485153“rel=“nofollow”>。 然后看text-rendering Cairo AP,这应当足以使你开始工作。





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签