wxTextChunk: wxObject

This class is used for storing a text string which has all the same font and colour attributes. The entire hypertext file is broken up into a list of these fragments, and the Compile function assigns actual font and colour attributes to each chunk. A text chunk may also mark the start of a line (each line has a special start line text chunk).

If a chunk represents the start of a block, the block_id is this block. For chunks within a block, the block_id is always the id of the block currently in scope. A text chunk which marks the end of a block has block_id set to the next block's id, but end_block set to the ending block's id. This is because a text chunk contains the next fragment of text, and an end block chunk has two purposes: to end one block, and continue another.

wxTextChunk::wxTextChunk

voidwxTextChunkint chunkType, int lineNumber, char *text, wxFont *font,
wxColour *colour, int blockType, long blockId, int attribute, Bool visibility

Constructor. Used only internally.

wxTextChunk::wxTextChunk

voidwxTextChunk

Destructor. Used only internally.

wxTextChunk::background_colour

wxColour *background_colour

The background colour allocated for the chunk by Compile.

wxTextChunk::block_id

longblock_id

Id of the block associated with the text in the chunk.

wxTextChunk::block_type

intblock_type

Block type, an integer defined by the application using a wxHyperTextMapping object.

wxTextChunk::chunk_type

intchunk_type

The chunk_type data member may be one of:

wxTextChunk::colour

wxColour *colour

The foreground colour allocated for the chunk by Compile.

wxTextChunk::end_id

longend_id

Id of the block which has just ended, if the type of this chunk is CHUNK_END_BLOCK. block_id is the id of block which has come into scope, and which starts with the text stored in the chunk.

wxTextChunk::font

wxFont *font

The font allocated for the chunk by Compile.

wxTextChunk::line_no

intline_no

The line number for this chunk.

wxTextChunk::logical_op

intlogical_op

The logical operator for this chunk.

wxTextChunk::selected

Boolselected

For chunks which start a block, TRUE if the block is currently selected.

wxTextChunk::special_attribute

intspecial_attribute

For a block-starting chunk, specifies one or more special attributes ORed together. There is currently only one such attribute, wxHYPER_SECTION, which if present indicates that the block starts a new section.

wxTextChunk::text

char *text

The actual text in the chunk.

wxTextChunk::visibility

Boolvisibility

For a block-starting chunk, determines whether the chunk is visible.