Re: Dynamic sizing.

Wolfgang Thaller <[email protected]>
Newsgroups gmane.comp.lang.haskell.gui
Message-ID <[email protected]>
Glynn Clements wrote:

> Wolfgang Thaller wrote:
>
>> Question to all: Who is not familiar either with Java's GridBagLayout
>> or with Tcl's "grid" geometry manager?  (BTW: Is XmRowColumn the same
>> thing or something different?)
>
> Well, XmRowColumn is a widget class, whereas the other two are
> "standalone" geometry managers.

Yes. I actually think we should be using specialized container widgets, 
not "standalone" geometry managers, because the former can be 
typechecked more easily (see my last e-mail for an example of what I'm 
thinking).

> Motif's "generic" container widget is XmForm. This allows you to place
> the children arbitrarily, with the edges positioned using attachments.

I lost track somewhere, but I think I get the drift (and I'll try 
reading it again tomorrow, when tiredness isn't interfering).
Is there anything that an XmForm do that Grids can't?

I think we should just manually implement a grid-layout manager for the 
Motif backend.
An alternative would be to manually implement something like XmForm on 
all other platforms, but it looks like that is harder than implementing 
a grid.

>> That's the best way of managing dynamic layouts that I know. Any
>> reasons for not using something like that?

> I find that the mechanisms used by Java and Tcl tend to be a bit too
> explicit in the actual placement and sizing of widgets. Motif prefers
> to allow widgets to size themselves, with the size and layout of the
> parent adjusting accordingly.

... as do Java's GridBagLayout and Tcl's grid.

> This simplifies i18n; [...]

Of course. But I don't have to create separate layouts for the Java/Tcl 
grid layout managers, either.

> For more complex layouts, it's common to create a hierarchy of nested
> containers.

Yes, agreed.

Cheers,

Wolfgang
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.