Re: [gtkmm] pack_start and AttachOptions is still confusing
- From: Murray Cumming <murrayc usa net>
- To: Michael Babcock <mbabcock la creatureshop henson com>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: [gtkmm] pack_start and AttachOptions is still confusing
- Date: 12 Jul 2002 09:13:58 +0100
On Thu, 2002-07-11 at 20:38, Michael Babcock wrote:
> Okay I realize it is probably too late to change this, but... 
No, it's not.
> The two booleans have been changed to a single bitwise ORable 
> enumeration. This makes the code more readable than just seeing "true" 
> or "false", but doesn't solve the other problem, which is that there are 
> two separate parameters, yet they are not independent. Even though we 
> only have the single enumeration now, by making them ORable, we still 
> have more allowable combinations than we should (in fact, it's worse 
> now, we have six possible attach options instead of four).
Well, ORable flags are like that - some of them (2 of the 3 here) are
mutually exclusive.
 
> I propose a single, non-ORable enumeration that accurately reflects the 
> possible packing options, perhaps something like:
> 
> SHRINK - Shrink space to widget's size request.
> EXPAND_PADDING - Expand space with padding around widget.
> EXPAND_WIDGET - Expand space by expanding the widget size.
I like the idea.
So
SHRINK would be Gtk::SHRINK (or false, false)
EXPAND_PADDING would be Gtk::EXPAND (or true, false)
EXPAND_WIDGET would be Gtk::EXPAND | 
Here is a link to the C function's documentation:
> 
> Am I correct that these are the only options that are really valid? This 
> seems much less confusing to me than having strange possibilites like 
> FILL with no EXPAND, or SHRINK|FILL, etc. I can never remember which 
> meaning is EXPAND or FILL either, and this eliminates that problem. 
> Thoughts?
> 
> -- 
> Michael Babcock
> Jim Henson's Creature Shop
> 
> 
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
> 
-- 
Murray Cumming
murrayc usa net
www.murrayc.com
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]