home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Environments / Clean 1.2.4 / IOInterface / sliderBar.dcl < prev    next >
Encoding:
Modula Definition  |  1995-02-22  |  1.3 KB  |  45 lines  |  [TEXT/3PRM]

  1. definition module sliderBar;
  2.  
  3.  
  4. //    Version 0.8 to 1.0
  5.  
  6.  
  7. import    deltaIOSystem;
  8. from    ioState import IOState;
  9.  
  10.  
  11. /* A general Slider Bar definition, which is a dialog item
  12.     implemented entirely in Concurrent Clean as a Control.
  13. */
  14.  
  15.  
  16. ::    SliderDirection    =    Horizontal | Vertical;
  17. ::    SliderPos        :==    Int;
  18. ::    SliderMax        :==    Int;
  19.  
  20.  
  21. /*    A SliderBar is defined by the following attributes:
  22.     - Id, ItemPos and SelectState, like other DialogItems.
  23.     - SliderDirection: Horizontal or Vertical.
  24.     - SliderPos: the initial position of the slider. This position is always
  25.                  adjusted between 0 and SliderMax.
  26.     - SliderMax: the slider can take on positions between 0 and SliderMax.
  27. */
  28. SliderBar    ::    !DialogItemId !ItemPos !SelectState !SliderDirection
  29.                 !SliderPos !SliderMax
  30.                 !(DialogFunction s (IOState s))
  31.             ->    DialogItem s (IOState s);
  32.  
  33. /*    ChangeSliderBar moves the slider of the indicated bar to the new
  34.     position. The position is always adjusted between 0 and SliderMax.
  35. */
  36. ChangeSliderBar        ::    !DialogItemId !SliderPos
  37.                         !(DialogState s (IOState s))
  38.                     ->      DialogState s (IOState s);
  39.  
  40. /*    GetSliderPosition retrieves the current slider position of the slider
  41.     bar with the indicated id from the DialogInfo parameter. When the id is
  42.     not the id of a SliderBar a run-time error is generated.
  43. */
  44. GetSliderPosition    ::    !DialogItemId !DialogInfo -> SliderPos;
  45.