home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12osp1.exe / src / text / paragrph.hpp < prev    next >
Text File  |  1997-04-02  |  2KB  |  60 lines

  1. /*====START_GENERATED_PROLOG======================================
  2.  */
  3. /*
  4.  *   COMPONENT_NAME: odtextpart
  5.  *
  6.  *   CLASSES: none
  7.  *
  8.  *   ORIGINS: 82,27
  9.  *
  10.  *
  11.  *   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  12.  *   All Rights Reserved
  13.  *   Licensed Materials - Property of IBM
  14.  *   US Government Users Restricted Rights - Use, duplication or
  15.  *   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  16.  *
  17.  *   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  18.  *   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  19.  *   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  20.  *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  21.  *   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  22.  *   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  23.  *   OR PERFORMANCE OF THIS SOFTWARE.
  24.  */
  25. /*====END_GENERATED_PROLOG========================================
  26.  */
  27. // @(#) 1.8 com/src/samples/text/paragrph.hpp, odtextpart, od96os2, odos29712d 2/21/97 13:40:51 [3/21/97 17:48:38]
  28. #ifndef _PARAGRAPH_HPP_
  29. #define _PARAGRAPH_HPP_
  30.  
  31. #include "textplat.h"
  32.  
  33. class Paragraph
  34. {
  35.    public:
  36.       Paragraph(int orgPos, char* chars, int numChars);
  37.       Paragraph(int orgPos);
  38.       ~Paragraph();
  39.       void InsertText(int insPos, char* newChars, int numNewChars);
  40.       void AppendText(char* newChars, int numNewChars);
  41.       void DeleteText(int from, int numChars);
  42.       void ReplaceText(int from, int to, char* newChars, int numNewChars);
  43.       Paragraph* Split(int from);
  44.       void Join(Paragraph* appendingPara);
  45.       void CopyText(int from, int to, char* outBuffer);
  46.       inline int GetTextSize() {return textBufferSize;}
  47.       int GetOrigin();
  48.       void ChangeOrigin(int origin);
  49.       void DrawText(HDC hdc, RECT clipRect, int fontWidth, int fontDesc);
  50.  
  51.    private:
  52.       int     origin;
  53.       int     mem_allocated;
  54.  
  55.       char*     textBuffer;
  56.       int       textBufferSize;
  57.  
  58. };
  59. #endif
  60.