CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

conout.h

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 
00023 #include <stdarg.h>
00024 #include "iutil/eventh.h"
00025 #include "iutil/comp.h"
00026 
00027 class csRect;
00028 struct iConsoleOutput;
00029 struct iTextureManager;
00030 struct iFont;
00031 
00033 enum
00034 {
00035   csConPageUp = -1,
00036   csConPageDown = -2,
00037   csConVeryTop = -3,
00038   csConVeryBottom = -4
00039 };
00040 
00041 enum
00042 {
00043   csConNoCursor = 0,
00044   csConNormalCursor,
00045   csConInsertCursor
00046 };
00047 
00048 SCF_VERSION (iConsoleWatcher, 0, 0, 1);
00049 
00054 struct iConsoleWatcher : public iBase
00055 {
00057   virtual void ConsoleVisibilityChanged(iConsoleOutput*, bool visible) = 0;
00058 };
00059 
00060 
00061 SCF_VERSION (iConsoleOutput, 2, 1, 0);
00062 
00084 struct iConsoleOutput : public iBase
00085 {
00099   virtual void PutText (const char *text, ...) CS_GNUC_PRINTF (2, 3) = 0;
00100 
00104   virtual void PutTextV (const char *text, va_list args)
00105       CS_GNUC_PRINTF (2, 0) = 0;
00106 
00111   virtual const char *GetLine (int line = -1) const = 0;
00112 
00122   virtual void Draw2D (csRect *oRect = 0) = 0;
00123 
00133   virtual void Draw3D (csRect *oRect = 0) = 0;
00134 
00140   virtual void Clear (bool wipe = false) = 0;
00141 
00143   virtual void SetBufferSize (int maxLines) = 0;
00144 
00146   virtual bool GetTransparency () const = 0;
00148   virtual void SetTransparency (bool transp) = 0;
00149 
00151   virtual iFont *GetFont () const = 0;
00153   virtual void SetFont (iFont *font) = 0;
00154 
00156   virtual int GetTopLine () const = 0;
00163   virtual void ScrollTo (int topLine, bool snap = true) = 0;
00164 
00166   virtual int GetCursorStyle () const = 0;
00168   virtual void SetCursorStyle (int style) = 0;
00169 
00174   virtual void SetVisible (bool show) = 0;
00178   virtual bool GetVisible () = 0;
00179 
00191   virtual void AutoUpdate (bool autoUpdate) = 0;
00192 
00194   virtual void SetCursorPos (int charNo) = 0;
00195 
00197   virtual int GetMaxLineWidth () = 0;
00198 
00203   virtual void RegisterWatcher (iConsoleWatcher*) = 0;
00204 
00206   virtual bool PerformExtension (const char *command, ...) = 0;
00207 
00209   virtual bool PerformExtensionV (const char *command, va_list) = 0;
00210 };
00211 
00212 #endif // __CS_IVARIA_CONOUT_H__

Generated for Crystal Space by doxygen 1.3.9.1