\manpage {panel} {} {Panels}
 
\definition
Panels are windows used for displaying text messages and updating the
values of variables. A panel $P$ consists of a set of panel items and a set
of buttons.  A variable of
a certain type (int, bool, string, double, color) is associated with each item (except for text items). It can be
manipulated through the item and a string label.
 
\creation P 
 
\create { }
   { creates an empty panel $P$. }
 
 
\create {(string\ s)}
   { creates an empty panel $P$ with header $s$. }
 
 
\create {(string\ s,\ int\ w,\ int\ h)}
   { creates an empty panel $P$ of width $w$ and
            height $h$ with header $s$. }
 
 
\operations 1.2 4.8 
 
\op  void set\_bg\_color {(color\ bg\_col)}
           {  sets the panel background color to $bg\_col$ .  }
 
 
\op  void buttons\_per\_line {(int\ n)}
           {  defines the maximal number $n$ of buttons per line.  }
 
 
\op  void label {(string\ s)}
           {  sets the panel label to $s$ .  }
 
 
\op  void text\_item {(string\ s)}
           {  adds a text\_item $s$ to $P$. }
 
 
\opl void bool\_item {(string\ s, \ bool\&\ x)}
           {  adds a boolean item with label $s$ and variable $x$ to $P$. }
 
 
\opl void real\_item {(string\ s, \ double\&\ x)}
           {  adds a real item with label $s$ and variable $x$ to $P$. }
 
 
\opl void color\_item {(string\ s, \ color\&\ x)}
           {  adds a color item with label $s$ and variable $x$ to $P$. }
 
 
\opl void lstyle\_item {(string\ s, \ line\_style\&\ x)}
           {  adds a line style item with label $s$ and variable $x$ to $P$. }
 
 
\opl void int\_item {(string\ s, int\&\ x)}
           {  adds an integer item with label $s$ and variable $x$ to $P$. }
 
 
\opl void int\_item {(string\ s, int\&\ x, \ int\ l, \ int\ h, \ int\ step)}
           {  adds an integer choice item with label $s$, variable $x$,
	     range $l$,\dots, $h$, and step size $step$ to $P$. }
 
 
\opl void int\_item {(string\ s, int\&\ x, \ int\ l, \ int\ h)}
           {  adds an integer slider item with label $s$, variable $x$, and
	     range $l$,\dots,$h$ to $P$. }
 
 
\opl void string\_item {(string\ s, \ string\&\ x)}
           {  adds a string item with label $s$ and variable $x$ to $P$. }
 
 
\opl void string\_item {(string\ label, string\&\ x, list\<string\>\&\ L)}
           {  adds a string item with label $s$, variable $x$, and menu $L$
	     to $P$. }
 
 
\opl void choice\_item {(string\ header, int\&\ x, list\<string\>\&\ L)}
           {  adds an integer item with label $s$, variable $x$, and choices
	     from $L$ to $P$. }
 
 
\opl void choice\_item {(string\ header, int\&\ x, string\ s1, ...,string\ sk)}
           {  adds an integer item with label $s$, variable $x$, and choices
	     $s_1$, \dots, $s_k$ to $P$ ($k \le 4$). }
 
 
\op  int button {(string\ s)}
           {  adds a button with label $s$ to $P$ and returns its number. }
 
 
\op  void new\_button\_line {()}
           {  starts a new line of buttons. }
 
 
\op  void display {()}
           {  display \var\ centered on screen.  }
 
 
\op  void display {(int\ x, int\ y)}
           {  display \var\ with left upper corner at $(x,y)$.  }
 
 
\op  void display {(window\&\ W)}
           {  display \var\ centered over window $W$.  }
 
 
\opl void display {(window\&\ W, \ int\ x, int\ y)}
           {  display \var\ with left upper corner at position $(x,y)$
             of window $W$.  }
 
 
\op  int  read {()}
           {  waits for a button selection in $P$. Returns the number of
             the selected button. }
 
 
\op  int  open {()}
           {  $P$.display() $+$ $P$.read(). }
 
 
\op  int open {(int\ x, int\ y)}
           {  $P$.display$(x,y)$ $+$ $P$.read(). }
 
 
\op  int open {(window\&\ W)}
           {  $P$.display$(W)$ $+$ $P$.read(). }
 
 
\opl int open {(window\&\ W, \ int\ x, int\ y)}
           {  $P$.display$(W,x,y)$ $+$ $P$.read(). }
 
 
