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