paragui-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-cvs] CVS: paragui/src/widgets pgbutton.cpp,1.8,1.8.2.1 pgcolumn


From: Teunis Peters <address@hidden>
Subject: [paragui-cvs] CVS: paragui/src/widgets pgbutton.cpp,1.8,1.8.2.1 pgcolumnitem.cpp,1.3,1.3.2.1 pgimage.cpp,1.3,1.3.2.1 pglabel.cpp,1.4,1.4.2.1 pglayout.cpp,1.2,1.2.2.1 pglineedit.cpp,1.6,1.6.2.1 pglistboxitem.cpp,1.6,1.6.2.1 pgpopupmenu.cpp,1.7,1.7.2.1 pgprogressbar.cpp,1.4,1.4.2.1 pgrichedit.cpp,1.4,1.4.2.1 pgthemewidget.cpp,1.6,1.6.2.1 pgwidget.cpp,1.13,1.13.2.1 pgwidgetdnd.cpp,1.3,1.3.2.1 pgwidgetlist.cpp,1.11,1.11.2.1 pgwindow.cpp,1.10,1.10.2.1
Date: Tue, 18 Jun 2002 18:40:43 -0400

Update of /cvsroot/paragui/paragui/src/widgets
In directory subversions:/tmp/cvs-serv27818/src/widgets

Modified Files:
      Tag: devel-opengl
        pgbutton.cpp pgcolumnitem.cpp pgimage.cpp pglabel.cpp 
        pglayout.cpp pglineedit.cpp pglistboxitem.cpp pgpopupmenu.cpp 
        pgprogressbar.cpp pgrichedit.cpp pgthemewidget.cpp 
        pgwidget.cpp pgwidgetdnd.cpp pgwidgetlist.cpp pgwindow.cpp 
Log Message:
Initial checkin of code by Teunis Peters
Added abstraction layer for display support.
Initial OpenGL testing mode - use SDL_GLSDL to activate
A lot of test code is still present - FIXME
Some demos do not operate at all.  Some work barely.
only animation works flawlessly at this time.


Index: pgbutton.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgbutton.cpp,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -C2 -r1.8 -r1.8.2.1
*** pgbutton.cpp        28 Apr 2002 16:35:30 -0000      1.8
--- pgbutton.cpp        18 Jun 2002 22:40:39 -0000      1.8.2.1
***************
*** 35,42 ****
  
  struct PG_ButtonDataInternal {
!       SDL_Surface* srf_normal;
!       SDL_Surface* srf_high;
!       SDL_Surface* srf_down;
!       SDL_Surface* srf_icon[3];
  
        bool free_icons;
--- 35,42 ----
  
  struct PG_ButtonDataInternal {
!       PG_Draw::PG_DrawableSurface* srf_normal;
!       PG_Draw::PG_DrawableSurface* srf_high;
!       PG_Draw::PG_DrawableSurface* srf_down;
!       PG_Draw::PG_DrawableSurface* srf_icon[3];
  
        bool free_icons;
***************
*** 46,50 ****
  
        PG_Gradient gradState[3];
!       SDL_Surface* background[3];
        int backMode[3];
        int backBlend[3];
--- 46,50 ----
  
        PG_Gradient gradState[3];
!       PG_Draw::PG_DrawableSurface* background[3];
        int backMode[3];
        int backBlend[3];
***************
*** 250,254 ****
        if(my_internaldata->srf_normal) {
                if(my_transparency[0] > 0) {
!                       SDL_SetAlpha(my_internaldata->srf_normal, SDL_SRCALPHA, 
255-my_transparency[0]);
                }
        }
--- 250,254 ----
        if(my_internaldata->srf_normal) {
                if(my_transparency[0] > 0) {
!                       my_internaldata->srf_normal->SetAlpha(SDL_SRCALPHA, 
255-my_transparency[0]);
                }
        }
***************
*** 257,261 ****
        if(my_internaldata->srf_down) {
                if(my_transparency[1] > 0) {
!                       SDL_SetAlpha(my_internaldata->srf_down, SDL_SRCALPHA, 
255-my_transparency[1]);
                }
        }
--- 257,261 ----
        if(my_internaldata->srf_down) {
                if(my_transparency[1] > 0) {
!                       my_internaldata->srf_down->SetAlpha(SDL_SRCALPHA, 
255-my_transparency[1]);
                }
        }
***************
*** 264,268 ****
        if(my_internaldata->srf_high) {
                if(my_transparency[2] > 0) {
!                       SDL_SetAlpha(my_internaldata->srf_high, SDL_SRCALPHA, 
255-my_transparency[2]);
                }
        }
--- 264,268 ----
        if(my_internaldata->srf_high) {
                if(my_transparency[2] > 0) {
!                       my_internaldata->srf_high->SetAlpha(SDL_SRCALPHA, 
255-my_transparency[2]);
                }
        }
***************
*** 397,409 ****
  
        if(my_internaldata->srf_icon[0] != NULL) {
!               SDL_SetColorKey(my_internaldata->srf_icon[0], SDL_SRCCOLORKEY, 
colorkey);
        }
  
        if(my_internaldata->srf_icon[1] != NULL) {
!               SDL_SetColorKey(my_internaldata->srf_icon[1], SDL_SRCCOLORKEY, 
colorkey);
        }
  
        if(my_internaldata->srf_icon[2] != NULL) {
!               SDL_SetColorKey(my_internaldata->srf_icon[2], SDL_SRCCOLORKEY, 
colorkey);
        }
  
--- 397,409 ----
  
        if(my_internaldata->srf_icon[0] != NULL) {
!               my_internaldata->srf_icon[0]->SetColorKey(SDL_SRCCOLORKEY, 
colorkey);
        }
  
        if(my_internaldata->srf_icon[1] != NULL) {
!               my_internaldata->srf_icon[1]->SetColorKey(SDL_SRCCOLORKEY, 
colorkey);
        }
  
        if(my_internaldata->srf_icon[2] != NULL) {
!               my_internaldata->srf_icon[2]->SetColorKey(SDL_SRCCOLORKEY, 
colorkey);
        }
  
***************
*** 412,418 ****
  
  bool PG_Button::SetIcon2(const char* filenameup, const char* filenamedown, 
const char* filenameover) {
!       SDL_Surface* icon0 = PG_Application::LoadSurface(filenameup);
!       SDL_Surface* icon1 = PG_Application::LoadSurface(filenamedown);
!       SDL_Surface* icon2 = PG_Application::LoadSurface(filenameover);
  
        if(icon0 == NULL) {
--- 412,418 ----
  
  bool PG_Button::SetIcon2(const char* filenameup, const char* filenamedown, 
const char* filenameover) {
!       PG_Draw::PG_DrawableSurface* icon0 = 
PG_Application::LoadSurface(filenameup);
!       PG_Draw::PG_DrawableSurface* icon1 = 
PG_Application::LoadSurface(filenamedown);
!       PG_Draw::PG_DrawableSurface* icon2 = 
PG_Application::LoadSurface(filenameover);
  
        if(icon0 == NULL) {
***************
*** 442,446 ****
  
  /**  */
! bool PG_Button::SetIcon(SDL_Surface* icon_up, SDL_Surface* 
icon_down,SDL_Surface* icon_over) {
  
        if(!icon_up && !icon_down && !icon_over) {
--- 442,446 ----
  
  /**  */
! bool PG_Button::SetIcon(PG_Draw::PG_DrawableSurface* icon_up, 
PG_Draw::PG_DrawableSurface* icon_down,PG_Draw::PG_DrawableSurface* icon_over) {
  
        if(!icon_up && !icon_down && !icon_over) {
***************
*** 459,463 ****
  }
  
! bool PG_Button::SetIcon(SDL_Surface* icon_up, SDL_Surface* icon_down) {
        return SetIcon(icon_up, icon_down, NULL);
  }
--- 459,463 ----
  }
  
! bool PG_Button::SetIcon(PG_Draw::PG_DrawableSurface* icon_up, 
PG_Draw::PG_DrawableSurface* icon_down) {
        return SetIcon(icon_up, icon_down, NULL);
  }
***************
*** 515,519 ****
  
  /**  */
! void PG_Button::eventButtonSurface(SDL_Surface** surface, int newstate, 
Uint16 w, Uint16 h) {
        if (!surface)
                return;
--- 515,519 ----
  
  /**  */
! void PG_Button::eventButtonSurface(PG_Draw::PG_DrawableSurface** surface, int 
newstate, Uint16 w, Uint16 h) {
        if (!surface)
                return;
***************
*** 538,542 ****
  }
  
! void PG_Button::SetBackground(int state, SDL_Surface* background, int mode) {
  
        if(!background) {
--- 538,542 ----
  }
  
! void PG_Button::SetBackground(int state, PG_Draw::PG_DrawableSurface* 
background, int mode) {
  
        if(!background) {
***************
*** 557,561 ****
  }
  
! void PG_Button::eventBlit(SDL_Surface* srf, const PG_Rect& src, const 
PG_Rect& dst) {
        PG_Rect rect = *this;
        PG_Rect r;
--- 557,561 ----
  }
  
! void PG_Button::eventBlit(PG_Draw::PG_DrawableSurface* srf, const PG_Rect& 
src, const PG_Rect& dst) {
        PG_Rect rect = *this;
        PG_Rect r;
***************
*** 596,601 ****
  
        if(t != 255) {
!               SDL_SetAlpha(srf, SDL_SRCALPHA, 255-t);
!               PG_Draw::BlitSurface(srf, src, my_srfScreen, dst);
        }
  
--- 596,601 ----
  
        if(t != 255) {
!               srf->SetAlpha(SDL_SRCALPHA, 255-t);
!               my_srfScreen->BlitSurface(srf, src, dst);
        }
  
***************
*** 608,614 ****
        // check for icon srf
        //
!       //SDL_Surface* iconsrf = (my_state == BTN_STATE_PRESSED) ? 
((my_internaldata->srf_icon[1] == 0) ? my_internaldata->srf_icon[0] : 
my_internaldata->srf_icon[1]) : my_internaldata->srf_icon[0];
  
!       SDL_Surface* iconsrf;
        if(my_state ==  BTN_STATE_PRESSED) {
                if(my_internaldata->srf_icon[1] == 0) {
--- 608,614 ----
        // check for icon srf
        //
!       //PG_Draw::PG_DrawableSurface* iconsrf = (my_state == 
BTN_STATE_PRESSED) ? ((my_internaldata->srf_icon[1] == 0) ? 
my_internaldata->srf_icon[0] : my_internaldata->srf_icon[1]) : 
my_internaldata->srf_icon[0];
  
!       PG_Draw::PG_DrawableSurface* iconsrf;
        if(my_state ==  BTN_STATE_PRESSED) {
                if(my_internaldata->srf_icon[1] == 0) {
***************
*** 631,641 ****
        if(iconsrf) {
  
!               int dx = my_text.empty() ? (rect.my_width - iconsrf->w) >> 1 : 
3;
!               int dy = (rect.my_height - iconsrf->h) >> 1;
  
                r.my_xpos = rect.my_xpos + dx + shift;
                r.my_ypos = rect.my_ypos + dy + shift;
!               r.my_width = iconsrf->w;
!               r.my_height = iconsrf->h;
  
                // calc new cliprect for icon
--- 631,641 ----
        if(iconsrf) {
  
!               int dx = my_text.empty() ? (rect.my_width - 
iconsrf->getScreen()->w) >> 1 : 3;
!               int dy = (rect.my_height - iconsrf->getScreen()->h) >> 1;
  
                r.my_xpos = rect.my_xpos + dx + shift;
                r.my_ypos = rect.my_ypos + dy + shift;
!               r.my_width = iconsrf->getScreen()->w;
!               r.my_height = iconsrf->getScreen()->h;
  
                // calc new cliprect for icon
***************
*** 643,649 ****
  
                // blit the icon
!               PG_Draw::BlitSurface(iconsrf, my_src, my_srfScreen, my_dst);
  
!               tw -= (iconsrf->w + 3);
        }
  
--- 643,649 ----
  
                // blit the icon
!               my_srfScreen->BlitSurface(iconsrf, my_src, my_dst);
  
!               tw -= (iconsrf->getScreen()->w + 3);
        }
  
***************
*** 656,661 ****
                int ty = ((my_height - h)/2) + shift;
  
!               if (iconsrf /*&& tx < (iconsrf->w + 3)*/)
!                       tx += iconsrf->w + 3;
  
                DrawText(tx, ty, my_text.c_str());
--- 656,661 ----
                int ty = ((my_height - h)/2) + shift;
  
!               if (iconsrf /*&& tx < (iconsrf->getScreen()->w + 3)*/)
!                       tx += iconsrf->getScreen()->w + 3;
  
                DrawText(tx, ty, my_text.c_str());

Index: pgcolumnitem.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgcolumnitem.cpp,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -C2 -r1.3 -r1.3.2.1
*** pgcolumnitem.cpp    15 Apr 2002 13:35:36 -0000      1.3
--- pgcolumnitem.cpp    18 Jun 2002 22:40:39 -0000      1.3.2.1
***************
*** 28,31 ****
--- 28,32 ----
  
  #include "pgcolumnitem.h"
+ #include "pgdraw.h"
  
  PG_ColumnItem::PG_ColumnItem(Uint32 columns, Uint32 height, void* userdata) : 
PG_ListBoxItem(height) {
***************
*** 55,59 ****
  }
  
! void PG_ColumnItem::eventBlit(SDL_Surface* srf, const PG_Rect& src, const 
PG_Rect& dst) {
        int xshift = 0;
  
--- 56,60 ----
  }
  
! void PG_ColumnItem::eventBlit(PG_Draw::PG_DrawableSurface* srf, const 
PG_Rect& src, const PG_Rect& dst) {
        int xshift = 0;
  
***************
*** 65,69 ****
  
        if(my_srfIcon != NULL) {
!               xshift = my_srfIcon->w;
        }
  
--- 66,70 ----
  
        if(my_srfIcon != NULL) {
!               xshift = my_srfIcon->getScreen()->w;
        }
  

Index: pgimage.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgimage.cpp,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -C2 -r1.3 -r1.3.2.1
*** pgimage.cpp 15 Apr 2002 13:35:36 -0000      1.3
--- pgimage.cpp 18 Jun 2002 22:40:39 -0000      1.3.2.1
***************
*** 28,31 ****
--- 28,32 ----
  
  #include "pgimage.h"
+ #include "pgdraw.h"
  
  PG_Image::PG_Image(PG_Widget* parent, const PG_Point& p, const char* 
filename, const char* style) : PG_ThemeWidget(parent, PG_Rect(p.x, p.y, 1, 1), 
style) {
***************
*** 33,56 ****
  
        if(my_image != NULL) {
!               SizeWidget(my_image->w, my_image->h);
        }
  }
  
! PG_Image::PG_Image(PG_Widget* parent, const PG_Point& p, SDL_Surface* image, 
bool freeimage, const char* style) : PG_ThemeWidget(parent, PG_Rect(p.x, p.y, 
1, 1), style) {
        SetImage(image, freeimage);
  
        if(my_image != NULL) {
!               SizeWidget(my_image->w, my_image->h);
        }
  }
  
! void PG_Image::eventDraw(SDL_Surface* surface, const PG_Rect& rect) {}
  
! void PG_Image::eventBlit(SDL_Surface* srf, const PG_Rect& src, const PG_Rect& 
dst) {
        if(my_image == NULL) {
                return;
        }
  
!       if(my_image->w != 0 && my_image->h != 0) {
                PG_Rect my_src;
                PG_Rect my_dst;
--- 34,57 ----
  
        if(my_image != NULL) {
!               SizeWidget(my_image->getScreen()->w, my_image->getScreen()->h);
        }
  }
  
! PG_Image::PG_Image(PG_Widget* parent, const PG_Point& p, 
PG_Draw::PG_DrawableSurface* image, bool freeimage, const char* style) : 
PG_ThemeWidget(parent, PG_Rect(p.x, p.y, 1, 1), style) {
        SetImage(image, freeimage);
  
        if(my_image != NULL) {
!               SizeWidget(my_image->getScreen()->w, my_image->getScreen()->h);
        }
  }
  
! void PG_Image::eventDraw(PG_Draw::PG_DrawableSurface* surface, const PG_Rect& 
rect) {}
  
! void PG_Image::eventBlit(PG_Draw::PG_DrawableSurface* srf, const PG_Rect& 
src, const PG_Rect& dst) {
        if(my_image == NULL) {
                return;
        }
  
!       if(my_image->getScreen()->w != 0 && my_image->getScreen()->h != 0) {
                PG_Rect my_src;
                PG_Rect my_dst;

Index: pglabel.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pglabel.cpp,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -r1.4 -r1.4.2.1
*** pglabel.cpp 27 Apr 2002 15:36:55 -0000      1.4
--- pglabel.cpp 18 Jun 2002 22:40:39 -0000      1.4.2.1
***************
*** 29,32 ****
--- 29,33 ----
  #include "pglabel.h"
  #include "pgtheme.h"
+ #include "pgdraw.h"
  
  PG_Label::PG_Label(PG_Widget* parent, const PG_Rect& r, const char* text, 
const char* style) :
***************
*** 74,89 ****
  }
  
! void PG_Label::eventBlit(SDL_Surface* srf, const PG_Rect& src, const PG_Rect& 
dst) {
        int xshift = my_indent;
  
        // should we blit an icon ?
        if(my_srfIcon != NULL) {
!               xshift = my_srfIcon->w + my_indent;
  
                PG_Rect icon_rect(
                    my_xpos + my_indent,
!                   my_ypos + (my_height - my_srfIcon->h)/2,
!                   my_srfIcon->w,
!                   my_srfIcon->h);
  
                PG_Rect icon_src;
--- 75,90 ----
  }
  
! void PG_Label::eventBlit(PG_Draw::PG_DrawableSurface* srf, const PG_Rect& 
src, const PG_Rect& dst) {
        int xshift = my_indent;
  
        // should we blit an icon ?
        if(my_srfIcon != NULL) {
!               xshift = my_srfIcon->getScreen()->w + my_indent;
  
                PG_Rect icon_rect(
                    my_xpos + my_indent,
!                   my_ypos + (my_height - my_srfIcon->getScreen()->h)/2,
!                   my_srfIcon->getScreen()->w,
!                   my_srfIcon->getScreen()->h);
  
                PG_Rect icon_src;
***************
*** 121,125 ****
  
  /**  */
! void PG_Label::eventDraw(SDL_Surface* surface, const PG_Rect& rect) {}
  
  void PG_Label::SetAlignment(int a) {
--- 122,126 ----
  
  /**  */
! void PG_Label::eventDraw(PG_Draw::PG_DrawableSurface* surface, const PG_Rect& 
rect) {}
  
  void PG_Label::SetAlignment(int a) {
***************
*** 128,132 ****
  }
  
! SDL_Surface* PG_Label::SetIcon(SDL_Surface* icon) {
  
        if((icon != my_srfIcon)  && my_freeicon){
--- 129,133 ----
  }
  
! PG_Draw::PG_DrawableSurface* PG_Label::SetIcon(PG_Draw::PG_DrawableSurface* 
icon) {
  
        if((icon != my_srfIcon)  && my_freeicon){
***************
*** 141,145 ****
  }
  
! SDL_Surface* PG_Label::SetIcon(const char* filename) {
        if(my_freeicon){
                PG_Application::UnloadSurface(my_srfIcon);
--- 142,146 ----
  }
  
! PG_Draw::PG_DrawableSurface* PG_Label::SetIcon(const char* filename) {
        if(my_freeicon){
                PG_Application::UnloadSurface(my_srfIcon);

Index: pglayout.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pglayout.cpp,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -r1.2 -r1.2.2.1
*** pglayout.cpp        15 Apr 2002 13:35:36 -0000      1.2
--- pglayout.cpp        18 Jun 2002 22:40:39 -0000      1.2.2.1
***************
*** 25,28 ****
--- 25,29 ----
  #include "pgpopupmenu.h"
  #include "pgmenubar.h"
+ #include "pgdraw.h"
  
  #include <cstring>
***************
*** 127,131 ****
        }
  
!       SDL_Surface *screen = PG_Application::GetScreen();
        char* parm;
        char *d;
--- 128,132 ----
        }
  
!         PG_Draw::PG_DrawableSurface *screen = PG_Application::GetScreen();
        char* parm;
        char *d;
***************
*** 140,144 ****
        for(d = strtok(parm,","); d != NULL; d = strtok(NULL,",")) {
                if(parent == NULL) {
!                       mx = ((i%2)==0) ? screen->w : screen->h;
                } else {
                        mx = ((i%2)==0) ? parent->w : parent->h;
--- 141,145 ----
        for(d = strtok(parm,","); d != NULL; d = strtok(NULL,",")) {
                if(parent == NULL) {
!                       mx = ((i%2)==0) ? screen->getScreen()->w : 
screen->getScreen()->h;
                } else {
                        mx = ((i%2)==0) ? parent->w : parent->h;

Index: pglineedit.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pglineedit.cpp,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -C2 -r1.6 -r1.6.2.1
*** pglineedit.cpp      6 May 2002 11:18:03 -0000       1.6
--- pglineedit.cpp      18 Jun 2002 22:40:39 -0000      1.6.2.1
***************
*** 30,33 ****
--- 30,34 ----
  #include "pgapplication.h"
  #include "pgtheme.h"
+ #include "pgdraw.h"
  #include <cstring>
  #include <stdarg.h>
***************
*** 52,56 ****
  }
  
! void PG_LineEdit::eventBlit(SDL_Surface* surface, const PG_Rect& src, const 
PG_Rect& dst) {
        PG_ThemeWidget::eventBlit(surface, src, dst);
  
--- 53,57 ----
  }
  
! void PG_LineEdit::eventBlit(PG_Draw::PG_DrawableSurface* surface, const 
PG_Rect& src, const PG_Rect& dst) {
        PG_ThemeWidget::eventBlit(surface, src, dst);
  
***************
*** 98,102 ****
        else {
                PG_Rect src, dst;
!               PG_Rect rect(x + GetCursorXPos(), y + (Height() - 
my_srfTextCursor->h)/2, my_srfTextCursor->w, my_srfTextCursor->h);
                GetClipRects(src, dst, rect);
                PG_Widget::eventBlit(my_srfTextCursor, src, dst);
--- 99,103 ----
        else {
                PG_Rect src, dst;
!               PG_Rect rect(x + GetCursorXPos(), y + (Height() - 
my_srfTextCursor->getScreen()->h)/2, my_srfTextCursor->getScreen()->w, 
my_srfTextCursor->getScreen()->h);
                GetClipRects(src, dst, rect);
                PG_Widget::eventBlit(my_srfTextCursor, src, dst);

Index: pglistboxitem.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pglistboxitem.cpp,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -C2 -r1.6 -r1.6.2.1
*** pglistboxitem.cpp   27 Apr 2002 15:36:55 -0000      1.6
--- pglistboxitem.cpp   18 Jun 2002 22:40:39 -0000      1.6.2.1
***************
*** 30,35 ****
  #include "pglistbox.h"
  #include "pgtheme.h"
  
! PG_ListBoxItem::PG_ListBoxItem(int height, const char* text, SDL_Surface* 
icon, void* userdata, const char* style) : PG_ListBoxBaseItem(height, userdata) 
{
        
        for(int i=0; i<3; i++) {
--- 30,36 ----
  #include "pglistbox.h"
  #include "pgtheme.h"
+ #include "pgdraw.h"
  
! PG_ListBoxItem::PG_ListBoxItem(int height, const char* text, 
PG_Draw::PG_DrawableSurface* icon, void* userdata, const char* style) : 
PG_ListBoxBaseItem(height, userdata) {
        
        for(int i=0; i<3; i++) {
***************
*** 83,88 ****
  }
  
! void PG_ListBoxItem::eventBlit(SDL_Surface* srf, const PG_Rect& src, const 
PG_Rect& dst) {
!       SDL_Surface* temp = NULL;
  
        if((dst.my_width == 0) || (dst.my_height == 0)) {
--- 84,89 ----
  }
  
! void PG_ListBoxItem::eventBlit(PG_Draw::PG_DrawableSurface* srf, const 
PG_Rect& src, const PG_Rect& dst) {
!       PG_Draw::PG_DrawableSurface* temp = NULL;
  
        if((dst.my_width == 0) || (dst.my_height == 0)) {

Index: pgpopupmenu.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgpopupmenu.cpp,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -C2 -r1.7 -r1.7.2.1
*** pgpopupmenu.cpp     7 May 2002 12:47:48 -0000       1.7
--- pgpopupmenu.cpp     18 Jun 2002 22:40:39 -0000      1.7.2.1
***************
*** 139,143 ****
  }
  
! bool PG_MenuItem::renderSurface(SDL_Surface *canvas, SDL_Surface **text, 
SDL_Color *tcol, SDL_Color *scol) {
        if (/*!*text ||*/ !canvas)
                return false;
--- 139,143 ----
  }
  
! bool PG_MenuItem::renderSurface(PG_Draw::PG_DrawableSurface *canvas, 
PG_Draw::PG_DrawableSurface **text, SDL_Color *tcol, SDL_Color *scol) {
        if (/*!*text ||*/ !canvas)
                return false;
***************
*** 163,167 ****
  }
  
! inline bool PG_MenuItem::paintNormal(SDL_Surface *canvas, SDL_Color *tcol, 
SDL_Color *scol) {
        if (!isValidRect())
                return false;
--- 163,167 ----
  }
  
! inline bool PG_MenuItem::paintNormal(PG_Draw::PG_DrawableSurface *canvas, 
SDL_Color *tcol, SDL_Color *scol) {
        if (!isValidRect())
                return false;
***************
*** 170,174 ****
  }
  
! inline bool PG_MenuItem::paintSelected(SDL_Surface *canvas, SDL_Color *tcol, 
SDL_Color *scol) {
        if (!isValidRect())
                return false;
--- 170,174 ----
  }
  
! inline bool PG_MenuItem::paintSelected(PG_Draw::PG_DrawableSurface *canvas, 
SDL_Color *tcol, SDL_Color *scol) {
        if (!isValidRect())
                return false;
***************
*** 177,181 ****
  }
  
! inline bool PG_MenuItem::paintDisabled(SDL_Surface *canvas, SDL_Color *tcol, 
SDL_Color *scol) {
        if (!isValidRect())
                return false;
--- 177,181 ----
  }
  
! inline bool PG_MenuItem::paintDisabled(PG_Draw::PG_DrawableSurface *canvas, 
SDL_Color *tcol, SDL_Color *scol) {
        if (!isValidRect())
                return false;
***************
*** 454,459 ****
  }
  
! void PG_PopupMenu::eventBlit(SDL_Surface* srf, const PG_Rect& src, const 
PG_Rect& dst) {
!       SDL_Surface* surface = my_srfScreen;
        PG_ThemeWidget::eventBlit(srf, src, dst);
  
--- 454,459 ----
  }
  
! void PG_PopupMenu::eventBlit(PG_Draw::PG_DrawableSurface* srf, const PG_Rect& 
src, const PG_Rect& dst) {
!       PG_Draw::PG_DrawableSurface* surface = my_srfScreen;
        PG_ThemeWidget::eventBlit(srf, src, dst);
  
***************
*** 480,484 ****
                                statesel = 2;
  
!                       PG_Draw::DrawThemedSurface(surface, itemRect,
                                          miGradients[statesel],
                                          miBackgrounds[statesel],
--- 480,484 ----
                                statesel = 2;
  
!                       surface->DrawThemedSurface(itemRect,
                                          miGradients[statesel],
                                          miBackgrounds[statesel],

Index: pgprogressbar.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgprogressbar.cpp,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -r1.4 -r1.4.2.1
*** pgprogressbar.cpp   27 Apr 2002 15:36:55 -0000      1.4
--- pgprogressbar.cpp   18 Jun 2002 22:40:39 -0000      1.4.2.1
***************
*** 105,109 ****
  }
  
! void PG_ProgressBar::eventBlit(SDL_Surface* srf, const PG_Rect& src, const 
PG_Rect& dst) {
        PG_Rect pr(
            my_xpos + 1,
--- 105,109 ----
  }
  
! void PG_ProgressBar::eventBlit(PG_Draw::PG_DrawableSurface* srf, const 
PG_Rect& src, const PG_Rect& dst) {
        PG_Rect pr(
            my_xpos + 1,
***************
*** 124,128 ****
  
        // draw the gradient
!       SDL_Surface* ind = PG_ThemeWidget::CreateThemedSurface(
                               pr,
                               &my_pbGradient,
--- 124,128 ----
  
        // draw the gradient
!       PG_Draw::PG_DrawableSurface* ind = PG_ThemeWidget::CreateThemedSurface(
                               pr,
                               &my_pbGradient,
***************
*** 132,136 ****
  
        GetClipRects(my_src, my_dst, pr);
!       PG_Draw::BlitSurface(ind, my_src, my_srfScreen, my_dst);
  
        PG_ThemeWidget::DeleteThemedSurface(ind);
--- 132,136 ----
  
        GetClipRects(my_src, my_dst, pr);
!       my_srfScreen->BlitSurface(ind, my_src, my_dst);
  
        PG_ThemeWidget::DeleteThemedSurface(ind);

Index: pgrichedit.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgrichedit.cpp,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -r1.4 -r1.4.2.1
*** pgrichedit.cpp      28 Apr 2002 16:35:30 -0000      1.4
--- pgrichedit.cpp      18 Jun 2002 22:40:39 -0000      1.4.2.1
***************
*** 31,34 ****
--- 31,35 ----
  #include "pgrichedit.h"
  #include "pglog.h"
+ #include "pgdraw.h"
  
  const Uint32 PG_RichEdit::my_Marks[PG_RichEdit::MARKS_COUNT] = { ' ', 0x01, 
'\n', '\t', 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0xF
***************
*** 60,64 ****
  }
  
! void PG_RichEdit::eventBlit(SDL_Surface* srf, const PG_Rect& src, const 
PG_Rect& dst) {
  
        PG_WidgetListEx::eventBlit(srf, src, dst);
--- 61,65 ----
  }
  
! void PG_RichEdit::eventBlit(PG_Draw::PG_DrawableSurface* srf, const PG_Rect& 
src, const PG_Rect& dst) {
  
        PG_WidgetListEx::eventBlit(srf, src, dst);

Index: pgthemewidget.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgthemewidget.cpp,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -C2 -r1.6 -r1.6.2.1
*** pgthemewidget.cpp   28 Apr 2002 16:35:30 -0000      1.6
--- pgthemewidget.cpp   18 Jun 2002 22:40:39 -0000      1.6.2.1
***************
*** 36,40 ****
  
  struct PG_WidgetDataInternal{
!       SDL_Surface* cachesurface;
        SDL_Color backgroundcolor;
  
--- 36,40 ----
  
  struct PG_WidgetDataInternal{
!       PG_Draw::PG_DrawableSurface* cachesurface;
        SDL_Color backgroundcolor;
  
***************
*** 182,192 ****
  }
  
! void PG_ThemeWidget::eventDraw(SDL_Surface* surface, const PG_Rect& rect) {
        if(my_srfObject == NULL) {
                return;
        }
  
!       PG_Draw::DrawThemedSurface(
!           surface,
            rect,
            my_has_gradient ? &my_gradient : 0,
--- 182,191 ----
  }
  
! void PG_ThemeWidget::eventDraw(PG_Draw::PG_DrawableSurface* surface, const 
PG_Rect& rect) {
        if(my_srfObject == NULL) {
                return;
        }
  
!       surface->DrawThemedSurface(
            rect,
            my_has_gradient ? &my_gradient : 0,
***************
*** 202,206 ****
  bool PG_ThemeWidget::SetBackground(const char* filename, int mode, Uint32 
colorkey) {
        // try to load the file
!       SDL_Surface* temp = PG_Application::LoadSurface(filename, true);
  
        // success ?
--- 201,205 ----
  bool PG_ThemeWidget::SetBackground(const char* filename, int mode, Uint32 
colorkey) {
        // try to load the file
!       PG_Draw::PG_DrawableSurface* temp = 
PG_Application::LoadSurface(filename, true);
  
        // success ?
***************
*** 222,231 ****
  
        Uint32 c = SDL_MapRGB(
!               my_background->format, 
                (colorkey>>16) & 0xFF,
                (colorkey>>8) & 0xFF,
                colorkey & 0xFF);
                
!       SDL_SetColorKey(my_background, SDL_SRCCOLORKEY, c);
         
        if(my_srfObject == NULL) {
--- 221,230 ----
  
        Uint32 c = SDL_MapRGB(
!               my_background->getScreen()->format, 
                (colorkey>>16) & 0xFF,
                (colorkey>>8) & 0xFF,
                colorkey & 0xFF);
                
!       my_background->SetColorKey(SDL_SRCCOLORKEY, c);
         
        if(my_srfObject == NULL) {
***************
*** 239,243 ****
  
        // try to load the file
!       SDL_Surface* temp = PG_Application::LoadSurface(filename, true);
  
        // success ?
--- 238,242 ----
  
        // try to load the file
!       PG_Draw::PG_DrawableSurface* temp = 
PG_Application::LoadSurface(filename, true);
  
        // success ?
***************
*** 266,270 ****
  
  
! bool PG_ThemeWidget::SetBackground(SDL_Surface* surface, int mode) {
  
        if(!surface) {
--- 265,269 ----
  
  
! bool PG_ThemeWidget::SetBackground(PG_Draw::PG_DrawableSurface* surface, int 
mode) {
  
        if(!surface) {
***************
*** 316,320 ****
  }
  
! bool PG_ThemeWidget::SetImage(SDL_Surface* image, bool bFreeImage) {
        if(image == NULL) {
                return false;
--- 315,319 ----
  }
  
! bool PG_ThemeWidget::SetImage(PG_Draw::PG_DrawableSurface* image, bool 
bFreeImage) {
        if(image == NULL) {
                return false;
***************
*** 334,338 ****
  
  bool PG_ThemeWidget::LoadImage(const char* filename) {
!       SDL_Surface* image = PG_Application::LoadSurface(filename);
  
        if(image == NULL) {
--- 333,337 ----
  
  bool PG_ThemeWidget::LoadImage(const char* filename) {
!       PG_Draw::PG_DrawableSurface* image = 
PG_Application::LoadSurface(filename);
  
        if(image == NULL) {
***************
*** 379,383 ****
  }
  
! void PG_ThemeWidget::eventBlit(SDL_Surface* srf, const PG_Rect& src, const 
PG_Rect& dst) {
  
        if(my_srfObject != NULL) {
--- 378,382 ----
  }
  
! void PG_ThemeWidget::eventBlit(PG_Draw::PG_DrawableSurface* srf, const 
PG_Rect& src, const PG_Rect& dst) {
  
        if(my_srfObject != NULL) {
***************
*** 394,408 ****
                if(GetTransparency() < 255) {
                        Uint32 c = SDL_MapRGBA(
!                                      my_srfScreen->format,
                                       my_internaldata->backgroundcolor.r,
                                       my_internaldata->backgroundcolor.g,
                                       my_internaldata->backgroundcolor.b,
                                       255-GetTransparency());
!                       SDL_FillRect(my_srfScreen, (SDL_Rect*)&dst, c);
                }
        } else if (my_internaldata->nocache) {
                PG_Rect dest = *this;
!               PG_Draw::DrawThemedSurface(
!                       my_srfScreen,
                        dest,
                        my_has_gradient ? &my_gradient : 0,
--- 393,406 ----
                if(GetTransparency() < 255) {
                        Uint32 c = SDL_MapRGBA(
!                                      my_srfScreen->getScreen()->format,
                                       my_internaldata->backgroundcolor.r,
                                       my_internaldata->backgroundcolor.g,
                                       my_internaldata->backgroundcolor.b,
                                       255-GetTransparency());
!                       my_srfScreen->FillRect(dst, c);
                }
        } else if (my_internaldata->nocache) {
                PG_Rect dest = *this;
!               my_srfScreen->DrawThemedSurface(
                        dest,
                        my_has_gradient ? &my_gradient : 0,
***************
*** 442,448 ****
  }
  
! SDL_Surface* PG_ThemeWidget::CreateThemedSurface(const PG_Rect& r, 
PG_Gradient* gradient, SDL_Surface* background, int bkmode, Uint8 blend) {
!       SDL_Surface* cache_surface = NULL;
!       SDL_Surface* screen = PG_Application::GetScreen();
        std::string key;
  
--- 440,447 ----
  }
  
! PG_Draw::PG_DrawableSurface* PG_ThemeWidget::CreateThemedSurface(const 
PG_Rect& r, PG_Gradient* gradient, PG_Draw::PG_DrawableSurface* background, int 
bkmode, Uint8 blend) {
!         PG_Draw::PG_Draw* draw = PG_Application::GetDrawingEnvironment();
!       PG_Draw::PG_DrawableSurface* cache_surface = NULL;
!       PG_Draw::PG_DrawableSurface* screen = PG_Application::GetScreen();
        std::string key;
  
***************
*** 464,484 ****
        }
  
!       Uint8 bpp = screen->format->BitsPerPixel;
!       Uint32 Rmask = screen->format->Rmask;
!       Uint32 Gmask = screen->format->Gmask;
!       Uint32 Bmask = screen->format->Bmask;
        Uint32 Amask = 0;
  
        if(background != NULL) {
!               if((background->format->Amask != 0) || ((bpp < 
background->format->BitsPerPixel) && (bpp <= 8))) {
!                       bpp = background->format->BitsPerPixel;
!                       Rmask = background->format->Rmask;
!                       Gmask = background->format->Gmask;
!                       Bmask = background->format->Bmask;
!                       Amask = background->format->Amask;
                }
        }
  
!       SDL_Surface *surface = SDL_CreateRGBSurface(
                                   SDL_SWSURFACE,
                                   r.my_width,
--- 463,483 ----
        }
  
!       Uint8 bpp = screen->getScreen()->format->BitsPerPixel;
!       Uint32 Rmask = screen->getScreen()->format->Rmask;
!       Uint32 Gmask = screen->getScreen()->format->Gmask;
!       Uint32 Bmask = screen->getScreen()->format->Bmask;
        Uint32 Amask = 0;
  
        if(background != NULL) {
!               if((background->getScreen()->format->Amask != 0) || ((bpp < 
background->getScreen()->format->BitsPerPixel) && (bpp <= 8))) {
!                       bpp = background->getScreen()->format->BitsPerPixel;
!                       Rmask = background->getScreen()->format->Rmask;
!                       Gmask = background->getScreen()->format->Gmask;
!                       Bmask = background->getScreen()->format->Bmask;
!                       Amask = background->getScreen()->format->Amask;
                }
        }
  
!       PG_Draw::PG_DrawableSurface *surface = draw->CreateDrawableSurface(
                                   SDL_SWSURFACE,
                                   r.my_width,
***************
*** 492,502 ****
                               
        if ( bpp == 8 )
!               SDL_SetPalette ( surface, SDL_LOGPAL, 
screen->format->palette->colors, 0, 256 );
  
        if(surface) {
                if(background || gradient) {
!                       PG_Draw::DrawThemedSurface(surface, PG_Rect(0, 0, 
r.my_width, r.my_height), gradient, background, bkmode, blend);
                } else {
!                       SDL_SetColorKey(surface, SDL_SRCCOLORKEY, 0);
                }
        }
--- 491,501 ----
                               
        if ( bpp == 8 )
!               surface->SetPalette ( SDL_LOGPAL, 
screen->getScreen()->format->palette->colors, 0, 256 );
  
        if(surface) {
                if(background || gradient) {
!                       surface->DrawThemedSurface(PG_Rect(0, 0, r.my_width, 
r.my_height), gradient, background, bkmode, blend);
                } else {
!                       surface->SetColorKey(SDL_SRCCOLORKEY, 0);
                }
        }
***************
*** 506,510 ****
  }
  
! void PG_ThemeWidget::DeleteThemedSurface(SDL_Surface* surface) {
        if(surface == NULL) {
                return;
--- 505,509 ----
  }
  
! void PG_ThemeWidget::DeleteThemedSurface(PG_Draw::PG_DrawableSurface* 
surface) {
        if(surface == NULL) {
                return;

Index: pgwidget.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgwidget.cpp,v
retrieving revision 1.13
retrieving revision 1.13.2.1
diff -C2 -r1.13 -r1.13.2.1
*** pgwidget.cpp        6 May 2002 10:40:50 -0000       1.13
--- pgwidget.cpp        18 Jun 2002 22:40:39 -0000      1.13.2.1
***************
*** 96,99 ****
--- 96,100 ----
  
  void PG_Widget::InitWidget(PG_Widget* parent, bool bObjectSurface) {
+         PG_Draw::PG_Draw* draw = PG_Application::GetDrawingEnvironment();
  
        my_internaldata = new PG_WidgetDataInternal;
***************
*** 119,123 ****
        my_srfObject = NULL;
        if(my_internaldata->havesurface) {
!               my_srfObject = PG_Draw::CreateRGBSurface(w, h);
        }
  
--- 120,124 ----
        my_srfObject = NULL;
        if(my_internaldata->havesurface) {
!               my_srfObject = draw->CreateDrawableSurface(w, h);
        }
  
***************
*** 427,442 ****
        MoveRect(x, y);
  
!       if(vertical.my_xpos + vertical.my_width > my_srfScreen->w) {
!               vertical.my_width = my_srfScreen->w - vertical.my_xpos;
        }
!       if(vertical.my_ypos + vertical.my_height > my_srfScreen->h) {
!               vertical.my_height = my_srfScreen->h - vertical.my_ypos;
        }
  
!       if(horizontal.my_xpos + horizontal.my_width > my_srfScreen->w) {
!               horizontal.my_width = my_srfScreen->w- horizontal.my_xpos;
        }
!       if(horizontal.my_ypos + horizontal.my_height > my_srfScreen->h) {
!               horizontal.my_height = my_srfScreen->h - horizontal.my_ypos;
        }
  
--- 428,443 ----
        MoveRect(x, y);
  
!       if(vertical.my_xpos + vertical.my_width > my_srfScreen->getScreen()->w) 
{
!               vertical.my_width = my_srfScreen->getScreen()->w - 
vertical.my_xpos;
        }
!       if(vertical.my_ypos + vertical.my_height > 
my_srfScreen->getScreen()->h) {
!               vertical.my_height = my_srfScreen->getScreen()->h - 
vertical.my_ypos;
        }
  
!       if(horizontal.my_xpos + horizontal.my_width > 
my_srfScreen->getScreen()->w) {
!               horizontal.my_width = my_srfScreen->getScreen()->w- 
horizontal.my_xpos;
        }
!       if(horizontal.my_ypos + horizontal.my_height > 
my_srfScreen->getScreen()->h) {
!               horizontal.my_height = my_srfScreen->getScreen()->h - 
horizontal.my_ypos;
        }
  
***************
*** 446,452 ****
                UpdateRect(my_internaldata->rectClip);
                PG_Application::LockScreen();
!               SDL_UpdateRects(my_srfScreen, 1, &my_internaldata->rectClip);
!               SDL_UpdateRects(my_srfScreen, 1, &vertical);
!               SDL_UpdateRects(my_srfScreen, 1, &horizontal);
                PG_Application::UnlockScreen();
        }
--- 447,453 ----
                UpdateRect(my_internaldata->rectClip);
                PG_Application::LockScreen();
!               my_srfScreen->UpdateRects(1, &my_internaldata->rectClip);
!               my_srfScreen->UpdateRects(1, &vertical);
!               my_srfScreen->UpdateRects(1, &horizontal);
                PG_Application::UnlockScreen();
        }
***************
*** 462,465 ****
--- 463,467 ----
  
  bool PG_Widget::SizeWidget(Uint16 w, Uint16 h) {
+         PG_Draw::PG_Draw* draw = PG_Application::GetDrawingEnvironment();
        if((w == my_width) && (h == my_height)) {
                return false;
***************
*** 475,479 ****
  
                if(w > 0 && h > 0) {
!                       my_srfObject = PG_Draw::CreateRGBSurface(w, h);
                }
                else {
--- 477,481 ----
  
                if(w > 0 && h > 0) {
!                       my_srfObject = draw->CreateDrawableSurface(w, h);
                }
                else {
***************
*** 660,664 ****
        }
  
!       SDL_SetClipRect(my_srfScreen, NULL);
        Update();
  
--- 662,666 ----
        }
  
!       my_srfScreen->SetClipRect();
        Update();
  
***************
*** 696,704 ****
        }
  
!       SDL_SetClipRect(my_srfScreen, NULL);
  
        if(!PG_Application::GetBulkMode()) {
                PG_Application::LockScreen();
!               SDL_UpdateRects(my_srfScreen, 1, &my_internaldata->rectClip);
                PG_Application::UnlockScreen();
        }
--- 698,706 ----
        }
  
!       my_srfScreen->SetClipRect();
  
        if(!PG_Application::GetBulkMode()) {
                PG_Application::LockScreen();
!               my_srfScreen->UpdateRects(1, &my_internaldata->rectClip);
                PG_Application::UnlockScreen();
        }
***************
*** 822,826 ****
                                index = children->FindIndexOf(this);
                                if(index != -1) {
!                                       SDL_SetClipRect(my_srfScreen, 
&my_internaldata->rectClip);
                                        
//children->Intersect(&my_internaldata->rectClip, index+1, 
-1).Blit(my_internaldata->rectClip);
                                        
children->Intersect(&my_internaldata->rectClip, index+1, -1).Blit();
--- 824,828 ----
                                index = children->FindIndexOf(this);
                                if(index != -1) {
!                                       
my_srfScreen->SetClipRect(my_internaldata->rectClip);
                                        
//children->Intersect(&my_internaldata->rectClip, index+1, 
-1).Blit(my_internaldata->rectClip);
                                        
children->Intersect(&my_internaldata->rectClip, index+1, -1).Blit();
***************
*** 836,840 ****
  
                if(index != -1) {
!                       SDL_SetClipRect(my_srfScreen, 
&my_internaldata->rectClip);
                        //widgetList.Intersect(&my_internaldata->rectClip, 
index+1, -1).Blit(my_internaldata->rectClip);
                        widgetList.Intersect(&my_internaldata->rectClip, 
index+1, -1).Blit();
--- 838,842 ----
  
                if(index != -1) {
!                       my_srfScreen->SetClipRect(my_internaldata->rectClip);
                        //widgetList.Intersect(&my_internaldata->rectClip, 
index+1, -1).Blit(my_internaldata->rectClip);
                        widgetList.Intersect(&my_internaldata->rectClip, 
index+1, -1).Blit();
***************
*** 848,854 ****
        PG_LogDBG("UPD: x:%d y:%d w:%d h:%d",dst.x,dst.y,dst.w,dst.h);
  #endif // DEBUG
!       SDL_UpdateRects(my_srfScreen, 1, &my_internaldata->rectClip);
  
!       SDL_SetClipRect(my_srfScreen, NULL);
        PG_Application::UnlockScreen();
  }
--- 850,856 ----
        PG_LogDBG("UPD: x:%d y:%d w:%d h:%d",dst.x,dst.y,dst.w,dst.h);
  #endif // DEBUG
!       my_srfScreen->UpdateRects(1, &my_internaldata->rectClip);
  
!       my_srfScreen->SetClipRect();
        PG_Application::UnlockScreen();
  }
***************
*** 889,896 ****
        if(y < 0)
                y=0;
!       if(x > (my_srfScreen->w - my_width -1))
!               x = (my_srfScreen->w - my_width -1);
!       if(y > (my_srfScreen->h - my_height -1))
!               y = (my_srfScreen->h - my_height -1);
  
        MoveWidget(x,y);
--- 891,898 ----
        if(y < 0)
                y=0;
!       if(x > (my_srfScreen->getScreen()->w - my_width -1))
!               x = (my_srfScreen->getScreen()->w - my_width -1);
!       if(y > (my_srfScreen->getScreen()->h - my_height -1))
!               y = (my_srfScreen->getScreen()->h - my_height -1);
  
        MoveWidget(x,y);
***************
*** 964,967 ****
--- 966,970 ----
  void PG_Widget::FadeOut() {
        PG_Rect r(0, 0, my_width, my_height);
+         PG_Draw::PG_Draw* draw = PG_Application::GetDrawingEnvironment();
  
        // blit the widget to screen (invisible)
***************
*** 969,976 ****
  
        // create a temp surface
!       SDL_Surface* srfFade = PG_Draw::CreateRGBSurface(my_width, my_height);
  
        // blit the widget to temp surface
!       PG_Draw::BlitSurface(my_srfScreen, *this, srfFade, r);
  
        int d = (255-my_internaldata->transparency)/ my_internaldata->fadeSteps;
--- 972,979 ----
  
        // create a temp surface
!       PG_Draw::PG_DrawableSurface* srfFade = 
draw->CreateDrawableSurface(my_width, my_height);
  
        // blit the widget to temp surface
!       srfFade->BlitSurface(my_srfScreen, *this, r);
  
        int d = (255-my_internaldata->transparency)/ my_internaldata->fadeSteps;
***************
*** 983,994 ****
        for(int i=my_internaldata->transparency; i<255; i += d) {
                RestoreBackground(NULL, true);
!               SDL_SetAlpha(srfFade, SDL_SRCALPHA, 255-i);
!               SDL_BlitSurface(srfFade, NULL, my_srfScreen, this);
!               SDL_UpdateRects(my_srfScreen, 1, &my_internaldata->rectClip);
        }
  
        RestoreBackground(NULL, true);
!       SDL_SetAlpha(srfFade, SDL_SRCALPHA, 0);
!       SDL_BlitSurface(srfFade, NULL, my_srfScreen, this);
        SetVisible(false);
        PG_Application::UnlockScreen();
--- 986,997 ----
        for(int i=my_internaldata->transparency; i<255; i += d) {
                RestoreBackground(NULL, true);
!               srfFade->SetAlpha(SDL_SRCALPHA, 255-i);
!               my_srfScreen->BlitSurface(srfFade, PG_Rect(), *this);
!               my_srfScreen->UpdateRects(1, &my_internaldata->rectClip);
        }
  
        RestoreBackground(NULL, true);
!       srfFade->SetAlpha(SDL_SRCALPHA, 0);
!       my_srfScreen->BlitSurface(srfFade, PG_Rect(), *this);
        SetVisible(false);
        PG_Application::UnlockScreen();
***************
*** 1000,1006 ****
  
  void PG_Widget::FadeIn() {
  
        // blit the widget to screen (invisible)
!       SDL_SetClipRect(my_srfScreen, NULL);
        Blit();
  
--- 1003,1010 ----
  
  void PG_Widget::FadeIn() {
+         PG_Draw::PG_Draw* draw = PG_Application::GetDrawingEnvironment();
  
        // blit the widget to screen (invisible)
!       my_srfScreen->SetClipRect();
        Blit();
  
***************
*** 1012,1021 ****
  
        // create a temp surface
!       SDL_Surface* srfFade = PG_Draw::CreateRGBSurface(w, h);
  
        PG_Application::LockScreen();
        
        // blit the widget to temp surface
!       PG_Draw::BlitSurface(my_srfScreen, my_internaldata->rectClip, srfFade, 
src);
  
        int d = (255-my_internaldata->transparency)/ my_internaldata->fadeSteps;
--- 1016,1025 ----
  
        // create a temp surface
!       PG_Draw::PG_DrawableSurface* srfFade = draw->CreateDrawableSurface(w, 
h);
  
        PG_Application::LockScreen();
        
        // blit the widget to temp surface
!       srfFade->BlitSurface(my_srfScreen, my_internaldata->rectClip, src);
  
        int d = (255-my_internaldata->transparency)/ my_internaldata->fadeSteps;
***************
*** 1026,1032 ****
        for(int i=255; i>my_internaldata->transparency; i -= d) {
                RestoreBackground(NULL, true);
!               SDL_SetAlpha(srfFade, SDL_SRCALPHA, 255-i);
!               PG_Draw::BlitSurface(srfFade, src, my_srfScreen, 
my_internaldata->rectClip);
!               SDL_UpdateRects(my_srfScreen, 1, &my_internaldata->rectClip);
        }
  
--- 1030,1036 ----
        for(int i=255; i>my_internaldata->transparency; i -= d) {
                RestoreBackground(NULL, true);
!               srfFade->SetAlpha(SDL_SRCALPHA, 255-i);
!               my_srfScreen->BlitSurface(srfFade, src, 
my_internaldata->rectClip);
!               my_srfScreen->UpdateRects(1, &my_internaldata->rectClip);
        }
  
***************
*** 1094,1098 ****
  
                if(index != -1) {
!                       SDL_SetClipRect(my_srfScreen, clip);
                        //widgetList.Intersect(clip, 0, index).Blit(*clip);
                        widgetList.Intersect(clip, 0, index).Blit();
--- 1098,1102 ----
  
                if(index != -1) {
!                       my_srfScreen->SetClipRect(*clip);
                        //widgetList.Intersect(clip, 0, index).Blit(*clip);
                        widgetList.Intersect(clip, 0, index).Blit();
***************
*** 1102,1106 ****
  
        GetParent()->RestoreBackground(clip);
!       SDL_SetClipRect(my_srfScreen, clip);
        GetParent()->Blit(false, false);
  
--- 1106,1110 ----
  
        GetParent()->RestoreBackground(clip);
!       my_srfScreen->SetClipRect(*clip);
        GetParent()->Blit(false, false);
  
***************
*** 1146,1157 ****
        }
  
!       SDL_Surface* screen = PG_Application::GetScreen();
  
        PG_Application::LockScreen();
        PG_Application::RedrawBackground(r);
!       SDL_SetClipRect(screen, (PG_Rect*)&r);
        widgetList.Intersect((PG_Rect*)&r).Blit(r);
        //widgetList.Blit(r);
!       SDL_SetClipRect(screen, NULL);
        PG_Application::UnlockScreen();
  }
--- 1150,1161 ----
        }
  
!       PG_Draw::PG_DrawableSurface* screen = PG_Application::GetScreen();
  
        PG_Application::LockScreen();
        PG_Application::RedrawBackground(r);
!       screen->SetClipRect(r);
        widgetList.Intersect((PG_Rect*)&r).Blit(r);
        //widgetList.Blit(r);
!       screen->SetClipRect();
        PG_Application::UnlockScreen();
  }
***************
*** 1507,1511 ****
  }
  
! void PG_Widget::eventBlit(SDL_Surface* srf, const PG_Rect& src, const 
PG_Rect& dst) {
  
        // Don't blit an object without a surface
--- 1511,1515 ----
  }
  
! void PG_Widget::eventBlit(PG_Draw::PG_DrawableSurface* srf, const PG_Rect& 
src, const PG_Rect& dst) {
  
        // Don't blit an object without a surface
***************
*** 1517,1521 ****
        // Set alpha
        if(my_internaldata->transparency != 255) {
!               SDL_SetAlpha(srf, SDL_SRCALPHA, 
255-my_internaldata->transparency);
  
                // Blit widget surface to screen
--- 1521,1525 ----
        // Set alpha
        if(my_internaldata->transparency != 255) {
!               srf->SetAlpha(SDL_SRCALPHA, 255-my_internaldata->transparency);
  
                // Blit widget surface to screen
***************
*** 1525,1530 ****
  #endif // DEBUG
  
!               PG_Draw::BlitSurface(srf, src, my_srfScreen, dst);
!       }
  }
  
--- 1529,1534 ----
  #endif // DEBUG
  
!                       my_srfScreen->BlitSurface(srf, src, dst);
!               }
  }
  
***************
*** 1588,1591 ****
--- 1592,1597 ----
  void PG_Widget::SetPixel(int x, int y, Uint8 r, Uint8 g, Uint8 b) {
        static PG_Point p;
+       SDL_Color c;
+       c.r = r; c.g = g; c.b = b;
  
        if(my_srfObject == NULL) {
***************
*** 1593,1600 ****
                p.y = my_ypos + y;
                if(my_internaldata->rectClip.IsInside(p)) {
!                       PG_Draw::SetPixel(p.x, p.y, r, g, b, my_srfScreen);
                }
        } else {
!               PG_Draw::SetPixel(x, y, r, g, b, my_srfObject);
        }
  }
--- 1599,1606 ----
                p.y = my_ypos + y;
                if(my_internaldata->rectClip.IsInside(p)) {
!                       my_srfScreen->SetPixel(p.x, p.y, c);
                }
        } else {
!               my_srfObject->SetPixel(x, y, c);
        }
  }
***************
*** 1602,1606 ****
  void PG_Widget::DrawHLine(int x, int y, int w, Uint8 r, Uint8 g, Uint8 b) {
        static PG_Rect rect;
!       SDL_Surface* surface = my_srfObject;
        
        if(my_srfObject == NULL) {
--- 1608,1612 ----
  void PG_Widget::DrawHLine(int x, int y, int w, Uint8 r, Uint8 g, Uint8 b) {
        static PG_Rect rect;
!       PG_Draw::PG_DrawableSurface* surface = my_srfObject;
        
        if(my_srfObject == NULL) {
***************
*** 1618,1622 ****
        int x0 = PG_MAX(x, my_internaldata->rectClip.x);
        int x1 = PG_MIN(x+w, 
my_internaldata->rectClip.x+my_internaldata->rectClip.w);
!       Uint32 c = SDL_MapRGB(surface->format, r, g, b);
  
        int wl = (x1-x0);
--- 1624,1628 ----
        int x0 = PG_MAX(x, my_internaldata->rectClip.x);
        int x1 = PG_MIN(x+w, 
my_internaldata->rectClip.x+my_internaldata->rectClip.w);
!       Uint32 c = SDL_MapRGB(surface->getScreen()->format, r, g, b);
  
        int wl = (x1-x0);
***************
*** 1632,1641 ****
  
        rect.SetRect(x0, y, wl, 1);
!       SDL_FillRect(surface, &rect, c);
  }
  
  void PG_Widget::DrawVLine(int x, int y, int h, Uint8 r, Uint8 g, Uint8 b) {
        static PG_Rect rect;
!       SDL_Surface* surface = my_srfObject;
        
        if(my_srfObject == NULL) {
--- 1638,1647 ----
  
        rect.SetRect(x0, y, wl, 1);
!       surface->FillRect(rect, c);
  }
  
  void PG_Widget::DrawVLine(int x, int y, int h, Uint8 r, Uint8 g, Uint8 b) {
        static PG_Rect rect;
!       PG_Draw::PG_DrawableSurface* surface = my_srfObject;
        
        if(my_srfObject == NULL) {
***************
*** 1653,1657 ****
        int y0 = PG_MAX(y, my_internaldata->rectClip.y);
        int y1 = PG_MIN(y+h, 
my_internaldata->rectClip.y+my_internaldata->rectClip.h);
!       Uint32 c = SDL_MapRGB(surface->format, r, g, b);
  
        int hl = (y1-y0);
--- 1659,1663 ----
        int y0 = PG_MAX(y, my_internaldata->rectClip.y);
        int y1 = PG_MIN(y+h, 
my_internaldata->rectClip.y+my_internaldata->rectClip.h);
!       Uint32 c = SDL_MapRGB(surface->getScreen()->format, r, g, b);
  
        int hl = (y1-y0);
***************
*** 1667,1671 ****
  
        rect.SetRect(x, y0, 1, hl);
!       SDL_FillRect(surface, &rect, c);
  }
  
--- 1673,1677 ----
  
        rect.SetRect(x, y0, 1, hl);
!       surface->FillRect(rect, c);
  }
  
***************
*** 1681,1685 ****
  
  void PG_Widget::DrawLine(Uint32 x0, Uint32 y0, Uint32 x1, Uint32 y1, const 
SDL_Color& color, Uint8 width) {
!       SDL_Surface* surface = my_srfObject;
  
        if(surface == NULL) {
--- 1687,1691 ----
  
  void PG_Widget::DrawLine(Uint32 x0, Uint32 y0, Uint32 x1, Uint32 y1, const 
SDL_Color& color, Uint8 width) {
!       PG_Draw::PG_DrawableSurface* surface = my_srfObject;
  
        if(surface == NULL) {
***************
*** 1691,1698 ****
        }
  
!       PG_Draw::DrawLine(surface, x0, y0, x1, y1, color, width);
  }
  
! void PG_Widget::eventDraw(SDL_Surface* surface, const PG_Rect& rect) {
  }
  
--- 1697,1704 ----
        }
  
!       surface->DrawLine(x0, y0, x1, y1, color, width);
  }
  
! void PG_Widget::eventDraw(PG_Draw::PG_DrawableSurface* surface, const 
PG_Rect& rect) {
  }
  
***************
*** 1703,1711 ****
  }
  
! SDL_Surface* PG_Widget::GetWidgetSurface() {
        return my_srfObject;
  }
  
! SDL_Surface* PG_Widget::GetScreenSurface() {
        return my_srfScreen;
  }
--- 1709,1717 ----
  }
  
! PG_Draw::PG_DrawableSurface* PG_Widget::GetWidgetSurface() {
        return my_srfObject;
  }
  
! PG_Draw::PG_DrawableSurface* PG_Widget::GetScreenSurface() {
        return my_srfScreen;
  }

Index: pgwidgetdnd.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgwidgetdnd.cpp,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -C2 -r1.3 -r1.3.2.1
*** pgwidgetdnd.cpp     15 Apr 2002 13:35:36 -0000      1.3
--- pgwidgetdnd.cpp     18 Jun 2002 22:40:39 -0000      1.3.2.1
***************
*** 168,172 ****
  
                if(dragimage != NULL) {
!                       dragimagecache = 
PG_Draw::CreateRGBSurface(dragimage->w, dragimage->h);
                }
  
--- 168,173 ----
  
                if(dragimage != NULL) {
!                 dragimagecache =
!                   
PG_Application::GetDrawingEnvironment()->CreateDrawableSurface(dragimage->getScreen()->w,
 dragimage->getScreen()->h);
                }
  
***************
*** 182,186 ****
  bool PG_WidgetDnD::eventMouseMotion(const SDL_MouseMotionEvent* motion) {
        PG_WidgetDnD* target = NULL;
!       SDL_Surface* dropimage = NULL;
  
        int x,y;
--- 183,187 ----
  bool PG_WidgetDnD::eventMouseMotion(const SDL_MouseMotionEvent* motion) {
        PG_WidgetDnD* target = NULL;
!       PG_Draw::PG_DrawableSurface* dropimage = NULL;
  
        int x,y;
***************
*** 298,302 ****
  
  /**  */
! SDL_Surface* PG_WidgetDnD::eventQueryDragImage() {
        return NULL;
  }
--- 299,303 ----
  
  /**  */
! PG_Draw::PG_DrawableSurface* PG_WidgetDnD::eventQueryDragImage() {
        return NULL;
  }
***************
*** 304,309 ****
  /**  */
  void PG_WidgetDnD::cacheDragArea(PG_Point p) {
!       SDL_Rect srcrect;
!       SDL_Rect dstrect;
  
        if(!dragimagecache || !dragimage)
--- 305,310 ----
  /**  */
  void PG_WidgetDnD::cacheDragArea(PG_Point p) {
!       PG_Rect srcrect;
!       PG_Rect dstrect;
  
        if(!dragimagecache || !dragimage)
***************
*** 314,326 ****
        srcrect.x = p.x;
        srcrect.y = p.y;
!       srcrect.w = dragimagecache->w;
!       srcrect.h = dragimagecache->h;
  
        dstrect.x = 0;
        dstrect.y = 0;
!       dstrect.w = dragimagecache->w;
!       dstrect.h = dragimagecache->h;
  
!       PG_Draw::BlitSurface(GetScreenSurface(), srcrect, dragimagecache, 
dstrect);
  
        PG_Application::UnlockScreen();
--- 315,327 ----
        srcrect.x = p.x;
        srcrect.y = p.y;
!       srcrect.w = dragimagecache->getScreen()->w;
!       srcrect.h = dragimagecache->getScreen()->h;
  
        dstrect.x = 0;
        dstrect.y = 0;
!       dstrect.w = dragimagecache->getScreen()->w;
!       dstrect.h = dragimagecache->getScreen()->h;
  
!       dragimagecache->BlitSurface(GetScreenSurface(), srcrect, dstrect);
  
        PG_Application::UnlockScreen();
***************
*** 329,334 ****
  /**  */
  void PG_WidgetDnD::restoreDragArea(PG_Point p) {
!       SDL_Rect srcrect;
!       SDL_Rect dstrect;
  
        if((dragimagecache == NULL) || (dragimage == NULL))
--- 330,335 ----
  /**  */
  void PG_WidgetDnD::restoreDragArea(PG_Point p) {
!       PG_Rect srcrect;
!       PG_Rect dstrect;
  
        if((dragimagecache == NULL) || (dragimage == NULL))
***************
*** 339,351 ****
        srcrect.x = 0;
        srcrect.y = 0;
!       srcrect.w = dragimagecache->w;
!       srcrect.h = dragimagecache->h;
  
        dstrect.x = p.x;
        dstrect.y = p.y;
!       dstrect.w = dragimagecache->w;
!       dstrect.h = dragimagecache->h;
  
!       PG_Draw::BlitSurface(dragimagecache, srcrect, GetScreenSurface(), 
dstrect);
  
        PG_Application::UnlockScreen();
--- 340,352 ----
        srcrect.x = 0;
        srcrect.y = 0;
!       srcrect.w = dragimagecache->getScreen()->w;
!       srcrect.h = dragimagecache->getScreen()->h;
  
        dstrect.x = p.x;
        dstrect.y = p.y;
!       dstrect.w = dragimagecache->getScreen()->w;
!       dstrect.h = dragimagecache->getScreen()->h;
  
!       GetScreenSurface()->BlitSurface(dragimagecache, srcrect, dstrect);
  
        PG_Application::UnlockScreen();
***************
*** 357,362 ****
                return;
  
!       x -= dragimage->w / 2;
!       y -= dragimage->h / 2;
  
        if(x<0)
--- 358,363 ----
                return;
  
!       x -= dragimage->getScreen()->w / 2;
!       y -= dragimage->getScreen()->h / 2;
  
        if(x<0)
***************
*** 365,413 ****
                y=0;
  
!       if(x + dragimage->w > GetScreenSurface()->w)
!               x = GetScreenSurface()->w - dragimage->w;
  
!       if(y + dragimage->h > GetScreenSurface()->h)
!               y = GetScreenSurface()->h - dragimage->h;
  }
  
  /** */
! SDL_Surface* PG_WidgetDnD::eventQueryDropImage(SDL_Surface* dragimage) {
        return NULL;
  }
  /**  */
! void PG_WidgetDnD::drawDragArea(PG_Point pt, SDL_Surface* image) {
!       SDL_Rect srcrect;
!       SDL_Rect dstrect;
  
        srcrect.x = 0;
        srcrect.y = 0;
!       srcrect.w = image->w;
!       srcrect.h = image->h;
  
        dstrect.x = pt.x;
        dstrect.y = pt.y;
!       dstrect.w = image->w;
!       dstrect.h = image->h;
  
        PG_Application::LockScreen();
!       PG_Draw::BlitSurface(image, srcrect, GetScreenSurface(), dstrect);
        PG_Application::UnlockScreen();
  
  }
  /**  */
! void PG_WidgetDnD::updateDragArea(PG_Point pt, SDL_Surface* image) {
!       SDL_Rect dstrect;
  
        dstrect.x = pt.x;
        dstrect.y = pt.y;
!       dstrect.w = image->w;
!       dstrect.h = image->h;
  
!       SDL_UpdateRects(GetScreenSurface(), 1, &dstrect);
  }
  
  /**  */
! void PG_WidgetDnD::slideDragImage(PG_Point start, PG_Point end, int steps, 
SDL_Surface* image) {
        double dx, dy;
        PG_Point current,old;
--- 366,414 ----
                y=0;
  
!       if(x + dragimage->getScreen()->w > GetScreenSurface()->getScreen()->w)
!               x = GetScreenSurface()->getScreen()->w - 
dragimage->getScreen()->w;
  
!       if(y + dragimage->getScreen()->h > GetScreenSurface()->getScreen()->h)
!               y = GetScreenSurface()->getScreen()->h - 
dragimage->getScreen()->h;
  }
  
  /** */
! PG_Draw::PG_DrawableSurface* 
PG_WidgetDnD::eventQueryDropImage(PG_Draw::PG_DrawableSurface* dragimage) {
        return NULL;
  }
  /**  */
! void PG_WidgetDnD::drawDragArea(PG_Point pt, PG_Draw::PG_DrawableSurface* 
image) {
!       PG_Rect srcrect;
!       PG_Rect dstrect;
  
        srcrect.x = 0;
        srcrect.y = 0;
!       srcrect.w = image->getScreen()->w;
!       srcrect.h = image->getScreen()->h;
  
        dstrect.x = pt.x;
        dstrect.y = pt.y;
!       dstrect.w = image->getScreen()->w;
!       dstrect.h = image->getScreen()->h;
  
        PG_Application::LockScreen();
!       GetScreenSurface()->BlitSurface(image, srcrect, dstrect);
        PG_Application::UnlockScreen();
  
  }
  /**  */
! void PG_WidgetDnD::updateDragArea(PG_Point pt, PG_Draw::PG_DrawableSurface* 
image) {
!       PG_Rect dstrect;
  
        dstrect.x = pt.x;
        dstrect.y = pt.y;
!       dstrect.w = image->getScreen()->w;
!       dstrect.h = image->getScreen()->h;
  
!       GetScreenSurface()->UpdateRects(1, &dstrect);
  }
  
  /**  */
! void PG_WidgetDnD::slideDragImage(PG_Point start, PG_Point end, int steps, 
PG_Draw::PG_DrawableSurface* image) {
        double dx, dy;
        PG_Point current,old;

Index: pgwidgetlist.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgwidgetlist.cpp,v
retrieving revision 1.11
retrieving revision 1.11.2.1
diff -C2 -r1.11 -r1.11.2.1
*** pgwidgetlist.cpp    6 May 2002 10:40:50 -0000       1.11
--- pgwidgetlist.cpp    18 Jun 2002 22:40:39 -0000      1.11.2.1
***************
*** 30,33 ****
--- 30,34 ----
  #include "pgapplication.h"
  #include "pglog.h"
+ #include "pgdraw.h"
  
  struct PG_WidgetListDataInternal{
***************
*** 114,118 ****
  }
  
! void PG_WidgetList::eventBlit(SDL_Surface* srf, const PG_Rect& src, const 
PG_Rect& dst) {
        PG_Rect r = my_rectList;
        r.my_xpos -= my_bordersize;
--- 115,119 ----
  }
  
! void PG_WidgetList::eventBlit(PG_Draw::PG_DrawableSurface* srf, const 
PG_Rect& src, const PG_Rect& dst) {
        PG_Rect r = my_rectList;
        r.my_xpos -= my_bordersize;

Index: pgwindow.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgwindow.cpp,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -C2 -r1.10 -r1.10.2.1
*** pgwindow.cpp        6 May 2002 10:40:50 -0000       1.10
--- pgwindow.cpp        18 Jun 2002 22:40:39 -0000      1.10.2.1
***************
*** 30,33 ****
--- 30,34 ----
  #include "pgapplication.h"
  #include "pgtheme.h"
+ #include "pgdraw.h"
  
  PG_Window::PG_Window(PG_Widget* parent, const PG_Rect& r, const char* 
windowtext, Uint32 flags, const char* style, int heightTitlebar) : 
PG_ThemeWidget(parent, r) {
***************
*** 103,107 ****
  }
  
! void PG_Window::eventBlit(SDL_Surface* srf, const PG_Rect& src, const 
PG_Rect& dst) {
        PG_Rect my_src;
        PG_Rect my_dst;
--- 104,108 ----
  }
  
! void PG_Window::eventBlit(PG_Draw::PG_DrawableSurface* srf, const PG_Rect& 
src, const PG_Rect& dst) {
        PG_Rect my_src;
        PG_Rect my_dst;
***************
*** 157,164 ****
        if(y < 0)
                y=0;
!       if(x > (my_srfScreen->w - my_width - 1))
!               x = (my_srfScreen->w - my_width - 1);
!       if(y > (my_srfScreen->h - my_height - 1))
!               y = (my_srfScreen->h - my_height -1);
  
        if(my_moveMode) {
--- 158,165 ----
        if(y < 0)
                y=0;
!       if(x > (my_srfScreen->getScreen()->w - my_width - 1))
!               x = (my_srfScreen->getScreen()->w - my_width - 1);
!       if(y > (my_srfScreen->getScreen()->h - my_height - 1))
!               y = (my_srfScreen->getScreen()->h - my_height -1);
  
        if(my_moveMode) {
***************
*** 192,199 ****
                        y = GetParent()->Height() - 5;
        } else {                     // A top-level-widget
!               if(x > (my_srfScreen->w - my_width - 1))
!                       x = (my_srfScreen->w - my_width - 1);
!               if(y > (my_srfScreen->h - my_height - 1))
!                       y = (my_srfScreen->h - my_height - 1);
        }
  
--- 193,200 ----
                        y = GetParent()->Height() - 5;
        } else {                     // A top-level-widget
!               if(x > (my_srfScreen->getScreen()->w - my_width - 1))
!                       x = (my_srfScreen->getScreen()->w - my_width - 1);
!               if(y > (my_srfScreen->getScreen()->h - my_height - 1))
!                       y = (my_srfScreen->getScreen()->h - my_height - 1);
        }
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]