Agar-SVN | 18 Jun 2012 07:10
Favicon

Agar: r9127 - trunk/gui

Author: vedge
Date: 2012-06-18 01:10:47 -0400 (Mon, 18 Jun 2012)
New Revision: 9127

Modified:
   trunk/gui/AG_Box.3
Log:
Fix example code; closes #199

Modified: trunk/gui/AG_Box.3
===================================================================
--- trunk/gui/AG_Box.3	2012-06-15 08:40:33 UTC (rev 9126)
+++ trunk/gui/AG_Box.3	2012-06-18 05:10:47 UTC (rev 9127)
 <at>  <at>  -156,22 +156,22  <at>  <at> 
 .Nm
 widget neither reacts to nor generates any event.
 .Sh EXAMPLES
-The following code fragment creates two rows of buttons, packed horizontally.
+The following code fragment packs two columns of buttons:
 .Pp
 .Bd -literal -offset indent
 AG_Window *win;
-AG_Box *boxVert, *boxRow[2];
+AG_Box *boxHoriz, *boxCol[2];
 int i;

 win = AG_WindowNew(0);
-boxVert = AG_BoxNewVert(win, AG_BOX_EXPAND);
-boxRow[0] = AG_BoxNewHoriz(boxVert, AG_BOX_EXPAND);
-boxRow[1] = AG_BoxNewHoriz(boxVert, AG_BOX_EXPAND);
+boxHoriz = AG_BoxNewVert(win, 0);
+boxCol[0] = AG_BoxNewHoriz(boxHoriz, 0);
+boxCol[1] = AG_BoxNewHoriz(boxHoriz, 0);

 for (i = 0; i < 5; i++)
-	AG_ButtonNew(boxRow[0], 0, "foo");
+	AG_ButtonNew(boxCol[0], 0, "In column 1");
 for (i = 0; i < 5; i++)
-	AG_ButtonNew(boxRow[1], 0, "bar");
+	AG_ButtonNew(boxCol[1], 0, "In column 2");

 AG_WindowShow(win);
 .Ed

Gmane