home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / borhead.zip / PMMLE.H < prev    next >
C/C++ Source or Header  |  1994-11-09  |  12KB  |  285 lines

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