Boost logo

Boost :

Subject: Re: [boost] [rfc] cppgui
From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2009-07-01 19:13:47

------- Original message -------
> From: Stewart, Robert <Robert.Stewart_at_[hidden]>
> To: boost_at_[hidden]
> Sent: 1.7.'09, 17:09
> Felipe Magno de Almeida
>> On Wed, Jul 1, 2009 at 4:41 PM, Stewart,


>> > If you juxtapose spring tabs, they act as though there is a
>> > zero space, invisible widget between them. Thus,
>> > <ST><ST>widget<ST> puts the widget 2/3 of the way across the
>> > horizontal extent.
>> Why 2/3 if there's four widgets?
> I never said a spring tab was a widget.

I was confused because you mentioned the behavior as if there were
invisible widgets. So I wrongly assumed they were themselves widgets.

> Call it and treat it how you like. It merely consumes space, though in a
> layout mode, were there a GUI editor, they would be visible.

I get it now.

> Why 2/3?
> |<oooooooooooo><oooooooooooo><widget><oooooooooooo>|
> All spring tabs exert the same space-consuming force, so they divide the
> available space evenly among them. Thus, each spring tab consumes (width
> - widget.width)/N of the space. (Extend accordingly when there are more
> widgets in the "line.")
> The center of the widget is, thus, 2/3 of the way across the available
> width.

Now I get it. It is 2/3 of the available empty space.


>> Probably. But I wanted something more generic. Maybe the
>> proportion can be assigned.
> You could do that, but the simplicity of a spring tab is expressed in the
> formula shown above. There's no need to indicate the relative strength of
> any; just add more where needed to effect the needed alignment.

That excludes any resizing behavior. I'm not sure it would be too simple to
be usable? What if you have a huge space in some platform. The widget might
get too small. I guess it would be okay for automatically resized widgets,
like labels.


>> And what happens if two widgets are side-by-side to a spring.
>> Should it press both?
> Yes:
> |<ooooooooooooooo><widget><widget><ooooooooooooooo>|

I meant:


Where both first springs would actually be the same. I'm not sure this
question of mine is not because of a misunderstand of spring tabs. Are they

What do you think of this use-case be added to rulers instead? Where you
could attach it proportionally to the rule size? So you could add exactly
in 2/3 without creating extra objects to represent this rational. If spring
tabs are unidimensional, then they aren't much different from rulers.

>> I see a window as having a depth dimension, should springs
>> press work on a layer, or all depths of a window?
> I don't know, but I guess it would be layer specific.

Each time I like more the idea of creating a layer concept. Where all
widgets are in the same layer. Without overlapping. And the layer could
then have some layout, which would manage the widgets size and position to
avoid overlap. I have to grow this idea yet though.

> _____
> Rob Stewart robert.stewart_at_[hidden]
> Software Engineer, Core Software using std::disclaimer;
> Susquehanna International Group, LLP

Felipe Magno de Almeida
Consultor C++
Sent from my E71

Boost list run by bdawes at, gregod at, cpdaniel at, john at