|
cswsutil.h00001 /* 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 __CSWSUTIL_H__ 00021 #define __CSWSUTIL_H__ 00022 00023 #define CSWS_INTERNAL 00024 #include "csws.h" 00025 #include "cswindow.h" 00026 00032 class csWindowList : public csWindow 00033 { 00034 protected: 00036 csDialog *dialog; 00038 csListBox *list; 00040 csButton *butshow, *butmaximize, *butclose; 00042 csComponent *focusedwindow; 00044 bool shouldclose; 00045 00046 public: 00048 csWindowList (csComponent *iParent); 00049 00051 virtual bool SetRect (int xmin, int ymin, int xmax, int ymax); 00052 00054 virtual void SetState (int mask, bool enable); 00055 00057 virtual bool HandleEvent (iEvent &Event); 00058 00059 protected: 00061 void RebuildList (); 00063 static bool do_addtowindowlist (csComponent *child, void *param); 00064 }; 00065 00068 extern void RectUnion (cswsRectVector &rect, csRect &result); 00069 00071 extern void ParseConfigBitmap (csApp *app, const char *prefix, 00072 const char *section, const char *id, int &x, int &y, int &w, int &h); 00073 00075 extern void csHLS2RGB (float h, float l, float s, float &r, float &g, float &b); 00077 extern void csRGB2HLS (float r, float g, float b, float &h, float &l, float &s); 00079 extern void csGetRGB (int iColor, csApp *iApp, float &r, float &g, float &b); 00080 00082 extern csButton *csNewToolbarButton (csComponent *iToolbar, int iCommand, 00083 char *iText, csButtonFrameStyle iFrameStyle = csbfsThinRect, 00084 int iButtonStyle = CSBS_SHIFT | CSBS_TEXTBELOW); 00086 extern csButton *csNewToolbarButton (csComponent *iToolbar, int iCommand, 00087 csPixmap *bmpup = NULL, csPixmap *bmpdn = NULL, 00088 csButtonFrameStyle iFrameStyle = csbfsThinRect, 00089 int iButtonStyle = CSBS_SHIFT, bool iDeletePixmaps = true); 00091 extern csPixmap *NewBitmap (csApp *app, char *texturename, int tx, int ty, 00092 int tw, int th); 00093 00094 #endif // __CSWSUTIL_H__ Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000 |