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

  1. // OCL - OS/2 Class Library
  2. // (c) Cubus 1995
  3. // All Rights Reserved
  4. // OEntryField.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/OEntryField.hpp 1.50 1996/08/11 23:47:13 B.STEIN Release $
  31.  
  32. #ifndef OEFIELD_INCLUDED
  33.   #define OEFIELD_INCLUDED
  34.  
  35.  
  36. #ifndef OSTRING_INCLUDED
  37.   #include <OString.hpp>
  38. #endif
  39.  
  40.  
  41. #ifndef OFRAME_INCLUDED
  42.   #include <OFrame.hpp>
  43. #endif
  44.  
  45.  
  46. typedef class OEntryField *pOEntryField;
  47.  
  48. class __CPP_EXPORT__ OEntryField
  49.   : public OWindow
  50. {
  51.  protected:
  52.     ULONG  limit;
  53.  
  54.  public:
  55.  
  56.     OEntryField          (const ULONG id,
  57.                           const HWND Parent,
  58.                           const ULONG Style = ES_MARGIN | ES_AUTOSCROLL,
  59.                           const ULONG Limit = CCHMAXPATH);
  60.  
  61.     OEntryField          (const ULONG id,
  62.                           const OFrame& Parent,
  63.                           const ULONG Style = ES_MARGIN | ES_AUTOSCROLL,
  64.                           const ULONG Limit = CCHMAXPATH);
  65.  
  66.     OEntryField          (const ULONG id,
  67.                           const pOFrame Parent,
  68.                           const ULONG Style = ES_MARGIN | ES_AUTOSCROLL,
  69.                           const ULONG Limit = CCHMAXPATH);
  70.  
  71.     virtual
  72.        ~OEntryField      ();
  73.  
  74.     virtual
  75.        PSZ isOfType      () const;
  76.  
  77.     OEntryField&
  78.        createEntryField  (const ULONG x,
  79.                           const ULONG y,
  80.                           const ULONG cx,
  81.                           const ULONG cy);
  82.  
  83.     OWindow&
  84.        inherit           (const HWND hwndDlg);
  85.  
  86.     BOOL
  87.        getText           (OString& Buffer),
  88.        setText           (PCSZ text),
  89.        cutText           (),
  90.        copyText          (),
  91.        pasteText         (),
  92.        clearText         (),
  93.        queryChanged      (),
  94.        queryRDOnly       (),
  95.        querySelection    (USHORT& firstChar, USHORT& lastChar),
  96.        setFirstChar      (const USHORT first),
  97.        setInsertMode     (const BOOL insert = TRUE),
  98.        setRDOnly         (const BOOL readOnly = TRUE),
  99.        setSelection      (const USHORT firstChar, const USHORT lastChar),
  100.        setTextLimit      (const USHORT limit);
  101.  
  102.     ULONG
  103.        queryFirstChar    ();
  104. };
  105.  
  106.  
  107. #endif // OEFIELD_INCLUDED
  108.  
  109. // end of source
  110.