--------------------------------------------------------------------------------
--                                                                            --
-- Copyright (C) 2004, RISC OS Ada Library (RASCAL) developers.               --
--                                                                            --
-- This 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.         --
--                                                                            --
-- This 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 library; if not, write to the Free Software        --
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA    --
--                                                                            --
--------------------------------------------------------------------------------

-- @brief Text related.
-- $Author$
-- $Date$
-- $Revision$

package RASCAL.Text is

   --
   -- Sets the text colours in the form &BBGGRR00.
   --
   procedure Set_Colour (Foreground : in Integer;
                         Background : in Integer);

   --
   -- Calculates the width of a string, if plotted in the current desktop font.
   --Desktop font can be outline font or old BBC-type font.
   --
   function Get_Width (Text : in String) return Integer;

   --
   -- Plots a string using the current desktop font.
   --
   procedure Plot (Text : in String;
                   X    : in Integer;
                   Y    : in Integer;
                   Flags: in Integer := 0);

   --
   -- Returns the string truncated if necessary with an ellipsis.
   --Depending on the current alphabet and Wimp font, either an ellipsis character is used, or three full stops.
   --
   function Truncate (Text : in String;
                      Width: in Integer) return String;

   --
   -- Returns split point.
   --
   function Get_SplitPoint (Text  : in String;
                            Width : in Integer;
                            Split : in Character) return Integer;

private
end RASCAL.Text;