Hi,

On 5 May 2008, at 13:22, Dennis Schridde wrote:
> Am Sonntag, 4. Mai 2008 23:49:57 schrieb Freddie Witherden:
>> The problem I am having is how a widget should tell its parent where
>> it wants to be? Should it be relative to other widgets? Should it be
>> relative to a side (north, east, south, west)?
> My proposal is "stolen" from Qt: "layouts" and ~"hints".
>
>
> Layouts:
> myLayout = newHBoxLayout();
> myLayout->add( wdg1 );
> myLayout->add( wdg2 );
>
> Result:
> | wdg1 | wdg2 |
>
> (Similar for VBoxlayouts, etc.)
>
> In layouts any positional information of the widget is ignored.
>
>
> ~Hints:
> wdg1 = newWidget();
> wdg1->setMinimumSize( 0, 0 );
> wdg1->setMaximumSize( 1, 1 );
> wdg1->setDefaultSize( 0.5, 0.5 );

I like it. It is also the same method which GTK uses. Should be nice  
and easy to implement as well.

Regards, Freddie.

_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev

Reply via email to