*** xmred.0.orig	Thu Feb  5 12:52:09 1998
--- xmred.0	Thu Feb  5 12:51:56 1998
***************
*** 0 ****
--- 1,528 ----
+ 
+ 
+ 
+ XMRED(6)						 XMRED(6)
+ 
+ 
+ NNAAMMEE
+        xmred - garden editor for xmris
+ 
+ SSYYNNOOPPSSIISS
+        xxmmrreedd [-option ...] [-toolkitoption ...]
+ 
+ DDEESSCCRRIIPPTTIIOONN
+        Mr Ed is a tool for creating and editing alternate gardens
+        for Mr Is.  Hopefully  its  user	 interface  is	intuitive
+        enough that most of this manual page need not be read by a
+        casual user.
+ 
+        In the default configuration, the main window  presents	a
+        garden image on the left, a control panel on the right and
+        a list of gardens underneath. Gardens can  be  loaded  and
+        saved using the menu, these then appear in the list below.
+        The insert option loads a file into the	copy  buffer.  It
+        can  then  be  dragged  to the desired place in the garden
+        list.
+ 
+        To edit a garden (or comment, or include),  either  select
+        it  with	 a  button  press and release, or with a drag and
+        drop into the edit box at the lower right.  The	drag  and
+        drop  will  remove it from the garden list, selection will
+        copy it, and the source garden will  be	updated	 too.  To
+        delete  gardens,	 drag  them to the copy buffer.	 The main
+        garden display will be updated, if it was a  garden  being
+        moved  to  the  edit  box. The box on the lower right is a
+        copy buffer. You can drag and drop into and out of this to
+        the  garden  list  or one of the edit boxes. Similarly you
+        can drag and drop from the edit boxes to the garden  list,
+        and within the garden list itself. Note that drag and drop
+        always removes the source, if  it  is  within  the  garden
+        list, whereas selection does not delete the source.
+ 
+        The  control  panel  shows  a set of options, which can be
+        bound to buttons. This can be done  either  by  press  and
+        release	with  the  required button, or drag and drop onto
+        the required button's icon. You can bind an option to more
+        than  one button. However, press and release on the apples
+        option will simply change the currently selected	 explicit
+        apple,  not  necessarily bind that option to a new button.
+        The fill pattern and color can be select	 by  pressing  on
+        them. The current garden will be updated. The list of but-
+        tons shows which options are bound to which  buttons.  You
+        can  also  change button bindings by pressing the destina-
+        tion button with the pointer  over  the	button	with  the
+        required option's icon, or by drag and drop from button to
+        button.
+ 
+        The six options are,
+ 
+        AAppppllee  This selects where apples from one of the four sets
+ 	      of  explicit  apple locations are placed. To select
+ 
+ 
+ 
+ X Version 11		 20 December 1993			1
+ 
+ 
+ 
+ 
+ 
+ XMRED(6)						 XMRED(6)
+ 
+ 
+ 	      which set is being controlled, press on  the  rele-
+ 	      vant  quadrant  of  the  icon. One of these sets is
+ 	      used when Mr Is is used with  the	 +random  option.
+ 	      You  can	place apples anywhere there isn't a path,
+ 	      even in an unstable location,  which  will  immedi-
+ 	      ately  fall.  Placing  an explicit apple on a path,
+ 	      will fill the path.
+ 
+        RRaannddoomm This controls where apples may be placed	randomly,
+ 	      if Mr Is is started with the -random option. Apples
+ 	      will only be placed on the specified locations,  or
+ 	      where  ever  an  explicit	 apple	could be located.
+ 	      Unless you specify otherwise, random apples may  be
+ 	      located  anywhere there isn't a path, even unstable
+ 	      locations which will immediately	fall.  Placing	a
+ 	      random apple on a path, will fill the path.
+ 
+        CChheerrrryy This  controls  where  cherries  are located. There
+ 	      must be at least one cherry on a	garden.	 Cherries
+ 	      may be located anywhere on the board.
+ 
+        PPaatthh   This controls where the initial path is. Each loca-
+ 	      tion on the board consists of  a	centre	and  four
+ 	      edges.  Depending	 on  the  exact	 location  of the
+ 	      pointer, you will select either the centre,  or  an
+ 	      edge.  Filling  a path will place a random apple in
+ 	      the filled location. The four locations immediately
+ 	      below the
+ 
+        PPllaayyeerr This  controls  where the player starts from. There
+ 	      must be exactly one such location.
+ 
+        DDeenn    This controls where the monsters start from.  There
+ 	      must be at least one den.
+ 
+        The  list  of  totals  show  the	 counts	 for the explicit
+        apples, cherries, random apples	required,  apple  spaces,
+        unstable	 apple	positions,  dens  and player positions. A
+        warning is shown on the left of any  which  are	inconsis-
+        tant,  or  out of range. The number of apples for a garden
+        can be set by moving the scroll bar at  the  left  of  the
+        apple  icon.  Note  that	 when  you  change  the number of
+        apples, or add or remove explicit apples, a  warning  will
+        change  on  on  some  or all of the explicit apple counts.
+        This is just to remind you that you must do some more work
+        on  the	garden,	 before	 it  is consistant. There are two
+        types of random apple spaces,  stable  and  unstable.  The
+        unstable	 space	count  is  shown with an arrow in it, the
+        other apple space count shows the total	number	of  apple
+        spaces.	The  hazzard  warning on the unstable count, just
+        shows that you have some unstable  apple	 positions  (this
+        may be intentional on your part). The hazzard on the total
+        apple space count indicates that	 there	are  less  spaces
+        than the number of apples you specified for the garden.
+ 
+ 
+ 
+ X Version 11		 20 December 1993			2
+ 
+ 
+ 
+ 
+ 
+ XMRED(6)						 XMRED(6)
+ 
+ 
+        Below this is a comment box for the garden. Selecting this
+        will pop up a dialog which you can enter information about
+        the garden.
+ 
+        At  the lower right of the control panel is a display mode
+        selector. There are three display modes. The  first  shows
+        all  the	 explicit  apple  positions,  4	 to  a	cell when
+        required. The  second  shows  only  one	set  of	 explicit
+        apples, the set selected using the apples option quadrant.
+        The final mode shows none of the explicit apples, just the
+        random apple spaces.
+ 
+        The  garden  display  is on the left of this. It shows the
+        currently edited garden. Clicking or dragging a mouse but-
+        ton  on	this area will perform the option currently bound
+        to that button. You will notice the totals change when you
+        do this.
+ 
+        Mr  Ed  will  use colour sprites, if the visual permits it
+        (has a colour map size of more than 15,	and  you  haven't
+        forced  monochrome).  All  the colours bar black and white
+        are user definable. There are four sets, one for	 each  of
+        the four combinations of gender and swap flag. The colours
+        are allocated in reverse order of their distance in colour
+        space,  from currently allocated colours (the most distant
+        colours are allocated  first).  That  way,  if  allocation
+        fails because the colour map is full, an allocated substi-
+        tute colour, which is nearest the desired colour,  can  be
+        used and the allocated colours are kept maximally distant.
+        You can limit the number	 of  distinct  colours	with  the
+        -distinct option.  A warning message is sent to stderr, if
+        a colour allocation fails. The -colours argument shows how
+        these are allocated, and -help -colours can be used to get
+        the colour resource names.
+ 
+ OOPPTTIIOONNSS
+        Mr Ed accepts the standard X Toolkit options, as	 well  as
+        these.
+ 
+        --hheellpp  Lists  the  command  options,  application resource
+ 	      fields and some other information to  stderr.  Does
+ 	      not  start the game. If the -colours option is sup-
+ 	      plied too, then the  colour  resource  classes  are
+ 	      listed instead, with their default values. The for-
+ 	      mat of this list is suitable  for	 inclusion  in	a
+ 	      resource	file.  Note,  this  does not list out the
+ 	      colour values that you would get	if  you	 ran  the
+ 	      game, as it does not read the color resources.
+ 
+        --sswwaapp
+        --rrvv
+        --rreevveerrssee
+ 	      Normally the foreground is black and the background
+ 	      white, this swaps them round.  On	 colour	 systems,
+ 
+ 
+ 
+ X Version 11		 20 December 1993			3
+ 
+ 
+ 
+ 
+ 
+ XMRED(6)						 XMRED(6)
+ 
+ 
+ 	      this may also alter other colours.
+ 
+        ++sswwaapp
+        --nnoosswwaapp
+ 	      Override	a  swap	 resource  in  your resources, to
+ 	      force unswapped colours.
+ 
+        --mmoonnoo  Use black	 and  white,  even  on	colour	displays.
+ 	      (Unfortunately,	the  obvious  option,  '-bw',  is
+ 	      already nabbed by the toolkit as borderwidth.)
+ 
+        --mmrriiss
+        --mmssiitt
+        --ggeennddeerr _g_e_n_d_e_r
+ 	      Mr Ed has two sets of  sprites.  Mris  selects  the
+ 	      classic  sprites,	 while msit selects a more modern
+ 	      set.  Valid  genders  are	 'he',	'she',	'female',
+ 	      'male', 'msit', 'mris', 'boy', 'girl'.
+ 
+        --ddeepptthh _d_e_p_t_h
+ 	      Mr Ed will use the default depth of the screen. You
+ 	      may wish to override that	 by  using  this  option.
+ 	      Selecting	 a  different depth may affect the visual
+ 	      selected.
+ 
+        --vviissuuaall _v_i_s_u_a_l_-_c_l_a_s_s
+ 	      Mr Ed will pick the default  visual,  but	 you  can
+ 	      override	that  by  specifying  a particular visual
+ 	      class. Valid visuals  are	 'PseudoColor',	 'Direct-
+ 	      Color',  'TrueColor',  'StaticColor',  'GrayScale',
+ 	      and 'StaticGray'. To see which one is  picked,  you
+ 	      can  use	the  -colours  option. If you do select a
+ 	      non-default visual, you may have to specify a  pri-
+ 	      vate  colour  map	 too,  due  to limitations of the
+ 	      server or display.
+ 
+        --pprriivvaattee
+ 	      This forces Mr Ed to allocate a private colour map.
+ 	      Normally Mr Ed will share the default colour map of
+ 	      the selected visual, but	if  that  does	not  have
+ 	      enough  free  colour  cells  then some colours will
+ 	      have to be shared.
+ 
+        --ccoolloouurrss
+        --ccoolloorrss
+ 	      Show how	the  colours  are  allocated,  and  which
+ 	      visual has been selected.	 The allocation is listed
+ 	      to  stdout.  When	 allocating  each   colour,   its
+ 	      resource	name  and  rgb values are listed together
+ 	      with the nearest already allocated colour	 and  the
+ 	      distance	between	 them  in colour space. The allo-
+ 	      cated pixel number is printed last. If  given  with
+ 	      the  -help  option, the colour resource classes are
+ 	      listed, and the game does not start.
+ 
+ 
+ 
+ X Version 11		 20 December 1993			4
+ 
+ 
+ 
+ 
+ 
+ XMRED(6)						 XMRED(6)
+ 
+ 
+        --ddiissttiinncctt _n
+ 	      Sets the number of distinct colours used. This  can
+ 	      be  used	to  limit the number of colours used from
+ 	      the colour map. Black and white are  not	included,
+ 	      and  neither  are the two writable colours used for
+ 	      the garden backgrounds  on  dynamic  visuals.  Note
+ 	      that  -distinct  0  is  different	 from -mono, even
+ 	      though both will only use black and white.
+ 
+ RREESSOOUURRCCEESS
+        Mr Ed uses the X toolkit	 application  resource	mechanism
+        for setting up the environment. Application resource items
+        start with 'Xmris', so  that  Mr	 Ed  will  pick	 up  your
+        defaults	 for Mr Is. The resource name can be derived from
+        the given resource class by decapitalizing it. For example
+        'cherryStalk'  is  the  resource name for the class 'cher-
+        ryStalk'. The following classes are used (choices in  '{}'
+        and defaults in '[]'.)
+ 
+        XXmmrriiss..RReevveerrsseeVViiddeeoo:: _{_y_e_s_, _n_o_} [[nnoo]]
+ 	      Specifies whether to use swapped colours or not.
+ 
+        XXmmrriiss..MMoonnoo:: _{_y_e_s_, _n_o_} [[nnoo]]
+ 	      Whether  the  default  is	 for monochrome on colour
+ 	      displays.
+ 
+        XXmmrriiss..GGeennddeerr:: _g_e_n_d_e_r [[hhee]]
+ 	      Sets the default game  gender.  Valid  genders  are
+ 	      'mris',  'msit',	'she',	'he',  'female',  'male',
+ 	      'boy', 'girl'.
+ 
+        XXmmrriiss..DDeepptthh:: _d_e_p_t_h
+ 	      Set the required screen depth to use.
+ 
+        XXmmrriiss..VViissuuaall:: _v_i_s_u_a_l_-_c_l_a_s_s
+ 	      Set the required visual class to use. Valid visuals
+ 	      are   'PseudoColor',   'DirectColor',  'TrueColor',
+ 	      'StaticColor', 'GrayScale', and 'StaticGray'.
+ 
+        XXmmrriiss..PPrriivvaattee:: _{_y_e_s_, _n_o_} [[nnoo]]
+ 	      Set whether or not to use a private colour map.
+ 
+        XXmmrriiss..DDiissttiinncctt:: _n
+ 	      Set the number of distinct colours  allocated  from
+ 	      the colour map.
+ 
+        In  addition,  you  have	 the  normal  resources	 such  as
+        '*Font'.
+ 
+ CCOOLLOOUURR RREESSOOUURRCCEESS
+        There are many colour name defaults. For a  full	 descrip-
+        tion  see  the xmris(6) manual page, but note that not all
+        the colors are used for Mr Ed. Provided that you specified
+        the  colour resources for Mr Is loosely enough, Mr Ed will
+ 
+ 
+ 
+ X Version 11		 20 December 1993			5
+ 
+ 
+ 
+ 
+ 
+ XMRED(6)						 XMRED(6)
+ 
+ 
+        pick up the same overrides. The foreground color	 for  the
+        Icon widgets is copied from the apple faint color on color
+        visuals (this is important for the noswap color scheme).
+ 
+ WWIIDDGGEETT RREESSOOUURRCCEESS
+        There are a few resources which are picked up from widgets
+        within  the widget tree. They are the initial button bind-
+        ings, colors, fills and mode.  The bindings  are	 attached
+        to   the	 individual  button  displays.	The  options  are
+        'apple', 'random', 'cherry', 'path', 'player'  and  'den'.
+        The colors, fills and mode are attached to the color, fill
+        and mode form widgets. The value must be an integer in the
+        correct range.
+ 
+        There  is an additional composite resource for children of
+        composite widgets (Paned and SimpleMenu), called 'attach'.
+        This allows you to change the ordering of sibling widgets.
+        Mr Ed uses this resource to determine the correct order to
+        create  the sibling widgets. For instance, to get the con-
+        trol panel on the left of the garden widget, use the  con-
+        straint '*one.garden.attach:panel'.  In addition, the wid-
+        gets are created in such an order  that	Form  constraints
+        'fromHoriz'  and 'fromVert' can be specified in any order.
+ 
+        There are four new widgets used for Mr Ed, 'Icon', 'Drag',
+        'Garden' and 'PixmapList'.
+ 
+        The  Icon  widget  is  a subclass of Simple. It displays a
+        pixmap and allows its selection with any button press.  If
+        a  button is dragged on it, it may invoke a drag widget to
+        perform a  drag	operation.   It	 has  the  following  new
+        resources of interest.
+ 
+        ddrraaggSSeennssiittiivviittyy:: _p_i_x_e_l_s [[44]]
+ 	      Sets  the	 minimum  drag which must occur, before a
+ 	      drag widget is popped up, to take	 over  the  drag-
+ 	      ging. When set to zero, dragging is disabled.
+ 
+        ffllaasshhDDeellaayy:: _d_e_l_a_y [[110000]]
+ 	      Sets the time for which the widget is highlit after
+ 	      selection. This time is in milliseconds.
+ 
+        hhiigghhlliigghhttTThhiicckknneessss:: _p_i_x_e_l_s [[11]]
+ 	      Sets the thickness of the highlight box.
+ 
+        ffoorreeggrroouunndd:: _c_o_l_o_r [[ddeeffaauulltt ffoorreeggrroouunndd]]
+ 	      Sets the color of the highlight box and block.
+ 
+        The Drag widget is a subclass of	 OverrideShell.	 It  dis-
+        plays  a pixmap, and follows the pointer until a button is
+        released. Its use is for drag and drop. It  has	no  addi-
+        tional resources of user interest.
+ 
+        The Garden widget is a subclass of Simple. It performs the
+ 
+ 
+ 
+ X Version 11		 20 December 1993			6
+ 
+ 
+ 
+ 
+ 
+ XMRED(6)						 XMRED(6)
+ 
+ 
+        garden editing.	It has no additional  resources	 of  user
+        interest.
+ 
+        The PixmapList widget is a subclass of Simple. It displays
+        a list of pixmaps, and permits them to be  scrolled.  Each
+        pixmap  may be selected by a button press on it, or a drag
+        widget invoked by dragging on a pixmap.	 In  addition  to
+        the Icon widget additional resources, it has the following
+        additional resources of user interest.
+ 
+        ddiissttaannccee:: _p_i_x_e_l_s [[44]]
+ 	      The distance between each pixmap.
+ 
+        ppiixxmmaappBBoorrddeerrWWiiddtthh:: _p_i_x_e_l_s [[11]]
+ 	      The border width for each pixmap.
+ 
+        ppiixxmmaappBBoorrddeerrCCoolloorr:: _c_o_l_o_r [[ddeeffaauulltt ffoorreeggrroouunndd]]
+ 	      The border color for each pixmap.
+ 
+ EENNVVIIRROONNMMEENNTT
+        A few environment variables are used to locate  resources.
+ 
+        DDIISSPPLLAAYY
+ 	   The	default	 display to connect to. May be overridden
+ 	   with the -display option.
+ 
+ FFIILLEESS
+        ~~//..XXddeeffaauullttss
+        ......//aapppp--ddeeffaauullttss//XXmmrriiss..aadd
+        ......//aapppp--ddeeffaauullttss//XXmmrriiss--ccoolloorr..aadd
+ 	      You can place you favourite key bindings and  stuff
+ 	      in an application resource file, and Mr Ed will use
+ 	      them, rather than its compiled defaults.	See X for
+ 	      information about how these are searched.
+ 
+        ......//aapppp--ddeeffaauullttss//xxmmrriiss//<<ggaarrddeennss>>
+ 	      Search path for loadable gardens used by Mr Is.
+ 
+ SSEEEE AALLSSOO
+        xxmmrriiss(6)
+ 
+ EERRRROORRSS
+        If  a  loaded garden is incorrect, an error dialog is dis-
+        played, enabling you to locate the  offending  garden  and
+        lines.
+ 
+ BBUUGGSS
+        The  visual  class name conversion is performed by a stan-
+        dard toolkit routine. It accepts only  American	spelling,
+        the  English  spelling  of  'grey'  and	'colour'  are not
+        allowed.
+ 
+        The Drag widget should perhaps just be a shell,	having	a
+        single child of Icon, to do the rendering.
+ 
+ 
+ 
+ X Version 11		 20 December 1993			7
+ 
+ 
+ 
+ 
+ 
+ XMRED(6)						 XMRED(6)
+ 
+ 
+        The PixmapList widget should perhaps be a composite widget
+        with Icon children. However when I tried this using a  Box
+        widget, it didn't work with the insert function.
+ 
+ CCOOPPYYRRIIGGHHTT
+        Copyright (C) 1993 Nathan Sidwell.
+ 
+ AAUUTTHHOORR
+        Nathan		Sidwell		  <nathan@pact.srf.ac.uk>
+        <http://www.pact.srf.ac.uk/~nathan/>
+ 
+        Additional   sprites    by    Stefan    Gustavson    <ste-
+        fang@isy.liu.se>
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ X Version 11		 20 December 1993			8
+ 
+ 
