Contents page

Rules for Tools/EmbossedPropOn()

     EmbossedPropOn(struct Window *window, short id, long (*routine)(),
               unsigned short horizrange, unsigned short vertrange)

     To take a standard proportional gadget and turn it into an
     embossed proportional gadget, call `EmbossedPropOn()'.

     In addition to the Window and GadgetID parameters, this function
     requires a pointer to a routine that you provide as well as
     maximum values for both vertical and horizontal sliders.

     The routine will be called every time the gadget is dragged or
     drawn.  You may use this routine to update your display in any way
     you please.  For example, use it to redraw the value of the
     parameter being modifed by the slider.

     Your routine is passed a bunch of parameters:
    `struct Window *window'
          The window.

    `struct Gadget *gadget'
          This proportional gadget.

    `unsigned short HPosition'
          A value from 0 to the horizontal maximum - 1.

    `unsigned long VPosition'
          A value from 0 to the vertical maximum - 1.  The routine can
     return a long value which will be returned to your program.

     See EmbossedPropOff().