paragui-cvs
[Top][All Lists]
Advanced

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

[paragui-cvs] CVS: paragui/src/widgets Makefile.am,1.2,1.3 pgbutton.cpp,


From: Alexander Pipelka <address@hidden>
Subject: [paragui-cvs] CVS: paragui/src/widgets Makefile.am,1.2,1.3 pgbutton.cpp,1.3,1.4 pgcheckbutton.cpp,1.3,1.4 pgdropdown.cpp,1.3,1.4 pglineedit.cpp,1.3,1.4 pglistbox.cpp,1.3,1.4 pgmenubar.cpp,1.1.1.1,1.2 pgmessagebox.cpp,1.3,1.4 pgpopupmenu.cpp,1.3,1.4 pgradiobutton.cpp,1.3,1.4 pgscrollbar.cpp,1.3,1.4 pgslider.cpp,1.3,1.4 pgspinnerbox.cpp,1.3,1.4 pgwidget.cpp,1.4,1.5 pgwidgetlist.cpp,1.3,1.4 pgwindow.cpp,1.3,1.4 pgnotebook.cpp,1.3,NONE
Date: Sat, 27 Apr 2002 07:57:26 -0400

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

Modified Files:
        Makefile.am pgbutton.cpp pgcheckbutton.cpp pgdropdown.cpp 
        pglineedit.cpp pglistbox.cpp pgmenubar.cpp pgmessagebox.cpp 
        pgpopupmenu.cpp pgradiobutton.cpp pgscrollbar.cpp pgslider.cpp 
        pgspinnerbox.cpp pgwidget.cpp pgwidgetlist.cpp pgwindow.cpp 
Removed Files:
        pgnotebook.cpp 
Log Message:
Here we go :))
This is the first version with libsigc++ support.

All internal callback handling mechanisms have been removed.
See include/pgsignals.h for details (BEWARE! Class templates are my friends).



Index: Makefile.am
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** Makefile.am 15 Apr 2002 13:31:31 -0000      1.2
--- Makefile.am 27 Apr 2002 11:57:22 -0000      1.3
***************
*** 36,39 ****
--- 36,40 ----
  INCLUDES = \
        $(EXPAT_INCLUDE) \
+       $(SIGC_CFLAGS) \
        $(SDL_CFLAGS) \
        -I$(top_srcdir)/include

Index: pgbutton.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgbutton.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgbutton.cpp        15 Apr 2002 13:35:36 -0000      1.3
--- pgbutton.cpp        27 Apr 2002 11:57:22 -0000      1.4
***************
*** 372,376 ****
        Update();
  
!       SendMessage(GetParent(), MSG_BUTTONCLICK, GetID(), 0);
        return true;
  }
--- 372,377 ----
        Update();
  
!       sigButtonClick(this);
!       
        return true;
  }

Index: pgcheckbutton.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgcheckbutton.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgcheckbutton.cpp   15 Apr 2002 13:35:36 -0000      1.3
--- pgcheckbutton.cpp   27 Apr 2002 11:57:22 -0000      1.4
***************
*** 51,58 ****
  }
  
- bool PG_CheckButton::eventButtonClick(int id, PG_Widget* widget) {
-       return false;
- }
- 
  void PG_CheckButton::SetUnpressed() {
        my_widgetButton->SetPressed(false);
--- 51,54 ----
***************
*** 61,65 ****
        Update();
  
!       // Notify parent
!       SendMessage(GetParent(), MSG_BUTTONCLICK, (MSG_ID)GetID(), (MSG_DATA)0);
  }
--- 57,60 ----
        Update();
  
!       sigButtonClick(this);
  }

Index: pgdropdown.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgdropdown.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgdropdown.cpp      15 Apr 2002 13:35:36 -0000      1.3
--- pgdropdown.cpp      27 Apr 2002 11:57:23 -0000      1.4
***************
*** 41,48 ****
        PG_Rect rbutton(abs(r.my_width - r.my_height), 0, r.my_height, 
r.my_height);
        my_DropButton = new PG_Button(this, PG_IDDROPDOWN_BOX, rbutton, NULL, 
style);
! 
        PG_Rect rlist(r.my_xpos, r.my_ypos + r.my_height +1, r.my_width, 
r.my_height * 5);
        my_DropList = new PG_ListBox(NULL, rlist, style);
!       my_DropList->SetEventObject(MSG_SELECTITEM, this, 
(MSG_CALLBACK_OBJ)&PG_DropDown::select_handler);
  
        //LoadThemeStyle(style);
--- 41,49 ----
        PG_Rect rbutton(abs(r.my_width - r.my_height), 0, r.my_height, 
r.my_height);
        my_DropButton = new PG_Button(this, PG_IDDROPDOWN_BOX, rbutton, NULL, 
style);
!       my_DropButton->sigButtonClick.connect(slot(this, 
&PG_DropDown::handleButtonClick));
!       
        PG_Rect rlist(r.my_xpos, r.my_ypos + r.my_height +1, r.my_width, 
r.my_height * 5);
        my_DropList = new PG_ListBox(NULL, rlist, style);
!       my_DropList->sigSelectItem.connect(slot(this, 
&PG_DropDown::handleSelectItem));
  
        //LoadThemeStyle(style);
***************
*** 84,89 ****
  }
  
! bool PG_DropDown::eventButtonClick (int id, PG_Widget* widget) {
!       if(id != PG_IDDROPDOWN_BOX) {
                return false;
        }
--- 85,90 ----
  }
  
! bool PG_DropDown::handleButtonClick(PG_Button* widget, PG_Pointer* data) {
!       if(widget->GetID() != PG_IDDROPDOWN_BOX) {
                return false;
        }
***************
*** 120,127 ****
  }
  
- bool PG_DropDown::eventSelectItem(PG_ListBoxBaseItem* item) {
-       return false;
- }
- 
  // TODO: Fill me with code :)
  void PG_DropDown::eventSizeWidget(Uint16 w, Uint16 h) {}
--- 121,124 ----
***************
*** 133,138 ****
  }
  
! PARAGUI_CALLBACK(PG_DropDown::select_handler) {
!       PG_ListBoxItem* item = (PG_ListBoxItem*)data;
  
        my_EditBox->SetText(item->GetText());
--- 130,134 ----
  }
  
! bool PG_DropDown::handleSelectItem(PG_ListBoxItem* item, PG_Pointer* data) {
  
        my_EditBox->SetText(item->GetText());
***************
*** 145,156 ****
        }
  
!       eventSelectItem(item);
!       SendMessage(NULL, MSG_SELECTITEM, GetID(), (unsigned long)item);
! 
!       return true;
  }
  
- // 1. try to fix the problems when running PG_DropDown in a modal loop
- // still not working -- Alex
  bool PG_DropDown::ProcessEvent(const SDL_Event * event, bool bModal) {
  
--- 141,147 ----
        }
  
!       return sigSelectItem(item, item->GetUserData());
  }
  
  bool PG_DropDown::ProcessEvent(const SDL_Event * event, bool bModal) {
  

Index: pglineedit.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pglineedit.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pglineedit.cpp      15 Apr 2002 13:35:36 -0000      1.3
--- pglineedit.cpp      27 Apr 2002 11:57:23 -0000      1.4
***************
*** 171,175 ****
        Update();
  
!       SendMessage(this, MSG_EDITBEGIN, GetID(), 0);
        eventEditBegin(GetID(), this, 0,0);
  }
--- 171,175 ----
        Update();
  
!       sigEditBegin(this);
        eventEditBegin(GetID(), this, 0,0);
  }
***************
*** 182,186 ****
        ReleaseInputFocus();
  
!       SendMessage(this, MSG_EDITEND, GetID(), 0);
        eventEditEnd(GetID(), this, 0,0);
  }
--- 182,186 ----
        ReleaseInputFocus();
  
!       sigEditEnd(this);
        eventEditEnd(GetID(), this, 0,0);
  }
***************
*** 297,301 ****
                        }
                        EditEnd();
!                       SendMessage(this, MSG_RETURN, GetID(), 0);
                        return true;
  
--- 297,301 ----
                        }
                        EditEnd();
!                       sigEditReturn(this);
                        return true;
  

Index: pglistbox.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pglistbox.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pglistbox.cpp       15 Apr 2002 13:35:36 -0000      1.3
--- pglistbox.cpp       27 Apr 2002 11:57:23 -0000      1.4
***************
*** 44,48 ****
  }
  
! void PG_ListBox::AddItem(PG_ListBoxBaseItem* item) {
      if (!item)
          return;
--- 44,48 ----
  }
  
! void PG_ListBox::AddItem(PG_ListBoxItem* item) {
      if (!item)
          return;
***************
*** 82,94 ****
                }
  
!               my_selectedItem = item;
        }
  
!       SendMessage(NULL, MSG_SELECTITEM, GetID(), (unsigned long)item);
!       eventSelectItem(item);
! }
! 
! bool PG_ListBox::eventSelectItem(PG_ListBoxBaseItem* item) {
!       return false;
  }
  
--- 82,89 ----
                }
  
!               my_selectedItem = (PG_ListBoxItem*)item;
        }
  
!       sigSelectItem((PG_ListBoxItem*)item, item->GetUserData());
  }
  
***************
*** 115,119 ****
  }
  
! PG_ListBoxBaseItem* PG_ListBox::GetSelectedItem() {
        return my_selectedItem;
  }
--- 110,114 ----
  }
  
! PG_ListBoxItem* PG_ListBox::GetSelectedItem() {
        return my_selectedItem;
  }
***************
*** 125,129 ****
  void PG_ListBox::SelectFirstItem() {
        my_selectindex = 0;
!       PG_ListBoxBaseItem* item = (PG_ListBoxBaseItem*)FindWidget(0);
  
        if(item == NULL) {
--- 120,124 ----
  void PG_ListBox::SelectFirstItem() {
        my_selectindex = 0;
!       PG_ListBoxItem* item = static_cast<PG_ListBoxItem*>(FindWidget(0));
  
        if(item == NULL) {
***************
*** 135,139 ****
  
  void PG_ListBox::SelectNextItem() {
!       PG_ListBoxBaseItem* item = 
(PG_ListBoxBaseItem*)FindWidget(my_selectindex+1);
  
        if(item == NULL) {
--- 130,134 ----
  
  void PG_ListBox::SelectNextItem() {
!       PG_ListBoxItem* item = (PG_ListBoxItem*)FindWidget(my_selectindex+1);
  
        if(item == NULL) {
***************
*** 146,150 ****
  
  void PG_ListBox::SelectPrevItem() {
!       PG_ListBoxBaseItem* item = 
(PG_ListBoxBaseItem*)FindWidget(my_selectindex-1);
  
        if(item == NULL) {
--- 141,145 ----
  
  void PG_ListBox::SelectPrevItem() {
!       PG_ListBoxItem* item = (PG_ListBoxItem*)FindWidget(my_selectindex-1);
  
        if(item == NULL) {

Index: pgmenubar.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgmenubar.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** pgmenubar.cpp       15 Apr 2002 13:22:15 -0000      1.1.1.1
--- pgmenubar.cpp       27 Apr 2002 11:57:23 -0000      1.2
***************
*** 46,52 ****
        last->button->SetFontSize(GetFontSize());
  
!       last->button->SetEventObject(
!                                                       MSG_BUTTONCLICK,
!                                                       this, 
(MSG_CALLBACK_OBJ)&PG_MenuBar::handle_button, last);
  
        last->popupmenu = menu;
--- 46,50 ----
        last->button->SetFontSize(GetFontSize());
  
!       last->button->sigButtonClick.connect(slot(this, 
&PG_MenuBar::handleButtonClick), last);
  
        last->popupmenu = menu;
***************
*** 55,65 ****
  }
  
! PARAGUI_CALLBACK(PG_MenuBar::handle_button) {
!       PG_Button* button = static_cast<PG_Button*>(widget);
!       MenuBarItem* item = static_cast<MenuBarItem*>(clientdata);
! 
        // check if we are visible
!       if(item->popupmenu->IsVisible()) {
!               item->popupmenu->Hide();
                my_active = NULL;
                return true;
--- 53,74 ----
  }
  
! bool PG_MenuBar::handleButtonClick(PG_Button* button, PG_Pointer* data) {
!       MenuBarItem* last = static_cast<MenuBarItem*>(data);
!       
!       // find the button
!       /*for(std::vector<MenuBarItem*>::iterator i=ItemList.begin(); i != 
ItemList.end(); i++) {
!               if((*i)->button == button) {
!                       last = (*i);
!                       break;
!               }
!       }*/
!       
!       if(last == NULL) {
!               return false;
!       }
!       
        // check if we are visible
!       if(last->popupmenu->IsVisible()) {
!               last->popupmenu->Hide();
                my_active = NULL;
                return true;
***************
*** 71,75 ****
        }
  
!       my_active = item->popupmenu;
        my_active->trackMenu(button->x, button->y + button->h);
  
--- 80,84 ----
        }
  
!       my_active = last->popupmenu;
        my_active->trackMenu(button->x, button->y + button->h);
  

Index: pgmessagebox.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgmessagebox.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgmessagebox.cpp    15 Apr 2002 13:35:36 -0000      1.3
--- pgmessagebox.cpp    27 Apr 2002 11:57:23 -0000      1.4
***************
*** 35,39 ****
--- 35,42 ----
  
        my_btnok = new PG_Button(this, 1, btn1, btn1text);
+       my_btnok->sigButtonClick.connect(slot(this, 
&PG_MessageBox::handleButtonClick));
+       
        my_btncancel = new PG_Button(this, 2, btn2, btn2text);
+       my_btncancel->sigButtonClick.connect(slot(this, 
&PG_MessageBox::handleButtonClick));
  
        Init(windowtext, textalign, style);
***************
*** 77,86 ****
  
  //Event?
! bool PG_MessageBox::eventButtonClick(int id, PG_Widget* widget) {
        //Button clicked?
!       if(widget==my_btnok || widget==my_btncancel) {
!               //Set Buttonflag to ButtonID
!               buttonflag=id;
!               SendMessage(this, MSG_MODALQUIT, 0, 0);
                return true;
        }
--- 80,95 ----
  
  //Event?
! bool PG_MessageBox::handleButtonClick(PG_Button* widget, PG_Pointer* data) {
        //Button clicked?
!       if(widget == my_btnok) {
!               buttonflag=1;
!               QuitModal();
!               return true;
!       }
!       
!       if(widget == my_btncancel) {
!               buttonflag=2;
!               QuitModal();
!               //SendMessage(this, MSG_MODALQUIT, 0, 0);
                return true;
        }

Index: pgpopupmenu.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgpopupmenu.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgpopupmenu.cpp     15 Apr 2002 13:35:36 -0000      1.3
--- pgpopupmenu.cpp     27 Apr 2002 11:57:23 -0000      1.4
***************
*** 41,45 ****
   * MenuItem
   */
! PG_PopupMenu::MenuItem::MenuItem(PG_PopupMenu *parent, char *caption, int id, 
MI_FLAGS flags)
                : myFlags(flags),
                myCaption(caption ? caption : ""),
--- 41,45 ----
   * MenuItem
   */
! PG_MenuItem::PG_MenuItem(PG_PopupMenu *parent, char *caption, int id, 
MI_FLAGS flags)
                : myFlags(flags),
                myCaption(caption ? caption : ""),
***************
*** 56,60 ****
  }
  
! PG_PopupMenu::MenuItem::MenuItem(PG_PopupMenu *parent, char *caption, 
PG_PopupMenu *submenu)
  : myFlags(MIF_SUBMENU),
  myCaption(caption ? caption : ""),
--- 56,60 ----
  }
  
! PG_MenuItem::PG_MenuItem(PG_PopupMenu *parent, char *caption, PG_PopupMenu 
*submenu)
  : myFlags(MIF_SUBMENU),
  myCaption(caption ? caption : ""),
***************
*** 70,76 ****
  }
  
! PG_PopupMenu::MenuItem::~MenuItem() {}
  
! void PG_PopupMenu::MenuItem::initItem() {
        my_xpos = my_ypos = my_height = my_width = 0;
        myPoint.x = myPoint.y = 0;
--- 70,76 ----
  }
  
! PG_MenuItem::~PG_MenuItem() {}
  
! void PG_MenuItem::initItem() {
        my_xpos = my_ypos = my_height = my_width = 0;
        myPoint.x = myPoint.y = 0;
***************
*** 83,87 ****
  }
  
! bool PG_PopupMenu::MenuItem::measureItem(PG_Rect* rect, bool full) {
  
        rect->x = x;
--- 83,87 ----
  }
  
! bool PG_MenuItem::measureItem(PG_Rect* rect, bool full) {
  
        rect->x = x;
***************
*** 129,133 ****
  }
  
! bool PG_PopupMenu::MenuItem::isPointInside(int x, int y) {
        int posx = x - my_xpos;
        int posy = y - my_ypos;
--- 129,133 ----
  }
  
! bool PG_MenuItem::isPointInside(int x, int y) {
        int posx = x - my_xpos;
        int posy = y - my_ypos;
***************
*** 140,144 ****
  }
  
! bool PG_PopupMenu::MenuItem::renderSurface(SDL_Surface *canvas, SDL_Surface 
**text, SDL_Color *tcol, SDL_Color *scol) {
        if (/*!*text ||*/ !canvas)
                return false;
--- 140,144 ----
  }
  
! bool PG_MenuItem::renderSurface(SDL_Surface *canvas, SDL_Surface **text, 
SDL_Color *tcol, SDL_Color *scol) {
        if (/*!*text ||*/ !canvas)
                return false;
***************
*** 157,161 ****
  }
  
! inline bool PG_PopupMenu::MenuItem::isValidRect() {
        if ((my_width > 0) && (my_height > 0))
                return true;
--- 157,161 ----
  }
  
! inline bool PG_MenuItem::isValidRect() {
        if ((my_width > 0) && (my_height > 0))
                return true;
***************
*** 164,168 ****
  }
  
! inline bool PG_PopupMenu::MenuItem::paintNormal(SDL_Surface *canvas, 
SDL_Color *tcol, SDL_Color *scol) {
        if (!isValidRect())
                return false;
--- 164,168 ----
  }
  
! inline bool PG_MenuItem::paintNormal(SDL_Surface *canvas, SDL_Color *tcol, 
SDL_Color *scol) {
        if (!isValidRect())
                return false;
***************
*** 171,175 ****
  }
  
! inline bool PG_PopupMenu::MenuItem::paintSelected(SDL_Surface *canvas, 
SDL_Color *tcol, SDL_Color *scol) {
        if (!isValidRect())
                return false;
--- 171,175 ----
  }
  
! inline bool PG_MenuItem::paintSelected(SDL_Surface *canvas, SDL_Color *tcol, 
SDL_Color *scol) {
        if (!isValidRect())
                return false;
***************
*** 178,182 ****
  }
  
! inline bool PG_PopupMenu::MenuItem::paintDisabled(SDL_Surface *canvas, 
SDL_Color *tcol, SDL_Color *scol) {
        if (!isValidRect())
                return false;
--- 178,182 ----
  }
  
! inline bool PG_MenuItem::paintDisabled(SDL_Surface *canvas, SDL_Color *tcol, 
SDL_Color *scol) {
        if (!isValidRect())
                return false;
***************
*** 233,237 ****
  }
  
! void PG_PopupMenu::appendItem(MenuItem *item) {
        PG_Rect     rect;
  
--- 233,237 ----
  }
  
! void PG_PopupMenu::appendItem(PG_MenuItem *item) {
        PG_Rect     rect;
  
***************
*** 257,271 ****
  PG_PopupMenu& PG_PopupMenu::addMenuItem(char *caption,
                                          int ID,
!                                         MSG_CALLBACK handler,
!                                         void *data,
!                                         MenuItem::MI_FLAGS flags) {
  
!       MenuItem* item = new MenuItem(this, caption, ID, flags);
        appendItem(item);
  
!       if (handler) {
!               //action = new PG_Action(ID, handler, data);
!               item->SetEventCallback(MSG_SELECTMENUITEM, handler, data);
!       }
  
        return *this;
--- 257,269 ----
  PG_PopupMenu& PG_PopupMenu::addMenuItem(char *caption,
                                          int ID,
!                                         PG_MenuItemSlot slot,
!                                         PG_Pointer* data,
!                                         PG_MenuItem::MI_FLAGS flags) {
  
!       PG_MenuItem* item = new PG_MenuItem(this, caption, ID, flags);
!       item->data = data;
        appendItem(item);
  
!       item->sigMenuItemSelect.connect(slot);
  
        return *this;
***************
*** 274,293 ****
  PG_PopupMenu& PG_PopupMenu::addMenuItem(char *caption,
                                          int ID,
!                                         MSG_CALLBACK_OBJ handler,
!                                         PG_EventObject *obj,
!                                         void *data,
!                                         MenuItem::MI_FLAGS flags) {
!       if (handler && !obj) {
!               //TODO: throw an exception here
!               return *this;
!       }
! 
!       MenuItem* item = new MenuItem(this, caption, ID, flags);
        appendItem(item);
  
-       if (handler) {
-               item->SetEventObject(MSG_SELECTMENUITEM, obj, handler, data);
-       }
- 
        return *this;
  }
--- 272,280 ----
  PG_PopupMenu& PG_PopupMenu::addMenuItem(char *caption,
                                          int ID,
!                                         PG_MenuItem::MI_FLAGS flags) {
!       PG_MenuItem* item = new PG_MenuItem(this, caption, ID, flags);
!       item->data = NULL;
        appendItem(item);
  
        return *this;
  }
***************
*** 295,301 ****
  PG_PopupMenu& PG_PopupMenu::addMenuItem(char *caption,
                                          PG_PopupMenu *sub,
!                                         MenuItem::MI_FLAGS flags) {
!       MenuItem    *item = new MenuItem(this, caption, sub);
! 
        appendItem(item);
  
--- 282,289 ----
  PG_PopupMenu& PG_PopupMenu::addMenuItem(char *caption,
                                          PG_PopupMenu *sub,
!                                         PG_MenuItem::MI_FLAGS flags) {
!                                                                               
        
!       PG_MenuItem* item = new PG_MenuItem(this, caption, sub);
!       item->data = NULL;
        appendItem(item);
  
***************
*** 303,328 ****
  }
  
- /*PG_PopupMenu& PG_PopupMenu::addMenuItem(char *caption,
-                                         int ID,
-                                         PG_Action *action,
-                                         void *data,
-                                         MenuItem::MI_FLAGS flags) {
-       MenuItem    *item = new MenuItem(this, caption, ID, flags);
- 
-       appendItem(item);
- 
-       if (action) {
-               if (actions[ID])
-                       //TODO: an exception here??
-                       PG_LogWRN("Duplicate action ID %d - Replacing old 
value", ID);
-               actions[ID] = action;
-       };
- 
-       return *this;
- }*/
- 
  PG_PopupMenu& PG_PopupMenu::addSeparator() {
        // Ugly
!       return addMenuItem((char*)0, -1, NULL, 0, MenuItem::MIF_SEPARATOR);
  }
  
--- 291,297 ----
  }
  
  PG_PopupMenu& PG_PopupMenu::addSeparator() {
        // Ugly
!       return addMenuItem((char*)0, -1, PG_MenuItem::MIF_SEPARATOR);
  }
  
***************
*** 332,336 ****
        mi = std::find_if(start, stop, item_with_id(id));
        if (*mi && mi != stop)
!               ((MenuItem*)*mi)->disable();
  }
  
--- 301,305 ----
        mi = std::find_if(start, stop, item_with_id(id));
        if (*mi && mi != stop)
!               ((PG_MenuItem*)*mi)->disable();
  }
  
***************
*** 340,344 ****
        mi = std::find_if(start, stop, item_with_id(id));
        if (*mi && mi != stop)
!               ((MenuItem*)*mi)->enable();
  }
  
--- 309,313 ----
        mi = std::find_if(start, stop, item_with_id(id));
        if (*mi && mi != stop)
!               ((PG_MenuItem*)*mi)->enable();
  }
  
***************
*** 396,400 ****
  
                for (MII i = start; i != stop; i++) {
!                       MenuItem* item = *i;
  
                        item->measureItem(&itemRect);
--- 365,369 ----
  
                for (MII i = start; i != stop; i++) {
!                       PG_MenuItem* item = *i;
  
                        item->measureItem(&itemRect);
***************
*** 439,445 ****
                        if (!selected->isMute()) {
                                // call item's callback
!                               selected->SendMessage(NULL, MSG_SELECTMENUITEM, 
(unsigned int)selected->getId(), (unsigned long)selected);
                                // call general callback (PG_PopupMenu)
!                               SendMessage(NULL, MSG_SELECTMENUITEM, (unsigned 
int)selected->getId(), (unsigned long)selected);
                        }
                }
--- 408,414 ----
                        if (!selected->isMute()) {
                                // call item's callback
!                               selected->sigMenuItemSelect(selected, 
selected->data);
                                // call general callback (PG_PopupMenu)
!                               sigMenuItemSelect(selected, selected->data);
                        }
                }
***************
*** 487,491 ****
  
                for (MII i = start; i != stop; i++) {
!                       MenuItem* item = *i;
  
                        item->measureItem(&itemRect, true);
--- 456,460 ----
  
                for (MII i = start; i != stop; i++) {
!                       PG_MenuItem* item = *i;
  
                        item->measureItem(&itemRect, true);
***************
*** 532,536 ****
  }
  
! bool PG_PopupMenu::selectItem(MenuItem *item, MII iter) {
        if (selected)
                selected->unselect();
--- 501,505 ----
  }
  
! bool PG_PopupMenu::selectItem(PG_MenuItem *item, MII iter) {
        if (selected)
                selected->unselect();
***************
*** 582,586 ****
  
  bool PG_PopupMenu::handleMotion(PG_Point const &p) {
!       MenuItem  *item = 0;
        PG_Rect    itemRect;
  
--- 551,555 ----
  
  bool PG_PopupMenu::handleMotion(PG_Point const &p) {
!       PG_MenuItem  *item = 0;
        PG_Rect    itemRect;
  
***************
*** 638,642 ****
  
        PG_Rect    itemRect;
!       MenuItem  *oldSel = selected;
  
        if (selected) {
--- 607,611 ----
  
        PG_Rect    itemRect;
!       PG_MenuItem  *oldSel = selected;
  
        if (selected) {
***************
*** 713,719 ****
                                if (/*actions[selected->getId()] &&*/ 
!selected->isDisabled()) {
                                        // call item's callback
!                                       selected->SendMessage(NULL, 
MSG_SELECTMENUITEM, (unsigned int)selected->getId(), (unsigned long)selected);
                                        // call general callback (PG_PopupMenu)
!                                       SendMessage(NULL, MSG_SELECTMENUITEM, 
(unsigned int)selected->getId(), (unsigned long)selected);
                                }
  
--- 682,688 ----
                                if (/*actions[selected->getId()] &&*/ 
!selected->isDisabled()) {
                                        // call item's callback
!                                       selected->sigMenuItemSelect(selected, 
selected->data);
                                        // call general callback (PG_PopupMenu)
!                                       sigMenuItemSelect(selected, 
selected->data);
                                }
  

Index: pgradiobutton.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgradiobutton.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgradiobutton.cpp   15 Apr 2002 13:35:36 -0000      1.3
--- pgradiobutton.cpp   27 Apr 2002 11:57:23 -0000      1.4
***************
*** 52,56 ****
        my_widgetButton->SetToggle(true);
        my_widgetButton->EnableReceiver(false);
! 
        rectLabel.SetRect(rectButton.my_width, 0, r.my_width - 
rectButton.my_width, r.my_height);
        my_widgetLabel = new PG_Label(this, rectLabel, text, style);
--- 52,57 ----
        my_widgetButton->SetToggle(true);
        my_widgetButton->EnableReceiver(false);
!       my_widgetButton->sigButtonClick.connect(slot(this, 
&PG_RadioButton::handleButtonClick));
!       
        rectLabel.SetRect(rectButton.my_width, 0, r.my_width - 
rectButton.my_width, r.my_height);
        my_widgetLabel = new PG_Label(this, rectLabel, text, style);
***************
*** 111,115 ****
  }
  
! bool PG_RadioButton::eventButtonClick(int id, PG_Widget* widget) {
  
        if(widget == my_widgetButton) {
--- 112,116 ----
  }
  
! bool PG_RadioButton::handleButtonClick(PG_Button* widget, PG_Pointer* data) {
  
        if(widget == my_widgetButton) {
***************
*** 139,145 ****
  
        Update();
! 
!       // Notify parent
!       SendMessage(GetParent(), MSG_BUTTONCLICK, (MSG_ID)GetID(), (MSG_DATA)1);
  }
  
--- 140,145 ----
  
        Update();
!       
!       sigButtonClick(this);
  }
  

Index: pgscrollbar.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgscrollbar.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgscrollbar.cpp     15 Apr 2002 13:35:36 -0000      1.3
--- pgscrollbar.cpp     27 Apr 2002 11:57:23 -0000      1.4
***************
*** 94,102 ****
                              (direction == PG_SB_VERTICAL) ? PG_IDSCROLLBAR_UP 
: PG_IDSCROLLBAR_LEFT,
                              position[0]);
! 
        scrollbutton[1] = new PG_Button(
                              this,
                              (direction == PG_SB_VERTICAL) ? 
PG_IDSCROLLBAR_DOWN : PG_IDSCROLLBAR_RIGHT,
                              position[1]);
  
        dragbutton = new ScrollButton(this, PG_IDSCROLLBAR_DRAG, position[3]);
--- 94,104 ----
                              (direction == PG_SB_VERTICAL) ? PG_IDSCROLLBAR_UP 
: PG_IDSCROLLBAR_LEFT,
                              position[0]);
!       
scrollbutton[0]->sigButtonClick.connect(slot(this,&PG_ScrollBar::handleButtonClick));
!       
        scrollbutton[1] = new PG_Button(
                              this,
                              (direction == PG_SB_VERTICAL) ? 
PG_IDSCROLLBAR_DOWN : PG_IDSCROLLBAR_RIGHT,
                              position[1]);
+       
scrollbutton[1]->sigButtonClick.connect(slot(this,&PG_ScrollBar::handleButtonClick));
  
        dragbutton = new ScrollButton(this, PG_IDSCROLLBAR_DRAG, position[3]);
***************
*** 232,236 ****
                        }
  
!                       SendMessage(GetParent(), MSG_SCROLLPOS, GetID(), 
scroll_current);
                        return true;
  
--- 234,239 ----
                        }
  
!                       sigScrollPos(this, scroll_current);
!                       //SendMessage(GetParent(), MSG_SCROLLPOS, GetID(), 
scroll_current);
                        return true;
  
***************
*** 241,250 ****
                                SetPosition(scroll_current - my_linesize);
                        }
!                       SendMessage(GetParent(), MSG_SCROLLPOS, GetID(), 
scroll_current);
                        return true;
  
                case 5:
                        SetPosition(scroll_current + my_linesize);
!                       SendMessage(GetParent(), MSG_SCROLLPOS, GetID(), 
scroll_current);
                        return true;
        }
--- 244,256 ----
                                SetPosition(scroll_current - my_linesize);
                        }
! 
!                       sigScrollPos(this, scroll_current);
!                       //SendMessage(GetParent(), MSG_SCROLLPOS, GetID(), 
scroll_current);
                        return true;
  
                case 5:
                        SetPosition(scroll_current + my_linesize);
!                       sigScrollPos(this, scroll_current);
!                       //SendMessage(GetParent(), MSG_SCROLLPOS, GetID(), 
scroll_current);
                        return true;
        }
***************
*** 319,324 ****
                int pos = GetPosFromPoint(p);
                if(GetParent()->scroll_current != pos || my_tickMode) {
!                       GetParent()->scroll_current = pos;
!                       GetParent()->SendMessage(GetParent()->GetParent(), 
MSG_SCROLLTRACK, GetParent()->GetID(), pos);
                }
  
--- 325,332 ----
                int pos = GetPosFromPoint(p);
                if(GetParent()->scroll_current != pos || my_tickMode) {
!                       PG_ScrollBar* parent = GetParent();
!                       parent->scroll_current = pos;
!                       parent->sigScrollTrack(parent, pos);
!                       //GetParent()->SendMessage(GetParent()->GetParent(), 
MSG_SCROLLTRACK, GetParent()->GetID(), pos);
                }
  
***************
*** 376,404 ****
  }
  
! /**  */
! bool PG_ScrollBar::eventButtonClick(int id, PG_Widget* widget) {
! 
!       if(widget == scrollbutton[0]) {         // UP | LEFT
                if(scroll_current == scroll_min) {
                        return false;
                }
                SetPosition(scroll_current - my_linesize);
!               SendMessage(GetParent(), MSG_SCROLLPOS, GetID(), 
scroll_current);
                return true;
        }
  
!       if(widget == scrollbutton[1]) {         // DOWN | RIGHT
                if(scroll_current == scroll_max) {
                        return false;
                }
                SetPosition(scroll_current + my_linesize);
!               SendMessage(GetParent(), MSG_SCROLLPOS, GetID(), 
scroll_current);
                return true;
  
        }
  
!       return PG_ThemeWidget::eventButtonClick(id, widget);
  }
  
  /**  */
  bool PG_ScrollBar::eventMouseButtonDown(const SDL_MouseButtonEvent* button) {
--- 384,414 ----
  }
  
! bool PG_ScrollBar::handleButtonClick(PG_Button* button, PG_Pointer* data) {
!       
!       if(button == scrollbutton[0]) {         // UP | LEFT
                if(scroll_current == scroll_min) {
                        return false;
                }
                SetPosition(scroll_current - my_linesize);
!               sigScrollPos(this, scroll_current);
!               //SendMessage(GetParent(), MSG_SCROLLPOS, GetID(), 
scroll_current);
                return true;
        }
  
!       if(button == scrollbutton[1]) {         // DOWN | RIGHT
                if(scroll_current == scroll_max) {
                        return false;
                }
                SetPosition(scroll_current + my_linesize);
!               sigScrollPos(this, scroll_current);
!               //SendMessage(GetParent(), MSG_SCROLLPOS, GetID(), 
scroll_current);
                return true;
  
        }
  
!       return false;
  }
  
+ 
  /**  */
  bool PG_ScrollBar::eventMouseButtonDown(const SDL_MouseButtonEvent* button) {
***************
*** 416,421 ****
        PG_Button::eventMouseButtonUp(button);
  
!       //GetParent()->SetPosition(pos);
!       GetParent()->SendMessage(GetParent()->GetParent(), MSG_SCROLLPOS, 
GetParent()->GetID(), pos);
  
        return true;
--- 426,431 ----
        PG_Button::eventMouseButtonUp(button);
  
!       GetParent()->sigScrollPos(GetParent(), pos);
!       //GetParent()->SendMessage(GetParent()->GetParent(), MSG_SCROLLPOS, 
GetParent()->GetID(), pos);
  
        return true;

Index: pgslider.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgslider.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgslider.cpp        15 Apr 2002 13:35:36 -0000      1.3
--- pgslider.cpp        27 Apr 2002 11:57:23 -0000      1.4
***************
*** 67,70 ****
--- 67,71 ----
                SetPosition(scroll_min);
        }
+       sigScrollTrack.connect(slot(this, &PG_Slider::handleTrack));
  }
  
***************
*** 125,129 ****
        }
  
!       SendMessage(GetParent(), MSG_SCROLLTRACK, GetID(), scroll_current);
  
        return true;
--- 126,130 ----
        }
  
!       sigSlide(this, scroll_current);
  
        return true;
***************
*** 153,155 ****
--- 154,160 ----
  
        dragbutton->SizeWidget(position[3].w, position[3].h);
+ }
+ 
+ bool PG_Slider::handleTrack(PG_ScrollBar* from, long pos) {
+       return sigSlide(this, pos);
  }

Index: pgspinnerbox.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgspinnerbox.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgspinnerbox.cpp    15 Apr 2002 13:35:36 -0000      1.3
--- pgspinnerbox.cpp    27 Apr 2002 11:57:23 -0000      1.4
***************
*** 49,61 ****
  
        m_pEditBox = new PG_MaskEdit( this, box_rect, style );
!       m_pEditBox->SetEventObject(MSG_EDITEND, this, 
(MSG_CALLBACK_OBJ)&PG_SpinnerBox::handle_editend);
  
        m_pButtonUp = new PG_Button( this, PG_IDSPINNERBOX_UP, up_rect, "" );
        // load a specific style
        m_pButtonUp->LoadThemeStyle(style, "ButtonUp");
  
        m_pButtonDown = new PG_Button( this, PG_IDSPINNERBOX_DOWN, down_rect, 
"" );
        // load a specific style
        m_pButtonDown->LoadThemeStyle(style, "ButtonDown");
  
        m_iMinValue = 0;
--- 49,63 ----
  
        m_pEditBox = new PG_MaskEdit( this, box_rect, style );
!       m_pEditBox->sigEditEnd.connect(slot(this, 
&PG_SpinnerBox::handleEditEnd));
  
        m_pButtonUp = new PG_Button( this, PG_IDSPINNERBOX_UP, up_rect, "" );
        // load a specific style
        m_pButtonUp->LoadThemeStyle(style, "ButtonUp");
+       m_pButtonUp->sigButtonClick.connect(slot(this, 
&PG_SpinnerBox::handleButtonClick));
  
        m_pButtonDown = new PG_Button( this, PG_IDSPINNERBOX_DOWN, down_rect, 
"" );
        // load a specific style
        m_pButtonDown->LoadThemeStyle(style, "ButtonDown");
+       m_pButtonDown->sigButtonClick.connect(slot(this, 
&PG_SpinnerBox::handleButtonClick));
  
        m_iMinValue = 0;
***************
*** 66,77 ****
        m_pEditBox->SetValidKeys("-0123456789");
  
-       // we don't need to call Show() in the constructor -- Alex
-       /*
-       m_pButtonUp->Show( false );
-       m_pButtonDown->Show( false );
-       m_pEditBox->Show( false );
-               
-       Show( true );
-       */
  }
  
--- 68,71 ----
***************
*** 81,103 ****
  }
  
! bool PG_SpinnerBox::eventButtonClick(int id, PG_Widget *widget) {
  
!       switch( id ) {
! 
!               case PG_IDSPINNERBOX_UP: // Up
!                       if( m_iValue < m_iMaxValue ) {
!                               m_iValue++;
!                               SetTextValue();
!                               return true;
!                       }
!                       return false;
! 
!               case PG_IDSPINNERBOX_DOWN: // Down
!                       if( m_iValue > m_iMinValue ) {
!                               m_iValue--;
!                               SetTextValue();
!                               return true;
!                       }
!                       return false;
        }
  
--- 75,96 ----
  }
  
! bool PG_SpinnerBox::handleButtonClick(PG_Button* widget, PG_Pointer* data) {
  
!       if(widget == m_pButtonUp) {
!               if( m_iValue < m_iMaxValue ) {
!                       m_iValue++;
!                       SetTextValue();
!                       return true;
!               }
!               return false;
!       }
!       
!       if(widget == m_pButtonDown) {
!               if( m_iValue > m_iMinValue ) {
!                       m_iValue--;
!                       SetTextValue();
!                       return true;
!               }
!               return false;
        }
  
***************
*** 108,112 ****
        m_pEditBox->SetTextFormat("%u", m_iValue );
        m_pEditBox->Update();
!       SendMessage( NULL, MSG_SPINNER_CHANGE, GetID(), (unsigned long)m_iValue 
);
  }
  
--- 101,105 ----
        m_pEditBox->SetTextFormat("%u", m_iValue );
        m_pEditBox->Update();
!       sigSpinnerChange(this, m_iValue);
  }
  
***************
*** 128,132 ****
  }
  
! PARAGUI_CALLBACK(PG_SpinnerBox::handle_editend) {
        const char* text = m_pEditBox->GetText();
        m_iValue = (text != NULL) ? atoi(text) : 0;
--- 121,125 ----
  }
  
! bool PG_SpinnerBox::handleEditEnd(PG_LineEdit* edit) {
        const char* text = m_pEditBox->GetText();
        m_iValue = (text != NULL) ? atoi(text) : 0;

Index: pgwidget.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgwidget.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** pgwidget.cpp        26 Apr 2002 12:43:23 -0000      1.4
--- pgwidget.cpp        27 Apr 2002 11:57:23 -0000      1.5
***************
*** 850,854 ****
                                if(index != -1) {
                                        SDL_SetClipRect(my_srfScreen, 
&my_internaldata->rectClip);
!                                       
children->Intersect(&my_internaldata->rectClip, index+1, 
-1).Blit(my_internaldata->rectClip);
                                }
                        }
--- 850,855 ----
                                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();
                                }
                        }
***************
*** 863,867 ****
                if(index != -1) {
                        SDL_SetClipRect(my_srfScreen, 
&my_internaldata->rectClip);
!                       widgetList.Intersect(&my_internaldata->rectClip, 
index+1, -1).Blit(my_internaldata->rectClip);
                }
  
--- 864,869 ----
                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();
                }
  
***************
*** 1120,1124 ****
                if(index != -1) {
                        SDL_SetClipRect(my_srfScreen, clip);
!                       widgetList.Intersect(clip, 0, index).Blit(*clip);
                }
                return true;
--- 1122,1127 ----
                if(index != -1) {
                        SDL_SetClipRect(my_srfScreen, clip);
!                       //widgetList.Intersect(clip, 0, index).Blit(*clip);
!                       widgetList.Intersect(clip, 0, index).Blit();
                }
                return true;
***************
*** 1175,1179 ****
        PG_Application::RedrawBackground(r);
        SDL_SetClipRect(screen, (PG_Rect*)&r);
!       widgetList.Intersect((PG_Rect*)&r).Blit(r);
        SDL_SetClipRect(screen, NULL);
        PG_Application::UnlockScreen();
--- 1178,1183 ----
        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();
***************
*** 1509,1513 ****
  
  void PG_Widget::QuitModal() {
!               SendMessage(this, MSG_MODALQUIT, 0, 0);
  }
  
--- 1513,1517 ----
  
  void PG_Widget::QuitModal() {
!               eventQuitModal(0, this, 0);
  }
  
***************
*** 1859,1911 ****
  void PG_Widget::GetClipRects(PG_Rect& src, PG_Rect& dst) {
        GetClipRects(src, dst, *this);
- }
- 
- bool PG_Widget::eventButtonClick(int id, PG_Widget* widget) {
-       return false;
- }
- 
- 
- bool PG_Widget::eventScrollPos(int id, PG_Widget* widget, unsigned long data) 
{
-       return false;
- }
- 
- 
- bool PG_Widget::eventScrollTrack(int id, PG_Widget* widget, unsigned long 
data) {
-       return false;
- }
- 
- bool PG_Widget::eventMessage(MSG_MESSAGE* msg) {
-       bool rc = false;
- 
-     if (!msg)
-         return false;
- 
-       if((msg->to != this) && (msg->to != NULL)) {
-               return false;
-       }
- 
-       if(PG_MessageObject::eventMessage(msg)) {
-               return true;
-       }
- 
-       switch(msg->type) {
-               case MSG_BUTTONCLICK:
-                       rc = eventButtonClick(msg->widget_id, 
(PG_Widget*)(msg->from));
-                       break;
- 
-               case MSG_SCROLLPOS:
-                       rc = eventScrollPos(msg->widget_id, 
(PG_Widget*)(msg->from), msg->data);
-                       break;
- 
-               case MSG_SCROLLTRACK:
-                       rc = eventScrollTrack(msg->widget_id, 
(PG_Widget*)(msg->from), msg->data);
-                       break;
- 
-               default:
-                       rc = false;
-                       break;
-       }
- 
-       return rc;
  }
  
--- 1863,1866 ----

Index: pgwidgetlist.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgwidgetlist.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgwidgetlist.cpp    15 Apr 2002 13:35:36 -0000      1.3
--- pgwidgetlist.cpp    27 Apr 2002 11:57:23 -0000      1.4
***************
*** 75,79 ****
        my_objVerticalScrollbar->MoveWidget(r.my_width - my_widthScrollbar, 0);
        my_objVerticalScrollbar->SizeWidget(my_widthScrollbar, r.my_height);
! 
        my_objHorizontalScrollbar = new PG_ScrollBar(this, 
PG_IDWIDGETLIST_SCROLL, my_rectHorizontalScrollbar, PG_SB_HORIZONTAL, style);
        my_objHorizontalScrollbar->SetRange(0,0);
--- 75,81 ----
        my_objVerticalScrollbar->MoveWidget(r.my_width - my_widthScrollbar, 0);
        my_objVerticalScrollbar->SizeWidget(my_widthScrollbar, r.my_height);
!       my_objVerticalScrollbar->sigScrollPos.connect(slot(this, 
&PG_WidgetList::handleScrollPos));
!       my_objVerticalScrollbar->sigScrollTrack.connect(slot(this, 
&PG_WidgetList::handleScrollTrack));
!       
        my_objHorizontalScrollbar = new PG_ScrollBar(this, 
PG_IDWIDGETLIST_SCROLL, my_rectHorizontalScrollbar, PG_SB_HORIZONTAL, style);
        my_objHorizontalScrollbar->SetRange(0,0);
***************
*** 81,84 ****
--- 83,88 ----
        my_objHorizontalScrollbar->MoveWidget(0, r.my_height - 
my_heightHorizontalScrollbar);
        my_objHorizontalScrollbar->SizeWidget(r.my_width, 
my_heightHorizontalScrollbar);
+       my_objHorizontalScrollbar->sigScrollPos.connect(slot(this, 
&PG_WidgetList::handleScrollPos));
+       my_objHorizontalScrollbar->sigScrollTrack.connect(slot(this, 
&PG_WidgetList::handleScrollTrack));
  
        my_rectList.SetRect(
***************
*** 154,183 ****
  }
  
! bool PG_WidgetList::eventScrollPos(int id, PG_Widget* widget, unsigned long 
data) {
        if(widget == my_objVerticalScrollbar) {
!               ScrollToY(data);
                return true;
        }
  
        if(widget == my_objHorizontalScrollbar) {
!               ScrollToX(data);
                return true;
        }
  
!       return true; //PG_ThemeWidget::eventScrollPos(id, widget, data);
  }
  
! bool PG_WidgetList::eventScrollTrack(int id, PG_Widget* widget, unsigned long 
data) {
        if(widget == my_objVerticalScrollbar) {
!               ScrollToY(data);
                return true;
        }
  
        if(widget == my_objHorizontalScrollbar) {
!               ScrollToX(data);
                return true;
        }
  
!       return true; // PG_ThemeWidget::eventScrollTrack(id, widget, data);
  }
  
--- 158,187 ----
  }
  
! bool PG_WidgetList::handleScrollPos(PG_ScrollBar* widget, long pos) {
        if(widget == my_objVerticalScrollbar) {
!               ScrollToY(pos);
                return true;
        }
  
        if(widget == my_objHorizontalScrollbar) {
!               ScrollToX(pos);
                return true;
        }
  
!       return false;
  }
  
! bool PG_WidgetList::handleScrollTrack(PG_ScrollBar* widget, long pos) {
        if(widget == my_objVerticalScrollbar) {
!               ScrollToY(pos);
                return true;
        }
  
        if(widget == my_objHorizontalScrollbar) {
!               ScrollToX(pos);
                return true;
        }
  
!       return false;
  }
  

Index: pgwindow.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgwindow.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgwindow.cpp        15 Apr 2002 13:35:36 -0000      1.3
--- pgwindow.cpp        27 Apr 2002 11:57:23 -0000      1.4
***************
*** 47,51 ****
--- 47,54 ----
  
        my_buttonClose = new PG_Button(this, PG_WINDOW_CLOSE, rb, NULL);
+       my_buttonClose->sigButtonClick.connect(slot(this, 
&PG_Window::handleButtonClick));
+       
        my_buttonMinimize = new PG_Button(this, PG_WINDOW_MINIMIZE, rb, NULL);
+       my_buttonMinimize->sigButtonClick.connect(slot(this, 
&PG_Window::handleButtonClick));
  
        LoadThemeStyle(style);
***************
*** 204,220 ****
  }
  
! bool PG_Window::eventButtonClick(int id, PG_Widget* widget) {
!       switch(id) {
!               // close window
!               case PG_WINDOW_CLOSE:
!                       Hide();
!                       SendMessage(NULL, MSG_WINDOWCLOSE, GetID(), 0);
!                       return true;
! 
!               // minimize window
!               case PG_WINDOW_MINIMIZE:
!                       Hide();
!                       SendMessage(NULL, MSG_WINDOWMINIMIZE, GetID(), 0);
!                       return true;
        }
  
--- 207,223 ----
  }
  
! bool PG_Window::handleButtonClick(PG_Button* widget, PG_Pointer* data) {
!       // close window
!       if(widget == my_buttonClose) {
!               Hide();
!               sigWindowClose(this);
!               return true;
!       }
!       
!       // minimize window
!       if(widget == my_buttonMinimize) {
!               Hide();
!               sigWindowMinimize(this);
!               return true;
        }
  

--- pgnotebook.cpp DELETED ---




reply via email to

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