GtkLayout: correct use or kludge?



hi, i've been trying to write a widget for quite some time, but i can't
quite get it right. it's always a half working kludge. i tried it on a
low level with gdkwindows to hold and move the children, but i had too
many troubles.

the widget is basically a container in which the children get scrolled
differently. one child gets scrolled in both directions, while others
are only scrolled by one or none. so, the latter widgets are stationary
in at least one direction. all of the children are visible at all times;
they never scroll off the viewable area as would happen if they were
scrolled normally.

i was about to try one of two ideas, but before i start i was hoping to
get some opinions.

1) use a gtklayout to hold everything. move the children on scroll
events accordingly by setting their attribute (x,y) position. then use
gdk_window_lower to put the fully scrollable child under everthing so it
doesn't obscure other children when scrolled.

2) use a layout to hold multiple layouts. each child layout is given a
viewable area (size) and attached to the appropriate scroll bars.

i think 2 sounds better, but i'm not sure yet. any ideas?

thanks!
-- 

-greg

http://neenjatech.org

Passionate hatred can give meaning and purpose to an empty life.
                -- Eric Hoffer



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