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 to PV_YES.

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.

The size of buffer in bytes.

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



sm_ww_read copies word wrapped text from a multiline text widget into buffer, starting at offset. A null terminator is supplied in buffer after the copied data. Use sm_ww_length to determine the size required for buffer and add 1.

See Also

sm_ww_length, sm_ww_write