Creating an aggregating GtkContainer
- From: Per Hermansson <hermansson per bredband net>
- To: gtk-app-devel-list gnome org
- Subject: Creating an aggregating GtkContainer
- Date: Wed, 18 Nov 2009 19:35:07 +0100
Hi everyone
I'm contributing to a project called the Common Printing Dialog
which goal is to create the next generation print dialog for Gnome.
The dialog allows users to customize different options which depends
on the current printer being selected.
What I'm struggling to implement is a GtkContainer which sort of aggregates
or combines multiple sub-containers. So that when adding new widgets
each sub-container is filled until no more space is available then the
next sub-container
is filled. A picture of how this should look like is available here:
http://wiki.openusability.org/printing/index.php/Image:Level3.5_1200.png
My question is if someone knows a good way to implement this.
I've tested with estimating the widgets size and if the sum of all
children is larger
then the container the next sub-container is used.
One problem is that the widget's size is not known until the widget gets
visible
so I need to workaround that.
Feel free to post suggestions here or have a look at the source code
here [1]
(e.g. the option_table_append function) and contribute a patch.
Thanks
Per
[1]
http://bzr.linuxfoundation.org/loggerhead/openprinting/misc/common-printing-dialog/annotate/head%3A/gtk-dialog/dialog-optiontable.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]