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