(********************************************************************) (* *) (* text.s7i Interface type for line/column oriented files *) (* Copyright (C) 1989 - 2011 Thomas Mertes *) (* *) (* This file is part of the Seed7 Runtime Library. *) (* *) (* The Seed7 Runtime Library is free software; you can *) (* redistribute it and/or modify it under the terms of the GNU *) (* Lesser General Public License as published by the Free Software *) (* Foundation; either version 2.1 of the License, or (at your *) (* option) any later version. *) (* *) (* The Seed7 Runtime Library is distributed in the hope that it *) (* will be useful, but WITHOUT ANY WARRANTY; without even the *) (* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR *) (* PURPOSE. See the GNU Lesser General Public License for more *) (* details. *) (* *) (* You should have received a copy of the GNU Lesser General *) (* Public License along with this program; if not, write to the *) (* Free Software Foundation, Inc., 51 Franklin Street, *) (* Fifth Floor, Boston, MA 02110-1301, USA. *) (* *) (********************************************************************) include "file.s7i"; include "color.s7i"; (** * Interface type for line/column oriented [[file|files]]. * The text interface is implemented with [[console|console_file]], * [[graph_file]], [[window|window_file]], [[pixmap_file|pixmapFontFile]], * [[stritext|striText]] and many other types. *) const type: text is subtype file; (* Procedures and Elements granted for every text *) (** * Get the height of ''aText''. * @return the height of ''aText''. *) const func integer: height (in text: aText) is DYNAMIC; (** * Get the width of ''aText''. * @return the width of ''aText''. *) const func integer: width (in text: aTExt) is DYNAMIC; (** * Determine the current line of ''aText''. * @return the current line of ''aText''. *) const func integer: line (in text: aText) is DYNAMIC; (** * Determine the current column of ''aText''. * @return the current column of ''aText''. *) const func integer: column (in text: aText) is DYNAMIC; (** * Clear an area of ''aText'' with the background color. * The area is specified in (line, column) coordinates and is * between the (''upper'', ''left'') and (''lower'', ''right''). *) const proc: clear (inout text: aText, in integer: upper, in integer: left, in integer: lower, in integer: right) is DYNAMIC; (** * Clear the area of ''aText'' with the background color. *) const proc: clear (inout text: aText) is DYNAMIC; const proc: v_scroll (inout text: aText, in integer: count) is DYNAMIC; const proc: v_scroll (inout text: aText, in integer: upper, in integer: left, in integer: lower, in integer: right, in integer: count) is DYNAMIC; const proc: h_scroll (inout text: aText, in integer: count) is DYNAMIC; const proc: h_scroll (inout text: aText, in integer: upper, in integer: left, in integer: lower, in integer: right, in integer: count) is DYNAMIC; (** * Set the current foreground color of ''aText''. *) const proc: color (inout text: aText, in color: foreground) is DYNAMIC; (** * Set the current foreground and background color of ''aText''. *) const proc: color (inout text: aText, in color: foreground, in color: background) is DYNAMIC; (** * Set the current position of ''aText'' to ''line'' and ''column''. *) const proc: setPos (inout text: aText, in integer: line, in integer: column) is DYNAMIC; (** * Set the current position of ''aText'' to the coordinates (''xPos'', ''yPos''). *) const proc: setPosXY (inout text: aText, in integer: xPos, in integer: yPos) is DYNAMIC; (** * Set the ''line'' of the current position of ''aText''. *) const proc: setLine (inout text: aText, in integer: line) is DYNAMIC; (** * Set the ''column'' of the current position of ''aText''. *) const proc: setColumn (inout text: aText, in integer: column) is DYNAMIC; const proc: cursor (ref text: aText, ref boolean: on) is DYNAMIC; const proc: box (ref text: aText) is DYNAMIC; const proc: clear_box (ref text: aText) is DYNAMIC;