Programming Guide |
Copies the contents of a wordwrapped text widget into a text buffer
int sm_ww_read(int field_number, char *buffer, int nbytes, int offset);int sm_n_ww_read(char *field_name, char *buffer, int nbytes, int offset);
field_name, field_number
- Specifies the field whose contents you want to read. Word wrapped text is allowed only in multiline text widgets whose
word_wrap
property is set toPV_YES
.buffer
- A pointer to the buffer into which the field's contents are to be read. To determine the size required by this buffer, call sm_ww_length to get the length of the word wrapped text and add 1.
nbytes
- The size of
buffer
in bytes.offset
- The offset into the word wrap field at which to start reading. Supply a value of 0 to start reading from the beginning of the field.
C only
- 0 The number of bytes read into buffer, excluding the null terminator.
sm_ww_read
copies word wrapped text from a multiline text widget intobuffer
, starting at offset. A null terminator is supplied in buffer after the copied data. Usesm_ww_length
to determine the size required forbuffer
and add 1.