/* Copyright 1996 Acorn Computers Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /**************************************************************************** * This source file was written by Acorn Computers Limited. It is part of * * the RISCOS library for writing applications in C for RISC OS. It may be * * used freely in the creation of programs for Archimedes. It should be * * used with Acorn's C Compiler Release 3 or later. * * * ***************************************************************************/ /* * Title: txtscrap.h * Purpose: Coordinate a unique txt selection among many txt objects. * */ # ifndef __txtscrap_h # define __txtscrap_h # ifndef __txt_h # include "txt.h" # endif /**************************** INTERFACE FUNCTIONS *************************/ /* --------------------------- txtscrap_setselect -------------------------- * Description: Calls txt_setselect(t, from, to) and remembers t. * If another txt object currently holds the selection * then this is first cleared. * * Parameters: txt t -- text object * txt_index from -- array index of start of selection * txt_index to -- array index of end of selection * (i.e. first character not in the selection). * * Returns: void. * Other Info: If "from" >= "to" then the selection will be unset, and * t will not be remembered as holding the current selection. * A txt must not be destroyed while still holding the * selection, please clear the selection first. * */ void txtscrap_setselect(txt t, txt_index from, txt_index to); /* -------------------------- txtscrap_selectowner ------------------------- * Description: Returns the current holder of the selection. * * Parameters: void. * * Returns: The txt that currently holds the selection, or 0 if none. * Other Info: none. * */ txt txtscrap_selectowner(void); # endif /* end scrap.h */