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