GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sat Oct 25, 2014 7:41 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: runtime customization of TextBuffer tags
PostPosted: Tue Jan 08, 2008 4:36 pm 
Offline
GTK+ Guru

Joined: Fri Jan 04, 2008 3:17 pm
Posts: 183
Location: France (92340 Bourg La Reine)
Hello All,

What is the correct (and simple) way of being able to customize a tag table at runtime thru some .rc (or any textual configuration) files?


I am doing some stuff like the following to fill a tagtable (code sort of stolen from a gtk demo textview.c file)

Code:
  ////////////////
  //
  tag = gtk_text_tag_new ("heading");
  g_object_set (tag,
      "weight", PANGO_WEIGHT_BOLD, "size", 14 * PANGO_SCALE, NULL);
  gtk_text_tag_table_add (tagtable, tag);
  //
  tag = gtk_text_tag_new ("bold");
  g_object_set (tag, "weight", PANGO_WEIGHT_BOLD, NULL);
  gtk_text_tag_table_add (tagtable, tag);
  //
  tag = gtk_text_tag_new ("italic");
  g_object_set (tag, "style", PANGO_STYLE_ITALIC, NULL);
  gtk_text_tag_table_add (tagtable, tag);
  //
  tag = gtk_text_tag_new ("fixed");
  g_object_set (tag, "family", "monospace", NULL);
  //
  tag = gtk_text_tag_new ("xxsmall");
  g_object_set (tag, "scale", PANGO_SCALE_XX_SMALL, NULL);
  gtk_text_tag_table_add (tagtable, tag);
  //


Is there any quick and easy way to tell GTK to override these builtin settings by those in some rc (or other configuration) files? I want to avoid coding my own parser, etc...

Regards

_________________
Basile Starynkevitch (France)
http://starynkevitch.net/Basile/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group