CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

cswsutil.h

00001 /*
00002     Crystal Space Windowing System: Miscelaneous CSWS utilites
00003     Copyright (C) 1998,1999 by Andrew Zabolotny <bit@eltech.ru>
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_CSWSUTIL_H__
00021 #define __CS_CSWSUTIL_H__
00022 
00027 #define CSWS_INTERNAL
00028 #include "csws.h"
00029 #include "cswindow.h"
00030 
00036 class csWindowList : public csWindow
00037 {
00038 protected:
00040   csDialog *dialog;
00042   csListBox *list;
00044   csButton *butshow, *butmaximize, *butclose;
00046   csComponent *focusedwindow;
00048   bool shouldclose;
00049 
00050 public:
00052   csWindowList (csComponent *iParent);
00053 
00055   virtual bool SetRect (int xmin, int ymin, int xmax, int ymax);
00056 
00058   virtual void SetState (int mask, bool enable);
00059 
00061   virtual bool HandleEvent (iEvent &Event);
00062 
00063 protected:
00065   void RebuildList ();
00067   static bool do_addtowindowlist (csComponent *child, void *param);
00068 };
00069 
00074 extern void RectUnion (cswsRectVector &rect, csRect &result);
00075 
00077 extern void ParseConfigBitmap (csApp *app, const char *prefix,
00078   const char *section, const char *id, int &x, int &y, int &w, int &h);
00079 
00081 extern void csHLS2RGB (float h, float l, float s, float &r, float &g, float &b);
00083 extern void csRGB2HLS (float r, float g, float b, float &h, float &l, float &s);
00085 extern void csGetRGB (int iColor, csApp *iApp, float &r, float &g, float &b);
00086 
00088 extern csButton *csNewToolbarButton (csComponent *iToolbar, int iCommand,
00089   char *iText, csButtonFrameStyle iFrameStyle = csbfsThinRect,
00090   int iButtonStyle = CSBS_SHIFT | CSBS_TEXTBELOW);
00092 extern csButton *csNewToolbarButton (csComponent *iToolbar, int iCommand,
00093   csPixmap *bmpup = NULL, csPixmap *bmpdn = NULL,
00094   csButtonFrameStyle iFrameStyle = csbfsThinRect,
00095   int iButtonStyle = CSBS_SHIFT, bool iDeletePixmaps = true);
00097 extern csPixmap *NewBitmap (csApp *app, char *texturename, int tx, int ty,
00098   int tw, int th);
00099 
00102 #endif // __CS_CSWSUTIL_H__

Generated for Crystal Space by doxygen 1.2.14