X11 Work Bench Toolkit 1.0
'base class' structure for TEXT_OBJECT More...
|allocated size of aLines array |
|number of entries currently in the array - call WBCheckReAllocTextBuffer() before increasing |
|The maximum column number for any line, rounded up by 'DEFAULT_TAB_WIDTH'. |
|The 'smallest maximum' recorded in 'aLineCache'. |
|unsigned long||aLineCache [TEXT_BUFFER_LINE_CACHE_SIZE]|
|An array of line indices, sorted longest to least, for the 'longest lines'. |
|unsigned int||aLineCacheLen [TEXT_BUFFER_LINE_CACHE_SIZE]|
|The actual line lengths associated with 'aLineCache' (zero if unused) |
|char *||aLines |
|array of 'lines'. each pointer is suballocated via WBAlloc() |
'base class' structure for TEXT_OBJECT
The structure is assumed to have a variable length array 'aLines' at the end, which extends beyond the length of the base structure. 'nArraySize' indicates the maximum size of this array, and 'nEntries' indicates the (contiguous) actual size of the array, starting at element .
This is a simple array structure, and to insert a line in the middle you will need to use 'memmove()' following a call to WBCheckReAllocTextBuffer(), and then re-assign 'nEntries' as needed. New entries must be allocated via 'WBAlloc()'.
To allocate a new structure, call WBAllocTextBuffer(). To free an allocated structure, call WBFreeTextBuffer().
The 'cached information' data members are maintained internally. You should not alter them. You can re-evaluate them at any time by calling WBTextBufferLineChange() and WBTextBufferRefreshCache()