scrollbar.pp 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. (******************************************************************************
  2. *
  3. * Copyright (c) 1996-2000 Palm, Inc. or its subsidiaries.
  4. * All rights reserved.
  5. *
  6. * File: ScrollBar.h
  7. *
  8. * Release: Palm OS SDK 4.0 (63220)
  9. *
  10. * Description:
  11. * This file defines scroll bar structures and routines.
  12. *
  13. * History:
  14. * Feb 6, 1996 Created by Art Lamb
  15. *
  16. *****************************************************************************)
  17. unit scrollbar;
  18. interface
  19. uses palmos, coretraps, control;
  20. type
  21. ScrollBarRegionType = Enum;
  22. const
  23. sclUpArrow = 0;
  24. sclDownArrow = Succ(sclUpArrow);
  25. sclUpPage = Succ(sclDownArrow);
  26. sclDownPage = Succ(sclUpPage);
  27. sclCar = Succ(sclDownPage);
  28. type
  29. ScrollBarAttrType = record
  30. {$ifdef ALLOW_ACCESS_TO_INTERNALS_OF_SCROLLBARS} // These fields will not be available in the next OS release!
  31. Bits: UInt16;
  32. {
  33. UInt16 usable :1; // Set if part of ui
  34. UInt16 visible :1; // Set if drawn, used internally
  35. UInt16 hilighted :1; // Set if region is hilighted
  36. UInt16 shown :1; // Set if drawn and maxValue > minValue
  37. UInt16 activeRegion :4; // ScrollBarRegionType
  38. UInt16 reserved :8; // Reserved for future use
  39. }
  40. {$endif}
  41. end;
  42. ScrollBarAttrTag = ScrollBarAttrType;
  43. ScrollBarType = record
  44. {$ifdef ALLOW_ACCESS_TO_INTERNALS_OF_SCROLLBARS} // These fields will not be available in the next OS release!
  45. bounds: RectangleType;
  46. id: UInt16;
  47. attr: ScrollBarAttrType;
  48. value: Int16;
  49. minValue: Int16;
  50. maxValue: Int16;
  51. pageSize: Int16;
  52. penPosInCar: Int16;
  53. savePos: Int16;
  54. {$endif}
  55. end;
  56. ScrollBarPtr = ^ScrollBarType;
  57. procedure SclGetScrollBar(const bar: ScrollBarPtr; var valueP, minP, maxP, pageSizeP: Int16); syscall sysTrapSclGetScrollBar;
  58. procedure SclSetScrollBar(bar: ScrollBarPtr; value: Int16; const min, max, pageSize: Int16); syscall sysTrapSclSetScrollBar;
  59. procedure SclDrawScrollBar(bar: ScrollBarPtr); syscall sysTrapSclDrawScrollBar;
  60. function SclHandleEvent(bar: ScrollBarPtr; const event: EventPtr): Boolean; syscall sysTrapSclHandleEvent;
  61. implementation
  62. end.