#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <Xol/OpenLook.h>
#include <Xol/Nonexclusi.h>
#include <Xol/RectButton.h>
#include <stdio.h>
static void select_callback();
static char *names[] = { "orange", "banana", "apple", "pear", "peach",
                         "watermelon", "pineapple", "cherry", "strawberry" };
void main(argc, argv)
  int   argc;
  char *argv[];
{
  XtAppContext app;
  Widget       toplevel, container, button[9];
  int i;
  /*
   * Initialize OLIT and the Intrinsics
   */
  OlToolkitInitialize((XtPointer)NULL);
  OlSetDefaultTextFormat(OL_MB_STR_REP);
  toplevel = XtAppInitialize(&app, "Fruits", NULL, 0, &argc, 
                             argv, NULL, NULL, 0);
/*
   * Create the OblongButton widget.
   */
  container = XtVaCreateManagedWidget("container", nonexclusivesWidgetClass,
                                       toplevel, 
                                       XtNlayoutType, OL_FIXEDCOLS,
                                       XtNmeasure,    3,
                                       NULL);
  for(i=0;i<XtNumber(names);i++)
      button[i] = XtVaCreateManagedWidget(names[i], rectButtonWidgetClass,
                                       container, NULL);
  XtRealizeWidget(toplevel);
  XtAppMainLoop(app);
}
