Function: GgiEditor Purpose: Create a Ggi text editor Category: USER-INTERFACE File: ggi.src Author: J.P. Terlouw Use: #include "ggi.h" ident editor; char *keyword, *contents; int width, height, mode, size; editor = GgiEditor(keyword, width, height, mode, contents, size); editor - 'handle' by which element can be referenced. keyword - user input keyword. width - element's width in pixels height - element's height in pixels mode - edit mode: one of ggiReadOnly, ggiEdit or ggiAppend contents - depending on 'size': text to be edited or filename size - size of the text string, 0 or -1 (see below) Description: GgiEditor creates a text editor element. On the screen is consists of a rectangular area in which the text appears and, if necessary, one or two scrollbars. The associated keyword is set to 'YES' whenever the user has changed the text. The argument 'mode' determines whether the user can change the text and what changes are allowed. ggiReadOnly prevents the user from modifying the text, ggiEdit allows the user to edit the whole text and ggiAppend lets the user only add to the end. If the argument 'size' is zero or positive, the 'contents' argument contains the text to be edited. If it is -1, 'contents' is the name of a file containing the text. If 'size' is zero, the editor element uses an internal copy of 'contents' in which changes can be made. The original text is not modified. If it is larger than zero, changes are immediately reflected in the supplied string. Related docs: GgiEditorSource.dc2, GgiEditorSave.dc2, GgiEditorSearch.dc2 Updates: Feb 11, 2000: JPT, Document created.