Re: Gtk::Text widget
- From: Derek Simkowiak <dereks kd-dev com>
- To: Stephen White <spwhite chariot net au>
- Cc: gtk-list gnome org
- Subject: Re: Gtk::Text widget
- Date: Thu, 20 Jul 2000 10:06:37 -0700 (PDT)
-> > I think of my widget as structured in layers, like in the Gimp.
-> > The bottom layer is the gapped text buffer, the next layer up are the
-> > "Style" spans (which are optimal for scanner-based syntax highlighting).
-> > The third layer up will be overlapping tags, in a tree structure, once
-> > I've had time to write it.
->
-> Would it be possible to have multiple "Styles" applied to spans for things
-> like being able to have tooltips on the text inside the box? Eg, to display
-> information about C structures when holding a mouse over the reference.
A "Style" (or technically, the GtkEtextStyle) is currently just a
linked list of Pango attributes. It would be possible to add whatever you
wanted to the list, but you'd need to write extra code in the "View" to
handle non-Pango attributes.
The feature you mention is one I plan to implement in my
application :).
-> Using multiple spans would also allow right clicking on text to bring
-> up a menu associated with that bit of text without having to try and
-> calculate where the text is currently being displayed in the text
-> widget.
A Style can have as many attributes as you like (including a
pointer to a callback function of some kind), but some of this may be
better implemented with "Tags", which are overlapping. I have not yet
implemented tags in my widget, although it is planned.
-> If you're not interested in adding this, please let me know how I would
-> be able to assist in this (unless you feel it wouldn't be of sufficient
-> general purpose value).
I need to write the "View" first, and then see where these
features would fit in. But, I *do* wish to add features like the ones you
describe. I just don't know if they belong in the widget or in the app,
yet.
--Derek
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]