





                                GGUUII CCllaasssseess iinn IIddooll

                                  _R_o_b_e_r_t _P_a_r_l_e_t_t
                             _(_p_a_r_l_e_t_t_@_d_i_a_l_._p_i_p_e_x_._c_o_m_)





          11..  IInnttrroodduuccttiioonn

          I recently undertook a medium size programming project in Idol,
          and had to write some GUI components.  I have expanded them and
          made  them suitable for general purpose use and I hope they are
          of use to other Idol programmers.

          The following GUI components are provided.  Each is a  subclass
          of a class called ``Component''.

          +o      Buttons, with text or Icon image content.

          +o      Text labels.

          +o      Images, loaded from external files.

          +o      Text fields, for input of a single line of text.

          +o      Check  boxes  (on/off  buttons).   These  can be grouped
                 together to give ``radio buttons''.

          +o      Text area.  A scrollable,  optionally  editable,  multi-
                 line text area.

          +o      Scroll  bars.   These  can  be  used to represent a page
                 within a document, or as  sliders  for  varying  over  a
                 given range of integer or real values.

          +o      List selection.  A pop-up list for selecting one of sev-
                 eral text items.

          +o      Editable list selection.  A pop-up list with the  selec-
                 tion being editable.

          +o      Menus.   Multi-level menus, with optional left and right
                 text or Icon image labels.  Also  with  check-boxes  and
                 groups of check-boxes (ie menu based radio buttons), and
                 menu separators.

          +o      Tables.    A   scrollable   multi-column   table,   with
                 adjustable column widths.

          +o      Tabbed  panes.   The familiar rectangular area with tabs
                 along the top, often used in configuration windows.

          +o      Decorative borders.

          Each component may be positioned in the  dialog  window  in  an
          absolute  position, or with a specification giving a percentage


                                          1









          of the window size, plus or minus an  offset.   In  the  latter
          case they will be re-positioned if the window is re-sized.

          Each  component  can be given its own Icon graphics attributes,
          specifying colours, fonts and so on.  These can  be  mixed  and
          matched at will.  Proportional fonts can be used if desired.

          Some  objects  contain other objects.  In this case the objects
          inside have positions  relative  to  the  container,  and  they
          inherit the container's graphics attributes.

          Double  buffering  is  extensively  used  in order to eliminate
          unsightly flicker from rapidly changing displays.

          22..  IInnssttaallllaattiioonn

          The gui classes come as part of the  distribution  of  ivib,  a
          program  for  designing  dialogs  interactively  using a visual
          interface.  Three files are needed to  use  the  classes  sepa-
          rately,  and these are located in the src directory of the ivib
          distribution :-

          center box; l    l.  gui.iol   T{ Main file containing the  gui
          classes.  T} keysyms.iol    T{ Include file containing X Window
          key definitions T} guiconsts.iol  T{ Some constant definitions.
          T}


          Either  copy  these files to a separate directory and link them
          into your program, or alternatively create a symbolic  link  to
          them.

          The  demos  directory  of  ivib  contains several demo programs
          which use the classes.  Just go to that directory and run  make
          to create executable programs.

          NB  -  gui.iol  uses class names that are longer than 8 charac-
          ters.  Currently only v10 of the Unix version of Idol  supports
          this.  Version 10.0 is available from

               http://segfault.cs.utsa.edu/icon/idol.zip.


          At  present,  I  have  not tried these classes out on a Windows
          system, so the above just relates to Unix systems.   Also,  the
          file  keysyms.iol  contains  X Window keyboard codes, and would
          need to be replaced for other systems.

          33..  CCrreeaattiinngg aa ddiiaalloogg

          A dialog window, into which components are placed is created by
          first  declaring  a  class  which is a sub-class of _Dialog, as
          follows :-

               class TestDialog : _Dialog(components)
                  method dialog_event(ev)
                     ...
                  end


                                          2









                  ...

                  initially
                     self$_Dialog.initially()
                     ...

               end

          Note the underscore before the D in ``_Dialog'' :  this  is  to
          prevent a name clash with an Icon library procedure of the same
          name.

          The best way to see how to fill in the blanks in  this  outline
          is  by an example.  Let us add two components into the above: a
          text button and a label.

          A label is added by adding the following code to the  initially
          clause :-

               local l

               l := Label()
               l$set_label("Click to close")
               l$set_pos("50%", "33%")
               l$set_align("c", "c")
               self$add(l)

          The  set_pos() method call makes the x position of the label be
          50% of the window width and  the  y  position  be  33%  of  the
          height.   The  set_align() method call aligns the label centred
          about that position.

          The line self$add(l) adds the label to the dialog.

          The code for adding a button is very similar.

               b := TextButton()
               b$set_label("Button")
               b$set_pos("50%", "66%")
               b$set_align("c", "c")
               self$add(b)

          The variable b should not be a  local  variable,  but  a  class
          variable,  because  we  will  refer  to  it in the dialog_event
          method.  This method is invoked whenever an event  takes  place
          in the window.  In this example, the method just checks whether
          the button is  clicked  and  if  so  closes  the  window.   The
          ev$get_code()  test  is necessary because a button produces two
          events; one with code 0 when the button goes down  and  another
          with code 1 when it is released.

               method dialog_event(ev)
                  if ev$get_component() === b & ev$get_code() > 0 then
                     self$dispose()
               end

          The attributes of the dialog window, including its initial size
          are set using the set_attribs() method of the _Dialog class:


                                          3









               self$set_attribs("size=215,150", "bg=light gray", "font=serif", "resize=on")

          Finally, the method _Dialog.show_modal() needs to be invoked to
          make the window appear:

               self$show_modal()

          Both  these  calls  can conveniently be placed in the initially
          section of the dialog.

          The final result is as follows :-

               class TestDialog : _Dialog(b)
                  method dialog_event(ev)
                     if ev$get_component() === b & ev$get_code() > 0 then
                        self$dispose()
                  end

                  initially
                     local l

                     self$_Dialog.initially()
                     l := Label()
                     l$set_label("Click to close")
                     l$set_pos("50%", "33%")
                     l$set_align("c", "c")
                     self$add(l)

                     b := TextButton()
                     b$set_label("Button")
                     b$set_pos("50%", "66%")
                     b$set_align("c", "c")
                     self$add(b)

                     self$set_attribs("size=215,150", "bg=light gray",  "font=serif", "resize=on")
                     self$show()
               end

          The dialog window can be invoked by simply using

               TestDialog()

          in the calling program.  The actual window is as follows :-

                           _F_i_g_u_r_e _1 _- _T_e_s_t_D_i_a_l_o_g _w_i_n_d_o_w

          This dialog can be reproduced by running the following commands
          :-

               idol testdialog.iol gui.iol
               testdialog


          33..11..  CChhiilldd ddiiaallooggss

          The  show()  method  is  appropriate  to use to create a dialog
          from, say, the main() procedure in a program, but if  a  dialog
          is  being created from within another dialog, then it is better


                                          4









          to use one of two methods in the _Dialog class  to  create  the
          dialog :-

          show_modal(d)  displays  the  dialog  d  as a _m_o_d_a_l dialog.  In
          other words, window  events  to  any  other  open  dialogs  are
          blocked  until  the dialog d is closed.  Also, the show_modal()
          method doesn't return until the dialog d is closed.

          show_modeless(d) displays the dialog d as  a  _m_o_d_e_l_e_s_s  dialog.
          This  means that window events are processed by the parent dia-
          log and d concurrently.  The call to show_modeless() opens  the
          dialog  and  returns  immediately, in contrast to show_modal().
          Note that when the parent dialog is closed, the child dialog is
          automatically closed.

          33..22..  TTiicckkeerrss

          A  dialog  may specify a tick() method, which is invoked by the
          toolkit at regular intervals.  The interval  between  ticks  is
          specified  by  the  set_ticker(n)  interval,  with  n being the
          interval desired in milliseconds.  The actual interval may  not
          be  exactly that amount, but it will not be smaller.  An active
          ticker can be stopped with stop_ticker() method.

          33..33..  DDoouubbllee CClliicckkss

          Double clicks are supported with the  get_click_count()  method
          in  the _Dialog class.  After a mouse press event has been gen-
          erated, this method can be called to determine how many  repeat
          clicks have occurred in a row.  A repeat click is a mouse press
          with the same mouse button in the same position and less than a
          specified time later than the previous click.  That time is set
          with the set_double_click_delay(i) method, where i is  in  mil-
          liseconds.   The default delay is 500 milliseconds, or one half
          second.

          44..  RReeffeerreennccee sseeccttiioonn


          44..11..  TTiicckkeerr ccllaassss

          Super-class : (none)

          A class for an object with a ticker.  This class should be sub-
          classed  by  a  class  that  wishes  to have a ticker facility,
          namely implement a method that  is  called  repeatedly  at  set
          intervals.

          tick()
               This method should be overridden by the subclass.  It will
               be called repeatedly.


          set_ticker(n)
               Start the ticker process, with  the  tick()  method  being
               invoked approximately every n milliseconds.




                                          5









               Parameters :

               n      the ticker interval in milliseconds.


          stop_ticker()
               Stop the ticker.


          retime_ticker(n)
               Change the interval of the ticker

               Parameters :

               n      the new interval.


          is_ticking()
               Succeeds if and only if the ticker is active.


          44..22..  DDiissppaattcchheerr ccllaassss

          Super-class : (none)

          This  class handles Icon events, dispatching them to the appro-
          priate dialog.  It also controls any active Tickers, activating
          them between events as and when appropriate.

          44..33..  __EEvveenntt ccllaassss

          Super-class : (none)

          An instance of this class is used to represent an event.

          get_event()
               Returns the Icon event associated with the event.


          get_code()
               Returns an additional field to distinguish between differ-
               ent types of event generated by the same  component.   For
               example,  a  TextField produces a code of zero when return
               is pressed, and a  code  of  one  when  the  contents  are
               changed.


          get_component()
               Returns the component associated with the event.  This may
               be a subclass of either Component or a MenuComponent.


          44..44..  __DDiiaalloogg ccllaassss

          Super-class : Container

          This is the parent class of a dialog window.



                                          6









          get_click_count()
               Returns the number of mouse clicks that have occurred con-
               secutively,  with  each  click  in the sequence being less
               than double_click_delay milliseconds apart.  That variable
               is  by  default 500 milliseconds, but it may be configured
               with set_double_click_delay().


          show_child(d)
               This is a variation on the conventional modal and modeless
               methods.   The dialog is opened, input to other windows is
               not blocked, but the call does not return until the window
               is closed.

               Parameters :

               d      The  parent  dialog, if specified, is blocked until
                      the window is closed.


          show_modeless(d)
               Displays the dialog as a modeless dialog.  This means that
               window  events are processed by this dialog and other open
               dialogs concurrently.  The call to  show_modeless()  opens
               the dialog and returns immediately.

               Parameters :

               d      This  optional  parameter specifies the parent dia-
                      log.  When a parent dialog  is  closed,  its  child
                      dialogs are automatically closed.


          show_modal(d)
               Displays  the  dialog  as a modal dialog.  In other words,
               window events to any other open dialogs are blocked  until
               the  dialog  is  closed.  This method doesn't return until
               the dialog is closed.

               Parameters :

               d      The parent dialog.  It will not normally be needed.


          get_win()
               Returns the Icon window associated with the dialog.


          set_min_size(w, h)
               Sets  the  minimum dimensions for a window.  The user will
               not be able to resize the window below this size.


          set_focus(c)
               Sets keyboard focus to the given component.   This  method
               should  only  be  invoked  after  the dialog has been dis-
               played.  To give a component the initial  keyboard  focus,
               invoke this method from within init_dialog()


                                          7









          clear_focus()
               Clear the keyboard focus.


          component_setup()
               This  empty  method may be overridden to add components to
               the dialog.  Alternatively, components may be added in the
               dialog's initially method.


          end_dialog()
               This  empty  method may be overridden.  It is invoked just
               before the dialog window is closed.


          dialog_event(e)
               This method must be over-ridden in the  subclass.   It  is
               the method which is invoked when an event occurs.

               Parameters :

               e      The instance of the _Event class to be processed.


          set_double_click_delay(i)
               Set  the delay in milliseconds between double clicks.  The
               default is 500 milliseconds


          set_repeat_delay(i)
               Set the delay in milliseconds between an initial repeating
               event and the start of repeat events.   The default is 500
               milliseconds


          set_repeat_rate(i)
               Set the delay in milliseconds  between  repeating  events.
               The default is 100 milliseconds


          44..55..  CCoommppoonneenntt ccllaassss

          Super-class : Ticker

          This is the parent class of all the GUI components.  All of its
          methods and variables therefore apply to its sub-classes.

          set_tooltip(x)
               Set a tooltip string.  This is presently only used by  the
               Toolbar class.


          is_hidden()
               Succeed  if  the component is hidden; for example if it is
               within a tabbed pane not presently visible.





                                          8









          is_unhidden()
               Succeed if the component is not hidden.


          is_shaded()
               Succeeds if the component is shaded; fails  otherwise.   A
               shaded  component, such as a button, may be displayed dif-
               ferently, and will not generate events.


          is_unshaded()
               Succeed if the component is not shaded.


          do_shading(W)
               Called from a component's display()  method,  this  method
               filters  the component to give a shaded appearance, if the
               is_shaded_flag is set.  W is the window to draw into (nor-
               mally self.cwin).


          handle_event(e)
               This method is over-ridden by all this class's subclasses.
               It is the method which handles an Icon event e.  It  would
               not  normally  be  called  by  a  user program.  It should
               either fail, or return an  _Event  structure.   This  will
               then  be  passed to the  dialog_event() method of the dia-
               log.  The first two fields of the _Event structure  should
               be  the  Icon  event  e  and the object itself.  The third
               field is the code, which can be any integer.


          toggle_is_shaded()
               Swap the shaded status of the component.


          set_is_shaded()
               Set the shaded status of the component to shaded.


          clear_is_shaded()
               Set the shaded status of the component to not shaded.


          toggle_draw_border()
               Toggle whether or not to draw a border around  the  compo-
               nent.   Different objects respond differently to this flag
               being set; some ignore it altogether.


          set_draw_border()
               Set the component such that a border is drawn.


          clear_draw_border()
               Set the component such that a border is not drawn.




                                          9









          display(buffer_flag)
               This draws, or re-draws, the component in the dialog  win-
               dow.

               Parameters :

               buffer_flag
                      If  this  parameter is not null, then the component
                      is displayed into the buffer window, not the dialog
                      window  (this  is  used  for  double-buffering pur-
                      poses).


          set_attribs(x[])
               Set the Icon attribs of the component to the given parame-
               ter

               Example :

                    w$set_attribs_list(["font=helvetica", "bg=pale blue"])



          set_attribs_list(l)
               Equivalent  to set_attribs(), above, but takes a list as a
               parameter.

               Example :

                    w$set_attribs_list(["font=helvetica", "bg=pale blue"])


               Parameters :

               l      The list of attribs.


          in_region()
               Succeeds if the component is not shaded and the values  of
               &x and &y lie within the component.


          got_focus()
               Method  called when the component gets the keyboard focus;
               may be extended.


          get_parent_win()
               Return the Icon window of the dialog in which  the  compo-
               nent resides.


          lost_focus()
               Method called when the component loses the keyboard focus;
               may be extended.





                                          10









          set_pos(x_spec, y_spec)
               Set the x and y position of the component.   Each  coordi-
               nate  can  be either an absolute pixel position, or can be
               given in the form of a percentage plus or minus an offset.

               Example :

                    c$set_pos(100, "25%")
                    c$set_pos("50%-20", "25%+100")


               Parameters :

               x_spec The x specification.

               y_spec The y specification.


          set_size(w_spec, h_spec)
               Set  the size of the component.  The parameters are in the
               same format as for set_pos() above.  Some components  will
               set  sensible  default sizes, but for others the size must
               be set explicitly.


          set_align(x_align, y_align)
               Set the alignment of the component.  Options  for  x_align
               are  ``l'',  ``c''  and ``r'', for left, centre, and right
               alignment.  Options  for  y_align  are  ``t'',  ``c''  and
               ``b'',  for  top centre and bottom alignment.  The default
               alignment is ``l'', ``t''.

               Parameters :

               x_align
                      The x alignment

               y_align
                      The y alignment


          get_parent_Dialog()
               Returns the dialog holding the component.


          set_parent_Dialog(c)
               Sets the owning _Dialog of  the  component.   This  method
               needs  to be extended for a component which contains other
               components.

               Parameters :

               c      The parent dialog.


          firstly()
               This method may be extended.   It  is  invoked  after  the
               position  of  the  object has been computed and the window


                                          11









               has been opened, but before the object has been  displayed
               in the window.


          finally()
               This  method  may  be extended.  It is invoked just before
               the window is closed.


          parse_pos(total, s)
               Parse a position specification into an absolute value.

               Parameters :

               total  The total value

               s      The size specifier


          resize()
               Compute the absolute positions and sizes from the specifi-
               cations  given  by  set_pos() and set_size().  This method
               needs to be extended for a component which contains  other
               components.


          generate_components()
               Generate  all the components that are visible in this com-
               ponent (which may be a container).


          generate_all_components()
               Generate all the components, including non-visible ones in
               this component.


          x_spec
               x position as specified by set_pos(), eg "50%"



          y_spec
               y position as specified by set_pos().


          w_spec
               width specifier as specified in set_size(), eg "100%"


          h_spec
               height specifier as specified in set_size(),


          x_align
               x alignment as specified in set_align(), eg "l".





                                          12









          y_align
               y alignment as specified in set_align(), eg "b".


          x
               Absolute x position in pixels computed from x_spec and the
               dimensions of the enclosing object or window.


          y
               Absolute y position.


          w
               Absolute width in pixels  computed  from  w_spec  and  the
               dimensions of the enclosing object or window.


          h
               Absolute height in pixels.


          parent_Dialog
               The  _Dialog  class  instance of which this Component is a
               part.


          attribs
               A list of strings being the Icon graphics  attributes,  eg
               ["bg=blue", "resize=on"].


          has_focus
               Flag  indicating  whether the Component currently has key-
               board focus; &null means it hasn't.


          is_shaded_flag
               Flag indicating whether the Component currently is shaded;
               &null means it isn't.


          cwin
               A  cloned  window created by combining the Dialog's canvas
               with the Component's attributes, so drawing into this win-
               dow  will draw straight to the Dialog window with the cor-
               rect attributes.


          cbwin
               A cloned window created by combining a buffer window  with
               the  Component's attributes.  This is used solely for dou-
               ble-buffering purposes.


          accepts_tab_focus_flag
               Flag indicating whether  the  Component  accepts  keyboard
               focus by way of the tab key being pressed;  &null means it


                                          13









               doesn't.


          draw_border_flag
               Flag indicating whether the Component should have a border
               drawn around it; &null means no.  Many Components (such as
               TextButtons) ignore this flag.


          tooltip
               Tooltip string for use with ToolBar objects.


          parent_Component
               Reference to enclosing Component object.


          44..66..  CCoonnttaaiinneerr ccllaassss

          Super-class : Component


          add(c)
               Add the Component to the Container.

               Parameters :

               c      The Component to add.


          set_components(x)
               Set the list of Components in this Container.

               Parameters :

               x      The list of Components.


          get_components()
               Get the list of Components in this Container.

               Returns :

               The list of Components


          44..77..  VViissiibblleeCCoonnttaaiinneerr ccllaassss

          Super-class : Component

          This is similar to a Container, except that the  object  itself
          is  a  capable  of  display.   A VisibleContainer should not be
          instantiated itself; rather one of  its  subclasses  should  be
          instantiated.

          add(c)
               Add the Component to the Container.



                                          14









               Parameters :

               c      The Component to add.


          set_components(x)
               Set the list of Components in this Container.

               Parameters :

               x      The list of Components.


          get_components()
               Get the list of Components in this Container.

               Returns :

               The list of Components


          44..88..  PPaanneell ccllaassss

          Super-class : VisibleContainer

          A  Panel of components.  This subclass of VisibleContainer just
          implements the methods display and handle_event, to display and
          forward events to all of its components.

          44..99..  TTooggggllee ccllaassss

          Super-class : (none)

          This  is a class for representing objects which can have an on-
          off state, in particular checkboxes, toggle buttons,  and  menu
          checkboxes.

          into_cbg()
               This  empty  method  may be overridden; it is invoked when
               the object is added to a CheckBoxGroup.  Note that  it  is
               overridden by some of the subclasses described below.


          set_parent_check_box_group(x)
               Set the parent CheckBoxGroup.

               Parameters :

               x      The parent CheckBoxGroup.


          is_checked()
               Succeed if the object is checked.


          get_status()
               Return  the  status  of  the  object;  1  if the object is
               checked, &null otherwise.


                                          15









          toggle_is_checked()
               Toggle the status of the object.


          set_is_checked()
               Set the status to checked.


          clear_is_checked()
               Set the status to unchecked.


          44..1100..  SSiizzeerr ccllaassss

          Super-class : Component

          This class provides a component which can be dragged across the
          window,  allowing  panes  within  the window to be resized.  An
          Event  is  generated  when  the  Sizer  has  been  dragged  and
          released.  The new position may then be obtained and the dialog
          adjusted accordingly.

          set_min_max(min, max)
               Set the minimum and maximum values for the Sizer.  Whether
               these  are x or y values depends on the orientation of the
               Sizer.


          get_curr_pos()
               Return the current position of the  Sizer.   This  may  be
               invoked  to  determine where the Sizer has been dragged to
               after it has generated an event.


          get_delta()
               Get the size of the move  during  the  last  drag  of  the
               Sizer.


          set_is_horizontal()
               Configure  the Sizer to be horizontal; the default is ver-
               tical.


          44..1111..  BBuuttttoonn ccllaassss

          Super-class : Toggle, Component

          This is the parent  class  of  the  button  classes,  including
          checkboxes.

          A  Button  produces  and  Event  of  code  0 when the button is
          depressed, and code 1 when it is released.

          By default, when a button holds the  keyboard  focus  a  dashed
          line  appears  just  within  the  button.  Then, when return is
          pressed an event of code 2  is  generated.   The  method  _Dia-
          log.set_initial_focus() can be used to have the button have the


                                          16









          focus when the dialog is first displayed.

          Buttons also repeatedly produce an event of -1 whilst they  are
          held  down,  rather like a repeating keyboard press.  The delay
          between the initial repeat event and subsequent  repeat  events
          is set in the parent dialog (see above).

          set_no_keyboard()
               Invoking  this  method  disables the keyboard control over
               the button described above.   No  dashed  line  will  ever
               appear  in  the  button  display  and  return will have no
               effect on the button even if it has the focus.


          set_imgs(x, y)
               Set the up/down images (if any) to the  strings  provided,
               which should be in Icon image format.  The two images must
               have the same dimensions.

               Parameters :

               x      The up image

               y      The down image


          set_img(x)
               Set the image (if any) to the given string,  which  should
               be in Icon image format.

               Parameters :

               x      The image


          toggle_is_checked()
               Toggle the checked status of the button.  This method, and
               the following two methods, may be inappropriate  for  non-
               toggle styles of button.


          set_is_checked()
               Set the status to checked.


          clear_is_checked()
               Set the status to unchecked.


          set_label(x)
               Set the label of the button, if any.

               Parameters :

               x      The label





                                          17









          44..1122..  CChheecckkBBooxx ccllaassss

          Super-class : Button

          An  instance of this class is a small button with a label which
          is either in an on or off state.  The button is an Icon  image,
          which may be specified by the user if desired.

          The images will default to appropriate values if not specified.

          The size will also default if not specified.  The methods  used
          to control the images, label and check the status are inherited
          from the superclasses Button and Toggle.

          44..1133..  TTeexxttBBuuttttoonn ccllaassss

          Super-class : Button

          A button with a text label.

          The size of the button can either be set using  set_size(),  be
          left to default to a size based on the given label.

          set_internal_alignment(x)
               Set  the  alignment  of  the label within the button.  The
               parameter should be either ``l'', ``c'' or  ``r''  to  set
               the  alignment  to left, centre or right respectively.  If
               this method is not invoked, then the alignment is centred.

               Parameters :

               x      The alignment


          44..1144..  IIccoonnBBuuttttoonn ccllaassss

          Super-class : Button

          This is a button with an Icon image within it.

          There  is  a  useful program in the Icon program library called
          xpmtoims, which will take an xpm file and output the equivalent
          Icon  image  string, which can then be inserted into a program.
          See also the X window programs sxpm and pixmap for viewing  and
          editing xpm files respectively.

          A border may be requested with set_draw_border().

          Unless  explicitly  specified,  the  size  will  default to the
          image's  size,  plus  a  standard  surround  if  a  border   is
          requested.

          44..1155..  TToogggglleeTTeexxttBBuuttttoonn ccllaassss

          Super-class : TextButton

          This  is simply a TextButton which acts as a toggle button.  In
          other words, when it is pressed down it stays down.  When it is


                                          18









          pressed  again  it  comes back up.  It therefore has one of two
          states, like a check box.

          44..1166..  TToogggglleeIIccoonnBBuuttttoonn ccllaassss

          Super-class : IconButton

          The equivalent of a ToggleTextButton, but for an IconButton.

          44..1177..  IIccoonn ccllaassss

          Super-class : Component

          This class displays an icon, supplied in Icon image format.   A
          border may be requested with toggle_draw_border().

          Unless  explicitly  specified,  the  size  will  default to the
          image's  size,  plus  a  standard  surround  if  a  border   is
          requested.

          set_img(x)
               Set the image to be displayed.

               Parameters :

               x      The image to be displayed


          44..1188..  LLaabbeell ccllaassss

          Super-class : Component

          This  class  implements  a  Text  label.  The default width and
          height are determined by dimensions of text

          set_internal_alignment(x)
               The internal alignment of the label, which should  be  one
               of  ``l'',  ``c''  or  ``r'',  for  left, centre, or right
               alignment respectively.   The default is ``l''.

               Parameters :

               x      The alignment.


          set_label(x)
               Set the label.

               Parameters :

               x      The label.


          44..1199..  IImmaaggee ccllaassss

          Super-class : Component




                                          19









          This class loads an image from file and displays it.  The image
          should  be  in  GIF format.  A border may be included with tog-
          gle_draw_border().

          The size of the area into which the image is drawn must be  set
          with set_size().

          set_internal_alignment(x, y)
               Set  the  horizontal  and  vertical alignment of the image
               within the area of the component; x should be ``l'', ``c''
               or  ``r'',  y should be ``t'', ``c'' or ``b''.  Default is
               ``c'', ``c''.


          set_filename(x)
               Set the name of the file from which to load the image; re-
               display the image from the new file if appropriate.


          set_scale_up()
               If  set,  then  the  image will be scaled up to fit in the
               space specified by set_size().  The image will not be dis-
               torted, but will be expanded to fill one of the dimensions
               depending on its shape.  If the image is bigger  than  the
               specified size then it will always be scaled down.


          44..2200..  TTeexxttFFiieelldd ccllaassss

          Super-class : Component

          A  class  for a single input line of text.  The text can scroll
          within the area specified.  By default, a border surrounds  the
          text area; this can be turned of by using toggle_draw_border().

          The horizontal size must be set by the set_size() method: there
          is no default (the vertical size will default, however).

          An event is generated when return is pressed (with code 0), and
          whenever the contents are changed (with code 1).

          set_filter(c)
               Set a filter on the characters allowed to be input to  the
               text field.

               Example :

                    # Permit only hexadecimal characters as input
                    set_filter('0987654321abcdefABCDEF')


               Parameters :

               c      The cset of permissible characters.


          get_contents()
               Return the present contents of the text field.


                                          20









          set_contents(x)
               Set  the  contents  of the field.  If not invoked then the
               initial content is the empty string.

               Parameters :

               x      The contents


          44..2211..  BBoorrddeerr ccllaassss

          Super-class : Panel

          This class provides decorative borders.  Optionally,  a  single
          other  component  can  be  the title of the Border.  This would
          normally be a Label object, but it could also be a CheckBox  or
          an Icon, or whatever is desired.

          set_internal_alignment(x)
               Set  the  alignment of the title object.  The input string
               should be ``l'', ``c'' or ``r''.


          set_title(c)
               Set the title object to c.


          44..2222..  CChheecckkBBooxxGGrroouupp ccllaassss

          Super-class : (none)

          This class is simply a container for several objects which then
          act  together as ``radio buttons''.  The objects should be sub-
          classes of Toggle, but are normally checkboxes.

          The set/unset status of objects in a  CheckBoxGroup  should  be
          set  with the set_which_one method, not by setting the individ-
          ual items directly with their own methods; that would result in
          confusion.

          NB  - the objects in the group must be added to both the Check-
          BoxGroup and the dialog box too; a CheckBoxGroup is not a  Con-
          tainer.

          set_by_flag(i)
               Set  the  object which is down according to the integer i.
               If i = 1 then the first object is down, if i = 2 the  sec-
               ond is down, etc for i = 4, 8, 16.


          get_by_flag()
               Returns  an  integer in the range 1, 2, 4, 8 ... depending
               upon whether the first, second, third etc object is  down.


          get_which_one()
               Returns the object is currently down.



                                          21









          add(c)
               Add the object to the CheckBoxGroup.

               Parameters :

               c      The object to add, which must be a subclass of Tog-
                      gle.


          set_which_one(x)
               Set which CheckBox which is down.

               Parameters :

               x      The object which is down.


          44..2233..  SSccrroollllBBaarr ccllaassss

          Super-class : Component

          This class provides horizontal and vertical scroll bars.

          There are two ways to use a scroll bar.  The first  way  is  to
          set  a  total_size  (represented by the whole bar), a page_size
          (represented by the draggable  button)  and  an  increment_size
          (being  the  amount added/subtracted when the top/bottom button
          is  pressed).   The  value  will  then  range  from   zero   to
          (total_size  -  page_size) inclusive.  An initial value must be
          set with the set_value() method.

          Alternatively, a scroll bar can  be  used  as  a  slider  which
          ranges  over  a given range of values.  In this case, the range
          is set with set_range().  It is  still  necessary  to  set  the
          increment  size  and the initial value, as above, but page_size
          and total_size should not be set.

          Real numbers as opposed to integers can be used for  the  range
          settings if desired.

          An  Event  is  returned whenever the buttons are pressed or the
          bar dragged; the value can be retrieved  by  get_value().   The
          event  code (obtainable by get_code()) is 1 if the bar has been
          dragged, and 0 if either button has been  pressed  or  the  bar
          released  after being dragged.  This fact can be used to reduce
          the number of events which are processed by the user's  program
          - just ignore events with code 1.

          set_is_horizontal()
               Make the scroll bar horizontal (default is vertical).


          set_total_size(x)
               Set the total size which the scroll bar area represents.

               Parameters :




                                          22









               x      The total size


          get_total_size()
               Return the total size.


          set_page_size(x)
               Set  the  size which the bar in the scroll bar area repre-
               sents.

               Parameters :

               x      The size.


          get_page_size()
               Get the page size.


          get_value()
               Get the value.

               Returns :

               The value


          set_value(x)
               Set the value representing the  top  of  the  bar  in  the
               scroll  bar.   The value is forced into range if it is not
               in range already.

               Parameters :

               x      The value.


          set_increment_size(x)
               Set the amount to increase the value by when  one  of  the
               buttons is pressed.

               Parameters :

               x      The increment size.


          set_range(lo, hi)
               Set  the range of the scroll bar.  The values may be inte-
               ger or real.

               Parameters :

               lo     The lower bound

               hi     The upper bound




                                          23









          44..2244..  SSccrroollllAArreeaa ccllaassss

          Super-class : Component

          This class acts as a superclass for any object which wishes  to
          display several items within a scrollable area.

          set_contents(x)
               Set the data to be displayed.

               Parameters :

               x      The list of data.


          set_checked(l)
               Set the checked (highlighted) lines.

               Parameters :

               l      A list.  Each element in the list corresponds to an
                      element in the data.  If the element is not  &null,
                      the line is checked.


          get_checked()
               Get the checked lines.

               Returns :

               A  list  corresponding  to the data.  If an element is not
               &null, then the corresponding line is checked.


          clear_selections()
               Clear the checked selections.


          set_select_one()
               Configure the object so that only one line  may  be  high-
               lighted


          set_select_many()
               Configure  the  object  so that several lines may be high-
               lighted


          get_which_down()
               Return item currently under the clicked cursor

               Returns :

               The item number


          object_get_which_down()
               Return object currently under the clicked cursor


                                          24









               Returns :

               The object


          get_prev_down()
               Return the item previously under the clicked cursor

               Returns :

               The item number


          object_get_prev_down()
               Return object currently under the clicked cursor

               Returns :

               The object


          get_selections()
               Return a list of items checked (highlighted)

               Returns :

               A list of items currently checked


          object_get_selections()
               Return a list of objects checked (highlighted)

               Returns :

               A list of objects currently checked


          set_selections(l)
               Set the current selections to the list l, which is a  list
               of item numbers.

               Parameters :

               l      The list of item numbers.


          object_set_selections(l)
               Set  the current selections to the list l, which is a list
               of objects

               Parameters :

               l      The list of objects.


          get_contents()
               Return the contents of the ScrollArea



                                          25









          draw(N, left_pos, yp, i)
               This method is overridden by  the  subclass  to  draw  the
               given line at the given position

               Parameters :

               N      The object to be drawn

               left_pos
                      The left position it should be drawn at

               yp     The y position it should be drawn at

               i      The index into the data corresponding to N


          44..2255..  NNooddee ccllaassss

          Super-class : (none)

          This class represents a node in a Tree object.

          generate_all_preorder()
               Generate  all  the  Nodes  in this subtree, including this
               Node, in preorder ordering.


          generate_all_postorder()
               Generate all the Nodes in  this  subtree,  including  this
               Node, in postorder ordering.


          generate_open_preorder()
               Generate  all  the  open  Nodes in this subtree, including
               this Node, in preorder ordering.


          generate_open_postorder()
               Generate all open Nodes in this  subtree,  including  this
               Node, in postorder ordering.


          expand()
               Expand all the Nodes below this node.


          set_label(x)
               Set the label for this node.


          set_bmps(x)
               Set  the bitmaps for this node.  The parameter should pro-
               vide a list of 3 bitmaps.  The first is displayed  if  the
               Node  is open and has subnodes, the second is displayed if
               the Node is closed and has subnodes, and the third is dis-
               played if the node has no subnodes.




                                          26









               Parameters :

               x      A list of 3 bitmaps.


          add(n)
               Add the given Node to this Node's list of subnodes.

               Parameters :

               The    Node to add.


          set_always_expandable()
               This  configures  the Node so that it is always treated as
               though it has subnodes for display purposes, event  though
               it may in fact have no subnodes.


          toggle_opened()
               Toggle the opened status of the Node.


          node_delete(n)
               Delete the given Node from the subnodes.


          44..2266..  TTrreeee ccllaassss

          Super-class : ScrollArea

          This  class  represents  a  tree object.  An Event of code 0 is
          generated when a click down occurs on a Node;  of code  1  when
          the   a  click  up  occurs  and  of  code  2  when  a  node  is
          expanded/contracted by a click on the small +/- icons.

          expand()
               Expand all the nodes in the Tree.


          set_default_bmps(l)
               Set the default bitmaps for each Node in  the  Tree.   The
               parameter  should  be  a  list of three bitmaps;  see Node
               above for an explanation.

               Parameters :

               l      The list of bitmaps.


          set_root_node(r)
               Set the root node of the Tree.


          flatten()
               This method returns a flat list of all the  Nodes  in  the
               tree that are currently displayed.



                                          27









               Returns :

               A list of nodes.


          44..2277..  TTeexxttLLiisstt ccllaassss

          Super-class : ScrollArea

          This class displays a list of strings.

          mode,  then optionally the user can be allowed to select either
          one line only, or several lines.

          44..2288..  EEddiittaabblleeTTeexxttLLiisstt ccllaassss

          Super-class : ScrollArea

          A scrollable editable text area.  An Event is  generated  when-
          ever the contents are changed by the user.

          44..2299..  DDrrooppDDoowwnn ccllaassss

          Super-class : (none)

          This class is just a superclass of List and EditList below.

          set_selection_list(x)
               Set the list selection items to the list x.

               Parameters :

               The    list of items


          get_selection()
               Return  an  integer  corresponding to the item in the list
               presently selected.


          44..3300..  LLiisstt ccllaassss

          Super-class : Component, DropDown

          This component is for selecting one string from a list of  sev-
          eral.  When a button is pressed a list appears (possibly with a
          scroll bar) from which one item can be selected.

          An event is generated whenever an item  is  selected  from  the
          list.


          set_selection(x)
               Set the selected item.

               Parameters :




                                          28









               x      An index into the list of selectable items.


          set_constant_label(x)
               The  given  string  will always appear in the text part of
               the component, rather than the currently selected item.


          44..3311..  EEddiittLLiisstt ccllaassss

          Super-class : Component, DropDown

          This component functions in the same way as List above, but the
          item  selected  may  be edited by the user.  An extra method is
          therefore supplied to get the content, as it may not correspond
          to an element of the list.

          An  event is generated with code 0 if an element of the list is
          selected, with code 1 if return is pressed, and with code 2  if
          the user edits the selected item.

          set_filter(c)
               Set the text field's filter (see TextField for details).

               Parameters :

               c      The filter


          get_contents()
               Return  the  contents of the selected item (which may have
               been edited).


          set_contents(x)
               Set the initial contents of the text to the given  string.


          set_selection(x)
               Set the selected item.

               Parameters :

               x      An index into the list of selectable items.


          44..3322..  MMeennuuBBuuttttoonn ccllaassss

          Super-class : Component

          This  is  similar to MenuBar, but holds just a single drop-down
          menu, rather than several.  It may be placed  anywhere  on  the
          dialog,  whereas a MenuBar would invariably be placed along the
          top.

          set_menu(c)
               Set the  menu  to  be  displayed  when  the  component  is
               clicked.


                                          29









               Parameters :

               c      The Menu.


          set_img(x)
               Set the image to be displayed in the button.

               Parameters :

               x      The Icon to be displayed.


          44..3333..  PPooppuuppMMeennuu ccllaassss

          Super-class : Component

          This  is  a popup menu class, namely a menu which pops up under
          the cursor under the direction of the program (for example when
          a right click has occurred.

          set_menu(c)
               Set  the menu to be displayed when the popup is displayed.

               Parameters :

               c      The Menu.


          popup()
               Popup the menu at the current cursor position.


          44..3344..  MMeennuuBBaarr ccllaassss

          Super-class : Component

          This class is the base from which  menu  systems  are  created,
          other than popup menus.

          Menu  items are added to this class; they are not separate com-
          ponents added to the dialog itself.

          The default position is (0, 0); the default size is 100% of the
          width  of  the screen and a reasonable height based on the font
          specified.

          add(c)
               Add the Menu c to the MenuBar.  This will be one drop down
               menu.  Items are then added to the Menu.

               Parameters :

               c      The Menu to add.






                                          30









          44..3355..  MMeennuuEEvveenntt ccllaassss

          Super-class : _Event

          This  class is an _Event with an extra code.  Its use is inter-
          nal to the menu system.

          get_menu_code()
               Return the additional code.


          44..3366..  MMeennuuCCoommppoonneenntt ccllaassss

          Super-class : (none)

          This is the superclass of all the objects that make up the menu
          system (other than the top level Components of course).

          For  components that appear in a menu with a label, an optional
          left/right string/image can be set.

          set_label_left(x)
               Set the optional left label to the given string.


          set_label_right(x)
               Set the optional right label to the given string.


          set_img_left(x)
               Set the optional left image to the given Icon image.


          set_img_right(x)
               Set the optional right image to the given Icon image.


          toggle_is_shaded()
               Toggle whether or not the item is shaded.  If it is, it is
               displayed in a filtered way and will not accept input.


          set_is_shaded()
               Set the shaded status of the component to shaded.


          clear_is_shaded()
               Set the shaded status of the component to not shaded.


          set_label(x)
               Set the centre label to the given string.


          44..3377..  SSuubbMMeennuu ccllaassss

          Super-class : MenuComponent



                                          31









          This  is  the parent class of menu components which popup other
          menus.

          44..3388..  MMeennuu ccllaassss

          Super-class : SubMenu

          This class encapsulates a drop down menu, or a sub-menu.

          The left, centre and right labels/images of the elements within
          it are formatted within the menu automatically.

          add(c)
               Add the given component to the Menu.


          44..3399..  TTeexxttMMeennuuIItteemm ccllaassss

          Super-class : MenuComponent

          This  class  encapsulates a single text item in a Menu.  It has
          no additional methods which the user need call other  than  are
          contained in its parent class, MenuComponent.

          44..4400..  CChheecckkBBooxxMMeennuuIItteemm ccllaassss

          Super-class : Toggle, MenuComponent

          This class encapsulates a check box in a menu.

          Several  CheckBoxMenuItems  may  be  added  to  a CheckBoxGroup
          structure to give "radio buttons" within menus.

          set_imgs(x, y)
               Set the up and down images to x and y  respectively.   The
               default  is  boxes,  unless  the  component  is added to a
               CheckBoxGroup in which case the default is diamonds.


          44..4411..  MMeennuuSSeeppaarraattoorr ccllaassss

          Super-class : MenuComponent

          This is simply a horizontal bar in a Menu, for decorative  pur-
          poses.  It has no methods which the user need invoke.

          44..4422..  TTaabblleeCCoolluummnn ccllaassss

          Super-class : TextButton

          This class provides one column within a Table, which displays a
          table of data.  A column has a label with a button  which  pro-
          duces  an  event  when  clicked.  The column may be expanded or
          contracted by dragging the right edge of the button.

          The label is set by calling the set_label(x) method of the par-
          ent class, TextButton.



                                          32









          set_column_width(x)
               Set  the initial width of the column, in pixels; this must
               be specified.

               Parameters :

               x      The width


          44..4433..  TTaabbllee ccllaassss

          Super-class : Component

          This class displays a table, the columns of which  are  set  up
          using TableColumns.

          set_button_group_height(x)
               Set  the  height  of the buttons at the top in pixels.  If
               not invoked, a sensible default will be used.

               Parameters :

               x      The height


          goto_pos(x, y)
               Move to the given position.  Either parameter may be omit-
               ted.

               Parameters :

               x      The row to move to

               y      The left offset to move to


          set_contents(x)
               Set  the contents of the table.  The parameter should be a
               two dimensional list.  Each element  of  the  list  should
               correspond to one row of the table.

               Parameters :

               x      The contents


          add(c)
               Add the given TableColumn to the Table.

               Parameters :

               c      The column to add.


          set_select_one()
               Configure  the  table  so that one row of the table may be
               highlighted.



                                          33









          set_select_many()
               Configure the table so that several rows of the table  may
               be highlighted.


          get_selections()
               Return a list of rows selected

               Returns :

               A list of rows currently selected


          set_selections(l)
               Set  the current selections to the list l, which is a list
               of row numbers.

               Parameters :

               l      The list of item numbers.


          44..4444..  BBuuttttoonnGGrroouupp ccllaassss

          Super-class : (none)

          This class groups several Buttons  together.   Then,  when  the
          mouse  is  clicked  down on one of the Buttons and then dragged
          onto another before being released, the other  Button  will  go
          "down".   This  is  the  common  behaviour for buttons in a bar
          along the top of an application.

          NB - A Button must be added to the ButtonGroup and  the  Dialog
          too.

          add(c)
               Add the given Button to the ButtonGroup.

               Parameters :

               c      The Button to add


          44..4455..  TTaabbIItteemm ccllaassss

          Super-class : Container

          This  class  represents  a single pane in a TabSet.  Components
          can be added to the TabItem using Container's add method.  They
          are  then  displayed  and  accept  input  when  that TabItem is
          selected.

          Components added to the TabItem are positioned relative to  the
          position  and size of the parent TabSet.  Therefore for example
          set_pos("50%", "50%") refers to the centre of the TabSet rather
          than the centre of the screen.  The components also inherit any
          window attributes of the TabSet, such as font,  colour  and  so
          on.


                                          34









          set_label(x)
               Set the TabItem's label.


          44..4466..  TTaabbSSeett ccllaassss

          Super-class : VisibleContainer

          This  class holds the several TabItems, and represents a tabbed
          pane.

          set_which_one(x)
               Set which tab is currently on display.

               Parameters :

               x      The TabItem to be displayed.


          add(c)
               Add the given TabItem to the TabSet.


          44..4477..  OOvveerrllaayyIItteemm ccllaassss

          Super-class : Container

          This class is one "pane" in an OverlaySet, which is rather like
          a  TabSet except that there are no tabs, and control over which
          pane is displayed is entirely the affair of the program.

          The components inside have their  size  and  position  computed
          relative to the parent OverlaySet and also inherit the Overlay-
          Set's windowing attributes.  Components are added using the add
          method of Container.

          44..4488..  OOvveerrllaayySSeett ccllaassss

          Super-class : VisibleContainer

          This  class  provides  a container which contains several Over-
          layItems, only one of which is visible at a time.

          set_which_one(x)
               Set which OverlayItem is currently displayed.  The default
               is the first which was added.


          add(c)
               Add the given OverlayItem to the OverlaySet.


          44..4499..  TToooollBBaarr ccllaassss

          Super-class : Panel

          This  class is a Panel which may have Components added to it in
          the normal way.  However, the Components within it will produce


                                          35









          tooltip  labels  when  the mouse cursor is held over them for a
          short period of time.   The tooltip strings may  be  set  using
          the set_tooltip method of Component.

          set_start_end_delays(x, y)
               Configure the delays used in making the tooltips appear.

               Parameters :

               x      The  starting delay, ie the period before a tooltip
                      appears.

               y      The end delay, namely how long  the  tooltip  stays
                      visible.


          55..  CCuussttoomm ccoommppoonneennttss

          It  is  very  easy to create customised components which can be
          added to dialogs.

          For the simplest components, only two methods need to be imple-
          mented;  one  to  display  the  object  and the other to handle
          events.

          Here is an example that draws a rectangle which changes  colour
          each time it is clicked.  The rectangle is drawn into either of
          the windows self.cwin or  self.cbwin,  depending  on  the  flag
          parameter.   The  x, y, w and h variables are all automatically
          set up from the position, size and alignment specifications set
          by the user of the component.

          The handle_event method takes an Icon event e as its parameter.
          In this case it uses the in_region method to determine  whether
          the &x and &y variables are in the component's area.

               class ColourRectangle : Component()
                  method display(buffer_flag)
                     W := if /buffer_flag then self.cwin else self.cbwin
                     FillRectangle(W, self.x, self.y, self.w, self.h)
                  end

                  method handle_event(e)
                     if self$in_region() & (integer(e) = (&lpress | &rpress | &mpress)) then {
                        # Set random colour.
                        WAttrib(self.cwin, "fg=" || ?65535 || "," || ?65535 || "," || ?65535)
                        self$display()
                     }
                  end
               end

          More complex components use other components within themselves.
          For example, the TextList class contains two  ScrollBars,  each
          of which in turn contains two IconButtons.

          In  this sort of component, certain methods must be extended so
          that the sub-components are properly initialized.



                                          36









          Here is an example which has an IconButton and a Label as  sub-
          components.   A  list  of  strings is given as input.  When the
          button is pressed the label changes to the  next  item  in  the
          list,  or goes back to the first one.  The user can thus select
          any of the items.  In use it looks like this :-

                            _F_i_g_u_r_e _2 _- _C_i_r_c_u_l_a_t_e _d_i_a_l_o_g

          In this example, the methods firstly(), finally() and  set_par-
          ent_Dialog() have been extended in order to initialize the sub-
          components b and l correctly, and to dispose of their resources
          when the dialog is closed.

          The  resize() method sets the sub-components position and size,
          and then calls the resize() method for each of them.

          The display() method and handle_event() methods are  very  sim-
          ple;  the  latter passes the event on to the button.  If it has
          been pressed  then  the  label  is  amended  and  an  event  is
          returned.

               #
               # Selection from a list
               #
               class Circulate : Component(selection, selection_list, b, l)
                  method set_selection_list(x)
                     return self.selection_list := x
                  end

                  method set_selection(x)
                     return self.selection := x
                  end

                  method get_selection()
                     return self.selection
                  end

                  method firstly()
                     self$Component.firstly()
                     self.b$firstly()
                     self.l$firstly()
                  end

                  method finally()
                     self$Component.finally()
                     self.b$finally()
                     self.l$finally()
                  end

                  method resize()
                     /self.h_spec := WAttrib(self.cwin, "fheight") + 16
                     self$Component.resize()

                     #
                     # Set button position and size
                     #
                     b$set_pos(self.x, self.y)
                     b$set_size(self.h, self.h)


                                          37









                     b$resize()

                     #
                     # Set label position and size
                     #
                     l$set_pos(self.x + self.h + 2, self.y)
                     l$set_size(self.w - self.h - 2, self.h)
                     l$set_label(self.selection_list[self.selection])
                     l$resize()

                     return
                  end

                  method display(buffer_flag)
                     W := if /buffer_flag then self.cwin else self.cbwin
                     l$display(buffer_flag)
                     b$display(buffer_flag)
                     self$do_shading(W)
                  end

                  method handle_event(e)
                     if b$handle_event(e)$get_code() > 0 then {
                        self.selection := 1 + self.selection % *self.selection_list
                        l$set_label(self.selection_list[self.selection])
                        return _Event(e, self, 0)
                     }
                  end

                  method set_parent_Dialog(x)
                     self$Component.set_parent_Dialog(x)
                     self.b$set_attribs_list(self.attribs)
                     self.b$set_parent_Dialog(x)
                     self.l$set_attribs_list(self.attribs)
                     self.l$set_parent_Dialog(x)
                  end

                  initially
                     self$Component.initially()
                     self.l := Label()
                     l$toggle_draw_border()
                     l$set_internal_alignment("l")
                     self.b := IconButton()
                     self.b$toggle_draw_border()
                     self.b$set_img("13,c1,_
               ~~~~0000~~~~~_
               ~~~000000~~~~_
               ~~00~~~~00~~~_
               ~00~~~~~~00~~_
               ~00~~~~~~00~~_
               ~00~~~~~~~~~~_
               ~00~~~~~~~~~~_
               ~00~~~~~~0~~~_
               ~00~~~~~000~~_
               ~00~~~~00000~_
               ~00~~~0000000_
               ~00~~~~~~00~~_
               ~00~~~~~~00~~_
               ~00~~~~~~00~~_


                                          38









               ~~00~~~~00~~~_
               ~~~000000~~~~_
               ~~~~0000~~~~~_
               ")

                     self.selection := 1
               end





















































                                          39



