home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v1.zip / DDKX86 / H / PMMLE.H < prev    next >
Text File  |  1995-04-14  |  13KB  |  289 lines

  1. /*DDK*************************************************************************/
  2. /*                                                                           */
  3. /* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
  4. /*                                                                           */
  5. /*    The following IBM OS/2 WARP source code is provided to you solely for  */
  6. /*    the purpose of assisting you in your development of OS/2 WARP device   */
  7. /*    drivers. You may use this code in accordance with the IBM License      */
  8. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  9. /*    Copyright statement may not be removed.                                */
  10. /*                                                                           */
  11. /*****************************************************************************/
  12. /****************************** Module Header ******************************\
  13. *
  14. * Module Name: PMMLE.H
  15. *
  16. * OS/2 Presentation Manager MultiLine Edit Control
  17. *
  18. *
  19. * ===========================================================================
  20. *
  21. * The following symbols are used in this file for conditional sections.
  22. *
  23. *   #define:                To include:
  24. *
  25. *   INCL_WINMLE             Includes this file
  26. *
  27. * ===========================================================================
  28. *
  29. * Comments at the end of each typedef line give the name tags used in
  30. * the assembler include version of this file.
  31. *
  32. * The assembler include version of this file excludes lines between XLATOFF
  33. * and XLATON comments.
  34. *
  35. #ifndef __IBMC__
  36.    * The public version of this file (as shipped with the OS/2 Toolkit
  37.    * product) excludes all non 32-bit material marked in this file
  38.    * as well as any areas specifically marked with __IBMC__ conditional
  39.    * sections - including this paragraph. The H2IBMH rexx command file
  40.    * removes these sections.
  41. #endif
  42. \***************************************************************************/
  43.  
  44. /* XLATOFF */
  45. #ifdef __IBMC__
  46.    #pragma checkout( suspend )
  47.       #ifndef __CHKHDR__
  48.          #pragma checkout( suspend )
  49.       #endif
  50.    #pragma checkout( resume )
  51. #endif
  52. /* XLATON */
  53.  
  54. #ifndef MLE_INCLUDED
  55.    #define MLE_INCLUDED
  56.  
  57.    /*************************************************************************
  58.    * MLE Window styles ( in addition to WS_* )
  59.    *************************************************************************/
  60.    #define MLS_WORDWRAP               0x00000001L
  61.    #define MLS_BORDER                 0x00000002L
  62.    #define MLS_VSCROLL                0x00000004L
  63.    #define MLS_HSCROLL                0x00000008L
  64.    #define MLS_READONLY               0x00000010L
  65.    #define MLS_IGNORETAB              0x00000020L
  66.    #define MLS_DISABLEUNDO            0x00000040L
  67.  
  68.    /*************************************************************************
  69.    * MLE External Data Types
  70.    *************************************************************************/
  71.    typedef LONG    IPT;        /* insertion point         */
  72.    typedef PLONG   PIPT;       /* insertion point         */
  73.    typedef LONG    PIX;        /* pixel                   */
  74.    typedef ULONG   LINE;       /* Line number             */
  75.  
  76.    typedef struct _FORMATRECT {  /* MLEFRD */
  77.       LONG cxFormat;           /* format rectangle width  */
  78.       LONG cyFormat;           /* format rectangle height */
  79.    } MLEFORMATRECT;
  80.    typedef MLEFORMATRECT FAR *PFORMATRECT;
  81.  
  82.    typedef struct _MLECTLDATA {  /* MLECTL */
  83.       USHORT   cbCtlData;      /* Length of the MLECTLDATA structure  */
  84.       USHORT   afIEFormat;     /* import/export format                */
  85.       ULONG    cchText;        /* text limit                          */
  86.       IPT      iptAnchor;      /* beginning of selection              */
  87.       IPT      iptCursor;      /* ending of selection                 */
  88.       LONG     cxFormat;       /* format rectangle width              */
  89.       LONG     cyFormat;       /* format rectangle height             */
  90.       ULONG    afFormatFlags;  /* formatting rectangle flags          */
  91.       PVOID    pHWXCtlData;    /* reserved for Pen CtlData (penpm.h)  */
  92.    } MLECTLDATA;
  93.    typedef MLECTLDATA FAR *PMLECTLDATA;
  94.  
  95.    /*************************************************************************
  96.    * afFormatFlags mask
  97.    *************************************************************************/
  98.    #define MLFFMTRECT_LIMITHORZ       0x00000001L
  99.    #define MLFFMTRECT_LIMITVERT       0x00000002L
  100.    #define MLFFMTRECT_MATCHWINDOW     0x00000004L
  101.    #define MLFFMTRECT_FORMATRECT      0x00000007L
  102.  
  103.    /*************************************************************************
  104.    * afIEFormat - Import/Export Format flags
  105.    *************************************************************************/
  106.    #define MLFIE_CFTEXT               0
  107.    #define MLFIE_NOTRANS              1
  108.    #define MLFIE_WINFMT               2
  109.    #define MLFIE_RTF                  3
  110.  
  111.    /*************************************************************************
  112.    * MLN_OVERFLOW structure
  113.    *************************************************************************/
  114.    typedef struct _MLEOVERFLOW {  /* overflow */
  115.       ULONG afErrInd;            /* see mask below                         */
  116.       LONG nBytesOver;           /* number of bytes overflowed             */
  117.       LONG pixHorzOver;          /* number of pixels horizontally overflow */
  118.       LONG pixVertOver;          /* number of pixels vertically overflowed */
  119.    }  MLEOVERFLOW;
  120.    typedef MLEOVERFLOW FAR *POVERFLOW;
  121.  
  122.    /*************************************************************************
  123.    * afErrInd - error format rectangle flags
  124.    *************************************************************************/
  125.    #define MLFEFR_RESIZE              0x00000001L
  126.    #define MLFEFR_TABSTOP             0x00000002L
  127.    #define MLFEFR_FONT                0x00000004L
  128.    #define MLFEFR_TEXT                0x00000008L
  129.    #define MLFEFR_WORDWRAP            0x00000010L
  130.    #define MLFETL_TEXTBYTES           0x00000020L
  131.  
  132.    /*************************************************************************
  133.    * MLN_MARGIN structure
  134.    *************************************************************************/
  135.    typedef struct _MLEMARGSTRUCT {  /* margin */
  136.       USHORT afMargins;      /* margin indicator     */
  137.       USHORT usMouMsg;       /* mouse message        */
  138.       IPT    iptNear;        /* the geometrically nearest insertion point */
  139.    } MLEMARGSTRUCT;
  140.    typedef MLEMARGSTRUCT FAR *PMARGSTRUCT;
  141.  
  142.    /*************************************************************************
  143.    * afFlags - margin notification indicators
  144.    *************************************************************************/
  145.    #define MLFMARGIN_LEFT             0x0001
  146.    #define MLFMARGIN_BOTTOM           0x0002
  147.    #define MLFMARGIN_RIGHT            0x0003
  148.    #define MLFMARGIN_TOP              0x0004
  149.  
  150.    /*************************************************************************
  151.    * MLM_QUERYSELECTION flags
  152.    *************************************************************************/
  153.    #define MLFQS_MINMAXSEL            0
  154.    #define MLFQS_MINSEL               1
  155.    #define MLFQS_MAXSEL               2
  156.    #define MLFQS_ANCHORSEL            3
  157.    #define MLFQS_CURSORSEL            4
  158.  
  159.    /*************************************************************************
  160.    * MLN_CLPBDFAIL flags
  161.    *************************************************************************/
  162.    #define MLFCLPBD_TOOMUCHTEXT       0x00000001L
  163.    #define MLFCLPBD_ERROR             0x00000002L
  164.  
  165.    /*************************************************************************
  166.    * MLM_SEARCH structure
  167.    *************************************************************************/
  168.    typedef struct _SEARCH {  /* search */
  169.       USHORT cb;            /* size of search spec structure       */
  170.       PCHAR  pchFind;       /* string to search for                */
  171.       PCHAR  pchReplace;    /* string to replace with              */
  172.       SHORT  cchFind;       /* length of pchFindString             */
  173.       SHORT  cchReplace;    /* length of replace string            */
  174.       IPT    iptStart;      /* point at which to start search      */
  175.                             /* (negative indicates cursor pt)      */
  176.                             /* becomes pt where string found       */
  177.       IPT    iptStop;       /* point at which to stop search       */
  178.                             /* (negative indicates EOT)            */
  179.       USHORT cchFound;      /* Length of found string at iptStart  */
  180.    } MLE_SEARCHDATA;
  181.    typedef MLE_SEARCHDATA FAR *PMLE_SEARCHDATA;
  182.  
  183.    /*************************************************************************
  184.    * MLM_SEARCH style flags
  185.    *************************************************************************/
  186.    #define MLFSEARCH_CASESENSITIVE    0x00000001L
  187.    #define MLFSEARCH_SELECTMATCH      0x00000002L
  188.    #define MLFSEARCH_CHANGEALL        0x00000004L
  189.  
  190.    /*************************************************************************
  191.    * MLE messages - MLM from 0x01b0 to 0x01de; MLN from 0x0001 to 0x000f
  192.    *************************************************************************/
  193.    /* formatting messages */
  194.    #define MLM_SETTEXTLIMIT           0x01b0
  195.    #define MLM_QUERYTEXTLIMIT         0x01b1
  196.    #define MLM_SETFORMATRECT          0x01b2
  197.    #define MLM_QUERYFORMATRECT        0x01b3
  198.    #define MLM_SETWRAP                0x01b4
  199.    #define MLM_QUERYWRAP              0x01b5
  200.    #define MLM_SETTABSTOP             0x01b6
  201.    #define MLM_QUERYTABSTOP           0x01b7
  202.    #define MLM_SETREADONLY            0x01b8
  203.    #define MLM_QUERYREADONLY          0x01b9
  204.  
  205.    /* text content manipulation and queries messages */
  206.    #define MLM_QUERYCHANGED           0x01ba
  207.    #define MLM_SETCHANGED             0x01bb
  208.    #define MLM_QUERYLINECOUNT         0x01bc
  209.    #define MLM_CHARFROMLINE           0x01bd
  210.    #define MLM_LINEFROMCHAR           0x01be
  211.    #define MLM_QUERYLINELENGTH        0x01bf
  212.    #define MLM_QUERYTEXTLENGTH        0x01c0
  213.  
  214.    /* text import and export messages */
  215.    #define MLM_FORMAT                 0x01c1
  216.    #define MLM_SETIMPORTEXPORT        0x01c2
  217.    #define MLM_IMPORT                 0x01c3
  218.    #define MLM_EXPORT                 0x01c4
  219.    #define MLM_DELETE                 0x01c6
  220.    #define MLM_QUERYFORMATLINELENGTH  0x01c7
  221.    #define MLM_QUERYFORMATTEXTLENGTH  0x01c8
  222.    #define MLM_INSERT                 0x01c9
  223.  
  224.    /* selection messages */
  225.    #define MLM_SETSEL                 0x01ca
  226.    #define MLM_QUERYSEL               0x01cb
  227.    #define MLM_QUERYSELTEXT           0x01cc
  228.  
  229.    /* undo and redo messages */
  230.    #define MLM_QUERYUNDO              0x01cd
  231.    #define MLM_UNDO                   0x01ce
  232.    #define MLM_RESETUNDO              0x01cf
  233.  
  234.    /* text attributes messages */
  235.    #define MLM_QUERYFONT              0x01d0
  236.    #define MLM_SETFONT                0x01d1
  237.    #define MLM_SETTEXTCOLOR           0x01d2
  238.    #define MLM_QUERYTEXTCOLOR         0x01d3
  239.    #define MLM_SETBACKCOLOR           0x01d4
  240.    #define MLM_QUERYBACKCOLOR         0x01d5
  241.  
  242.    /* scrolling messages */
  243.    #define MLM_QUERYFIRSTCHAR         0x01d6
  244.    #define MLM_SETFIRSTCHAR           0x01d7
  245.  
  246.    /* clipboard messages */
  247.    #define MLM_CUT                    0x01d8
  248.    #define MLM_COPY                   0x01d9
  249.    #define MLM_PASTE                  0x01da
  250.    #define MLM_CLEAR                  0x01db
  251.  
  252.    /* display manipulation messages */
  253.    #define MLM_ENABLEREFRESH          0x01dc
  254.    #define MLM_DISABLEREFRESH         0x01dd
  255.  
  256.    /* search message */
  257.    #define MLM_SEARCH                 0x01de
  258.    #define MLM_QUERYIMPORTEXPORT      0x01df
  259.  
  260.    /* notification messages */
  261.    #define MLN_OVERFLOW               0x0001
  262.    #define MLN_PIXHORZOVERFLOW        0x0002
  263.    #define MLN_PIXVERTOVERFLOW        0x0003
  264.    #define MLN_TEXTOVERFLOW           0x0004
  265.    #define MLN_VSCROLL                0x0005
  266.    #define MLN_HSCROLL                0x0006
  267.    #define MLN_CHANGE                 0x0007
  268.    #define MLN_SETFOCUS               0x0008
  269.    #define MLN_KILLFOCUS              0x0009
  270.    #define MLN_MARGIN                 0x000a
  271.    #define MLN_SEARCHPAUSE            0x000b
  272.    #define MLN_MEMERROR               0x000c
  273.    #define MLN_UNDOOVERFLOW           0x000d
  274.    #define MLN_CLPBDFAIL              0x000f
  275.  
  276. #endif /* MLE_INCLUDED */
  277.  
  278. /* XLATOFF */
  279. #ifdef __IBMC__
  280.    #pragma checkout( suspend )
  281.       #ifndef __CHKHDR__
  282.          #pragma checkout( resume )
  283.       #endif
  284.    #pragma checkout( resume )
  285. #endif
  286. /* XLATON */
  287.  
  288. /**************************** end of file **********************************/
  289.