CrystalSpace

Public API Reference

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

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 #include "csextern.h"
00028  
00029 #define CSWS_INTERNAL
00030 #include "csws.h"
00031 #include "cswindow.h"
00032 
00038 class CS_CSWS_EXPORT csWindowList : public csWindow
00039 {
00040 protected:
00042   csDialog *dialog;
00044   csListBox *list;
00046   csButton *butshow, *butmaximize, *butclose;
00048   csComponent *focusedwindow;
00050   bool shouldclose;
00051 
00052 public:
00054   csWindowList (csComponent *iParent);
00055 
00057   virtual bool SetRect (int xmin, int ymin, int xmax, int ymax);
00058 
00060   virtual void SetState (int mask, bool enable);
00061 
00063   virtual bool HandleEvent (iEvent &Event);
00064 
00065 protected:
00067   void RebuildList ();
00069   static bool do_addtowindowlist (csComponent *child, void *param);
00070 };
00071 
00076 extern CS_CSWS_EXPORT void RectUnion (cswsRectVector &rect, csRect &result);
00077 
00079 extern CS_CSWS_EXPORT void ParseConfigBitmap (csApp *app, const char *prefix,
00080   const char *section, const char *id, int &x, int &y, int &w, int &h);
00081 
00083 extern CS_CSWS_EXPORT void csHLS2RGB (float h, float l, float s, float &r, 
00084   float &g, float &b);
00086 extern CS_CSWS_EXPORT void csRGB2HLS (float r, float g, float b, float &h, 
00087   float &l, float &s);
00089 extern CS_CSWS_EXPORT void csGetRGB (int iColor, csApp *iApp, float &r, 
00090   float &g, float &b);
00091 
00093 extern CS_CSWS_EXPORT csButton *csNewToolbarButton (csComponent *iToolbar, 
00094   int iCommand, char *iText, csButtonFrameStyle iFrameStyle = csbfsThinRect,
00095   int iButtonStyle = CSBS_SHIFT | CSBS_TEXTBELOW);
00097 extern CS_CSWS_EXPORT csButton *csNewToolbarButton (csComponent *iToolbar, 
00098   int iCommand, csPixmap *bmpup = 0, csPixmap *bmpdn = 0,
00099   csButtonFrameStyle iFrameStyle = csbfsThinRect,
00100   int iButtonStyle = CSBS_SHIFT, bool iDeletePixmaps = true);
00102 extern CS_CSWS_EXPORT csPixmap *NewBitmap (csApp *app, char *texturename, 
00103   int tx, int ty, int tw, int th);
00104 
00107 #endif // __CS_CSWSUTIL_H__

Generated for Crystal Space by doxygen 1.3.9.1