[Classes] [Prev] [Next] [Methods]

NTextEdit

Methods Index

Heritage
Description
Usage
Environment
Public Methods
Constructor, Destructor, and Initializer Methods
Caret Interface
Paragraph Methods
Line Methods
Partial Text Utility
Protected Methods

NTextEdit


Heritage

Superclass: CNativeTextEdit

Subclasses: NScrollText


Description

NTextEdit adds the capability to organize the text inside a text box into paragraphs and lines. NTextEdit objects consist of multi-line text editing boxes that can be placed inside CView. They provide full editing support, including cut, copy, and paste operations.


Usage

Create and initialize an NTextEdit object. Users can then type inside the editing box.


Environment

The text is drawn in the foreground color; the border is drawn with the pen color. The interior of the text box is drawn in the background color.


Public Methods

Constructor, Destructor, and Initializer Methods

NTextEdit(CSubview* theEnclosure,
const CRect& theRegion,
unsigned theAttributes = TX_BORDER,
int theRightMargin = 1000,
int theCharacterLimit = 1000);
NTextEdit(const NTextEdit& theTextEdit);
NTextEdit& operator=(const NTextEdit& theTextEdit);
virtual ~NTextEdit();
BOOLEAN ITextEdit(
unsigned theAttributes = TX_BORDER,
int theRightMargin = 1000,
int theCharacterLimit = 1000,
const CStringRW theInitialText = NULLString,
BOOLEAN isAutoSelected = FALSE,
BOOLEAN isVisible = TRUE,
long theGlue = NULLSTICKY);

Caret Interface

void GetInsertPosition(T_PNUM* thePar, 
T_LNUM* theLine, T_CNUM* theChar) const;
void SetInsertPosition(T_PNUM thePar, 
T_LNUM theLine, T_CNUM theChar);

Paragraph Methods

virtual BOOLEAN SetParagraph(
const CStringRW& theText, T_PNUM theParagraph);
virtual BOOLEAN AddParagraph(
const CStringRW& theText, T_PNUM theParagraph);
virtual BOOLEAN AppendToParagraph(
const CStringRW& theText, T_PNUM theParagraph);
virtual BOOLEAN DeleteParagraph(T_PNUM theParagraph);
virtual CStringRW GetParagraph(
T_PNUM theParagraph) const;
virtual void SelectParagraph(T_PNUM theParagraph, 
T_LNUM theStartLine = 0,
T_LNUM theEndLine = LAST,
T_CNUM theStartChar = 0,
T_CNUM theEndChar = LAST);
virtual T_CNUM GetNCharInPar(
T_PNUM theParagraph) const;
virtual T_PNUM GetNParInText(void) const;
virtual T_PNUM GetNParInSelection(void) const;

Line Methods

virtual void SetLine(const CStringRW& theText, 
T_PNUM theParagraph, T_LNUM theLine);
virtual CStringRW GetLine(T_PNUM theParagraph, 
T_LNUM theLine) const;
virtual void SelectLine(
T_LNUM theLine = 0,
T_PNUM theParagraph = 0,
T_CNUM theStartingChar = 0,
T_CNUM theEndingChar = LAST);
virtual T_CNUM GetNCharInLine(
T_PNUM theParagraph=0, T_LNUM theLine=0) const;
virtual T_LNUM GetNLineInPar(T_PNUM theParagraph) const;
virtual T_LNUM GetNLineInText(void) const;
virtual T_LNUM GetNLineInSelection(void) const;

Partial Text Utility

virtual CStringRW GetSomeText(
T_PNUM theStartParagraph,
T_PNUM theEndParagraph,
T_LNUM theStartLine,
T_LNUM theEndLine,
T_CNUM theStartChar,
T_CNUM theEndChar);
virtual void SelectSomeText(
T_PNUM theStartParagraph,
T_PNUM theEndParagraph,
T_LNUM theStartLine,
T_LNUM theEndLine,
T_CNUM theStartChar,
T_CNUM theEndChar);

Protected Methods

NTextEdit(CSubview* theEnclosure);


[Classes] [Prev] [Next] [Methods]

support@xvt.com


Visit our online help desk for tech support

Copyright © 2009, Providence Software Solutions Inc. All rights reserved.