12.07.2015 Views

Athena Widget Set - C Language Interface - X Consortium ... - X.Org

Athena Widget Set - C Language Interface - X Consortium ... - X.Org

Athena Widget Set - C Language Interface - X Consortium ... - X.Org

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Text <strong>Widget</strong>sXawTextPosition Read( w, pos, *text_return, length);wpostextlengthSpecifies the TextSrc object.Specifies the position of the first character to be read fromthe text buffer.Returns the text read from the source.Specifies the maximum number of characters the TextSrcshould return to the application in text_return.This function returns the text position immediately after the characters read fromthe text buffer. The function is not required to read length characters if that manycharacters are in the file, it may break at any point that is convenient to the internalstructure of the source. It may take several calls to Read before the desired portionof the text buffer is fully retrieved.Replacing Text.To replace or edit the text in a text buffer use the Replace function:XawTextPosition Replace( w, end, *text);wstartendtextSpecifies the TextSrc object.Specifies the position of the first character to be removed from the textbuffer. This is also the location to begin inserting the new text.Specifies the position immediately after the last character to be removedfrom the text buffer.Specifies the text to be added to the text source.This function can return any of the following values:XawEditDoneXawPositionErrorXawEditErrorThe text replacement was successful.The edit mode is XawtextAppend and start is not the last characterof the source.Either the Source was read-only or the range to be deleted islarger than the length of the Source.The Replace arguments start and end represent the text source character positionsfor the existing text that is to be replaced by the text in the text block. Thecharacters from start up to but not including end are deleted, and the buffer specifiedby the text block is inserted in their place. If start and end are equal, no textis deleted and the new text is inserted after start.Scanning the TextSrcTo search the text source for one of the predefined boundary types use the Scanfunction:XawTextPosition Scan( w, position, type, dir, count, include);wSpecifies the TextSrc object.90

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!