paragui-cvs
[Top][All Lists]
Advanced

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

[paragui-cvs] CVS: paragui/include pgapplication.h,1.9,1.10 pgmessageobj


From: Alexander Pipelka <address@hidden>
Subject: [paragui-cvs] CVS: paragui/include pgapplication.h,1.9,1.10 pgmessageobject.h,1.9,1.10 pgsignals.h,1.4,1.5 pgwidget.h,1.11,1.12
Date: Mon, 06 May 2002 02:24:31 -0400

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

Modified Files:
        pgapplication.h pgmessageobject.h pgsignals.h pgwidget.h 
Log Message:
started signal redesign (not finished).
may fail to compile



Index: pgapplication.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pgapplication.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** pgapplication.h     30 Apr 2002 14:51:13 -0000      1.9
--- pgapplication.h     6 May 2002 06:24:29 -0000       1.10
***************
*** 459,463 ****
        */
  
!       static bool PumpIntoEventQueue(const SDL_Event* event);
  
        static bool RegisterObject(PG_MessageObject* obj);
--- 459,463 ----
        */
  
!       bool PumpIntoEventQueue(const SDL_Event* event);
  
        static bool RegisterObject(PG_MessageObject* obj);
***************
*** 472,475 ****
--- 472,518 ----
  protected:
  
+       /**
+       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);
+ 
+       /**
+       Overridable Eventhandler for a SDL_SysWMEvent message.
+       The default implementation returns 'false' which indicates that this 
message is not processed by this object.
+ 
+       @param syswm SDL_SysWMEvent 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 eventSysWM(const SDL_SysWMEvent* syswm);
+ 
+       /**
+       Overridable Eventhandler for the SDL_ActiveEvent message.
+       The default implementation returns 'false' which indicates that this 
message is not processed by this object.
+ 
+       @param active SDL_ActiveEvent 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 eventActive(const SDL_ActiveEvent* active);
+ 
+       /**
+       Overridable Eventhandler for a SDL_QuitEvent message.
+       The default implementation returns 'false' which indicates that this 
message is not processed by this object.
+ 
+       @param id               id of the sending widget
+       @param widget   pointer to the widget
+       @param data     event specific data
+ 
+       @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 eventQuit(const SDL_QuitEvent* quit);
+ 
+ 
        /** */
        static SDL_Event WaitEvent(Uint32 delay=0);
***************
*** 490,499 ****
        /**  */
        bool eventKeyDown(const SDL_KeyboardEvent* key);
- 
-       /**  */
-       bool eventQuit(int id, PG_MessageObject* widget, unsigned long data);
- 
-       /**  */
-       bool eventResize(const SDL_ResizeEvent* event);
  
        /**  */
--- 533,536 ----

Index: pgmessageobject.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pgmessageobject.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** pgmessageobject.h   30 Apr 2002 14:07:19 -0000      1.9
--- pgmessageobject.h   6 May 2002 06:24:29 -0000       1.10
***************
*** 119,132 ****
  
        /**
-       Overridable Eventhandler for the SDL_ActiveEvent message.
-       The default implementation returns 'false' which indicates that this 
message is not processed by this object.
- 
-       @param active SDL_ActiveEvent 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 eventActive(const SDL_ActiveEvent* active);
- 
-       /**
        Overridable Eventhandler for a SDL_KeyboardEvent message.
        This handler is called when a key changed it's state from unpressed to 
pressed.
--- 119,122 ----
***************
*** 182,217 ****
        */
        virtual bool eventMouseButtonUp(const SDL_MouseButtonEvent* button);
- 
-       /**
-       Overridable Eventhandler for a SDL_QuitEvent message.
-       The default implementation returns 'false' which indicates that this 
message is not processed by this object.
- 
-       @param id               id of the sending widget
-       @param widget   pointer to the widget
-       @param data     event specific data
- 
-       @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 eventQuit(int id, PG_MessageObject* widget, unsigned long 
data);
- 
-       /**
-       Overridable Eventhandler for a SDL_SysWMEvent message.
-       The default implementation returns 'false' which indicates that this 
message is not processed by this object.
- 
-       @param syswm SDL_SysWMEvent 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 eventSysWM(const SDL_SysWMEvent* syswm);
- 
-       /**
-       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);
  
        /** */
--- 172,175 ----

Index: pgsignals.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pgsignals.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** pgsignals.h 2 May 2002 09:50:38 -0000       1.4
--- pgsignals.h 6 May 2002 06:24:29 -0000       1.5
***************
*** 32,35 ****
--- 32,37 ----
  #include "SDL.h"
  #include <sigc++/signal_system.h>
+ #include <sigc++/convert.h>
+ #include <sigc++/bind.h>
  #include <iostream>
  #include <map>
***************
*** 55,148 ****
  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) {
!               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) {
!               return Signal0<bool>::connect(s);
!       };
! 
  
- private:
-       PG_Pointer* data;
  };
  
--- 57,100 ----
  typedef void PG_Pointer;
  
  
! class PG_Signal0 : public Signal0<bool> {
  public:
  
!       Connection connect(const Slot1<bool, PG_Pointer*>& s, PG_Pointer* data) 
{
!               return Signal0<bool>::connect(bind(s, data));
        };
  
  };
  
! 
! template<class P1> class PG_Signal1 : public Signal1<bool, P1>
  {
  
!       static bool sig_convert_widget(Callback1<bool, PG_Widget*> *s, P1 p1) {
!               return s->call(p1);
        }
  
!       static bool sig_convert0(Callback0<bool> *s, P1 p1) {
!               return s->call();
!       }
  
! public:
        
!       static Slot1<bool, P1> convert_slot(const Slot1<bool, PG_Widget*> &s) {
!               return convert(s, sig_convert_widget);
!       }
  
!       Connection connect(const Slot2<bool, P1, PG_Pointer*>& s, PG_Pointer* 
data) {
!               return Signal1<bool, P1>::connect(bind(s, data));
        };
  
!       Connection connect(const Slot1<bool, P1>& s) {
                return Signal1<bool, P1>::connect(s);
        }
  
!       Connection connect(const Slot0<bool>& s) {
!               return Signal1<bool, P1>::connect(convert(s, sig_convert0));
!       }
  
  };
  
***************
*** 155,161 ****
  
  public Signal2<bool, P1, PG_Pointer*>,
! public Signal1<bool, PG_Pointer*>,
! public Signal1<bool, P1>,
! public Signal0<bool>
  {
  public:
--- 107,111 ----
  
  public Signal2<bool, P1, PG_Pointer*>,
! public Signal1<bool, P1>
  {
  public:
***************
*** 170,176 ****
  
                        Signal2<bool, P1, PG_Pointer*>::emit(p1, data) |
!                       Signal1<bool, PG_Pointer*>::emit(data) |
!                       Signal1<bool, P1>::emit(p1) |
!                       Signal0<bool>::emit();
        }
  
--- 120,124 ----
  
                        Signal2<bool, P1, PG_Pointer*>::emit(p1, data) |
!                       Signal1<bool, P1>::emit(p1);
        }
  
***************
*** 182,188 ****
  
                        Signal2<bool, P1, PG_Pointer*>::emit(p1, data) |
!                       Signal1<bool, PG_Pointer*>::emit(data) |
!                       Signal1<bool, P1>::emit(p1) |
!                       Signal0<bool>::emit();
        }
        
--- 130,134 ----
  
                        Signal2<bool, P1, PG_Pointer*>::emit(p1, data) |
!                       Signal1<bool, P1>::emit(p1);
        }
        
***************
*** 190,196 ****
                return
                        Signal2<bool, P1, PG_Pointer*>::emit(p1, data) |
!                       Signal1<bool, PG_Pointer*>::emit(data) |
!                       Signal1<bool, P1>::emit(p1) |
!                       Signal0<bool>::emit();
        }
  
--- 136,140 ----
                return
                        Signal2<bool, P1, PG_Pointer*>::emit(p1, data) |
!                       Signal1<bool, P1>::emit(p1);
        }
  
***************
*** 198,218 ****
                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;
--- 142,148 ----
                return
                        Signal2<bool, P1, PG_Pointer*>::emit(p1, data) |
!                       Signal1<bool, P1>::emit(p1);
        }
        
        virtual Connection connect(const Slot3<bool, P1, P2, PG_Pointer*>& s, 
PG_Pointer* _data) {
                data = _data;
***************
*** 233,249 ****
        };
  
-       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) {
-               return Signal0<bool>::connect(s);
-       };
- 
  
  private:
--- 163,169 ----

Index: pgwidget.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pgwidget.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** pgwidget.h  2 May 2002 09:50:38 -0000       1.11
--- pgwidget.h  6 May 2002 06:24:29 -0000       1.12
***************
*** 695,699 ****
        Quit modal mode
        */
!       bool QuitModal();
  
        /**
--- 695,699 ----
        Quit modal mode
        */
!       bool QuitModal(PG_Widget* sender = NULL);
  
        /**




reply via email to

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