ivaria/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 { 00095 virtual void PutText (const char *text, ...) CS_GNUC_PRINTF (2, 3) = 0; 00096 00100 virtual void PutTextV (const char *text, va_list args) 00101 CS_GNUC_PRINTF (2, 0) = 0; 00102 00107 virtual const char *GetLine (int line = -1) const = 0; 00108 00118 virtual void Draw2D (csRect *oRect = 0) = 0; 00119 00129 virtual void Draw3D (csRect *oRect = 0) = 0; 00130 00136 virtual void Clear (bool wipe = false) = 0; 00137 00139 virtual void SetBufferSize (int maxLines) = 0; 00140 00142 virtual bool GetTransparency () const = 0; 00144 virtual void SetTransparency (bool transp) = 0; 00145 00147 virtual iFont *GetFont () const = 0; 00149 virtual void SetFont (iFont *font) = 0; 00150 00152 virtual int GetTopLine () const = 0; 00159 virtual void ScrollTo (int topLine, bool snap = true) = 0; 00160 00162 virtual int GetCursorStyle () const = 0; 00164 virtual void SetCursorStyle (int style) = 0; 00165 00170 virtual void SetVisible (bool show) = 0; 00174 virtual bool GetVisible () = 0; 00175 00187 virtual void AutoUpdate (bool autoUpdate) = 0; 00188 00190 virtual void SetCursorPos (int charNo) = 0; 00191 00193 virtual int GetMaxLineWidth () = 0; 00194 00199 virtual void RegisterWatcher (iConsoleWatcher*) = 0; 00200 00202 virtual bool PerformExtension (const char *command, ...) = 0; 00203 00205 virtual bool PerformExtensionV (const char *command, va_list) = 0; 00206 }; 00207 00208 #endif // __CS_IVARIA_CONOUT_H__
Generated for Crystal Space by doxygen 1.2.18