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