00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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__