home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / bpos13.zip / pmmle.pas < prev    next >
Pascal/Delphi Source File  |  1993-11-24  |  10KB  |  254 lines

  1. {**************************************************************************\
  2. *
  3. * Module Name: PMMLE.H
  4. *
  5. * OS/2 Presentation Manager MultiLine Edit Control - Version 1.0
  6. *
  7. * Copyright (c) International Business Machines Corporation 1989, 1990
  8. *
  9. \**************************************************************************}
  10. {| Version:   1.00
  11.  | Original translation: Peter Sawatzki ps
  12.  | Contributing:
  13.  |   Peter Sawatzki ps
  14.  |
  15.  | change history:
  16.  | Date:    Ver: Author:
  17.  | 11/11/93 1.00 ps     original translation by ps
  18. }
  19. Unit PmMLE;
  20. Interface
  21. Uses
  22.   Os2Def;
  23. Const
  24. {**************************************************************************\
  25. * MLE Class and dialog code
  26. \**************************************************************************}
  27. { in pmwin.h }
  28.  
  29. {**************************************************************************\
  30. * MLE Window styles ( in addition to WS_* )
  31. \**************************************************************************}
  32.   MLS_WORDWRAP             = $00000001;
  33.   MLS_BORDER               = $00000002;
  34.   MLS_VSCROLL              = $00000004;
  35.   MLS_HSCROLL              = $00000008;
  36.   MLS_READONLY             = $00000010;
  37.   MLS_IGNORETAB            = $00000020;
  38.  
  39. {**************************************************************************\
  40. * MLE External Data Types
  41. \**************************************************************************}
  42. Type
  43.   IPT  = LONG;       { insertion point                             }
  44.   PIPT = ^LONG;      { insertion point                             }
  45.   PIX  = LONG;       { pixel                                       }
  46.   LINE = ULONG;      { Line number                                 }
  47.  
  48.   MLEFORMATRECT = Record { MLEFRD format rectangle data               }
  49.     cxFormat,           { format rectangle width                     }
  50.     cyFormat: LONG      { format rectangle height                    }
  51.   End;
  52.   pFORMATRECT = ^MLEFORMATRECT;
  53.  
  54.   MLECTLDATA = Record { MLECTL control data                        }
  55.     cbCtlData,          { Length of the MLECTLDATA structure          }
  56.     afIEFormat: USHORT; { import/export format                        }
  57.     cchText: ULONG;     { text limit                                  }
  58.     iptAnchor,          { beginning of selection                      }
  59.     iptCursor: IPT;     { ending of selection                         }
  60.     cxFormat,           { format rectangle width                      }
  61.     cyFormat: LONG;     { format rectangle height                     }
  62.     afFormatFlags: ULONG{ formatting rectangle flags - see mask below }
  63.   End;
  64.   pMLECTLDATA = ^MLECTLDATA;
  65.  
  66. {**************************************************************************\
  67. * afFormatFlags mask
  68. \**************************************************************************}
  69. Const
  70.   MLFFMTRECT_LIMITHORZ     = $00000001;
  71.   MLFFMTRECT_LIMITVERT     = $00000002;
  72.   MLFFMTRECT_MATCHWINDOW   = $00000004;
  73.   MLFFMTRECT_FORMATRECT    = $00000007;
  74. {**************************************************************************\
  75. * afIEFormat - Import/Export Format flags
  76. \**************************************************************************}
  77.   MLFIE_CFTEXT             = 0;
  78.   MLFIE_NOTRANS            = 1;
  79.   MLFIE_WINFMT             = 2;
  80.   MLFIE_RTF                = 3;
  81.  
  82. {**************************************************************************\
  83. * MLN_OVERFLOW structure
  84. \**************************************************************************}
  85. Type
  86.   MLEOVERFLOW = Record { overflow structure                        }
  87.     afErrInd: ULONG;            { see mask below                            }
  88.     nBytesOver,                 { number of bytes overflowed                }
  89.     pixHorzOver,                { number of pixels horizontally overflowed  }
  90.     pixVertOver: LONG           { number of pixels vertically overflowed    }
  91.   End;
  92.   pOVERFLOW = ^MLEOVERFLOW;
  93.  
  94. Const
  95. {**************************************************************************\
  96. * afErrInd - error format rectangle flags
  97. \**************************************************************************}
  98.   MLFEFR_RESIZE            = $00000001;
  99.   MLFEFR_TABSTOP           = $00000002;
  100.   MLFEFR_FONT              = $00000004;
  101.   MLFEFR_TEXT              = $00000008;
  102.   MLFEFR_WORDWRAP          = $00000010;
  103.   MLFETL_TEXTBYTES         = $00000020;
  104.  
  105. Type
  106. {**************************************************************************\
  107. * MLN_MARGIN structure
  108. \**************************************************************************}
  109.   MLEMARGSTRUCT = Record { margin structure                        }
  110.     afMargins,            { margin indicator                          }
  111.     usMouMsg: USHORT;     { mouse message                             }
  112.     iptNear: IPT          { the geometrically nearest insertion point }
  113.  End;
  114.  pMARGSTRUCT = ^MLEMARGSTRUCT;
  115.  
  116. Const
  117. {**************************************************************************\
  118. * afFlags - margin notification indicators
  119. \**************************************************************************}
  120.   MLFMARGIN_LEFT           = $0001;
  121.   MLFMARGIN_BOTTOM         = $0002;
  122.   MLFMARGIN_RIGHT          = $0003;
  123.   MLFMARGIN_TOP            = $0004;
  124.  
  125. {**************************************************************************\
  126. * MLM_QUERYSELECTION flags
  127. \**************************************************************************}
  128.   MLFQS_MINMAXSEL          = 0;
  129.   MLFQS_MINSEL             = 1;
  130.   MLFQS_MAXSEL             = 2;
  131.   MLFQS_ANCHORSEL          = 3;
  132.   MLFQS_CURSORSEL          = 4;
  133.  
  134. {**************************************************************************\
  135. * MLN_CLPBDFAIL flags
  136. \**************************************************************************}
  137.   MLFCLPBD_TOOMUCHTEXT     = $00000001;
  138.   MLFCLPBD_ERROR           = $00000002;
  139.  
  140. Type
  141. {**************************************************************************\
  142. * MLM_SEARCH structure
  143. \**************************************************************************}
  144.   MLE_SEARCHDATA = Record { search structure                               }
  145.     cb: USHORT;           { size of search spec structure                  }
  146.     pchFind,              { string to search for                           }
  147.     pchReplace: pChar;    { string to replace with                         }
  148.     cchFind,              { length of pchFindString                        }
  149.     cchReplace: SHORT;    { length of replace string                       }
  150.     iptStart,             { point at which to start search                 }
  151.                           { (negative indicates cursor pt)                 }
  152.                           { becomes pt where string found                  }
  153.     iptStop: IPT;         { point at which to stop search                  }
  154.                           { (negative indicates EOT)                       }
  155.     cchFound: USHORT      { Length of found string at iptStart             }
  156.   End;
  157.   pMLE_SEARCHDATA = ^MLE_SEARCHDATA;
  158.  
  159. Const
  160. {**************************************************************************\
  161. * MLM_SEARCH style flags
  162. \**************************************************************************}
  163.   MLFSEARCH_CASESENSITIVE  = $00000001;
  164.   MLFSEARCH_SELECTMATCH    = $00000002;
  165.   MLFSEARCH_CHANGEALL      = $00000004;
  166.  
  167. {**************************************************************************\
  168. * MLE messages - MLM from 0x01b0 to 0x01de; MLN from 0x0001 to 0x000f
  169. \**************************************************************************}
  170. { formatting messages }
  171.   MLM_SETTEXTLIMIT         = $01b0;
  172.   MLM_QUERYTEXTLIMIT       = $01b1;
  173.   MLM_SETFORMATRECT        = $01b2;
  174.   MLM_QUERYFORMATRECT      = $01b3;
  175.   MLM_SETWRAP              = $01b4;
  176.   MLM_QUERYWRAP            = $01b5;
  177.   MLM_SETTABSTOP           = $01b6;
  178.   MLM_QUERYTABSTOP         = $01b7;
  179.   MLM_SETREADONLY          = $01b8;
  180.   MLM_QUERYREADONLY        = $01b9;
  181.  
  182. { text content manipulation and queries messages }
  183.   MLM_QUERYCHANGED         = $01ba;
  184.   MLM_SETCHANGED           = $01bb;
  185.   MLM_QUERYLINECOUNT       = $01bc;
  186.   MLM_CHARFROMLINE         = $01bd;
  187.   MLM_LINEFROMCHAR         = $01be;
  188.   MLM_QUERYLINELENGTH      = $01bf;
  189.   MLM_QUERYTEXTLENGTH      = $01c0;
  190.  
  191. { text import and export messages }
  192.   MLM_FORMAT               = $01c1;
  193.   MLM_SETIMPORTEXPORT      = $01c2;
  194.   MLM_IMPORT               = $01c3;
  195.   MLM_EXPORT               = $01c4;
  196.   MLM_DELETE               = $01c6;
  197.   MLM_QUERYFORMATLINELENGTH= $01c7;
  198.   MLM_QUERYFORMATTEXTLENGTH= $01c8;
  199.   MLM_INSERT               = $01c9;
  200.  
  201. { selection messages }
  202.   MLM_SETSEL               = $01ca;
  203.   MLM_QUERYSEL             = $01cb;
  204.   MLM_QUERYSELTEXT         = $01cc;
  205.  
  206. { undo and redo messages }
  207.   MLM_QUERYUNDO            = $01cd;
  208.   MLM_UNDO                 = $01ce;
  209.   MLM_RESETUNDO            = $01cf;
  210.  
  211. { text attributes messages }
  212.   MLM_QUERYFONT            = $01d0;
  213.   MLM_SETFONT              = $01d1;
  214.   MLM_SETTEXTCOLOR         = $01d2;
  215.   MLM_QUERYTEXTCOLOR       = $01d3;
  216.   MLM_SETBACKCOLOR         = $01d4;
  217.   MLM_QUERYBACKCOLOR       = $01d5;
  218.  
  219. { scrolling messages }
  220.   MLM_QUERYFIRSTCHAR       = $01d6;
  221.   MLM_SETFIRSTCHAR         = $01d7;
  222.  
  223. { clipboard messages }
  224.   MLM_CUT                  = $01d8;
  225.   MLM_COPY                 = $01d9;
  226.   MLM_PASTE                = $01da;
  227.   MLM_CLEAR                = $01db;
  228.  
  229. { display manipulation messages }
  230.   MLM_ENABLEREFRESH        = $01dc;
  231.   MLM_DISABLEREFRESH       = $01dd;
  232.  
  233. { search message }
  234.   MLM_SEARCH               = $01de;
  235.   MLM_QUERYIMPORTEXPORT    = $01df;
  236.  
  237. { notification messages }
  238.   MLN_OVERFLOW             = $0001;
  239.   MLN_PIXHORZOVERFLOW      = $0002;
  240.   MLN_PIXVERTOVERFLOW      = $0003;
  241.   MLN_TEXTOVERFLOW         = $0004;
  242.   MLN_VSCROLL              = $0005;
  243.   MLN_HSCROLL              = $0006;
  244.   MLN_CHANGE               = $0007;
  245.   MLN_SETFOCUS             = $0008;
  246.   MLN_KILLFOCUS            = $0009;
  247.   MLN_MARGIN               = $000a;
  248.   MLN_SEARCHPAUSE          = $000b;
  249.   MLN_MEMERROR             = $000c;
  250.   MLN_UNDOOVERFLOW         = $000d;
  251.   MLN_CLPBDFAIL            = $000f;
  252. Implementation
  253. End.
  254.