Main Page | Class List | File List | Class Members | File Members

CText Interface Reference

CText operates list of objects. More...

#import <ctext.h>

List of all members.

Public Member Functions

(id) init
 Initialize CText object.

(id) initWithString:
 Initialize text object by string.

(void) dealloc
 Release resource for the object.

(uint_t) lineNum
 Get number of lines in the text.

(NSString *) lineAtIndex:
 Get one line from text.

(void) appendLine:
 Append new line to the text.

(void) appendSomeLines:
 Append some lines to the text.

(void) prependLine:
 Prepend new string as a 1st line in text.

(void) prependSomeLines:
 Prepend some lines to the heading of text.

(uint_t) width
 Get max width of line in the text.

(void) print:
 Print the content of text.

(CText *) paste:
 Join other text for each lines and generate text from them.


Protected Attributes

NSMutableArray * line_array


Detailed Description

CText operates list of objects.

Description
CText operates list of objects.


Member Function Documentation

- (void) CText: (id) 
(NSString *) 
(id)  src
 

Append new line to the text.

Parameters:
src Source line.
Description
Append new line to the text. The source line must NOT have newline code in it. (See appendSomeLines() method).
Warning:
Do not give the line which contains newline code. This method does not split the line into some lines.

- (void) CText: (id) 
(NSString *) 
(id)  src
 

Append some lines to the text.

Parameters:
src Source string which contans some words and newlines.
Description
Append new lines to the text. The source string can contain some newlines. (See appendLine() method).

- (void) CText:
 

Release resource for the object.

Description
Release resource for the object.

- (id) CText:
 

Initialize CText object.

Description
Initialize CText object.
Returns:
The object itself.

- (id) CText: (id) 
(NSString *) 
(id)  str
 

Initialize text object by string.

Returns:
New text.
Parameters:
str Source string.
Description
Initialize text object by string.

- (NSString *) CText: (id) 
(uint_t) 
(id)  index
 

Get one line from text.

Return values:
obj The string for the line.
nil The indexed object is not found.
Parameters:
index Index to choose a line.
Description
Get one line from text.

- (uint_t) CText:
 

Get number of lines in the text.

Returns:
Number of lines.
Description
Get number of lines in the text.

- (CText *) CText: (id) 
(CText *) 
(id)  text
 

Join other text for each lines and generate text from them.

Parameters:
text Source text to paste.
Description
Paste other text for each lines. Each lines are joined and the indentation of right line are defined by maximum width of left lines.

- (void) CText: (id) 
(NSString *) 
(id)  src
 

Prepend new string as a 1st line in text.

Parameters:
src Source line. The string must NOT contain newline codes.
Description
Prepend new string as a 1st line in text. The source line must NOT have newline code in it. (See prependSomeLines() method).
Warning:
Do not give the line which contains newline code. This method does not split the line into some lines.

- (void) CText: (id) 
(NSString *) 
(id)  src
 

Prepend some lines to the heading of text.

Parameters:
src Source string which contans some words and newlines.
Description
Prepend new lines to the heading of text. The source string can contain some newlines. (See prependLine() method).

- (void) CText: (id) 
(FILE *) 
(id)  outfp
 

Print the content of text.

Parameters:
outfp Output file stream.
Description
Print the content of text.

- (uint_t) CText:
 

Get max width of line in the text.

Returns:
Width of text.
Description
Get max width of line in the text.


Member Data Documentation

NSMutableArray* CText::line_array [protected]
 

Array of lines in text


The documentation for this interface was generated from the following file:
Generated on Wed Jul 14 18:34:59 2004 for Coconut by doxygen 1.3.6