GLICT/globals.h

00001 /*
00002     GLICT - Graphics Library Interface Creation Toolkit
00003     Copyright (C) 2006-2007 OBJECT Networks
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 __GLICT_GLOBALS_H
00021 #define __GLICT_GLOBALS_H
00022 
00023 #include <GLICT/container.h>
00024 #include <GLICT/skinner.h>
00025 #include <GLICT/types.h>
00026 
00027 
00028 typedef void (*GLICTDEBUGCALLBACKPROC )(unsigned int len, const char *string);
00029 typedef void (*GLICTPAINTRECTPROC)( float left, float right, float top, float bottom, glictColor &color );
00030 
00032 class glictGlobalsClass {
00033     public:
00034         glictGlobalsClass();
00035         ~glictGlobalsClass();
00036 
00037         glictColor windowTitleBgColor;
00038         glictColor windowTitleColor;
00039         glictSkinner *windowTitleSkin;
00040         glictSkinner *windowBodySkin;
00041         glictSkinner *buttonSkin, *buttonHighlightSkin;
00042         glictSkinner *textboxSkin;
00043         glictColor buttonTextColor, buttonHighlightTextColor;
00044         glictColor panelTextColor;
00045         glictColor textboxTextColor;
00046 
00047         float w,h;
00048         glictPos lastMousePos; // last coordinates where user clicked
00049         glictClippingMode clippingMode;
00050         glictContainer* topFocused;
00051 
00052         bool enableGlTranslate;
00053         glictPos translation;
00054 
00055         bool drawPartialOut;
00056 
00057                 GLICTDEBUGCALLBACKPROC debugCallback;
00058                 GLICTPAINTRECTPROC paintrectCallback;
00059                 GLICTPAINTRECTPROC paintrectlinesCallback;
00060 
00061 
00062                 // functions
00063                 void Translatef(float, float, float);
00064                 void PaintRect(float top, float bottom, float left, float right);
00065                 void PaintRect(float left, float right, float top, float bottom, glictColor &col);
00066                 void PaintRectLines(float top, float bottom, float left, float right);
00067                 void PaintRectLines(float left, float right, float top, float bottom, glictColor &col);
00068                 void SetColor(float r, float g, float b, float a);
00069 };
00070 extern glictGlobalsClass glictGlobals;
00071 
00072 #define GLICT_RENDERING false
00073 #define GLICT_SELECTING true
00074 
00075 #define GLICT_APIREV 46 // from which subversion repository revision does this install come (manually changed upon relevant API changes)
00076 
00077 #endif

SourceForge.net Logo
generated with doxygen 1.5.3 on Mon Oct 29 18:09:26 2007