[Vala] Access GTKText



Hi list,
 
I've compiled and tested this C-tutorial that shows how to have different fonts, colors and and sizes in a 
single text box:
http://www.gtk.org/tutorial1.2/gtk_tut-14.html
 
GtkWidget *text;
...
text = gtk_text_new (NULL, NULL);
...
fixed_font = gdk_font_load ("-misc-fixed-medium-r-*-*-*-140-*-*-*-*-*-*");
...
gtk_text_insert (GTK_TEXT (text), fixed_font, &text->style->black, NULL,"Hello\n", -1);
 
 
Now I'd like to do the same in Vala. I've looked through valadoc and what valencia's completion would 
provide. But I couldn't find the keywords I expected in the Gtk namespace. Basically, I need an object that 
provides the gtk_text_insert(...) function, which allows me to add formatted text immediately.
 
VteTerminal, SourceView and TextView seem to be too limited, as they doesn't seem to provide such a function. 
Or am I just to blind to find a substitude that is as rich?
 
My understanding of creating GIR and VAPIs is not sufficient, but I think I wouldn't have to do this for 
gtktext.h, because the whole gtk-library is available to vala already?
 
I'll be happy about any input. Thanks a bunch in advance.
 
gilzad


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]