Add text formatting support to Glade

Rationale

Now that we have GtkBuilder support and GtkTextBuffer is exposed we should take better advantage of that.

Implementation

Support Pango Attributes in GtkEntry

Currently GtkLabel has support for direct PangoAttribute parsing, we should make it a part of this milestone to straight away reuse this code in GtkEntry and allow Glade to also configure pango attributes for entries (this should really mostly be cut/paste/reuse work).

Easier pango attributes editing

A WYGIWYS editor for pango markup formatting would make its use much more comfortable when avaliable (GtkEntry tooltips, GtkLabel...).

Fully support Buffers, Tags and Text

589413

With little effort this should be able to give us:

  1. Simply support for setting up a text 'palette' of sorts to use in code on your text (modifying the Glade file can change the look by changing the palette used in your app to display text).
  2. Create TextTags and associate them to a TextTagTable and this one to a TextBuffer so they're avaliable at run time.

  3. Have a customized Text Buffer editor which could allow the user to apply tags inline for preset text when a TextBuffer is associated with a TextTagTable (then that text would be serialized in xml for GtkBuilder to pick up later).

  4. Ease the binding of custom serialization/deserialization handlers to a TextBuffer for rich text support, besides Gtk's internal tagset format. GtkBuilder could register/unregister the format and its handlers as needed.

What we will need is 2 new entry points from GtkBuilder:

  1. Being able to add GtkTextTag children. The GtkTextTagTable->add() method already exists, but GtkTextTagTable doesn't implement the GtkBuildable interface. 590326

  2. Being able to install/use a custom parser on GtkTextBuffer to handle a custom "serialized-text" buffer that would be a serialized rich text format refering to the tags defined in the buffer's associated tag table. There's already an usable parser for a Gtk internal rich text format (see GtkTextBuffer->register_serialize_tagset() and GtkTextBuffer->register_deserialize_tagset()), but GtkTextBuffer doesn't implement the GtkBuildable interface either. 590327

Apps/Glade/Roadmap/TextFeatures (last edited 2013-11-18 19:35:46 by WilliamJonMcCann)