## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# 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.h"
    00028
    00029
    00030 class csRect;
    00031 struct iConsoleOutput;
    00032 struct iTextureManager;
    00033 struct iFont;
    00034
    00036 enum
    00037 {
    00038   csConPageUp = -1,
    00039   csConPageDown = -2,
    00040   csConVeryTop = -3,
    00041   csConVeryBottom = -4
    00042 };
    00043
    00044 enum
    00045 {
    00046   csConNoCursor = 0,
    00047   csConNormalCursor,
    00048   csConInsertCursor
    00049 };
    00050
    00051 SCF_VERSION (iConsoleWatcher, 0, 0, 1);
    00052
    00057 struct iConsoleWatcher : public iBase
    00058 {
    00060   virtual void ConsoleVisibilityChanged(iConsoleOutput*, bool visible) = 0;
    00061 };
    00062
    00063
    00064 SCF_VERSION (iConsoleOutput, 2, 1, 0);
    00065
    00083 struct iConsoleOutput : public iBase
    00084 {
    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__