home *** CD-ROM | disk | FTP | other *** search
- // Lemon (HK) Ltd
- // last modified on 30 July 1999
-
- function Window(src,lmargin,tmargin,rmargin,bmargin) {
- this.lyr = DragLayer;
- this.lyr(src);
- this.canDrag=WindowCanDrag;
-
- this.lmargin = lmargin ? lmargin : 0;
- this.tmargin = tmargin ? tmargin : 0;
- this.rmargin = rmargin ? rmargin : 0;
- this.bmargin = bmargin ? bmargin : 0;
-
- this.scrollbox = new ScrollBox(src + ".WindowBody");
- this.scrollbox.moveTo(lmargin, tmargin);
- this.scrollbox.resize(this.w-lmargin-rmargin, this.h-tmargin-bmargin);
- this.scrollbox.redraw();
- }
- function WindowCanDrag(x,y) {
- y-=this.y; x-=this.x;
- return y<=28;
- }
- function WindowResize(w,h) {
- this.resize(w,h);
- this.scrollbox.resize(this.w-this.lmargin-this.rmargin, this.h-this.tmargin-this.bmargin);
- this.scrollbox.redraw();
- }