NUMINPUT.DEF 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. DEFINITION MODULE NumInput;
  2. (*
  3. * REPERTOIRE
  4. * Release 1.6
  5. * By Charles Bradford and Cole Brecheen
  6. * (c) Copyright 1985-1992 PMI
  7. * Green Bay, Wisconsin
  8. * All rights reserved
  9. * (414) 468-6040
  10. *
  11. * $Header: D:/logfiles/defs/numinput.dev 1.3 30 Dec 1990 18:06:52 coleb $
  12. *
  13. *)
  14. (*
  15. Author: Mike Carter
  16. Description:
  17. Enter or edit a numeric field. Replacement for PMI
  18. StrInput.ReadNumeric. Note that parameters are
  19. slightly different:
  20. 1. PMI FloatingPoint and InDecimals parameters have
  21. been removed. They simply have no meaning the way
  22. real number input is now handled.
  23. 2. minusOK has been added - see below.
  24. 3. The meaning of DecimalPlaces has been changed -
  25. see below.
  26. Notes on parameters:
  27. * A new field was added in
  28. ScrnTypes.InputFieldRecord called "decimalPlace",
  29. with corresponding type DecimalPlaceType. This
  30. was designed to be passed to this routine: a -1
  31. value indicates user-specified decimal points (or
  32. none); a 0 means no digits after the decimal
  33. point, a 1 means one digit, etc.
  34. * The value of minusOK determines whether negative
  35. numbers are allowed; this can be set from rMin,
  36. iMin within UserOps. Must be FALSE for strings
  37. that are later to be interpreted as CARDINAL.
  38. *)
  39. IMPORT KbdInput;
  40. IMPORT VWindows;
  41. FROM ScrnTypes IMPORT DecimalPlaceType;
  42. PROCEDURE ReadNumericField
  43. ( WindowHandle : VWindows.AWindowHandle;
  44. VAR TheStr : ARRAY OF CHAR; (* in/out *)
  45. col1 : CARDINAL; (* in *)
  46. row1 : CARDINAL; (* in *)
  47. FieldWidth : CARDINAL; (* in *)
  48. DecimalPlaces: DecimalPlaceType; (* in *)
  49. minusOK : BOOLEAN; (* in *)
  50. VAR LastKey : CARDINAL; (* in/out *)
  51. VAR ExitKeys : KbdInput.KeyNumSet (* in *)
  52. );
  53. (*
  54. * This is a general-purpose numeric input routine that
  55. * replaces the StrInput.ReadNumeric procedure. The
  56. * parameters are slightly different.
  57. *)
  58. PROCEDURE Init();
  59. END NumInput.