paragui-cvs
[Top][All Lists]
Advanced

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

[paragui-cvs] CVS: paragui/include pgsignals.h,NONE,1.1 Makefile.am,1.1.


From: Alexander Pipelka <address@hidden>
Subject: [paragui-cvs] CVS: paragui/include pgsignals.h,NONE,1.1 Makefile.am,1.1.1.1,1.2 paragui.h,1.3,1.4 paragui_types.h,1.3,1.4 pgapplication.h,1.3,1.4 pgbutton.h,1.3,1.4 pgcheckbutton.h,1.3,1.4 pgdropdown.h,1.3,1.4 pglineedit.h,1.3,1.4 pglistbox.h,1.3,1.4 pgmenubar.h,1.3,1.4 pgmessagebox.h,1.3,1.4 pgmessageobject.h,1.3,1.4 pgpopupmenu.h,1.3,1.4 pgradiobutton.h,1.3,1.4 pgscrollbar.h,1.3,1.4 pgslider.h,1.3,1.4 pgspinnerbox.h,1.3,1.4 pgwidget.h,1.3,1.4 pgwidgetlist.h,1.3,1.4 pgwindow.h,1.3,1.4 pgeventobject.h,1.3,NONE pgnotebook.h,1.3,NONE
Date: Sat, 27 Apr 2002 07:57:27 -0400

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

Modified Files:
        Makefile.am paragui.h paragui_types.h pgapplication.h 
        pgbutton.h pgcheckbutton.h pgdropdown.h pglineedit.h 
        pglistbox.h pgmenubar.h pgmessagebox.h pgmessageobject.h 
        pgpopupmenu.h pgradiobutton.h pgscrollbar.h pgslider.h 
        pgspinnerbox.h pgwidget.h pgwidgetlist.h pgwindow.h 
Added Files:
        pgsignals.h 
Removed Files:
        pgeventobject.h pgnotebook.h 
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).



--- NEW FILE ---
#ifndef PG_SIGNALS_H
#define PG_SIGNALS_H

#include "SDL.h"
#include <sigc++/signal_system.h>
#include <iostream>
#include <map>

class PG_Widget;
class PG_Button;
class PG_CheckButton;
class PG_RadioButton;
class PG_ScrollBar;
class PG_Slider;
class PG_ListBoxItem;
class PG_LineEdit;
class PG_SpinnerBox;
class PG_MenuItem;
class PG_Window;
class PG_Application;
class PG_MessageObject;

using namespace SigC;

typedef void PG_Pointer;

typedef Signal1<bool, PG_Widget*> PG_SignalGeneric;

class PG_Signal0 : 
public Signal1<bool, PG_Pointer*>,
public Signal0<bool>
{
public:

        bool operator()(PG_Pointer* data) {
                Signal1<bool, PG_Pointer*>::emit(data);
                Signal0<bool>::emit();
        };
        
        bool operator()() {
                Signal1<bool, PG_Pointer*>::emit(data);
                Signal0<bool>::emit();
        };

        Connection connect(const Slot1<bool, PG_Pointer*>& s, PG_Pointer* _data 
= NULL) {
                data = _data;
                return Signal1<bool, PG_Pointer*>::connect(s);
        };

        Connection connect(const Slot0<bool>& s) {
                return Signal0<bool>::connect(s);
        };

private:
        PG_Pointer* data;
};

template<class P1>
class PG_Signal1 : 
public Signal2<bool, P1, PG_Pointer*>,
public Signal1<bool, PG_Pointer*>,
public Signal1<bool, P1>,
public Signal0<bool>
{
public:

        virtual ~PG_Signal1() {};
        
        virtual bool operator()(P1 p1, PG_Pointer* data) {
                return
                        Signal2<bool, P1, PG_Pointer*>::emit(p1, data) |
                        Signal1<bool, PG_Pointer*>::emit(data) |
                        Signal1<bool, P1>::emit(p1) |
                        Signal0<bool>::emit();
        }
        
        virtual bool operator()(P1 p1) {
                return
                        Signal2<bool, P1, PG_Pointer*>::emit(p1, data) |
                        Signal1<bool, PG_Pointer*>::emit(data) |
                        Signal1<bool, P1>::emit(p1) |
                        Signal0<bool>::emit();
        };

        virtual bool operator()(PG_Pointer* data) {
                return
                        Signal1<bool, PG_Pointer*>::emit(data) |
                        Signal0<bool>::emit();
        };

        virtual bool operator()() {
                return
                        Signal0<bool>::emit();
        };
        
        virtual Connection connect(const Slot2<bool, P1, PG_Pointer*>& s, 
PG_Pointer* _data = NULL) {
                data = _data;
                return Signal2<bool, P1, PG_Pointer*>::connect(s);
        };

        virtual Connection connect(const Slot1<bool, PG_Pointer*>& s, 
PG_Pointer* _data = NULL) {
                data = _data;
                return Signal1<bool, PG_Pointer*>::connect(s);
        };

        virtual Connection connect(const Slot1<bool, P1>& s) {
                return Signal1<bool, P1>::connect(s);
        }

        virtual Connection connect(const Slot0<bool>& s, PG_Pointer* _data) {
                data = _data;
                return Signal0<bool>::connect(s);
        };

        virtual Connection connect(const Slot0<bool>& s) {
                return Signal0<bool>::connect(s);
        };


private:
        PG_Pointer* data;
};


template<class P1, class P2>
class PG_Signal2 : 
public Signal3<bool, P1, P2, PG_Pointer*>,
public Signal2<bool, P1, P2>,
public Signal1<bool, P2>,

public Signal2<bool, P1, PG_Pointer*>,
public Signal1<bool, PG_Pointer*>,
public Signal1<bool, P1>,
public Signal0<bool>
{
public:

        virtual ~PG_Signal2() {};
        
        virtual bool operator()(P1 p1, P2 p2, PG_Pointer* data) {
                return
                        Signal3<bool, P1, P2, PG_Pointer*>::emit(p1, p2, data) |
                        Signal2<bool, P1, P2>::emit(p1, p2) |
                        Signal1<bool, P2>::emit(p2) |

                        Signal2<bool, P1, PG_Pointer*>::emit(p1, data) |
                        Signal1<bool, PG_Pointer*>::emit(data) |
                        Signal1<bool, P1>::emit(p1) |
                        Signal0<bool>::emit();
        }

        virtual bool operator()(P1 p1, P2 p2) {
                return
                        Signal3<bool, P1, P2, PG_Pointer*>::emit(p1, p2, data) |
                        Signal2<bool, P1, P2>::emit(p1, p2) |
                        Signal1<bool, P2>::emit(p2) |

                        Signal2<bool, P1, PG_Pointer*>::emit(p1, data) |
                        Signal1<bool, PG_Pointer*>::emit(data) |
                        Signal1<bool, P1>::emit(p1) |
                        Signal0<bool>::emit();
        }
        
        virtual bool operator()(P1 p1, PG_Pointer* data) {
                return
                        Signal2<bool, P1, PG_Pointer*>::emit(p1, data) |
                        Signal1<bool, PG_Pointer*>::emit(data) |
                        Signal1<bool, P1>::emit(p1) |
                        Signal0<bool>::emit();
        }

        virtual bool operator()(P1 p1) {
                return
                        Signal2<bool, P1, PG_Pointer*>::emit(p1, data) |
                        Signal1<bool, PG_Pointer*>::emit(data) |
                        Signal1<bool, P1>::emit(p1) |
                        Signal0<bool>::emit();
        }
        
        virtual bool operator()(PG_Pointer* data ) {
                return
                        Signal1<bool, PG_Pointer*>::emit(data) |
                        Signal0<bool>::emit();
        }
        
        virtual bool operator()() {
                return
                        Signal0<bool>::emit();
        };

        
        virtual Connection connect(const Slot3<bool, P1, P2, PG_Pointer*>& s, 
PG_Pointer* _data) {
                data = _data;
                return Signal3<bool, P1, P2, PG_Pointer*>::connect(s);
        }

        virtual Connection connect(const Slot2<bool, P1, P2>& s) {
                return Signal2<bool, P1, P2>::connect(s);
        }

        /*virtual Connection connect(const Slot2<bool, P2, PG_Pointer*>& s, 
PG_Pointer* _data) {
                data = _data;
                return Signal2<bool, P2, PG_Pointer*>::connect(s);
        }*/

        virtual Connection connect(const Slot1<bool, P2>& s) {
                return Signal1<bool, P2>::connect(s);
        }

        virtual Connection connect(const Slot2<bool, P1, PG_Pointer*>& s, 
PG_Pointer* _data) {
                data = _data;
                return Signal2<bool, P1, PG_Pointer*>::connect(s);
        };

        virtual Connection connect(const Slot1<bool, PG_Pointer*>& s, 
PG_Pointer* _data) {
                data = _data;
                return Signal1<bool, PG_Pointer*>::connect(s);
        };

        virtual Connection connect(const Slot1<bool, P1>& s) {
                return Signal1<bool, P1>::connect(s);
        }

        virtual Connection connect(const Slot0<bool>& s, PG_Pointer* _data) {
                data = _data;
                return Signal0<bool>::connect(s);
        };

        virtual Connection connect(const Slot0<bool>& s) {
                return Signal0<bool>::connect(s);
        };


private:
        PG_Pointer* data;
};


typedef PG_Signal1<PG_Button*> PG_SignalButtonClick;

typedef PG_Signal1<PG_RadioButton*> PG_SignalRadioButtonClick;

typedef PG_Signal1<PG_ListBoxItem*> PG_SignalSelectItem;

typedef PG_Signal2<PG_ScrollBar*, long> PG_SignalScrollPos;

typedef PG_Signal2<PG_ScrollBar*, long> PG_SignalScrollTrack;

typedef PG_Signal2<PG_Slider*, long> PG_SignalSlide;

typedef PG_Signal2<PG_Slider*, long> PG_SignalSlideEnd;

typedef PG_Signal2<PG_SpinnerBox*, long> PG_SignalSpinnerChange;

typedef PG_Signal1<PG_LineEdit*> PG_SignalEditBegin;

typedef PG_Signal1<PG_LineEdit*> PG_SignalEditEnd;

typedef PG_Signal1<PG_LineEdit*> PG_SignalEditReturn;

typedef Signal2<bool, PG_MenuItem*, PG_Pointer*> PG_SignalMenuItemSelected;

typedef PG_Signal1<PG_Window*> PG_SignalWindowClose;

typedef PG_Signal1<PG_Window*> PG_SignalWindowMinimize;

typedef PG_Signal1<PG_Window*> PG_SignalWindowRestore;

typedef PG_Signal1<PG_MessageObject*> PG_SignalAppIdle;

typedef PG_Signal1<PG_Application*> PG_SignalAppQuit;

typedef PG_Signal1 <const SDL_ResizeEvent*> PG_SignalVideoResize;

#endif // PG_SIGNALS_H

Index: Makefile.am
===================================================================
RCS file: /cvsroot/paragui/paragui/include/Makefile.am,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** Makefile.am 15 Apr 2002 13:22:31 -0000      1.1.1.1
--- Makefile.am 27 Apr 2002 11:57:22 -0000      1.2
***************
*** 30,34 ****
        pgdropdown.h \
        pgsurfacecache.h \
-       pgeventobject.h \
        pgpopupmenu.h \
        pgmessagebox.h \
--- 30,33 ----
***************
*** 49,53 ****
        pgmenubar.h \
        pgcompat.h \
!       pgdatacontainer.h
  
  EXTRA_DIST = \
--- 48,53 ----
        pgmenubar.h \
        pgcompat.h \
!       pgdatacontainer.h \
!       pgsignals.h
  
  EXTRA_DIST = \

Index: paragui.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/paragui.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** paragui.h   15 Apr 2002 13:35:35 -0000      1.3
--- paragui.h   27 Apr 2002 11:57:22 -0000      1.4
***************
*** 47,51 ****
  %include "pgrect.h"
  %include "pgmessageobject.h"
- %include "pgeventobject.h"
  %include "pgwidget.h"
  %include "pgthemewidget.h"
--- 47,50 ----

Index: paragui_types.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/paragui_types.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** paragui_types.h     15 Apr 2002 13:35:35 -0000      1.3
--- paragui_types.h     27 Apr 2002 11:57:22 -0000      1.4
***************
*** 47,59 ****
  class PG_MessageObject;
  class PG_Widget;
- class PG_EventObject;
  #ifndef SWIG
  class PG_Rect;
  #endif
  
- #ifdef __cplusplus
- extern "C" {
- #endif
- 
  //! Structure for a screen point
  typedef struct {
--- 47,54 ----
***************
*** 67,97 ****
  } PG_Gradient;
  
- #ifndef DOXYGEN_SKIP
- typedef unsigned long MSG_ID;
- typedef unsigned long MSG_DATA;
- #endif
- 
  //! ParaGUI message types
  typedef enum {
!       MSG_BUTTONCLICK,        //!< a button was pressed
!       MSG_SCROLLPOS,  //!< scrollbar changed it's position
!       MSG_SLIDEEND = MSG_SCROLLPOS,   //!< slider changed it's position
!       MSG_SCROLLTRACK,        //!< scrollbar position changing currently
!       MSG_SLIDE = MSG_SCROLLTRACK,    //!< slider position changing currently
        MSG_THREAD_SIGNAL,      //!< general appeal signal (can by used for 
signal events)
        MSG_SIGNAL,     //!< general appeal signal (can by used for signal 
events)
!       MSG_QUIT,       //!< the appliction's messageloop will quit
!       MSG_EDITBEGIN,  //!< a lineedit object entered "edit-mode"
!       MSG_EDITEND,    //!< a lineedit object has left "edit-mode"
!       MSG_APPIDLE,    //!< fired repeatedly (if enabled) when the event queue 
is empty
!       MSG_SELECTITEM, //!< a listbox item has been selected
!       MSG_VIDEORESIZE,        //!< the videowindow has been resized by the 
user
!       MSG_SPINNER_CHANGE,     //!< a spinnerobject changed it's value
!       MSG_WINDOWCLOSE,        //!< a window was closed
!       MSG_WINDOWMINIMIZE,     //!< a window was minimized
!       MSG_WINDOWRESTORE,      //!< a window was restored
!       MSG_RETURN,     //!< RETURN/ENTER was pressed in a lineedit widget
!       MSG_MODALQUIT,  //!< signal to leave a modal eventloop
!       MSG_SELECTMENUITEM,     //!< a menuitem has been selected
        MSG_NOTEBOOK_TAB_CLICK, //!< a notebook tab was clicked
        MSG_USER_1 = 10001,     //!< userevent 1
--- 62,87 ----
  } PG_Gradient;
  
  //! ParaGUI message types
  typedef enum {
! //    MSG_BUTTONCLICK,        //!< a button was pressed
! //    MSG_SCROLLPOS,  //!< scrollbar changed it's position
! //    MSG_SLIDEEND = MSG_SCROLLPOS,   //!< slider changed it's position
! //    MSG_SCROLLTRACK,        //!< scrollbar position changing currently
! //    MSG_SLIDE = MSG_SCROLLTRACK,    //!< slider position changing currently
        MSG_THREAD_SIGNAL,      //!< general appeal signal (can by used for 
signal events)
        MSG_SIGNAL,     //!< general appeal signal (can by used for signal 
events)
! //    MSG_QUIT,       //!< the appliction's messageloop will quit
! //    MSG_EDITBEGIN,  //!< a lineedit object entered "edit-mode"
! //    MSG_EDITEND,    //!< a lineedit object has left "edit-mode"
! //    MSG_APPIDLE,    //!< fired repeatedly (if enabled) when the event queue 
is empty
! //    MSG_SELECTITEM, //!< a listbox item has been selected
! //    MSG_VIDEORESIZE,        //!< the videowindow has been resized by the 
user
! //    MSG_SPINNER_CHANGE,     //!< a spinnerobject changed it's value
! //    MSG_WINDOWCLOSE,        //!< a window was closed
! //    MSG_WINDOWMINIMIZE,     //!< a window was minimized
! //    MSG_WINDOWRESTORE,      //!< a window was restored
! //    MSG_RETURN,     //!< RETURN/ENTER was pressed in a lineedit widget
! //    MSG_MODALQUIT,  //!< signal to leave a modal eventloop
! //    MSG_SELECTMENUITEM,     //!< a menuitem has been selected
        MSG_NOTEBOOK_TAB_CLICK, //!< a notebook tab was clicked
        MSG_USER_1 = 10001,     //!< userevent 1
***************
*** 126,211 ****
        PG_CURSOR_SOFTWARE //!< Use ParaGUI software cursor (when possible)
  } PG_CURSOR_MODE;
- 
- /**
-       General callback handler definition
-       @param id id of the calling widget
-       @param widget pointer to the caller
-       @param message specific data
-       @param clientdata pointer to userdefined callback data
-       @return true on success
- */
- #define PARAGUI_CALLBACK(funcname) \
- bool funcname (int id, PG_Widget* widget, unsigned long data, void 
*clientdata)
- 
- /**
-       callbackhandler for MSG_BUTTONCLICK messages
-       @param id id of the activated button
-       @param button pointer to the calling button
-       @param clientdata pointer to userdefined callback data
-       @return true on success
- */
- #define PARAGUI_CALLBACK_BUTTONCLICK(funcname) \
- bool funcname##_internal (int id, PG_Button* button, unsigned long data, void 
*clientdata); \
- bool funcname (int id, PG_Widget* widget, unsigned long data, void 
*clientdata) { \
-       return funcname##_internal (id, (PG_Button*)widget, data, clientdata); \
- } \
- inline bool funcname##_internal (int id, PG_Button* button, unsigned long 
data, void *clientdata)
- 
- /**
-       callbackhandler for MSG_SELECTMENUITEM messages
-       @param id id of the activated menuitem
-       @param item pointer to the calling MenuItem
-       @param clientdata pointer to userdefined callback data
-       @return true on success
- */
- #define PARAGUI_CALLBACK_SELECTMENUITEM(funcname) \
- bool funcname##_internal (int id, PG_PopupMenu::MenuItem* item, void 
*clientdata); \
- bool funcname (int id, PG_Widget* widget, unsigned long data, void 
*clientdata) { \
-       return funcname##_internal (id, (PG_PopupMenu::MenuItem*)data, 
clientdata); \
- } \
- inline bool funcname##_internal (int id, PG_PopupMenu::MenuItem* item, void 
*clientdata)
- 
- /**
-       Callback function for ParaGUI events.
-       @param id ID of the Widget/MessageObject that fired this event.
-       @param widget pointer to the caller widget.
-       @param data message specific data
-       @param clientdata user defined callback data
-       @return true - if the message was processed.
- 
-       This is the typedef of C-style callback functions.
- */
- typedef bool (*MSG_CALLBACK)(int id, PG_Widget* widget, unsigned long data, 
void *clientdata);
- 
- #ifndef SWIG
- /**
-       Member callback function for ParaGUI events.
-       @param id ID of the Widget/MessageObject that fired this event.
-       @param widget pointer to the caller widget.
-       @param data message specific data
-       @param clientdata user defined callback data
-       @return true - if the message was processed.
- 
-       This is the typedef of C++-style member callback functions.
-       Any class implementing C++-style callbacks must be derived from 
PG_EventObject.
- */
- typedef bool (PG_EventObject::*MSG_CALLBACK_OBJ)(int id, PG_Widget* widget, 
unsigned long data, void* clientdata);
- #endif
- 
- // MSG_MESSAGE
- #ifndef DOXYGEN_SKIP
- typedef struct {
-       PG_MSG_TYPE     type;
-       PG_MessageObject* from;
-       PG_MessageObject* to;
-       unsigned long widget_id;
-       unsigned long data;
-       PG_Point pt;
- } MSG_MESSAGE;
- #endif
- 
- #ifdef __cplusplus
- }
- #endif
  
  #endif // PARAGUI_TYPES_H
--- 116,119 ----

Index: pgapplication.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pgapplication.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgapplication.h     15 Apr 2002 13:35:35 -0000      1.3
--- pgapplication.h     27 Apr 2002 11:57:22 -0000      1.4
***************
*** 484,487 ****
--- 484,489 ----
        static PG_Font* DefaultFont;
  
+       PG_SignalAppQuit sigAppQuit;
+ 
  protected:
  

Index: pgbutton.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pgbutton.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgbutton.h  15 Apr 2002 13:35:35 -0000      1.3
--- pgbutton.h  27 Apr 2002 11:57:22 -0000      1.4
***************
*** 45,48 ****
--- 45,49 ----
  #include "pgwidget.h"
  #include <string>
+ #include "pgsignals.h"
  
  /**
***************
*** 247,250 ****
--- 248,253 ----
        */
        Uint8 GetBlendLevel(int mode);
+       
+       PG_SignalButtonClick sigButtonClick;
        
  protected:

Index: pgcheckbutton.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pgcheckbutton.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgcheckbutton.h     15 Apr 2002 13:35:35 -0000      1.3
--- pgcheckbutton.h     27 Apr 2002 11:57:22 -0000      1.4
***************
*** 75,81 ****
        /** */
        bool eventMouseButtonUp(const SDL_MouseButtonEvent* my_widgetButton);
- 
-       /** */
-       bool eventButtonClick(int id, PG_Widget* widget);
  };
  
--- 75,78 ----

Index: pgdropdown.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pgdropdown.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgdropdown.h        15 Apr 2002 13:35:35 -0000      1.3
--- pgdropdown.h        27 Apr 2002 11:57:22 -0000      1.4
***************
*** 46,50 ****
  #include "pglistbox.h"
  #include "pglistboxitem.h"
- #include "pgeventobject.h"
  
  /**
--- 46,49 ----
***************
*** 57,61 ****
  */
  
! class DECLSPEC PG_DropDown : public PG_Widget, public PG_EventObject {
  public:
  
--- 56,60 ----
  */
  
! class DECLSPEC PG_DropDown : public PG_Widget {
  public:
  
***************
*** 124,152 ****
        bool ProcessEvent(const SDL_Event * event, bool bModal);
  
  protected:
  
        /** */
!       void eventShow();
  
        /** */
!       void eventHide();
  
        /** */
!       bool eventButtonClick (int id, PG_Widget* widget);
  
        /** */
!       void eventSizeWidget(Uint16 w, Uint16 h);
  
        /** */
!       void eventMoveWidget(int x, int y);
  
        /** */
!       virtual bool eventSelectItem(PG_ListBoxBaseItem* item);
  
        PG_LineEdit* my_EditBox;
        PG_Button* my_DropButton;
        PG_ListBox* my_DropList;
- 
-       PARAGUI_CALLBACK(select_handler);
  };
  
--- 123,151 ----
        bool ProcessEvent(const SDL_Event * event, bool bModal);
  
+       PG_SignalSelectItem sigSelectItem;
+       
  protected:
  
        /** */
!       virtual bool handleButtonClick(PG_Button* widget, PG_Pointer* data);
  
        /** */
!       virtual bool handleSelectItem(PG_ListBoxItem* item, PG_Pointer* data);
  
        /** */
!       void eventShow();
  
        /** */
!       void eventHide();
  
        /** */
!       void eventSizeWidget(Uint16 w, Uint16 h);
  
        /** */
!       void eventMoveWidget(int x, int y);
  
        PG_LineEdit* my_EditBox;
        PG_Button* my_DropButton;
        PG_ListBox* my_DropList;
  };
  

Index: pglineedit.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pglineedit.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pglineedit.h        15 Apr 2002 13:35:35 -0000      1.3
--- pglineedit.h        27 Apr 2002 11:57:22 -0000      1.4
***************
*** 39,42 ****
--- 39,43 ----
  
  #include "pgthemewidget.h"
+ #include "pgsignals.h"
  #include <string>
  
***************
*** 140,143 ****
--- 141,148 ----
  
  
+       PG_SignalEditBegin sigEditBegin;
+       PG_SignalEditEnd sigEditEnd;
+       PG_SignalEditReturn sigEditReturn;
+       
  protected:
  

Index: pglistbox.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pglistbox.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pglistbox.h 15 Apr 2002 13:35:35 -0000      1.3
--- pglistbox.h 27 Apr 2002 11:57:22 -0000      1.4
***************
*** 57,61 ****
  
        /** */
!       void AddItem(PG_ListBoxBaseItem* item);
  
        /** */
--- 57,61 ----
  
        /** */
!       void AddItem(PG_ListBoxItem* item);
  
        /** */
***************
*** 66,70 ****
  
        /** */
!       PG_ListBoxBaseItem* GetSelectedItem();
  
        /** */
--- 66,70 ----
  
        /** */
!       PG_ListBoxItem* GetSelectedItem();
  
        /** */
***************
*** 96,103 ****
        void SetIndent(int indent);
  
! protected:
  
!       /** */
!       virtual bool eventSelectItem(PG_ListBoxBaseItem* item);
  
        /** */
--- 96,102 ----
        void SetIndent(int indent);
  
!       PG_SignalSelectItem sigSelectItem;
  
! protected:
  
        /** */
***************
*** 118,122 ****
        int my_selectindex;
  
!       PG_ListBoxBaseItem* my_selectedItem;
  
  };
--- 117,121 ----
        int my_selectindex;
  
!       PG_ListBoxItem* my_selectedItem;
  
  };

Index: pgmenubar.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pgmenubar.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgmenubar.h 15 Apr 2002 13:35:35 -0000      1.3
--- pgmenubar.h 27 Apr 2002 11:57:22 -0000      1.4
***************
*** 33,37 ****
  #include "pgbutton.h"
  #include "pgpopupmenu.h"
- #include "pgeventobject.h"
  
  /**
--- 33,36 ----
***************
*** 43,47 ****
  */
  
! class DECLSPEC PG_MenuBar : public PG_ThemeWidget, public PG_EventObject {
  public:
  
--- 42,46 ----
  */
  
! class DECLSPEC PG_MenuBar : public PG_ThemeWidget {
  public:
  
***************
*** 88,92 ****
                Callback handler for MSG_BUTTONCLICK messages
        */
!       PARAGUI_CALLBACK(handle_button);
  
        void Cleanup();
--- 87,91 ----
                Callback handler for MSG_BUTTONCLICK messages
        */
!       virtual bool handleButtonClick(PG_Button* button, PG_Pointer* data);
  
        void Cleanup();

Index: pgmessagebox.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pgmessagebox.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgmessagebox.h      15 Apr 2002 13:35:35 -0000      1.3
--- pgmessagebox.h      27 Apr 2002 11:57:22 -0000      1.4
***************
*** 103,107 ****
        @param widget                                                           
        widget for Evenet
        */
!       bool eventButtonClick(int id, PG_Widget* widget);
  
        /**
--- 103,107 ----
        @param widget                                                           
        widget for Evenet
        */
!       bool handleButtonClick(PG_Button* widget, PG_Pointer* data);
  
        /**

Index: pgmessageobject.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pgmessageobject.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgmessageobject.h   15 Apr 2002 13:35:35 -0000      1.3
--- pgmessageobject.h   27 Apr 2002 11:57:22 -0000      1.4
***************
*** 39,42 ****
--- 39,43 ----
  
  #include "paragui.h"
+ #include "pgsignals.h"
  #include <vector>
  
***************
*** 51,55 ****
  */
  
! class DECLSPEC PG_MessageObject {
  
  public:
--- 52,56 ----
  */
  
! class DECLSPEC PG_MessageObject : public SigC::Object {
  
  public:
***************
*** 109,138 ****
  
        /**
-       Send a message to an object
-       @param  target          object which will receive the message
-       @param  type                    type of the message (MSG_TYPE)
-       @param  id
-       @param  data                    message specific data value
-       */
-       bool SendMessage(PG_MessageObject* target, PG_MSG_TYPE type, MSG_ID id, 
MSG_DATA data);
- 
-       /**
-       Set a callback function for an event
-       @param  type                            message type to trigger
-       @param  cbfunc                  the function to call when the defined 
event is triggerd
-       @param  clientdata      client specific message data
-       */
-       void SetEventCallback(PG_MSG_TYPE type, MSG_CALLBACK cbfunc, void 
*clientdata = NULL);
- 
-       /**
-       Set an object member function for an event
-       @param  type                            message type to trigger
-       @param  calledobj               pointer to called object
-       @param  cbfunc                  member function to call
-       @param  clientdata      client specific message data
-       */
-       void SetEventObject(PG_MSG_TYPE type, PG_EventObject* calledobj, 
MSG_CALLBACK_OBJ cbfunc, void *clientdata = NULL);
- 
-       /**
        Sends an event to the global message queue.
  
--- 110,113 ----
***************
*** 163,166 ****
--- 138,145 ----
        virtual bool ProcessEvent(const SDL_Event* event);
  
+       PG_SignalAppIdle sigAppIdle;
+ 
+       PG_SignalVideoResize sigVideoResize;
+       
  protected:
  
***************
*** 265,286 ****
  
        /**
!       Overridable Eventhandler for a SDL_ResizeEvent message.
        The default implementation returns 'false' which indicates that this 
message is not processed by this object.
  
!       @param event SDL_ResizeEvent message
  
        @return Notifies the message pump if this message is processed by this 
object or it should be routed to the next message receiver.
        */
        virtual bool eventResize(const SDL_ResizeEvent* event);
- 
-       /**
-       Overridable Eventhandler for a SDL_SysUserEvent message.
-       The default implementation returns 'false' which indicates that this 
message is not processed by this object.
- 
-       @param event SDL_SysUserEvent message
- 
-       @return Notifies the message pump if this message is processed by this 
object or it should be routed to the next message receiver.
-       */
-       virtual bool eventMessage(MSG_MESSAGE* msg);
  
        /** */
--- 244,255 ----
  
        /**
!       Overridable Eventhandler for a SDL_VideoResize message.
        The default implementation returns 'false' which indicates that this 
message is not processed by this object.
  
!       @param syswm SDL_VideoResize message
  
        @return Notifies the message pump if this message is processed by this 
object or it should be routed to the next message receiver.
        */
        virtual bool eventResize(const SDL_ResizeEvent* event);
  
        /** */

Index: pgpopupmenu.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pgpopupmenu.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgpopupmenu.h       15 Apr 2002 13:35:35 -0000      1.3
--- pgpopupmenu.h       27 Apr 2002 11:57:22 -0000      1.4
***************
*** 48,51 ****
--- 48,155 ----
  
  #include "pgthemewidget.h"
+ #include "pgsignals.h"
+ 
+ class PG_PopupMenu;
+ class PG_MenuItem;
+ 
+ typedef Slot2<bool, PG_MenuItem*, PG_Pointer*> PG_MenuItemSlot;
+ 
+ /**
+  * @author Marek Habersack
+  *
+  * @short A menu item data structure
+  *
+  * Even though implemented as a class, MenuItem is not intended to be a new
+  * kind of widget - therefore it is derived only from PG_Rect for
+  * convenience. The idea is to have a "smart" data type (or a dumb class,
+  * if you prefer) that knows how to perform simple and specific actions on
+  * itself. The intention is to provide PG_PopupMenu with a fast mechanism
+  * for processing menu items - if MenuItem was derived from any of ParaGUI
+  * classes it would incurr unnecessary processing overhead.
+  *
+  * @todo better separator code
+  * @todo icon drawing
+  */
+ 
+ class PG_MenuItem : public PG_Rect, public PG_MessageObject {
+ public: // types
+       enum MI_FLAGS {
+               MIF_NONE = 0,
+               MIF_DISABLED = 0x01,
+               MIF_SEPARATOR = 0x02,
+               MIF_SUBMENU = 0x04
+       };
+ 
+ public: // methods
+       PG_MenuItem(PG_PopupMenu *parent,
+                        char *caption,
+                        int id,
+                        MI_FLAGS flags);
+       PG_MenuItem(PG_PopupMenu *parent,
+                        char *caption,
+                        PG_PopupMenu *submenu);
+       ~PG_MenuItem();
+ 
+       bool measureItem(PG_Rect* rect,  bool full = false);
+       bool isPointInside(int x, int y);
+       inline void moveTo(int x, int y);
+ 
+       inline SDL_Surface* getNormal() const;
+       inline SDL_Surface* getDisabled() const;
+       inline SDL_Surface* getSelected() const;
+ 
+       bool paintNormal(SDL_Surface *canvas, SDL_Color *tcol, SDL_Color *scol 
= 0);
+       bool paintDisabled(SDL_Surface *canvas, SDL_Color *tcol, SDL_Color 
*scol = 0);
+       bool paintSelected(SDL_Surface *canvas, SDL_Color *tcol, SDL_Color 
*scol = 0);
+ 
+       inline void disable();
+       inline void enable();
+       inline bool isDisabled() const;
+       inline bool isEnabled() const;
+       inline void select();
+       inline void unselect();
+       inline bool isSelected() const;
+       inline bool isSeparator() const;
+       inline bool isSubMenu() const;
+       inline bool isMute() const;
+ 
+       inline int Width() const;
+       inline int Height() const;
+ 
+       inline int getId() const;
+       inline PG_PopupMenu *getSubMenu() const;
+ 
+       inline const std::string& getCaption() const;
+ 
+       inline operator PG_Point const&() const;
+ 
+       PG_SignalMenuItemSelected sigMenuItemSelect;
+       
+       PG_Pointer* data;
+       
+ private: // methods
+       void initItem();
+       bool renderSurface(SDL_Surface *canvas, SDL_Surface **text, SDL_Color 
*tcol, SDL_Color *scol = 0);
+       bool isValidRect();
+ 
+ protected: // data
+       unsigned      myFlags;
+       std::string   myCaption;
+       PG_PopupMenu *myParent;
+ 
+       PG_PopupMenu *mySubMenu;
+       int           myId;
+ 
+       SDL_Surface  *sNormal;
+       SDL_Surface  *sSelected;
+       SDL_Surface  *sDisabled;
+ 
+       bool          selected;
+ 
+ private: // data
+       bool          needRecalc;
+       SDL_Rect      blitRect;
+       PG_Point      myPoint;
+ };
  
  /**
***************
*** 72,171 ****
  public:
        
-       /**
-        * @author Marek Habersack
-        *
-        * @short A menu item data structure
-        *
-        * Even though implemented as a class, MenuItem is not intended to be a 
new
-        * kind of widget - therefore it is derived only from PG_Rect for
-        * convenience. The idea is to have a "smart" data type (or a dumb 
class,
-        * if you prefer) that knows how to perform simple and specific actions 
on
-        * itself. The intention is to provide PG_PopupMenu with a fast 
mechanism
-        * for processing menu items - if MenuItem was derived from any of 
ParaGUI
-        * classes it would incurr unnecessary processing overhead.
-        *
-        * @todo better separator code
-        * @todo icon drawing
-        */
- #ifndef SWIG
-       class MenuItem : public PG_Rect, public PG_MessageObject {
-       public: // types
-               enum MI_FLAGS {
-                       MIF_NONE = 0,
-                       MIF_DISABLED = 0x01,
-                       MIF_SEPARATOR = 0x02,
-                       MIF_SUBMENU = 0x04
-               };
-       
-       public: // methods
-               MenuItem(PG_PopupMenu *parent,
-                                char *caption,
-                                int id,
-                                MI_FLAGS flags);
-               MenuItem(PG_PopupMenu *parent,
-                                char *caption,
-                                PG_PopupMenu *submenu);
-               ~MenuItem();
-       
-               bool measureItem(PG_Rect* rect,  bool full = false);
-               bool isPointInside(int x, int y);
-               inline void moveTo(int x, int y);
-       
-               inline SDL_Surface* getNormal() const;
-               inline SDL_Surface* getDisabled() const;
-               inline SDL_Surface* getSelected() const;
-       
-               bool paintNormal(SDL_Surface *canvas, SDL_Color *tcol, 
SDL_Color *scol = 0);
-               bool paintDisabled(SDL_Surface *canvas, SDL_Color *tcol, 
SDL_Color *scol = 0);
-               bool paintSelected(SDL_Surface *canvas, SDL_Color *tcol, 
SDL_Color *scol = 0);
-       
-               inline void disable();
-               inline void enable();
-               inline bool isDisabled() const;
-               inline bool isEnabled() const;
-               inline void select();
-               inline void unselect();
-               inline bool isSelected() const;
-               inline bool isSeparator() const;
-               inline bool isSubMenu() const;
-               inline bool isMute() const;
-       
-               inline int Width() const;
-               inline int Height() const;
-       
-               inline int getId() const;
-               inline PG_PopupMenu *getSubMenu() const;
-       
-               inline const std::string& getCaption() const;
-       
-               inline operator PG_Point const&() const;
-       
-       private: // methods
-               void initItem();
-               bool renderSurface(SDL_Surface *canvas, SDL_Surface **text, 
SDL_Color *tcol, SDL_Color *scol = 0);
-               bool isValidRect();
-       
-       protected: // data
-               unsigned      myFlags;
-               std::string   myCaption;
-               PG_PopupMenu *myParent;
-       
-               PG_PopupMenu *mySubMenu;
-               int           myId;
-       
-               SDL_Surface  *sNormal;
-               SDL_Surface  *sSelected;
-               SDL_Surface  *sDisabled;
-       
-               bool          selected;
-       
-       private: // data
-               bool          needRecalc;
-               SDL_Rect      blitRect;
-               PG_Point      myPoint;
-       };
  
  #ifndef DOXYGEN_SKIP
! class item_with_id : public std::unary_function<MenuItem*, bool> {
        int id;
  
--- 176,182 ----
  public:
        
  
  #ifndef DOXYGEN_SKIP
! class item_with_id : public std::unary_function<PG_MenuItem*, bool> {
        int id;
  
***************
*** 174,183 ****
                        : id(i) {}
  
!       bool operator() (const MenuItem* const mi) const {
                return mi->getId() == id;
        }
  };
  #endif // DOXYGEN_SKIP
- #endif // SWIG
  
  public: // methods
--- 185,193 ----
                        : id(i) {}
  
!       bool operator() (const PG_MenuItem* const mi) const {
                return mi->getId() == id;
        }
  };
  #endif // DOXYGEN_SKIP
  
  public: // methods
***************
*** 212,243 ****
        PG_PopupMenu& addMenuItem(char *caption,
                                  int ID,
!                                                         MSG_CALLBACK handler 
= 0,
!                                 void *data = 0,
!                                 MenuItem::MI_FLAGS flags = 
MenuItem::MIF_NONE);
  
-       /**
-        * Adds a menu item whose handler (if any) is set to be a member
-        * method of some object.
-        *
-        * @param caption   the item caption
-        * @param ID        the item identifier
-        * @param handler   function to handle the menu item click
-        * @param obj       object the 'handler' function lives in.
-        * @param data      application-specific data associated with the menu
-        *                  item action.
-        * @param flags     menu item flags
-        *
-        * @note @code obj @endcode cannot be 0 if @code handler @endcode is 
present
-        */
        PG_PopupMenu& addMenuItem(char *caption,
                                  int ID,
!                                                         MSG_CALLBACK_OBJ 
handler,
!                                 PG_EventObject *obj,
!                                 void *data = 0,
!                                 MenuItem::MI_FLAGS flags = 
MenuItem::MIF_NONE);
  
        PG_PopupMenu& addMenuItem(char *caption,
                                  PG_PopupMenu *sub,
!                                 MenuItem::MI_FLAGS flags = 
MenuItem::MIF_SUBMENU);
  #endif // SWIG
  
--- 222,236 ----
        PG_PopupMenu& addMenuItem(char *caption,
                                  int ID,
!                                                         PG_MenuItemSlot slot,
!                                 PG_Pointer* data = NULL,
!                                 PG_MenuItem::MI_FLAGS flags = 
PG_MenuItem::MIF_NONE);
  
        PG_PopupMenu& addMenuItem(char *caption,
                                  int ID,
!                                 PG_MenuItem::MI_FLAGS flags = 
PG_MenuItem::MIF_NONE);
  
        PG_PopupMenu& addMenuItem(char *caption,
                                  PG_PopupMenu *sub,
!                                 PG_MenuItem::MI_FLAGS flags = 
PG_MenuItem::MIF_SUBMENU);
  #endif // SWIG
  
***************
*** 267,274 ****
        void trackMenu(int x = -1, int y = -1);
  
  protected: // methods
  
  #ifndef SWIG
!       typedef std::list<MenuItem*>::iterator MII;
  #endif // SWIG
  
--- 260,269 ----
        void trackMenu(int x = -1, int y = -1);
  
+       PG_SignalMenuItemSelected sigMenuItemSelect;
+ 
  protected: // methods
  
  #ifndef SWIG
!       typedef std::list<PG_MenuItem*>::iterator MII;
  #endif // SWIG
  
***************
*** 300,311 ****
  private: // methods
  #ifndef SWIG
!       bool selectItem(MenuItem *item, MII iter);
        bool handleMotion(PG_Point const&);
!       void appendItem(MenuItem *item);
  #endif //SWIG
  
  protected: // data
  #ifndef SWIG
!       std::list<MenuItem*>  items; /** the menu items collection */
        std::string           myCaption; /** menu caption */
  #endif //SWIG
--- 295,306 ----
  private: // methods
  #ifndef SWIG
!       bool selectItem(PG_MenuItem *item, MII iter);
        bool handleMotion(PG_Point const&);
!       void appendItem(PG_MenuItem *item);
  #endif //SWIG
  
  protected: // data
  #ifndef SWIG
!       std::list<PG_MenuItem*>  items; /** the menu items collection */
        std::string           myCaption; /** menu caption */
  #endif //SWIG
***************
*** 334,338 ****
        int                   itemHeight;
        int                   lastH;
!       MenuItem             *selected;
  
        bool                  tracking;
--- 329,333 ----
        int                   itemHeight;
        int                   lastH;
!       PG_MenuItem             *selected;
  
        bool                  tracking;
***************
*** 346,350 ****
        PG_PopupMenu         *activeSub;
        PG_PopupMenu         *myMaster;
!       MenuItem             *subParent;
  };
  
--- 341,345 ----
        PG_PopupMenu         *activeSub;
        PG_PopupMenu         *myMaster;
!       PG_MenuItem             *subParent;
  };
  
***************
*** 354,436 ****
  }
  
! inline void PG_PopupMenu::MenuItem::moveTo(int _x, int _y) {
        myPoint.x = x = _x;
        myPoint.y = y = _y;
  };
  
! inline SDL_Surface* PG_PopupMenu::MenuItem::getNormal() const {
        return sNormal;
  }
  
! inline SDL_Surface* PG_PopupMenu::MenuItem::getDisabled() const {
        return sDisabled;
  }
  
! inline SDL_Surface* PG_PopupMenu::MenuItem::getSelected() const {
        return sSelected;
  }
  
! inline void PG_PopupMenu::MenuItem::disable() {
        myFlags |= MIF_DISABLED;
  }
  
! inline void PG_PopupMenu::MenuItem::enable() {
        myFlags &= ~MIF_DISABLED;
  }
  
! inline bool PG_PopupMenu::MenuItem::isDisabled() const {
        return (myFlags & MIF_DISABLED);
  }
  
! inline bool PG_PopupMenu::MenuItem::isEnabled() const {
        return !(myFlags & MIF_DISABLED);
  }
  
! inline void PG_PopupMenu::MenuItem::select() {
        selected = true;
  }
  
! inline void PG_PopupMenu::MenuItem::unselect() {
        selected = false;
  }
  
! inline bool PG_PopupMenu::MenuItem::isSelected() const {
        return selected;
  }
  
! inline bool PG_PopupMenu::MenuItem::isSeparator() const {
        return (myFlags & MIF_SEPARATOR);
  }
  
! inline bool PG_PopupMenu::MenuItem::isSubMenu() const {
        return (myFlags & MIF_SUBMENU);
  }
  
! inline bool PG_PopupMenu::MenuItem::isMute() const {
        return ((myFlags & MIF_DISABLED) ||
                (myFlags & MIF_SEPARATOR));
  }
  
! inline int PG_PopupMenu::MenuItem::Width() const {
        return w;
  }
  
! inline int PG_PopupMenu::MenuItem::Height() const {
        return h;
  }
  
! inline int PG_PopupMenu::MenuItem::getId() const {
        return myId;
  }
  
! inline PG_PopupMenu *PG_PopupMenu::MenuItem::getSubMenu() const {
        return mySubMenu;
  }
  
! inline const std::string& PG_PopupMenu::MenuItem::getCaption() const {
        return myCaption;
  }
  
! inline PG_PopupMenu::MenuItem::operator PG_Point const&() const {
        return myPoint;
  }
--- 349,431 ----
  }
  
! inline void PG_MenuItem::moveTo(int _x, int _y) {
        myPoint.x = x = _x;
        myPoint.y = y = _y;
  };
  
! inline SDL_Surface* PG_MenuItem::getNormal() const {
        return sNormal;
  }
  
! inline SDL_Surface* PG_MenuItem::getDisabled() const {
        return sDisabled;
  }
  
! inline SDL_Surface* PG_MenuItem::getSelected() const {
        return sSelected;
  }
  
! inline void PG_MenuItem::disable() {
        myFlags |= MIF_DISABLED;
  }
  
! inline void PG_MenuItem::enable() {
        myFlags &= ~MIF_DISABLED;
  }
  
! inline bool PG_MenuItem::isDisabled() const {
        return (myFlags & MIF_DISABLED);
  }
  
! inline bool PG_MenuItem::isEnabled() const {
        return !(myFlags & MIF_DISABLED);
  }
  
! inline void PG_MenuItem::select() {
        selected = true;
  }
  
! inline void PG_MenuItem::unselect() {
        selected = false;
  }
  
! inline bool PG_MenuItem::isSelected() const {
        return selected;
  }
  
! inline bool PG_MenuItem::isSeparator() const {
        return (myFlags & MIF_SEPARATOR);
  }
  
! inline bool PG_MenuItem::isSubMenu() const {
        return (myFlags & MIF_SUBMENU);
  }
  
! inline bool PG_MenuItem::isMute() const {
        return ((myFlags & MIF_DISABLED) ||
                (myFlags & MIF_SEPARATOR));
  }
  
! inline int PG_MenuItem::Width() const {
        return w;
  }
  
! inline int PG_MenuItem::Height() const {
        return h;
  }
  
! inline int PG_MenuItem::getId() const {
        return myId;
  }
  
! inline PG_PopupMenu *PG_MenuItem::getSubMenu() const {
        return mySubMenu;
  }
  
! inline const std::string& PG_MenuItem::getCaption() const {
        return myCaption;
  }
  
! inline PG_MenuItem::operator PG_Point const&() const {
        return myPoint;
  }

Index: pgradiobutton.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pgradiobutton.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgradiobutton.h     15 Apr 2002 13:35:35 -0000      1.3
--- pgradiobutton.h     27 Apr 2002 11:57:22 -0000      1.4
***************
*** 74,82 ****
        void SetPressed();
  
- //#ifndef SWIG
-       /** Sets formated text (like printf)*/
- //    void SetTextFormat(const char* text, ...);
- //#endif
- 
        /** */
        void SetText(const char* text);
--- 74,77 ----
***************
*** 85,88 ****
--- 80,85 ----
        const char* GetText();
  
+       PG_SignalRadioButtonClick sigButtonClick;
+       
  protected:
  
***************
*** 103,107 ****
  
        /** */
!       bool eventButtonClick(int id, PG_Widget* widget);
  
        PG_RadioButton* my_groupFirst;
--- 100,104 ----
  
        /** */
!       virtual bool handleButtonClick(PG_Button* widget, PG_Pointer* data);
  
        PG_RadioButton* my_groupFirst;

Index: pgscrollbar.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pgscrollbar.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgscrollbar.h       15 Apr 2002 13:35:35 -0000      1.3
--- pgscrollbar.h       27 Apr 2002 11:57:22 -0000      1.4
***************
*** 126,129 ****
--- 126,132 ----
        void SetPageSize(int ps);
  
+       PG_SignalScrollPos sigScrollPos;
+       PG_SignalScrollTrack sigScrollTrack;
+       
  protected:
  
***************
*** 138,142 ****
  
        /**  */
!       bool eventButtonClick(int id, PG_Widget* widget);
  
        /**  */
--- 141,145 ----
  
        /**  */
!       virtual bool handleButtonClick(PG_Button* button, PG_Pointer* data);
  
        /**  */

Index: pgslider.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pgslider.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgslider.h  15 Apr 2002 13:35:35 -0000      1.3
--- pgslider.h  27 Apr 2002 11:57:22 -0000      1.4
***************
*** 53,58 ****
--- 53,62 ----
        void LoadThemeStyle(const char* widgettype);
  
+       PG_SignalSlide sigSlide;
+       
  protected:
  
+       virtual bool handleTrack(PG_ScrollBar* from, long pos);
+       
        /** */
        bool eventMouseButtonUp(const SDL_MouseButtonEvent* button);

Index: pgspinnerbox.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pgspinnerbox.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgspinnerbox.h      15 Apr 2002 13:35:35 -0000      1.3
--- pgspinnerbox.h      27 Apr 2002 11:57:22 -0000      1.4
***************
*** 41,45 ****
  #include "pgbutton.h"
  #include "pgthemewidget.h"
- #include "pgeventobject.h"
  
  /**
--- 41,44 ----
***************
*** 62,66 ****
   */
  
! class DECLSPEC PG_SpinnerBox : public PG_ThemeWidget, public PG_EventObject {
  public:
  
--- 61,65 ----
   */
  
! class DECLSPEC PG_SpinnerBox : public PG_ThemeWidget {
  public:
  
***************
*** 102,109 ****
        }
  
  protected:
  
!       bool eventButtonClick(int id, PG_Widget *widget);
!       PARAGUI_CALLBACK(handle_editend);
  
  private:
--- 101,110 ----
        }
  
+       PG_SignalSpinnerChange sigSpinnerChange;
+       
  protected:
  
!       virtual bool handleButtonClick(PG_Button* widget, PG_Pointer* data);
!       virtual bool handleEditEnd(PG_LineEdit* edit);
  
  private:

Index: pgwidget.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pgwidget.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgwidget.h  15 Apr 2002 13:35:35 -0000      1.3
--- pgwidget.h  27 Apr 2002 11:57:22 -0000      1.4
***************
*** 835,854 ****
  protected:
  
-       /**
-               main eventhandler for messages
-               @param msg pointer to a MSG_MESSAGE structure
-               @return this eventhandler should return "true" if the message 
was proccessed.
-               This messagehandler can be overridden to perform custom 
operations.
-       */      
-       bool eventMessage(MSG_MESSAGE* msg);
- 
-       /**  */
-       virtual bool eventButtonClick(int id, PG_Widget* widget);
- 
        /**  */
!       virtual bool eventScrollPos(int id, PG_Widget* widget, unsigned long 
data);
  
        /**  */
!       virtual bool eventScrollTrack(int id, PG_Widget* widget, unsigned long 
data);
  
        /**
--- 835,843 ----
  protected:
  
        /**  */
!       //virtual bool eventScrollPos(int id, PG_Widget* widget, unsigned long 
data);
  
        /**  */
!       //virtual bool eventScrollTrack(int id, PG_Widget* widget, unsigned 
long data);
  
        /**

Index: pgwidgetlist.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pgwidgetlist.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgwidgetlist.h      15 Apr 2002 13:35:35 -0000      1.3
--- pgwidgetlist.h      27 Apr 2002 11:57:22 -0000      1.4
***************
*** 165,172 ****
  
        /**  */
!       bool eventScrollPos(int id, PG_Widget* widget, unsigned long data);
  
        /**  */
!       bool eventScrollTrack(int id, PG_Widget* widget, unsigned long data);
  
        /**  */
--- 165,172 ----
  
        /**  */
!       virtual bool handleScrollPos(PG_ScrollBar* widget, long pos);
  
        /**  */
!       virtual bool handleScrollTrack(PG_ScrollBar* widget, long pos);
  
        /**  */

Index: pgwindow.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pgwindow.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgwindow.h  15 Apr 2002 13:35:35 -0000      1.3
--- pgwindow.h  27 Apr 2002 11:57:22 -0000      1.4
***************
*** 78,81 ****
--- 78,87 ----
        void SetColorTitlebar(const SDL_Color& c);
  
+       PG_SignalWindowClose sigWindowClose;
+ 
+       PG_SignalWindowMinimize sigWindowMinimize;
+ 
+       PG_SignalWindowRestore sigWindowRestore;
+ 
  protected:
  
***************
*** 90,94 ****
  
        /** */
!       bool eventButtonClick(int id, PG_Widget* widget);
  
        /** */
--- 96,100 ----
  
        /** */
!       virtual bool handleButtonClick(PG_Button* widget, PG_Pointer* data);
  
        /** */

--- pgeventobject.h DELETED ---

--- pgnotebook.h DELETED ---




reply via email to

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