home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / header45.zip / pmmle.h < prev    next >
C/C++ Source or Header  |  1999-04-30  |  12KB  |  290 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 __IBMC__ || __IBMCPP__
  29.    #pragma info( none )
  30.    #ifndef __CHKHDR__
  31.       #pragma info( none )
  32.    #endif
  33.    #pragma info( restore )
  34. #endif
  35. #ifdef __cplusplus
  36.       extern "C" {
  37. #endif
  38. /* XLATON */
  39.  
  40. #ifndef MLE_INCLUDED
  41.    #define MLE_INCLUDED
  42.    
  43.    /*************************************************************************
  44.    * MLE Window styles ( in addition to WS_* )
  45.    *************************************************************************/
  46.    #define MLS_WORDWRAP               0x00000001L
  47.    #define MLS_BORDER                 0x00000002L
  48.    #define MLS_VSCROLL                0x00000004L
  49.    #define MLS_HSCROLL                0x00000008L
  50.    #define MLS_READONLY               0x00000010L
  51.    #define MLS_IGNORETAB              0x00000020L
  52.    #define MLS_DISABLEUNDO            0x00000040L
  53.    #define MLS_LIMITVSCROLL           0x00000080L
  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.       PVOID    pHWXCtlData;    /* reserved for Pen CtlData (penpm.h)  */
  81.    } MLECTLDATA;
  82.    typedef MLECTLDATA *PMLECTLDATA;
  83.    
  84.    /*************************************************************************
  85.    * afFormatFlags mask
  86.    *************************************************************************/
  87.    #define MLFFMTRECT_LIMITHORZ       0x00000001L
  88.    #define MLFFMTRECT_LIMITVERT       0x00000002L
  89.    #define MLFFMTRECT_MATCHWINDOW     0x00000004L
  90.    #define MLFFMTRECT_FORMATRECT      0x00000007L
  91.    
  92.    /*************************************************************************
  93.    * afIEFormat - Import/Export Format flags
  94.    *************************************************************************/
  95.    #define MLFIE_CFTEXT               0
  96.    #define MLFIE_NOTRANS              1
  97.    #define MLFIE_WINFMT               2
  98.    #define MLFIE_RTF                  3
  99.    
  100.    /*************************************************************************
  101.    * MLE color types: MLM_QUERY(TEXT/BACK)COLOR, MLM_SET(TEXT/BACK)COLOR
  102.    *************************************************************************/
  103.    #define MLE_INDEX  0
  104.    #define MLE_RGB    1
  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 __cplusplus
  278.         }
  279. #endif
  280. #if __IBMC__ || __IBMCPP__
  281.    #pragma info( none )
  282.    #ifndef __CHKHDR__
  283.       #pragma info( restore )
  284.    #endif
  285.    #pragma info( restore )
  286. #endif
  287. /* XLATON */
  288.  
  289. /**************************** end of file **********************************/
  290.