Re: [gtkmm] pack_start and AttachOptions is still confusing



Sorry, I hit the wrong key and it turned out to be a "send message" shortcut.

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. We have improved it, but if we can do better then we should. 
We might need a vote so that people don't feel that another API change has 
been forced on them.

> 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 is this correct?:
SHRINK would be Gtk::SHRINK (or false, false)
EXPAND_PADDING would be Gtk::EXPAND | Gtk::FILL (or true, true) (the default)
EXPAND_WIDGET would be Gtk::EXPAND (true, false) 

Here is a link to the C function's documentation:
http://developer.gnome.org/doc/API/2.0/gtk/gtkbox.html#gtk-box-pack-start

Are you certain that (false, true) is never used? Can you convince me or show me 
something official that says that?

-- 
Murray Cumming
murrayc usa net
www.murrayc.com




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