home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / oclsrc15.zip / OCL / Include / OMLE.hpp < prev    next >
C/C++ Source or Header  |  1996-08-12  |  4KB  |  144 lines

  1. // OCL - OS/2 Class Library
  2. // (c) Cubus 1995
  3. // All Rights Reserved
  4. // OMLE.hpp
  5.  
  6. /*
  7.  * Redistribution and use in source and binary forms, with or without
  8.  * modification, are permitted provided that the following conditions
  9.  * are met:
  10.  * 1. Redistributions of source code must retain the above copyright
  11.  *    notice, this list of conditions and the following disclaimer.
  12.  * 2. Neither the name Cubus nor the name Team OCL may be used to
  13.  *    endorse or promote products derived from this software
  14.  *    without specific prior written permission.
  15.  * 3. See OCL.INF for a detailed copyright notice.
  16.  *
  17.  *              THIS SOFTWARE IS PROVIDED ``AS IS'' AND
  18.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  21.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  23.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  24.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  25.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  26.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  27.  * SUCH DAMAGE.
  28.  */
  29.  
  30. // $Header: W:/Projects/OCL/Include/rcs/OMLE.hpp 1.50 1996/08/11 23:47:20 B.STEIN Release $
  31.  
  32. #ifndef OMLE_INCLUDED
  33.   #define OMLE_INCLUDED
  34.  
  35.  
  36. #ifndef OFRAME_INCLUDED
  37.   #include <oframe.hpp>
  38. #endif
  39.  
  40. #ifndef OSTRING_INCLUDED
  41.   #include <OString.hpp>
  42. #endif
  43.  
  44. #ifndef OTHREAD_INCLUDED
  45.   #include <OThread.hpp>
  46. #endif
  47.  
  48.  
  49. typedef class OMLE *pOMLE;
  50.  
  51.  
  52. class __CPP_EXPORT__ OMLE
  53.   : public OWindow
  54. {
  55.  protected:
  56.    PVOID              imex;
  57.    ULONG              imexLen;
  58.    IPT                imexOffset;
  59.  
  60.  public:
  61.    OThread<OMLE>      insertLargeThr;
  62.    OString            openedFile;
  63.  
  64. // enums
  65.  
  66.    enum              {
  67.                       text   = MLFIE_CFTEXT,
  68.                       binary = MLFIE_NOTRANS,
  69.                       winmle = MLFIE_WINFMT
  70.                      };
  71.  
  72.    enum              {
  73.                       border  = MLS_BORDER,
  74.                       rdonly  = MLS_READONLY,
  75.                       wrap    = MLS_WORDWRAP,
  76.                       hscroll = MLS_HSCROLL,
  77.                       vscroll = MLS_VSCROLL,
  78.                       notab   = MLS_IGNORETAB,
  79.                       noundo  = MLS_DISABLEUNDO
  80.                      };
  81.  
  82.    OMLE              (const ULONG id,
  83.                       const HWND Parent,
  84.                       const ULONG Style = OMLE::hscroll | OMLE::vscroll | OMLE::border);
  85.  
  86.    OMLE              (const ULONG id,
  87.                       const OFrame& Parent,
  88.                       const ULONG Style = OMLE::hscroll | OMLE::vscroll | OMLE::border);
  89.  
  90.    OMLE              (const ULONG id,
  91.                       const pOFrame Parent,
  92.                       const ULONG Style = OMLE::hscroll | OMLE::vscroll | OMLE::border);
  93.  
  94.    virtual
  95.       ~OMLE          ();
  96.  
  97.    virtual
  98.       PSZ isOfType   () const;
  99.  
  100.    virtual ULONG
  101.       getText        (PVOID out, ULONG len),
  102.       getText        (OString& Buffer),
  103.       setText        (PVOID in, ULONG len),
  104.       setText        (PSZ text);
  105.  
  106.    virtual BOOL
  107.       insertText     (PSZ text);
  108.  
  109.    BOOL
  110.       createMLE      (const ULONG x  = 0,
  111.                       const ULONG y  = 0,
  112.                       const ULONG cx = 0,
  113.                       const ULONG cy = 0),
  114.       copy           (),
  115.       cut            (),
  116.       paste          (),
  117.       copy2Clip      (),
  118.       cut2Clip       (),
  119.       pasteFromClip  (),
  120.       clear          (),
  121.       undo           (),
  122.       changed        (),
  123.       deleteText     (ULONG beginPoint, ULONG count),
  124.       deleteAll      (),
  125.       insertFile     (PCSZ fileName);
  126.  
  127. // services
  128.  
  129.    ULONG
  130.       length         (),
  131.       lines          (),
  132.       setFormat      (const ULONG format);
  133.  
  134.    void
  135.       disableRefresh (),
  136.       enableRefresh  (),
  137.       insertLarge    ();
  138. };
  139.  
  140.  
  141. #endif // OMLE_INCLUDED
  142.  
  143. // end of source
  144.