CrystalSpace

Public API Reference

ivaria/conout.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2000 by Jorrit Tyberghein
00003     Written by Michael Dale Long
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public
00016     License along with this library; if not, write to the Free
00017     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 */
00019 
00020 #ifndef __CS_IVARIA_CONOUT_H__
00021 #define __CS_IVARIA_CONOUT_H__
00022 
00027 #include "csutil/scf_interface.h"
00028 
00029 class csRect;
00030 struct iConsoleOutput;
00031 struct iTextureManager;
00032 struct iFont;
00033 
00035 enum
00036 {
00037   csConPageUp = -1,
00038   csConPageDown = -2,
00039   csConVeryTop = -3,
00040   csConVeryBottom = -4
00041 };
00042 
00043 enum
00044 {
00045   csConNoCursor = 0,
00046   csConNormalCursor,
00047   csConInsertCursor
00048 };
00049 
00054 struct iConsoleWatcher : public virtual iBase
00055 {
00056   SCF_INTERFACE (iConsoleWatcher, 1, 0, 0);
00057 
00059   virtual void ConsoleVisibilityChanged(iConsoleOutput*, bool visible) = 0;
00060 };
00061 
00062 
00079 struct iConsoleOutput : public virtual iBase
00080 {
00081   SCF_INTERFACE (iConsoleOutput, 3, 0, 0);
00082  
00097   virtual void PutText (const char *text, ...) CS_GNUC_PRINTF (2, 3) = 0;
00098 
00102   virtual void PutTextV (const char *text, va_list args)
00103       CS_GNUC_PRINTF (2, 0) = 0;
00104 
00109   virtual const char *GetLine (int line = -1) const = 0;
00110 
00120   virtual void Draw2D (csRect *oRect = 0) = 0;
00121 
00131   virtual void Draw3D (csRect *oRect = 0) = 0;
00132 
00138   virtual void Clear (bool wipe = false) = 0;
00139 
00141   virtual void SetBufferSize (int maxLines) = 0;
00142 
00144   virtual bool GetTransparency () const = 0;
00146   virtual void SetTransparency (bool transp) = 0;
00147 
00149   virtual iFont *GetFont () const = 0;
00151   virtual void SetFont (iFont *font) = 0;
00152 
00154   virtual int GetTopLine () const = 0;
00161   virtual void ScrollTo (int topLine, bool snap = true) = 0;
00162 
00164   virtual int GetCursorStyle () const = 0;
00166   virtual void SetCursorStyle (int style) = 0;
00167 
00172   virtual void SetVisible (bool show) = 0;
00176   virtual bool GetVisible () = 0;
00177 
00189   virtual void AutoUpdate (bool autoUpdate) = 0;
00190 
00192   virtual void SetCursorPos (int charNo) = 0;
00193 
00195   virtual int GetMaxLineWidth () = 0;
00196 
00201   virtual void RegisterWatcher (iConsoleWatcher*) = 0;
00202 
00204   virtual bool PerformExtension (const char *command, ...) = 0;
00205 
00207   virtual bool PerformExtensionV (const char *command, va_list) = 0;
00208 };
00209 
00210 #endif // __CS_IVARIA_CONOUT_H__

Generated for Crystal Space 1.0.2 by doxygen 1.4.7