home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mod201j.zip / modula2.exe / os2api / winstdsp.def < prev    next >
Text File  |  1994-05-03  |  6KB  |  112 lines

  1. DEFINITION MODULE WINSTDSPIN;
  2.  
  3. (************************************************************************
  4.   OS/2 2.0 interface for Presentation Manager
  5.            CUA spin button control class.
  6.  
  7.   Copyright (c) 1992 by Juergen Neuhoff
  8. *************************************************************************)
  9.  
  10. (*$XL+       Modula-2 language extensions: '_' allowed for symbol names *)
  11. (*$CDECL+    C-style procedures                                         *)
  12. (*$A         default alignment for record fields                        *)
  13.  
  14. (*************************************************************************)
  15. (*    SPINBUTTON Creation Flags                                          *)
  16. (*************************************************************************)
  17.  
  18. (*************************************************************************)
  19. (*    Character Acceptance                                               *)
  20. (*************************************************************************)
  21. CONST
  22.   SPBS_ALLCHARACTERS         = 00000000H; (* Default: All chars accepted *)
  23.   SPBS_NUMERICONLY           = 00000001H; (* Only 0 - 9 accepted & VKeys *)
  24.   SPBS_READONLY              = 00000002H; (* No chars allowed in entryfld*)
  25.  
  26. (*************************************************************************)
  27. (*    Type of Component                                                  *)
  28. (*************************************************************************)
  29. CONST
  30.   SPBS_MASTER                = 00000010H;
  31.   SPBS_SERVANT               = 00000000H; (* Default: Servant            *)
  32.  
  33. (*************************************************************************)
  34. (*    Type of Justification                                              *)
  35. (*************************************************************************)
  36. CONST
  37.   SPBS_JUSTDEFAULT           = 00000000H; (* Default: Same as Left       *)
  38.   SPBS_JUSTLEFT              = 00000008H;
  39.   SPBS_JUSTRIGHT             = 00000004H;
  40.   SPBS_JUSTCENTER            = 0000000CH;
  41.  
  42. (*************************************************************************)
  43. (*    Border or not                                                      *)
  44. (*************************************************************************)
  45. CONST
  46.   SPBS_NOBORDER              = 00000020H; (* Borderless SpinField        *)
  47.                                           (* Default is to have a border.*)
  48.  
  49. (*************************************************************************)
  50. (*    Fast spin or not                                                   *)
  51. (*************************************************************************)
  52. CONST
  53.   SPBS_FASTSPIN              = 00000100H; (* Allow fast spinning.  Fast  *)
  54.                                           (* spinning is performed by    *)
  55.                                           (* skipping over numbers       *)
  56.  
  57. (*************************************************************************)
  58. (*    Pad numbers on front with 0's                                      *)
  59. (*************************************************************************)
  60. CONST
  61.   SPBS_PADWITHZEROS          = 00000080H; (* Pad the number with zeroes  *)
  62.  
  63. (*************************************************************************)
  64. (*    SPINBUTTON Messages                                                *)
  65. (*************************************************************************)
  66.  
  67. (*************************************************************************)
  68. (*    Notification from Spinbutton to the application is sent in a       *)
  69. (*    WM_CONTROL message.                                                *)
  70. (*************************************************************************)
  71. CONST
  72.   SPBN_UPARROW               = 20AH;    (* up arrow button was pressed   *)
  73.   SPBN_DOWNARROW             = 20BH;    (* down arrow button was pressed *)
  74.   SPBN_ENDSPIN               = 20CH;    (* mouse button was released     *)
  75.   SPBN_CHANGE                = 20DH;    (* spinfield text has changed    *)
  76.   SPBN_SETFOCUS              = 20EH;    (* spinfield received focus      *)
  77.   SPBN_KILLFOCUS             = 20FH;    (* spinfield lost focus          *)
  78.  
  79. (*************************************************************************)
  80. (*    Messages from application to Spinbutton                            *)
  81. (*************************************************************************)
  82. CONST
  83.   SPBM_OVERRIDESETLIMITS     = 200H;    (* Set spinbutton limits without *)
  84.                                         (*  resetting the current value  *)
  85.   SPBM_QUERYLIMITS           = 201H;    (* Query limits set by           *)
  86.                                         (*   SPBM_SETLIMITS              *)
  87.   SPBM_SETTEXTLIMIT          = 202H;    (* Max entryfield characters     *)
  88.   SPBM_SPINUP                = 203H;    (* Tell entry field to spin up   *)
  89.   SPBM_SPINDOWN              = 204H;    (* Tell entry field to spin down *)
  90.   SPBM_QUERYVALUE            = 205H;    (* Tell entry field to send      *)
  91.                                         (*   current value               *)
  92.  
  93. (*************************************************************************)
  94. (*    Query Flags                                                        *)
  95. (*************************************************************************)
  96. CONST
  97.   SPBQ_UPDATEIFVALID         = 0;       (* Default                       *)
  98.   SPBQ_ALWAYSUPDATE          = 1;
  99.   SPBQ_DONOTUPDATE           = 3;
  100.  
  101. (*************************************************************************)
  102. (*    Return value for Empty Field.                                      *)
  103. (*       If ptr too long, variable sent in query msg                     *)
  104. (*************************************************************************)
  105. CONST
  106.   SPBM_SETARRAY              = 206H;    (* Change the data to spin       *)
  107.   SPBM_SETLIMITS             = 207H;    (* Change the numeric Limits     *)
  108.   SPBM_SETCURRENTVALUE       = 208H;    (* Change the current value      *)
  109.   SPBM_SETMASTER             = 209H;    (* Tell entryfield who master is *)
  110.  
  111. END WINSTDSPIN.
  112.