Outliner widget
- From: Gary Benson <gary inauspicious org>
- To: gtk-app-devel-list gnome org
- Subject: Outliner widget
- Date: Wed, 13 Mar 2002 03:14:39 +0000 (GMT)
Hi all,
Over the past few weeks I've been contemplating writing an outliner for
GNOME, the core of which will be an outliner widget which I'm about to try
and write; the screenshot on http://www.outliners.com/ gives a fair idea
of what I'm intending (a picture tells a thousand words and all that).
Currently I'm a little lost as to where to start, and I'd appreciate some
feedback on my current thoughts.
Initially, I thought that a tree view would be a good starting point, but
I've become convinced that it would be very hard to implement what I want
with one. My current thinking involves a recursive tree of three custom
widgets that mirror the organisation of the data being represented.
The highest level widget, Outline, would be a scrolled window containing
an OutlineGroup, which would simply be a vertical box containing
OutlineElements. The OutlineElement itself would be the lowest level
widget comprising the arrow on the left (used both as a drag handle and to
hide the subtree), and a GtkTextView on the right, below which would
optionally be an OutlineGroup (see crappy ASCII art below).
+-------+------------------+
| | +--------------+ |
| Arrow | | GtkTextView | |
| | +--------------+ |
| | | OutlineGroup | |
| | +--------------+ |
+-------+------------------+
Now for the questions:
What would be good parent classes be for my three widgets?
The arrow would probably be a toggle button. Is it possible to make it so
that double-clicking is required to toggle it, so that single click may be
used to select the subtree? Is it possible to override the renderer for a
widget or do I need to make a custom one? Is it possible to make the arrow
stay at the top of its hbox cell or do I need a fixed container in there?
Folding would probably be accomplished by enclosing the GtkTextView/
OutlineGroup vbox in an event box and setting its height to that of a line
of text when folded. Does this sound reasonable or is there a better way?
Thanks in advance,
Gary
[ gary inauspicious org ][ GnuPG 85A8F78B ][ http://inauspicious.org/ ]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]