On Mon, Jan 18, 2010 at 07:57:51PM +0000, Ash wrote:
> Greetings,
> today I tried using VG_View
> 
>     VG_InitSubsystem();
> 
>     VG* VG1;
>     VG1 = VG_New(0);
>     VG_Init(VG1,0);
> 
>     VG_View* V1;
>     V1 = VG_ViewNew(win2,VG1,VG_VIEW_GRID);
> 
>     AG_Expand(V1);
> 
> As a result I see a small square with grid. I didn't find any way to resize 
> or 
> expand it, how should I do it? Can I use AG_WidgetSizeAlloc?

Calling both VG_New() and VG_Init() will probably break things, make
sure to call only VG_New(). This is true of all Agar APIs where both a
FOO_New() and a FOO_Init() function are documented -- the FOO_Init() is
only useful in cases like this:

        VG foo;
        VG_Init(&foo, 0);

AG_Expand() will expand the VG_View widget to fit all available space in
the parent widget. Passing the VG_VIEW_EXPAND flag to VG_ViewNew() will
have the same effect.

AG_WidgetSizeAlloc() is only useful when implementing new widgets, it
should never be called from applications.

_______________________________________________
Agar mailing list
[email protected]
http://libagar.org/lists.html

Reply via email to