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

  1. DEFINITION MODULE WINSTDSLIDER;
  2.  
  3. (************************************************************************
  4.   OS/2 2.0 interface for Presentation Manager
  5.            CUA slider 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. FROM OS2DEF        IMPORT TYPEPREFIX;
  15.  
  16. (*************************************************************************)
  17. (*    Define messages for the slider control                             *)
  18. (*************************************************************************)
  19. CONST
  20.   SLM_ADDDETENT        = 0369H;    (* Add detent niche          *)
  21.   SLM_QUERYDETENTPOS   = 036AH;    (* Query position of detent  *)
  22.   SLM_QUERYSCALETEXT   = 036BH;    (* Query text at tick number *)
  23.   SLM_QUERYSLIDERINFO  = 036CH;    (* Query slider information  *)
  24.   SLM_QUERYTICKPOS     = 036DH;    (* Query position of tick    *)
  25.   SLM_QUERYTICKSIZE    = 036EH;    (* Query size of tick        *)
  26.   SLM_REMOVEDETENT     = 036FH;    (* Remove detent niche       *)
  27.   SLM_SETSCALETEXT     = 0370H;    (* Set text above tick       *)
  28.   SLM_SETSLIDERINFO    = 0371H;    (* Set slider parameters     *)
  29.   SLM_SETTICKSIZE      = 0372H;    (* Set size of tick          *)
  30.   SLN_CHANGE           = 1;        (* Slider position changed   *)
  31.   SLN_SLIDERTRACK      = 2;        (* Slider dragged by user    *)
  32.   SLN_SETFOCUS         = 3;        (* Slider gaining focus      *)
  33.   SLN_KILLFOCUS        = 4;        (* Slider losing focus       *)
  34.  
  35. (*************************************************************************)
  36. (*    Slider control data structure                                      *)
  37. (*************************************************************************)
  38. TYPE
  39.   SLDCDATA             = RECORD      (* sldcd *)
  40.     CASE                 : TYPEPREFIX OF
  41.     | TRUE               :
  42.       cbSize             : LONGCARD; (* Size of control block             *)
  43.       usScale1Increments : CARDINAL; (* # of divisions on scale           *)
  44.       usScale1Spacing    : CARDINAL; (* Space in pels between increments  *)
  45.       usScale2Increments : CARDINAL; (* # of divisions on scale           *)
  46.       usScale2Spacing    : CARDINAL; (* Space in pels between increments  *)
  47.     | FALSE              :
  48.       Size               : LONGCARD; (* Size of control block             *)
  49.       Scale1Increments   : CARDINAL; (* # of divisions on scale           *)
  50.       Scale1Spacing      : CARDINAL; (* Space in pels between increments  *)
  51.       Scale2Increments   : CARDINAL; (* # of divisions on scale           *)
  52.       Scale2Spacing      : CARDINAL; (* Space in pels between increments  *)
  53.     END;                 END;
  54.   PSLDCDATA            = POINTER TO SLDCDATA;
  55.  
  56. (*************************************************************************)
  57. (*    Slider control style flag definition                               *)
  58. (*************************************************************************)
  59. CONST
  60.   SLS_HORIZONTAL       = 00000000H; (* Orient slider horizontally*)
  61.   SLS_VERTICAL         = 00000001H; (* Orient slider vertically  *)
  62.   SLS_CENTER           = 00000000H; (* Center shaft in window    *)
  63.   SLS_BOTTOM           = 00000002H; (* Offset shaft to bottom (H)*)
  64.   SLS_TOP              = 00000004H; (* Offset shaft to top (H)   *)
  65.   SLS_LEFT             = 00000002H; (* Offset shaft to left (V)  *)
  66.   SLS_RIGHT            = 00000004H; (* Offset shaft to right (V) *)
  67.   SLS_SNAPTOINCREMENT  = 00000008H; (* Snap to nearest increment *)
  68.   SLS_BUTTONSBOTTOM    = 00000010H; (* Add buttons at shaft bot. *)
  69.   SLS_BUTTONSTOP       = 00000020H; (* Add buttons at shaft top  *)
  70.   SLS_BUTTONSLEFT      = 00000010H; (* Add buttons left of shaft *)
  71.   SLS_BUTTONSRIGHT     = 00000020H; (* Add buttons right of shaft*)
  72.   SLS_OWNERDRAW        = 00000040H; (* Owner draw some fields    *)
  73.   SLS_READONLY         = 00000080H; (* Provide a read only slider*)
  74.   SLS_RIBBONSTRIP      = 00000100H; (* Provide a ribbon strip    *)
  75.   SLS_HOMEBOTTOM       = 00000000H; (* Set home position at bot. *)
  76.   SLS_HOMETOP          = 00000200H; (* Set home position at top  *)
  77.   SLS_HOMELEFT         = 00000000H; (* Set home position at left *)
  78.   SLS_HOMERIGHT        = 00000200H; (* Set home position at right*)
  79.   SLS_PRIMARYSCALE1    = 00000000H; (* Scale 1 is primary scale  *)
  80.   SLS_PRIMARYSCALE2    = 00000400H; (* Scale 2 is primary scale  *)
  81.  
  82. (*************************************************************************)
  83. (*    Message attributes for setting and querying slider components      *)
  84. (*************************************************************************)
  85. CONST
  86.   SMA_SCALE1                = 00001H;
  87.   SMA_SCALE2                = 00002H;
  88.   SMA_SHAFTDIMENSIONS       = 00000H;
  89.   SMA_SHAFTPOSITION         = 00001H;
  90.   SMA_SLIDERARMDIMENSIONS   = 00002H;
  91.   SMA_SLIDERARMPOSITION     = 00003H;
  92.   SMA_RANGEVALUE            = 00000H;
  93.   SMA_INCREMENTVALUE        = 00001H;
  94.   SMA_SETALLTICKS           = 0FFFFH;
  95.  
  96. (*************************************************************************)
  97. (*    Ownerdraw flag definitions                                         *)
  98. (*************************************************************************)
  99. CONST
  100.   SDA_RIBBONSTRIP           = 0001H;
  101.   SDA_SLIDERSHAFT           = 0002H;
  102.   SDA_BACKGROUND            = 0003H;
  103.   SDA_SLIDERARM             = 0004H;
  104.  
  105. (*************************************************************************)
  106. (*    Error return codes                                                 *)
  107. (*************************************************************************)
  108. CONST
  109.   PMERR_UPDATE_IN_PROGRESS  = 1F06H;
  110.   SLDERR_INVALID_PARAMETERS = -1;
  111.  
  112. END WINSTDSLIDER.
  113.