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

pglog.h

Go to the documentation of this file.
00001 /*
00002     ParaGUI - crossplatform widgetset
00003     Copyright (C) 2000,2001,2002  Alexander Pipelka
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     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018  
00019     Alexander Pipelka
00020     pipelka@teleweb.at
00021  
00022     Last Update:      $Author: mbickel $
00023     Update Date:      $Date: 2007-04-13 16:15:56 $
00024     Source File:      $Source: /home/cvspsrv/cvsroot/games/asc/source/libs/paragui/include/pglog.h,v $
00025     CVS/RCS Revision: $Revision: 1.2 $
00026     Status:           $State 
00027 */
00028 
00035 #ifndef PGLOG_H
00036 #define PGLOG_H
00037 
00038 #include <stdarg.h>
00039 #include "SDL.h"
00040 #include "paragui.h"
00041 #include "pglabel.h"
00042 
00044 typedef enum {
00045     PG_LOG_NONE,  
00046     PG_LOG_ERR, 
00047     PG_LOG_WRN, 
00048     PG_LOG_MSG, 
00049     PG_LOG_DBG 
00050 } PG_LOG_LEVEL;
00051 
00056 #define PG_LOGMTH_STDOUT        1
00057 
00061 #define PG_LOGMTH_STDERR        2
00062 
00066 #define PG_LOGMTH_CONSOLE       4
00067 
00068 #ifdef __cplusplus
00069 
00075 namespace PG_LogConsole {
00087 DECLSPEC void LogVA(PG_LOG_LEVEL id, const char *Text, va_list ap);
00088 
00092 DECLSPEC void Done();
00093 
00100 DECLSPEC void Update();
00101 
00109 DECLSPEC void SetLogLevel(PG_LOG_LEVEL newlevel);
00110 
00114 DECLSPEC void Show();
00115 
00119 DECLSPEC void Hide();
00120 
00124 DECLSPEC void Toggle();
00125 
00131 DECLSPEC void SetMethod(int method);
00132 
00138 DECLSPEC int GetMethod();
00139 
00146 DECLSPEC void SetConsoleKey(SDLKey key);
00147 
00153 DECLSPEC SDLKey GetConsoleKey();
00154 
00161 DECLSPEC void SetTitle(const char* title, PG_Label::TextAlign alignment = PG_Label::CENTER);
00162 
00168 DECLSPEC void SetMaxLogLines(Uint32 max);
00169 }
00170 
00171 #endif
00172 
00173 #ifdef __cplusplus
00174 extern "C" {
00175 #endif
00176 
00183         DECLSPEC void PG_Log(PG_LOG_LEVEL id, const char *Text, ...);
00184 
00190         DECLSPEC void PG_LogMSG(const char *fmt, ...);
00191 
00197         DECLSPEC void PG_LogERR(const char *fmt, ...);
00198 
00204         DECLSPEC void PG_LogWRN(const char *fmt, ...);
00205 
00211         DECLSPEC void PG_LogDBG(const char *fmt, ...);
00212 
00213 #ifdef __cplusplus
00214 }
00215 #endif
00216 
00217 #endif // PGLOG_H
00218 
00219 /*
00220  * Local Variables:
00221  * c-basic-offset: 8
00222  * End:
00223  */

Generated on Tue Jun 24 01:27:48 2008 for Advanced Strategic Command by  doxygen 1.4.2