// -*- c++ -*-
/* This is a generated file, do not edit.  Generated from gtk--sigcpp.h.m4 */
#ifndef GTKMM_SIGCPP
#define GTKMM_SIGCPP
#include <gtk--sigcommon.h>
























    
    








/*************************************************************/
/* Tero's signal implementation starts from here.            */
/* This makes some additions to Phil's slot stuffs           */
/* Now it is possible for a C++ programmer to create signals */
/*************************************************************/

/*signals_impl*/


/*cm_signal_impl*/


/*cf_signal_impl*/


/*cs_signal_impl*/





/********************************************************************
*****  Signals with 0 Arguments 
********************************************************************/
 
  class Abstractslot0 : public Connection_impl 
    { 
     public: 
       virtual void call()=0; 
    }; 


  class Signal0 
    { 
       ConnImpl_List connectionlist; 
     public: 
       Connection_impl *begin() { return connectionlist.begin(); }
       Connection_impl *end() { return connectionlist.end(); }
       void insert_connection(Connection_impl *slot) 
         { 
          connectionlist.insert(slot); 
         } 
       void operator()() 
         { 
          Connection_impl *c=connectionlist.begin(); 
          Connection_impl *tmp;
          while(c!=connectionlist.end()) 
            { 
             tmp=c->next;
             ((Abstractslot0 *)c)->call(); 
             c=tmp; 
            } 
          
         } 
    }; 


/**** connect_to_method   ****/
template<class T>
  class Concretecppslot0 : public Abstractslot0 
  {
   private:
     T* obj;
     void (T::*method)();
     
   public:
     Concretecppslot0(T* receiver, void (T::*met)()  )
       : obj(receiver), method(met)  {}
     void call() 
       {  (obj->*method)(); 
       }
   };

template<class T,class T1>
  Connection connect_to_method(
    Signal0 &signal,
    T* receiver,void (T1::*method)() )
  {
   Connection_impl *slot=
     new Concretecppslot0<T>(receiver,method );
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_method with data  ****/
template<class T,class E>
  class Concretecppslot0cb : public Abstractslot0 
  {
   private:
     T* obj;
     void (T::*method)(E);
     E cbdata;
   public:
     Concretecppslot0cb(T* receiver, void (T::*met)(E) ,E cbd )
       : obj(receiver), method(met) ,cbdata(cbd) {}
     void call() 
       {  (obj->*method)(cbdata); 
       }
   };

template<class T,class T1,class E>
  Connection connect_to_method(
    Signal0 &signal,
    T* receiver,void (T1::*method)(E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretecppslot0cb<T,E>(receiver,method ,cbd);
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function   ****/
template<class M>
class Concretegtkslot0 : public Abstractslot0 
  {
   private:
     M func;
     
   public:
     Concretegtkslot0(M func_ )
       : func(func_)  {}
     void call()
       {  func(); }
     static void callback(GtkWidget * ,
       Concretegtkslot0<M>* s)
       {  s->call(); }
  };


inline Connection connect_to_function(
    Signal0  &signal,
    void (*func)() )
  {
   Connection_impl *slot=
     new Concretegtkslot0<void (*)()>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function with data  ****/
template<class M,class E>
class Concretegtkslot0cb : public Abstractslot0 
  {
   private:
     M func;
     E cbdata;
   public:
     Concretegtkslot0cb(M func_ ,E cbd)
       : func(func_) ,cbdata(cbd) {}
     void call()
       {  func(cbdata); }
     static void callback(GtkWidget * ,
       Concretegtkslot0cb<M,E>* s)
       {  s->call(); }
  };

template<class E>
inline Connection connect_to_function(
    Signal0  &signal,
    void (*func)(E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretegtkslot0cb<void (*)(E),E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal   ****/
template<class M>
  Connection connect_to_signal(
    Signal0  &signal,
    M& func  )
  {
   Connection_impl *slot=
     new Concretegtkslot0<M&>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal with data  ****/
template<class M,class E>
  Connection connect_to_signal(
    Signal0  &signal,
    M& func ,E cbd )
  {
   Connection_impl *slot=
     new Concretegtkslot0cb<M&,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }



/********************************************************************
*****  Signals with 0 Arguments with return type
********************************************************************/
template<class rettype> 
  class Abstractslot0_r : public Connection_impl 
    { 
     public: 
       virtual rettype call()=0; 
    }; 

template<class rettype>
  class Signal0_r 
    { 
       ConnImpl_List connectionlist; 
     public: 
       Connection_impl *begin() { return connectionlist.begin(); }
       Connection_impl *end() { return connectionlist.end(); }
       void insert_connection(Connection_impl *slot) 
         { 
          connectionlist.insert(slot); 
         } 
       rettype operator()() 
         {rettype rval; 
          Connection_impl *c=connectionlist.begin(); 
          Connection_impl *tmp;
          while(c!=connectionlist.end()) 
            { 
             tmp=c->next;
             rval=((Abstractslot0_r <rettype>*)c)->call(); 
             c=tmp; 
            } 
          return rval;
         } 
    }; 


/**** connect_to_method  wigh return ****/
template<class rettype,class T>
  class Concretecppslot0_r : public Abstractslot0_r <rettype>
  {
   private:
     T* obj;
     rettype (T::*method)();
     
   public:
     Concretecppslot0_r(T* receiver, rettype (T::*met)()  )
       : obj(receiver), method(met)  {}
     rettype call() 
       { return (obj->*method)(); 
       }
   };

template<class rettype,class T,class T1>
  Connection connect_to_method(
    Signal0_r<rettype> &signal,
    T* receiver,rettype (T1::*method)() )
  {
   Connection_impl *slot=
     new Concretecppslot0_r<rettype,T>(receiver,method );
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_method with data wigh return ****/
template<class rettype,class T,class E>
  class Concretecppslot0cb_r : public Abstractslot0_r <rettype>
  {
   private:
     T* obj;
     rettype (T::*method)(E);
     E cbdata;
   public:
     Concretecppslot0cb_r(T* receiver, rettype (T::*met)(E) ,E cbd )
       : obj(receiver), method(met) ,cbdata(cbd) {}
     rettype call() 
       { return (obj->*method)(cbdata); 
       }
   };

template<class rettype,class T,class T1,class E>
  Connection connect_to_method(
    Signal0_r<rettype> &signal,
    T* receiver,rettype (T1::*method)(E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretecppslot0cb_r<rettype,T,E>(receiver,method ,cbd);
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function  with return ****/
template<class rettype,class M>
class Concretegtkslot0_r : public Abstractslot0_r <rettype>
  {
   private:
     M func;
     
   public:
     Concretegtkslot0_r(M func_ )
       : func(func_)  {}
     rettype call()
       { return func(); }
     static rettype callback(GtkWidget * ,
       Concretegtkslot0_r<rettype,M>* s)
       { return GTKMM_PROXY_RV_HACK s->call(); }
  };

template<class rettype>
inline Connection connect_to_function(
    Signal0_r <rettype> &signal,
    rettype (*func)() )
  {
   Connection_impl *slot=
     new Concretegtkslot0_r<rettype,rettype (*)()>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function with data with return ****/
template<class rettype,class M,class E>
class Concretegtkslot0cb_r : public Abstractslot0_r <rettype>
  {
   private:
     M func;
     E cbdata;
   public:
     Concretegtkslot0cb_r(M func_ ,E cbd)
       : func(func_) ,cbdata(cbd) {}
     rettype call()
       { return func(cbdata); }
     static rettype callback(GtkWidget * ,
       Concretegtkslot0cb_r<rettype,M,E>* s)
       { return GTKMM_PROXY_RV_HACK s->call(); }
  };

template<class rettype,class E>
inline Connection connect_to_function(
    Signal0_r <rettype> &signal,
    rettype (*func)(E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretegtkslot0cb_r<rettype,rettype (*)(E),E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal  with return ****/
template<class rettype,class M>
  Connection connect_to_signal(
    Signal0_r <rettype> &signal,
    M& func  )
  {
   Connection_impl *slot=
     new Concretegtkslot0_r<rettype,M&>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal with data with return ****/
template<class rettype,class M,class E>
  Connection connect_to_signal(
    Signal0_r <rettype> &signal,
    M& func ,E cbd )
  {
   Connection_impl *slot=
     new Concretegtkslot0cb_r<rettype,M&,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }





/********************************************************************
*****  Signals with 1 Arguments 
********************************************************************/
template<class P1> 
  class Abstractslot1 : public Connection_impl 
    { 
     public: 
       virtual void call(P1 p1)=0; 
    }; 

template<class P1>
  class Signal1 
    { 
       ConnImpl_List connectionlist; 
     public: 
       Connection_impl *begin() { return connectionlist.begin(); }
       Connection_impl *end() { return connectionlist.end(); }
       void insert_connection(Connection_impl *slot) 
         { 
          connectionlist.insert(slot); 
         } 
       void operator()(P1 p1) 
         { 
          Connection_impl *c=connectionlist.begin(); 
          Connection_impl *tmp;
          while(c!=connectionlist.end()) 
            { 
             tmp=c->next;
             ((Abstractslot1 <P1>*)c)->call(p1); 
             c=tmp; 
            } 
          
         } 
    }; 


/**** connect_to_method   ****/
template<class T,class P1>
  class Concretecppslot1 : public Abstractslot1 <P1>
  {
   private:
     T* obj;
     void (T::*method)(P1);
     
   public:
     Concretecppslot1(T* receiver, void (T::*met)(P1)  )
       : obj(receiver), method(met)  {}
     void call(P1 p1) 
       {  (obj->*method)(p1); 
       }
   };

template<class T,class T1,class P1>
  Connection connect_to_method(
    Signal1<P1> &signal,
    T* receiver,void (T1::*method)(P1) )
  {
   Connection_impl *slot=
     new Concretecppslot1<T,P1>(receiver,method );
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_method with data  ****/
template<class T,class P1,class E>
  class Concretecppslot1cb : public Abstractslot1 <P1>
  {
   private:
     T* obj;
     void (T::*method)(P1,E);
     E cbdata;
   public:
     Concretecppslot1cb(T* receiver, void (T::*met)(P1,E) ,E cbd )
       : obj(receiver), method(met) ,cbdata(cbd) {}
     void call(P1 p1) 
       {  (obj->*method)(p1,cbdata); 
       }
   };

template<class T,class T1,class P1,class E>
  Connection connect_to_method(
    Signal1<P1> &signal,
    T* receiver,void (T1::*method)(P1,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretecppslot1cb<T,P1,E>(receiver,method ,cbd);
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function   ****/
template<class M,class P1>
class Concretegtkslot1 : public Abstractslot1 <P1>
  {
   private:
     M func;
     
   public:
     Concretegtkslot1(M func_ )
       : func(func_)  {}
     void call(P1 p1)
       {  func(p1); }
     static void callback(GtkWidget * ,P1 p1,
       Concretegtkslot1<M,P1>* s)
       {  s->call(p1); }
  };

template<class P1>
inline Connection connect_to_function(
    Signal1 <P1> &signal,
    void (*func)(P1) )
  {
   Connection_impl *slot=
     new Concretegtkslot1<void (*)(P1),P1>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function with data  ****/
template<class M,class P1,class E>
class Concretegtkslot1cb : public Abstractslot1 <P1>
  {
   private:
     M func;
     E cbdata;
   public:
     Concretegtkslot1cb(M func_ ,E cbd)
       : func(func_) ,cbdata(cbd) {}
     void call(P1 p1)
       {  func(p1,cbdata); }
     static void callback(GtkWidget * ,P1 p1,
       Concretegtkslot1cb<M,P1,E>* s)
       {  s->call(p1); }
  };

template<class P1,class E>
inline Connection connect_to_function(
    Signal1 <P1> &signal,
    void (*func)(P1,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretegtkslot1cb<void (*)(P1,E),P1,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal   ****/
template<class M,class P1>
  Connection connect_to_signal(
    Signal1 <P1> &signal,
    M& func  )
  {
   Connection_impl *slot=
     new Concretegtkslot1<M&,P1>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal with data  ****/
template<class M,class P1,class E>
  Connection connect_to_signal(
    Signal1 <P1> &signal,
    M& func ,E cbd )
  {
   Connection_impl *slot=
     new Concretegtkslot1cb<M&,P1,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }



/********************************************************************
*****  Signals with 1 Arguments with return type
********************************************************************/
template<class rettype,class P1> 
  class Abstractslot1_r : public Connection_impl 
    { 
     public: 
       virtual rettype call(P1 p1)=0; 
    }; 

template<class rettype,class P1>
  class Signal1_r 
    { 
       ConnImpl_List connectionlist; 
     public: 
       Connection_impl *begin() { return connectionlist.begin(); }
       Connection_impl *end() { return connectionlist.end(); }
       void insert_connection(Connection_impl *slot) 
         { 
          connectionlist.insert(slot); 
         } 
       rettype operator()(P1 p1) 
         {rettype rval; 
          Connection_impl *c=connectionlist.begin(); 
          Connection_impl *tmp;
          while(c!=connectionlist.end()) 
            { 
             tmp=c->next;
             rval=((Abstractslot1_r <rettype,P1>*)c)->call(p1); 
             c=tmp; 
            } 
          return rval;
         } 
    }; 


/**** connect_to_method  wigh return ****/
template<class rettype,class T,class P1>
  class Concretecppslot1_r : public Abstractslot1_r <rettype,P1>
  {
   private:
     T* obj;
     rettype (T::*method)(P1);
     
   public:
     Concretecppslot1_r(T* receiver, rettype (T::*met)(P1)  )
       : obj(receiver), method(met)  {}
     rettype call(P1 p1) 
       { return (obj->*method)(p1); 
       }
   };

template<class rettype,class T,class T1,class P1>
  Connection connect_to_method(
    Signal1_r<rettype,P1> &signal,
    T* receiver,rettype (T1::*method)(P1) )
  {
   Connection_impl *slot=
     new Concretecppslot1_r<rettype,T,P1>(receiver,method );
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_method with data wigh return ****/
template<class rettype,class T,class P1,class E>
  class Concretecppslot1cb_r : public Abstractslot1_r <rettype,P1>
  {
   private:
     T* obj;
     rettype (T::*method)(P1,E);
     E cbdata;
   public:
     Concretecppslot1cb_r(T* receiver, rettype (T::*met)(P1,E) ,E cbd )
       : obj(receiver), method(met) ,cbdata(cbd) {}
     rettype call(P1 p1) 
       { return (obj->*method)(p1,cbdata); 
       }
   };

template<class rettype,class T,class T1,class P1,class E>
  Connection connect_to_method(
    Signal1_r<rettype,P1> &signal,
    T* receiver,rettype (T1::*method)(P1,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretecppslot1cb_r<rettype,T,P1,E>(receiver,method ,cbd);
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function  with return ****/
template<class rettype,class M,class P1>
class Concretegtkslot1_r : public Abstractslot1_r <rettype,P1>
  {
   private:
     M func;
     
   public:
     Concretegtkslot1_r(M func_ )
       : func(func_)  {}
     rettype call(P1 p1)
       { return func(p1); }
     static rettype callback(GtkWidget * ,P1 p1,
       Concretegtkslot1_r<rettype,M,P1>* s)
       { return GTKMM_PROXY_RV_HACK s->call(p1); }
  };

template<class rettype,class P1>
inline Connection connect_to_function(
    Signal1_r <rettype,P1> &signal,
    rettype (*func)(P1) )
  {
   Connection_impl *slot=
     new Concretegtkslot1_r<rettype,rettype (*)(P1),P1>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function with data with return ****/
template<class rettype,class M,class P1,class E>
class Concretegtkslot1cb_r : public Abstractslot1_r <rettype,P1>
  {
   private:
     M func;
     E cbdata;
   public:
     Concretegtkslot1cb_r(M func_ ,E cbd)
       : func(func_) ,cbdata(cbd) {}
     rettype call(P1 p1)
       { return func(p1,cbdata); }
     static rettype callback(GtkWidget * ,P1 p1,
       Concretegtkslot1cb_r<rettype,M,P1,E>* s)
       { return GTKMM_PROXY_RV_HACK s->call(p1); }
  };

template<class rettype,class P1,class E>
inline Connection connect_to_function(
    Signal1_r <rettype,P1> &signal,
    rettype (*func)(P1,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretegtkslot1cb_r<rettype,rettype (*)(P1,E),P1,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal  with return ****/
template<class rettype,class M,class P1>
  Connection connect_to_signal(
    Signal1_r <rettype,P1> &signal,
    M& func  )
  {
   Connection_impl *slot=
     new Concretegtkslot1_r<rettype,M&,P1>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal with data with return ****/
template<class rettype,class M,class P1,class E>
  Connection connect_to_signal(
    Signal1_r <rettype,P1> &signal,
    M& func ,E cbd )
  {
   Connection_impl *slot=
     new Concretegtkslot1cb_r<rettype,M&,P1,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }





/********************************************************************
*****  Signals with 2 Arguments 
********************************************************************/
template<class P1,class P2> 
  class Abstractslot2 : public Connection_impl 
    { 
     public: 
       virtual void call(P1 p1,P2 p2)=0; 
    }; 

template<class P1,class P2>
  class Signal2 
    { 
       ConnImpl_List connectionlist; 
     public: 
       Connection_impl *begin() { return connectionlist.begin(); }
       Connection_impl *end() { return connectionlist.end(); }
       void insert_connection(Connection_impl *slot) 
         { 
          connectionlist.insert(slot); 
         } 
       void operator()(P1 p1,P2 p2) 
         { 
          Connection_impl *c=connectionlist.begin(); 
          Connection_impl *tmp;
          while(c!=connectionlist.end()) 
            { 
             tmp=c->next;
             ((Abstractslot2 <P1,P2>*)c)->call(p1,p2); 
             c=tmp; 
            } 
          
         } 
    }; 


/**** connect_to_method   ****/
template<class T,class P1,class P2>
  class Concretecppslot2 : public Abstractslot2 <P1,P2>
  {
   private:
     T* obj;
     void (T::*method)(P1,P2);
     
   public:
     Concretecppslot2(T* receiver, void (T::*met)(P1,P2)  )
       : obj(receiver), method(met)  {}
     void call(P1 p1,P2 p2) 
       {  (obj->*method)(p1,p2); 
       }
   };

template<class T,class T1,class P1,class P2>
  Connection connect_to_method(
    Signal2<P1,P2> &signal,
    T* receiver,void (T1::*method)(P1,P2) )
  {
   Connection_impl *slot=
     new Concretecppslot2<T,P1,P2>(receiver,method );
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_method with data  ****/
template<class T,class P1,class P2,class E>
  class Concretecppslot2cb : public Abstractslot2 <P1,P2>
  {
   private:
     T* obj;
     void (T::*method)(P1,P2,E);
     E cbdata;
   public:
     Concretecppslot2cb(T* receiver, void (T::*met)(P1,P2,E) ,E cbd )
       : obj(receiver), method(met) ,cbdata(cbd) {}
     void call(P1 p1,P2 p2) 
       {  (obj->*method)(p1,p2,cbdata); 
       }
   };

template<class T,class T1,class P1,class P2,class E>
  Connection connect_to_method(
    Signal2<P1,P2> &signal,
    T* receiver,void (T1::*method)(P1,P2,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretecppslot2cb<T,P1,P2,E>(receiver,method ,cbd);
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function   ****/
template<class M,class P1,class P2>
class Concretegtkslot2 : public Abstractslot2 <P1,P2>
  {
   private:
     M func;
     
   public:
     Concretegtkslot2(M func_ )
       : func(func_)  {}
     void call(P1 p1,P2 p2)
       {  func(p1,p2); }
     static void callback(GtkWidget * ,P1 p1,P2 p2,
       Concretegtkslot2<M,P1,P2>* s)
       {  s->call(p1,p2); }
  };

template<class P1,class P2>
inline Connection connect_to_function(
    Signal2 <P1,P2> &signal,
    void (*func)(P1,P2) )
  {
   Connection_impl *slot=
     new Concretegtkslot2<void (*)(P1,P2),P1,P2>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function with data  ****/
template<class M,class P1,class P2,class E>
class Concretegtkslot2cb : public Abstractslot2 <P1,P2>
  {
   private:
     M func;
     E cbdata;
   public:
     Concretegtkslot2cb(M func_ ,E cbd)
       : func(func_) ,cbdata(cbd) {}
     void call(P1 p1,P2 p2)
       {  func(p1,p2,cbdata); }
     static void callback(GtkWidget * ,P1 p1,P2 p2,
       Concretegtkslot2cb<M,P1,P2,E>* s)
       {  s->call(p1,p2); }
  };

template<class P1,class P2,class E>
inline Connection connect_to_function(
    Signal2 <P1,P2> &signal,
    void (*func)(P1,P2,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretegtkslot2cb<void (*)(P1,P2,E),P1,P2,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal   ****/
template<class M,class P1,class P2>
  Connection connect_to_signal(
    Signal2 <P1,P2> &signal,
    M& func  )
  {
   Connection_impl *slot=
     new Concretegtkslot2<M&,P1,P2>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal with data  ****/
template<class M,class P1,class P2,class E>
  Connection connect_to_signal(
    Signal2 <P1,P2> &signal,
    M& func ,E cbd )
  {
   Connection_impl *slot=
     new Concretegtkslot2cb<M&,P1,P2,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }



/********************************************************************
*****  Signals with 2 Arguments with return type
********************************************************************/
template<class rettype,class P1,class P2> 
  class Abstractslot2_r : public Connection_impl 
    { 
     public: 
       virtual rettype call(P1 p1,P2 p2)=0; 
    }; 

template<class rettype,class P1,class P2>
  class Signal2_r 
    { 
       ConnImpl_List connectionlist; 
     public: 
       Connection_impl *begin() { return connectionlist.begin(); }
       Connection_impl *end() { return connectionlist.end(); }
       void insert_connection(Connection_impl *slot) 
         { 
          connectionlist.insert(slot); 
         } 
       rettype operator()(P1 p1,P2 p2) 
         {rettype rval; 
          Connection_impl *c=connectionlist.begin(); 
          Connection_impl *tmp;
          while(c!=connectionlist.end()) 
            { 
             tmp=c->next;
             rval=((Abstractslot2_r <rettype,P1,P2>*)c)->call(p1,p2); 
             c=tmp; 
            } 
          return rval;
         } 
    }; 


/**** connect_to_method  wigh return ****/
template<class rettype,class T,class P1,class P2>
  class Concretecppslot2_r : public Abstractslot2_r <rettype,P1,P2>
  {
   private:
     T* obj;
     rettype (T::*method)(P1,P2);
     
   public:
     Concretecppslot2_r(T* receiver, rettype (T::*met)(P1,P2)  )
       : obj(receiver), method(met)  {}
     rettype call(P1 p1,P2 p2) 
       { return (obj->*method)(p1,p2); 
       }
   };

template<class rettype,class T,class T1,class P1,class P2>
  Connection connect_to_method(
    Signal2_r<rettype,P1,P2> &signal,
    T* receiver,rettype (T1::*method)(P1,P2) )
  {
   Connection_impl *slot=
     new Concretecppslot2_r<rettype,T,P1,P2>(receiver,method );
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_method with data wigh return ****/
template<class rettype,class T,class P1,class P2,class E>
  class Concretecppslot2cb_r : public Abstractslot2_r <rettype,P1,P2>
  {
   private:
     T* obj;
     rettype (T::*method)(P1,P2,E);
     E cbdata;
   public:
     Concretecppslot2cb_r(T* receiver, rettype (T::*met)(P1,P2,E) ,E cbd )
       : obj(receiver), method(met) ,cbdata(cbd) {}
     rettype call(P1 p1,P2 p2) 
       { return (obj->*method)(p1,p2,cbdata); 
       }
   };

template<class rettype,class T,class T1,class P1,class P2,class E>
  Connection connect_to_method(
    Signal2_r<rettype,P1,P2> &signal,
    T* receiver,rettype (T1::*method)(P1,P2,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretecppslot2cb_r<rettype,T,P1,P2,E>(receiver,method ,cbd);
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function  with return ****/
template<class rettype,class M,class P1,class P2>
class Concretegtkslot2_r : public Abstractslot2_r <rettype,P1,P2>
  {
   private:
     M func;
     
   public:
     Concretegtkslot2_r(M func_ )
       : func(func_)  {}
     rettype call(P1 p1,P2 p2)
       { return func(p1,p2); }
     static rettype callback(GtkWidget * ,P1 p1,P2 p2,
       Concretegtkslot2_r<rettype,M,P1,P2>* s)
       { return GTKMM_PROXY_RV_HACK s->call(p1,p2); }
  };

template<class rettype,class P1,class P2>
inline Connection connect_to_function(
    Signal2_r <rettype,P1,P2> &signal,
    rettype (*func)(P1,P2) )
  {
   Connection_impl *slot=
     new Concretegtkslot2_r<rettype,rettype (*)(P1,P2),P1,P2>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function with data with return ****/
template<class rettype,class M,class P1,class P2,class E>
class Concretegtkslot2cb_r : public Abstractslot2_r <rettype,P1,P2>
  {
   private:
     M func;
     E cbdata;
   public:
     Concretegtkslot2cb_r(M func_ ,E cbd)
       : func(func_) ,cbdata(cbd) {}
     rettype call(P1 p1,P2 p2)
       { return func(p1,p2,cbdata); }
     static rettype callback(GtkWidget * ,P1 p1,P2 p2,
       Concretegtkslot2cb_r<rettype,M,P1,P2,E>* s)
       { return GTKMM_PROXY_RV_HACK s->call(p1,p2); }
  };

template<class rettype,class P1,class P2,class E>
inline Connection connect_to_function(
    Signal2_r <rettype,P1,P2> &signal,
    rettype (*func)(P1,P2,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretegtkslot2cb_r<rettype,rettype (*)(P1,P2,E),P1,P2,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal  with return ****/
template<class rettype,class M,class P1,class P2>
  Connection connect_to_signal(
    Signal2_r <rettype,P1,P2> &signal,
    M& func  )
  {
   Connection_impl *slot=
     new Concretegtkslot2_r<rettype,M&,P1,P2>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal with data with return ****/
template<class rettype,class M,class P1,class P2,class E>
  Connection connect_to_signal(
    Signal2_r <rettype,P1,P2> &signal,
    M& func ,E cbd )
  {
   Connection_impl *slot=
     new Concretegtkslot2cb_r<rettype,M&,P1,P2,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }





/********************************************************************
*****  Signals with 3 Arguments 
********************************************************************/
template<class P1,class P2,class P3> 
  class Abstractslot3 : public Connection_impl 
    { 
     public: 
       virtual void call(P1 p1,P2 p2,P3 p3)=0; 
    }; 

template<class P1,class P2,class P3>
  class Signal3 
    { 
       ConnImpl_List connectionlist; 
     public: 
       Connection_impl *begin() { return connectionlist.begin(); }
       Connection_impl *end() { return connectionlist.end(); }
       void insert_connection(Connection_impl *slot) 
         { 
          connectionlist.insert(slot); 
         } 
       void operator()(P1 p1,P2 p2,P3 p3) 
         { 
          Connection_impl *c=connectionlist.begin(); 
          Connection_impl *tmp;
          while(c!=connectionlist.end()) 
            { 
             tmp=c->next;
             ((Abstractslot3 <P1,P2,P3>*)c)->call(p1,p2,p3); 
             c=tmp; 
            } 
          
         } 
    }; 


/**** connect_to_method   ****/
template<class T,class P1,class P2,class P3>
  class Concretecppslot3 : public Abstractslot3 <P1,P2,P3>
  {
   private:
     T* obj;
     void (T::*method)(P1,P2,P3);
     
   public:
     Concretecppslot3(T* receiver, void (T::*met)(P1,P2,P3)  )
       : obj(receiver), method(met)  {}
     void call(P1 p1,P2 p2,P3 p3) 
       {  (obj->*method)(p1,p2,p3); 
       }
   };

template<class T,class T1,class P1,class P2,class P3>
  Connection connect_to_method(
    Signal3<P1,P2,P3> &signal,
    T* receiver,void (T1::*method)(P1,P2,P3) )
  {
   Connection_impl *slot=
     new Concretecppslot3<T,P1,P2,P3>(receiver,method );
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_method with data  ****/
template<class T,class P1,class P2,class P3,class E>
  class Concretecppslot3cb : public Abstractslot3 <P1,P2,P3>
  {
   private:
     T* obj;
     void (T::*method)(P1,P2,P3,E);
     E cbdata;
   public:
     Concretecppslot3cb(T* receiver, void (T::*met)(P1,P2,P3,E) ,E cbd )
       : obj(receiver), method(met) ,cbdata(cbd) {}
     void call(P1 p1,P2 p2,P3 p3) 
       {  (obj->*method)(p1,p2,p3,cbdata); 
       }
   };

template<class T,class T1,class P1,class P2,class P3,class E>
  Connection connect_to_method(
    Signal3<P1,P2,P3> &signal,
    T* receiver,void (T1::*method)(P1,P2,P3,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretecppslot3cb<T,P1,P2,P3,E>(receiver,method ,cbd);
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function   ****/
template<class M,class P1,class P2,class P3>
class Concretegtkslot3 : public Abstractslot3 <P1,P2,P3>
  {
   private:
     M func;
     
   public:
     Concretegtkslot3(M func_ )
       : func(func_)  {}
     void call(P1 p1,P2 p2,P3 p3)
       {  func(p1,p2,p3); }
     static void callback(GtkWidget * ,P1 p1,P2 p2,P3 p3,
       Concretegtkslot3<M,P1,P2,P3>* s)
       {  s->call(p1,p2,p3); }
  };

template<class P1,class P2,class P3>
inline Connection connect_to_function(
    Signal3 <P1,P2,P3> &signal,
    void (*func)(P1,P2,P3) )
  {
   Connection_impl *slot=
     new Concretegtkslot3<void (*)(P1,P2,P3),P1,P2,P3>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function with data  ****/
template<class M,class P1,class P2,class P3,class E>
class Concretegtkslot3cb : public Abstractslot3 <P1,P2,P3>
  {
   private:
     M func;
     E cbdata;
   public:
     Concretegtkslot3cb(M func_ ,E cbd)
       : func(func_) ,cbdata(cbd) {}
     void call(P1 p1,P2 p2,P3 p3)
       {  func(p1,p2,p3,cbdata); }
     static void callback(GtkWidget * ,P1 p1,P2 p2,P3 p3,
       Concretegtkslot3cb<M,P1,P2,P3,E>* s)
       {  s->call(p1,p2,p3); }
  };

template<class P1,class P2,class P3,class E>
inline Connection connect_to_function(
    Signal3 <P1,P2,P3> &signal,
    void (*func)(P1,P2,P3,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretegtkslot3cb<void (*)(P1,P2,P3,E),P1,P2,P3,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal   ****/
template<class M,class P1,class P2,class P3>
  Connection connect_to_signal(
    Signal3 <P1,P2,P3> &signal,
    M& func  )
  {
   Connection_impl *slot=
     new Concretegtkslot3<M&,P1,P2,P3>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal with data  ****/
template<class M,class P1,class P2,class P3,class E>
  Connection connect_to_signal(
    Signal3 <P1,P2,P3> &signal,
    M& func ,E cbd )
  {
   Connection_impl *slot=
     new Concretegtkslot3cb<M&,P1,P2,P3,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }



/********************************************************************
*****  Signals with 3 Arguments with return type
********************************************************************/
template<class rettype,class P1,class P2,class P3> 
  class Abstractslot3_r : public Connection_impl 
    { 
     public: 
       virtual rettype call(P1 p1,P2 p2,P3 p3)=0; 
    }; 

template<class rettype,class P1,class P2,class P3>
  class Signal3_r 
    { 
       ConnImpl_List connectionlist; 
     public: 
       Connection_impl *begin() { return connectionlist.begin(); }
       Connection_impl *end() { return connectionlist.end(); }
       void insert_connection(Connection_impl *slot) 
         { 
          connectionlist.insert(slot); 
         } 
       rettype operator()(P1 p1,P2 p2,P3 p3) 
         {rettype rval; 
          Connection_impl *c=connectionlist.begin(); 
          Connection_impl *tmp;
          while(c!=connectionlist.end()) 
            { 
             tmp=c->next;
             rval=((Abstractslot3_r <rettype,P1,P2,P3>*)c)->call(p1,p2,p3); 
             c=tmp; 
            } 
          return rval;
         } 
    }; 


/**** connect_to_method  wigh return ****/
template<class rettype,class T,class P1,class P2,class P3>
  class Concretecppslot3_r : public Abstractslot3_r <rettype,P1,P2,P3>
  {
   private:
     T* obj;
     rettype (T::*method)(P1,P2,P3);
     
   public:
     Concretecppslot3_r(T* receiver, rettype (T::*met)(P1,P2,P3)  )
       : obj(receiver), method(met)  {}
     rettype call(P1 p1,P2 p2,P3 p3) 
       { return (obj->*method)(p1,p2,p3); 
       }
   };

template<class rettype,class T,class T1,class P1,class P2,class P3>
  Connection connect_to_method(
    Signal3_r<rettype,P1,P2,P3> &signal,
    T* receiver,rettype (T1::*method)(P1,P2,P3) )
  {
   Connection_impl *slot=
     new Concretecppslot3_r<rettype,T,P1,P2,P3>(receiver,method );
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_method with data wigh return ****/
template<class rettype,class T,class P1,class P2,class P3,class E>
  class Concretecppslot3cb_r : public Abstractslot3_r <rettype,P1,P2,P3>
  {
   private:
     T* obj;
     rettype (T::*method)(P1,P2,P3,E);
     E cbdata;
   public:
     Concretecppslot3cb_r(T* receiver, rettype (T::*met)(P1,P2,P3,E) ,E cbd )
       : obj(receiver), method(met) ,cbdata(cbd) {}
     rettype call(P1 p1,P2 p2,P3 p3) 
       { return (obj->*method)(p1,p2,p3,cbdata); 
       }
   };

template<class rettype,class T,class T1,class P1,class P2,class P3,class E>
  Connection connect_to_method(
    Signal3_r<rettype,P1,P2,P3> &signal,
    T* receiver,rettype (T1::*method)(P1,P2,P3,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretecppslot3cb_r<rettype,T,P1,P2,P3,E>(receiver,method ,cbd);
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function  with return ****/
template<class rettype,class M,class P1,class P2,class P3>
class Concretegtkslot3_r : public Abstractslot3_r <rettype,P1,P2,P3>
  {
   private:
     M func;
     
   public:
     Concretegtkslot3_r(M func_ )
       : func(func_)  {}
     rettype call(P1 p1,P2 p2,P3 p3)
       { return func(p1,p2,p3); }
     static rettype callback(GtkWidget * ,P1 p1,P2 p2,P3 p3,
       Concretegtkslot3_r<rettype,M,P1,P2,P3>* s)
       { return GTKMM_PROXY_RV_HACK s->call(p1,p2,p3); }
  };

template<class rettype,class P1,class P2,class P3>
inline Connection connect_to_function(
    Signal3_r <rettype,P1,P2,P3> &signal,
    rettype (*func)(P1,P2,P3) )
  {
   Connection_impl *slot=
     new Concretegtkslot3_r<rettype,rettype (*)(P1,P2,P3),P1,P2,P3>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function with data with return ****/
template<class rettype,class M,class P1,class P2,class P3,class E>
class Concretegtkslot3cb_r : public Abstractslot3_r <rettype,P1,P2,P3>
  {
   private:
     M func;
     E cbdata;
   public:
     Concretegtkslot3cb_r(M func_ ,E cbd)
       : func(func_) ,cbdata(cbd) {}
     rettype call(P1 p1,P2 p2,P3 p3)
       { return func(p1,p2,p3,cbdata); }
     static rettype callback(GtkWidget * ,P1 p1,P2 p2,P3 p3,
       Concretegtkslot3cb_r<rettype,M,P1,P2,P3,E>* s)
       { return GTKMM_PROXY_RV_HACK s->call(p1,p2,p3); }
  };

template<class rettype,class P1,class P2,class P3,class E>
inline Connection connect_to_function(
    Signal3_r <rettype,P1,P2,P3> &signal,
    rettype (*func)(P1,P2,P3,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretegtkslot3cb_r<rettype,rettype (*)(P1,P2,P3,E),P1,P2,P3,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal  with return ****/
template<class rettype,class M,class P1,class P2,class P3>
  Connection connect_to_signal(
    Signal3_r <rettype,P1,P2,P3> &signal,
    M& func  )
  {
   Connection_impl *slot=
     new Concretegtkslot3_r<rettype,M&,P1,P2,P3>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal with data with return ****/
template<class rettype,class M,class P1,class P2,class P3,class E>
  Connection connect_to_signal(
    Signal3_r <rettype,P1,P2,P3> &signal,
    M& func ,E cbd )
  {
   Connection_impl *slot=
     new Concretegtkslot3cb_r<rettype,M&,P1,P2,P3,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }





/********************************************************************
*****  Signals with 4 Arguments 
********************************************************************/
template<class P1,class P2,class P3,class P4> 
  class Abstractslot4 : public Connection_impl 
    { 
     public: 
       virtual void call(P1 p1,P2 p2,P3 p3,P4 p4)=0; 
    }; 

template<class P1,class P2,class P3,class P4>
  class Signal4 
    { 
       ConnImpl_List connectionlist; 
     public: 
       Connection_impl *begin() { return connectionlist.begin(); }
       Connection_impl *end() { return connectionlist.end(); }
       void insert_connection(Connection_impl *slot) 
         { 
          connectionlist.insert(slot); 
         } 
       void operator()(P1 p1,P2 p2,P3 p3,P4 p4) 
         { 
          Connection_impl *c=connectionlist.begin(); 
          Connection_impl *tmp;
          while(c!=connectionlist.end()) 
            { 
             tmp=c->next;
             ((Abstractslot4 <P1,P2,P3,P4>*)c)->call(p1,p2,p3,p4); 
             c=tmp; 
            } 
          
         } 
    }; 


/**** connect_to_method   ****/
template<class T,class P1,class P2,class P3,class P4>
  class Concretecppslot4 : public Abstractslot4 <P1,P2,P3,P4>
  {
   private:
     T* obj;
     void (T::*method)(P1,P2,P3,P4);
     
   public:
     Concretecppslot4(T* receiver, void (T::*met)(P1,P2,P3,P4)  )
       : obj(receiver), method(met)  {}
     void call(P1 p1,P2 p2,P3 p3,P4 p4) 
       {  (obj->*method)(p1,p2,p3,p4); 
       }
   };

template<class T,class T1,class P1,class P2,class P3,class P4>
  Connection connect_to_method(
    Signal4<P1,P2,P3,P4> &signal,
    T* receiver,void (T1::*method)(P1,P2,P3,P4) )
  {
   Connection_impl *slot=
     new Concretecppslot4<T,P1,P2,P3,P4>(receiver,method );
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_method with data  ****/
template<class T,class P1,class P2,class P3,class P4,class E>
  class Concretecppslot4cb : public Abstractslot4 <P1,P2,P3,P4>
  {
   private:
     T* obj;
     void (T::*method)(P1,P2,P3,P4,E);
     E cbdata;
   public:
     Concretecppslot4cb(T* receiver, void (T::*met)(P1,P2,P3,P4,E) ,E cbd )
       : obj(receiver), method(met) ,cbdata(cbd) {}
     void call(P1 p1,P2 p2,P3 p3,P4 p4) 
       {  (obj->*method)(p1,p2,p3,p4,cbdata); 
       }
   };

template<class T,class T1,class P1,class P2,class P3,class P4,class E>
  Connection connect_to_method(
    Signal4<P1,P2,P3,P4> &signal,
    T* receiver,void (T1::*method)(P1,P2,P3,P4,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretecppslot4cb<T,P1,P2,P3,P4,E>(receiver,method ,cbd);
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function   ****/
template<class M,class P1,class P2,class P3,class P4>
class Concretegtkslot4 : public Abstractslot4 <P1,P2,P3,P4>
  {
   private:
     M func;
     
   public:
     Concretegtkslot4(M func_ )
       : func(func_)  {}
     void call(P1 p1,P2 p2,P3 p3,P4 p4)
       {  func(p1,p2,p3,p4); }
     static void callback(GtkWidget * ,P1 p1,P2 p2,P3 p3,P4 p4,
       Concretegtkslot4<M,P1,P2,P3,P4>* s)
       {  s->call(p1,p2,p3,p4); }
  };

template<class P1,class P2,class P3,class P4>
inline Connection connect_to_function(
    Signal4 <P1,P2,P3,P4> &signal,
    void (*func)(P1,P2,P3,P4) )
  {
   Connection_impl *slot=
     new Concretegtkslot4<void (*)(P1,P2,P3,P4),P1,P2,P3,P4>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function with data  ****/
template<class M,class P1,class P2,class P3,class P4,class E>
class Concretegtkslot4cb : public Abstractslot4 <P1,P2,P3,P4>
  {
   private:
     M func;
     E cbdata;
   public:
     Concretegtkslot4cb(M func_ ,E cbd)
       : func(func_) ,cbdata(cbd) {}
     void call(P1 p1,P2 p2,P3 p3,P4 p4)
       {  func(p1,p2,p3,p4,cbdata); }
     static void callback(GtkWidget * ,P1 p1,P2 p2,P3 p3,P4 p4,
       Concretegtkslot4cb<M,P1,P2,P3,P4,E>* s)
       {  s->call(p1,p2,p3,p4); }
  };

template<class P1,class P2,class P3,class P4,class E>
inline Connection connect_to_function(
    Signal4 <P1,P2,P3,P4> &signal,
    void (*func)(P1,P2,P3,P4,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretegtkslot4cb<void (*)(P1,P2,P3,P4,E),P1,P2,P3,P4,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal   ****/
template<class M,class P1,class P2,class P3,class P4>
  Connection connect_to_signal(
    Signal4 <P1,P2,P3,P4> &signal,
    M& func  )
  {
   Connection_impl *slot=
     new Concretegtkslot4<M&,P1,P2,P3,P4>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal with data  ****/
template<class M,class P1,class P2,class P3,class P4,class E>
  Connection connect_to_signal(
    Signal4 <P1,P2,P3,P4> &signal,
    M& func ,E cbd )
  {
   Connection_impl *slot=
     new Concretegtkslot4cb<M&,P1,P2,P3,P4,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }



/********************************************************************
*****  Signals with 4 Arguments with return type
********************************************************************/
template<class rettype,class P1,class P2,class P3,class P4> 
  class Abstractslot4_r : public Connection_impl 
    { 
     public: 
       virtual rettype call(P1 p1,P2 p2,P3 p3,P4 p4)=0; 
    }; 

template<class rettype,class P1,class P2,class P3,class P4>
  class Signal4_r 
    { 
       ConnImpl_List connectionlist; 
     public: 
       Connection_impl *begin() { return connectionlist.begin(); }
       Connection_impl *end() { return connectionlist.end(); }
       void insert_connection(Connection_impl *slot) 
         { 
          connectionlist.insert(slot); 
         } 
       rettype operator()(P1 p1,P2 p2,P3 p3,P4 p4) 
         {rettype rval; 
          Connection_impl *c=connectionlist.begin(); 
          Connection_impl *tmp;
          while(c!=connectionlist.end()) 
            { 
             tmp=c->next;
             rval=((Abstractslot4_r <rettype,P1,P2,P3,P4>*)c)->call(p1,p2,p3,p4); 
             c=tmp; 
            } 
          return rval;
         } 
    }; 


/**** connect_to_method  wigh return ****/
template<class rettype,class T,class P1,class P2,class P3,class P4>
  class Concretecppslot4_r : public Abstractslot4_r <rettype,P1,P2,P3,P4>
  {
   private:
     T* obj;
     rettype (T::*method)(P1,P2,P3,P4);
     
   public:
     Concretecppslot4_r(T* receiver, rettype (T::*met)(P1,P2,P3,P4)  )
       : obj(receiver), method(met)  {}
     rettype call(P1 p1,P2 p2,P3 p3,P4 p4) 
       { return (obj->*method)(p1,p2,p3,p4); 
       }
   };

template<class rettype,class T,class T1,class P1,class P2,class P3,class P4>
  Connection connect_to_method(
    Signal4_r<rettype,P1,P2,P3,P4> &signal,
    T* receiver,rettype (T1::*method)(P1,P2,P3,P4) )
  {
   Connection_impl *slot=
     new Concretecppslot4_r<rettype,T,P1,P2,P3,P4>(receiver,method );
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_method with data wigh return ****/
template<class rettype,class T,class P1,class P2,class P3,class P4,class E>
  class Concretecppslot4cb_r : public Abstractslot4_r <rettype,P1,P2,P3,P4>
  {
   private:
     T* obj;
     rettype (T::*method)(P1,P2,P3,P4,E);
     E cbdata;
   public:
     Concretecppslot4cb_r(T* receiver, rettype (T::*met)(P1,P2,P3,P4,E) ,E cbd )
       : obj(receiver), method(met) ,cbdata(cbd) {}
     rettype call(P1 p1,P2 p2,P3 p3,P4 p4) 
       { return (obj->*method)(p1,p2,p3,p4,cbdata); 
       }
   };

template<class rettype,class T,class T1,class P1,class P2,class P3,class P4,class E>
  Connection connect_to_method(
    Signal4_r<rettype,P1,P2,P3,P4> &signal,
    T* receiver,rettype (T1::*method)(P1,P2,P3,P4,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretecppslot4cb_r<rettype,T,P1,P2,P3,P4,E>(receiver,method ,cbd);
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function  with return ****/
template<class rettype,class M,class P1,class P2,class P3,class P4>
class Concretegtkslot4_r : public Abstractslot4_r <rettype,P1,P2,P3,P4>
  {
   private:
     M func;
     
   public:
     Concretegtkslot4_r(M func_ )
       : func(func_)  {}
     rettype call(P1 p1,P2 p2,P3 p3,P4 p4)
       { return func(p1,p2,p3,p4); }
     static rettype callback(GtkWidget * ,P1 p1,P2 p2,P3 p3,P4 p4,
       Concretegtkslot4_r<rettype,M,P1,P2,P3,P4>* s)
       { return GTKMM_PROXY_RV_HACK s->call(p1,p2,p3,p4); }
  };

template<class rettype,class P1,class P2,class P3,class P4>
inline Connection connect_to_function(
    Signal4_r <rettype,P1,P2,P3,P4> &signal,
    rettype (*func)(P1,P2,P3,P4) )
  {
   Connection_impl *slot=
     new Concretegtkslot4_r<rettype,rettype (*)(P1,P2,P3,P4),P1,P2,P3,P4>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function with data with return ****/
template<class rettype,class M,class P1,class P2,class P3,class P4,class E>
class Concretegtkslot4cb_r : public Abstractslot4_r <rettype,P1,P2,P3,P4>
  {
   private:
     M func;
     E cbdata;
   public:
     Concretegtkslot4cb_r(M func_ ,E cbd)
       : func(func_) ,cbdata(cbd) {}
     rettype call(P1 p1,P2 p2,P3 p3,P4 p4)
       { return func(p1,p2,p3,p4,cbdata); }
     static rettype callback(GtkWidget * ,P1 p1,P2 p2,P3 p3,P4 p4,
       Concretegtkslot4cb_r<rettype,M,P1,P2,P3,P4,E>* s)
       { return GTKMM_PROXY_RV_HACK s->call(p1,p2,p3,p4); }
  };

template<class rettype,class P1,class P2,class P3,class P4,class E>
inline Connection connect_to_function(
    Signal4_r <rettype,P1,P2,P3,P4> &signal,
    rettype (*func)(P1,P2,P3,P4,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretegtkslot4cb_r<rettype,rettype (*)(P1,P2,P3,P4,E),P1,P2,P3,P4,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal  with return ****/
template<class rettype,class M,class P1,class P2,class P3,class P4>
  Connection connect_to_signal(
    Signal4_r <rettype,P1,P2,P3,P4> &signal,
    M& func  )
  {
   Connection_impl *slot=
     new Concretegtkslot4_r<rettype,M&,P1,P2,P3,P4>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal with data with return ****/
template<class rettype,class M,class P1,class P2,class P3,class P4,class E>
  Connection connect_to_signal(
    Signal4_r <rettype,P1,P2,P3,P4> &signal,
    M& func ,E cbd )
  {
   Connection_impl *slot=
     new Concretegtkslot4cb_r<rettype,M&,P1,P2,P3,P4,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }





/********************************************************************
*****  Signals with 5 Arguments 
********************************************************************/
template<class P1,class P2,class P3,class P4,class P5> 
  class Abstractslot5 : public Connection_impl 
    { 
     public: 
       virtual void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5)=0; 
    }; 

template<class P1,class P2,class P3,class P4,class P5>
  class Signal5 
    { 
       ConnImpl_List connectionlist; 
     public: 
       Connection_impl *begin() { return connectionlist.begin(); }
       Connection_impl *end() { return connectionlist.end(); }
       void insert_connection(Connection_impl *slot) 
         { 
          connectionlist.insert(slot); 
         } 
       void operator()(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5) 
         { 
          Connection_impl *c=connectionlist.begin(); 
          Connection_impl *tmp;
          while(c!=connectionlist.end()) 
            { 
             tmp=c->next;
             ((Abstractslot5 <P1,P2,P3,P4,P5>*)c)->call(p1,p2,p3,p4,p5); 
             c=tmp; 
            } 
          
         } 
    }; 


/**** connect_to_method   ****/
template<class T,class P1,class P2,class P3,class P4,class P5>
  class Concretecppslot5 : public Abstractslot5 <P1,P2,P3,P4,P5>
  {
   private:
     T* obj;
     void (T::*method)(P1,P2,P3,P4,P5);
     
   public:
     Concretecppslot5(T* receiver, void (T::*met)(P1,P2,P3,P4,P5)  )
       : obj(receiver), method(met)  {}
     void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5) 
       {  (obj->*method)(p1,p2,p3,p4,p5); 
       }
   };

template<class T,class T1,class P1,class P2,class P3,class P4,class P5>
  Connection connect_to_method(
    Signal5<P1,P2,P3,P4,P5> &signal,
    T* receiver,void (T1::*method)(P1,P2,P3,P4,P5) )
  {
   Connection_impl *slot=
     new Concretecppslot5<T,P1,P2,P3,P4,P5>(receiver,method );
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_method with data  ****/
template<class T,class P1,class P2,class P3,class P4,class P5,class E>
  class Concretecppslot5cb : public Abstractslot5 <P1,P2,P3,P4,P5>
  {
   private:
     T* obj;
     void (T::*method)(P1,P2,P3,P4,P5,E);
     E cbdata;
   public:
     Concretecppslot5cb(T* receiver, void (T::*met)(P1,P2,P3,P4,P5,E) ,E cbd )
       : obj(receiver), method(met) ,cbdata(cbd) {}
     void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5) 
       {  (obj->*method)(p1,p2,p3,p4,p5,cbdata); 
       }
   };

template<class T,class T1,class P1,class P2,class P3,class P4,class P5,class E>
  Connection connect_to_method(
    Signal5<P1,P2,P3,P4,P5> &signal,
    T* receiver,void (T1::*method)(P1,P2,P3,P4,P5,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretecppslot5cb<T,P1,P2,P3,P4,P5,E>(receiver,method ,cbd);
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function   ****/
template<class M,class P1,class P2,class P3,class P4,class P5>
class Concretegtkslot5 : public Abstractslot5 <P1,P2,P3,P4,P5>
  {
   private:
     M func;
     
   public:
     Concretegtkslot5(M func_ )
       : func(func_)  {}
     void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5)
       {  func(p1,p2,p3,p4,p5); }
     static void callback(GtkWidget * ,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,
       Concretegtkslot5<M,P1,P2,P3,P4,P5>* s)
       {  s->call(p1,p2,p3,p4,p5); }
  };

template<class P1,class P2,class P3,class P4,class P5>
inline Connection connect_to_function(
    Signal5 <P1,P2,P3,P4,P5> &signal,
    void (*func)(P1,P2,P3,P4,P5) )
  {
   Connection_impl *slot=
     new Concretegtkslot5<void (*)(P1,P2,P3,P4,P5),P1,P2,P3,P4,P5>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function with data  ****/
template<class M,class P1,class P2,class P3,class P4,class P5,class E>
class Concretegtkslot5cb : public Abstractslot5 <P1,P2,P3,P4,P5>
  {
   private:
     M func;
     E cbdata;
   public:
     Concretegtkslot5cb(M func_ ,E cbd)
       : func(func_) ,cbdata(cbd) {}
     void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5)
       {  func(p1,p2,p3,p4,p5,cbdata); }
     static void callback(GtkWidget * ,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,
       Concretegtkslot5cb<M,P1,P2,P3,P4,P5,E>* s)
       {  s->call(p1,p2,p3,p4,p5); }
  };

template<class P1,class P2,class P3,class P4,class P5,class E>
inline Connection connect_to_function(
    Signal5 <P1,P2,P3,P4,P5> &signal,
    void (*func)(P1,P2,P3,P4,P5,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretegtkslot5cb<void (*)(P1,P2,P3,P4,P5,E),P1,P2,P3,P4,P5,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal   ****/
template<class M,class P1,class P2,class P3,class P4,class P5>
  Connection connect_to_signal(
    Signal5 <P1,P2,P3,P4,P5> &signal,
    M& func  )
  {
   Connection_impl *slot=
     new Concretegtkslot5<M&,P1,P2,P3,P4,P5>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal with data  ****/
template<class M,class P1,class P2,class P3,class P4,class P5,class E>
  Connection connect_to_signal(
    Signal5 <P1,P2,P3,P4,P5> &signal,
    M& func ,E cbd )
  {
   Connection_impl *slot=
     new Concretegtkslot5cb<M&,P1,P2,P3,P4,P5,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }



/********************************************************************
*****  Signals with 5 Arguments with return type
********************************************************************/
template<class rettype,class P1,class P2,class P3,class P4,class P5> 
  class Abstractslot5_r : public Connection_impl 
    { 
     public: 
       virtual rettype call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5)=0; 
    }; 

template<class rettype,class P1,class P2,class P3,class P4,class P5>
  class Signal5_r 
    { 
       ConnImpl_List connectionlist; 
     public: 
       Connection_impl *begin() { return connectionlist.begin(); }
       Connection_impl *end() { return connectionlist.end(); }
       void insert_connection(Connection_impl *slot) 
         { 
          connectionlist.insert(slot); 
         } 
       rettype operator()(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5) 
         {rettype rval; 
          Connection_impl *c=connectionlist.begin(); 
          Connection_impl *tmp;
          while(c!=connectionlist.end()) 
            { 
             tmp=c->next;
             rval=((Abstractslot5_r <rettype,P1,P2,P3,P4,P5>*)c)->call(p1,p2,p3,p4,p5); 
             c=tmp; 
            } 
          return rval;
         } 
    }; 


/**** connect_to_method  wigh return ****/
template<class rettype,class T,class P1,class P2,class P3,class P4,class P5>
  class Concretecppslot5_r : public Abstractslot5_r <rettype,P1,P2,P3,P4,P5>
  {
   private:
     T* obj;
     rettype (T::*method)(P1,P2,P3,P4,P5);
     
   public:
     Concretecppslot5_r(T* receiver, rettype (T::*met)(P1,P2,P3,P4,P5)  )
       : obj(receiver), method(met)  {}
     rettype call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5) 
       { return (obj->*method)(p1,p2,p3,p4,p5); 
       }
   };

template<class rettype,class T,class T1,class P1,class P2,class P3,class P4,class P5>
  Connection connect_to_method(
    Signal5_r<rettype,P1,P2,P3,P4,P5> &signal,
    T* receiver,rettype (T1::*method)(P1,P2,P3,P4,P5) )
  {
   Connection_impl *slot=
     new Concretecppslot5_r<rettype,T,P1,P2,P3,P4,P5>(receiver,method );
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_method with data wigh return ****/
template<class rettype,class T,class P1,class P2,class P3,class P4,class P5,class E>
  class Concretecppslot5cb_r : public Abstractslot5_r <rettype,P1,P2,P3,P4,P5>
  {
   private:
     T* obj;
     rettype (T::*method)(P1,P2,P3,P4,P5,E);
     E cbdata;
   public:
     Concretecppslot5cb_r(T* receiver, rettype (T::*met)(P1,P2,P3,P4,P5,E) ,E cbd )
       : obj(receiver), method(met) ,cbdata(cbd) {}
     rettype call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5) 
       { return (obj->*method)(p1,p2,p3,p4,p5,cbdata); 
       }
   };

template<class rettype,class T,class T1,class P1,class P2,class P3,class P4,class P5,class E>
  Connection connect_to_method(
    Signal5_r<rettype,P1,P2,P3,P4,P5> &signal,
    T* receiver,rettype (T1::*method)(P1,P2,P3,P4,P5,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretecppslot5cb_r<rettype,T,P1,P2,P3,P4,P5,E>(receiver,method ,cbd);
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function  with return ****/
template<class rettype,class M,class P1,class P2,class P3,class P4,class P5>
class Concretegtkslot5_r : public Abstractslot5_r <rettype,P1,P2,P3,P4,P5>
  {
   private:
     M func;
     
   public:
     Concretegtkslot5_r(M func_ )
       : func(func_)  {}
     rettype call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5)
       { return func(p1,p2,p3,p4,p5); }
     static rettype callback(GtkWidget * ,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,
       Concretegtkslot5_r<rettype,M,P1,P2,P3,P4,P5>* s)
       { return GTKMM_PROXY_RV_HACK s->call(p1,p2,p3,p4,p5); }
  };

template<class rettype,class P1,class P2,class P3,class P4,class P5>
inline Connection connect_to_function(
    Signal5_r <rettype,P1,P2,P3,P4,P5> &signal,
    rettype (*func)(P1,P2,P3,P4,P5) )
  {
   Connection_impl *slot=
     new Concretegtkslot5_r<rettype,rettype (*)(P1,P2,P3,P4,P5),P1,P2,P3,P4,P5>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function with data with return ****/
template<class rettype,class M,class P1,class P2,class P3,class P4,class P5,class E>
class Concretegtkslot5cb_r : public Abstractslot5_r <rettype,P1,P2,P3,P4,P5>
  {
   private:
     M func;
     E cbdata;
   public:
     Concretegtkslot5cb_r(M func_ ,E cbd)
       : func(func_) ,cbdata(cbd) {}
     rettype call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5)
       { return func(p1,p2,p3,p4,p5,cbdata); }
     static rettype callback(GtkWidget * ,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,
       Concretegtkslot5cb_r<rettype,M,P1,P2,P3,P4,P5,E>* s)
       { return GTKMM_PROXY_RV_HACK s->call(p1,p2,p3,p4,p5); }
  };

template<class rettype,class P1,class P2,class P3,class P4,class P5,class E>
inline Connection connect_to_function(
    Signal5_r <rettype,P1,P2,P3,P4,P5> &signal,
    rettype (*func)(P1,P2,P3,P4,P5,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretegtkslot5cb_r<rettype,rettype (*)(P1,P2,P3,P4,P5,E),P1,P2,P3,P4,P5,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal  with return ****/
template<class rettype,class M,class P1,class P2,class P3,class P4,class P5>
  Connection connect_to_signal(
    Signal5_r <rettype,P1,P2,P3,P4,P5> &signal,
    M& func  )
  {
   Connection_impl *slot=
     new Concretegtkslot5_r<rettype,M&,P1,P2,P3,P4,P5>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal with data with return ****/
template<class rettype,class M,class P1,class P2,class P3,class P4,class P5,class E>
  Connection connect_to_signal(
    Signal5_r <rettype,P1,P2,P3,P4,P5> &signal,
    M& func ,E cbd )
  {
   Connection_impl *slot=
     new Concretegtkslot5cb_r<rettype,M&,P1,P2,P3,P4,P5,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }





/********************************************************************
*****  Signals with 6 Arguments 
********************************************************************/
template<class P1,class P2,class P3,class P4,class P5,class P6> 
  class Abstractslot6 : public Connection_impl 
    { 
     public: 
       virtual void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6)=0; 
    }; 

template<class P1,class P2,class P3,class P4,class P5,class P6>
  class Signal6 
    { 
       ConnImpl_List connectionlist; 
     public: 
       Connection_impl *begin() { return connectionlist.begin(); }
       Connection_impl *end() { return connectionlist.end(); }
       void insert_connection(Connection_impl *slot) 
         { 
          connectionlist.insert(slot); 
         } 
       void operator()(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6) 
         { 
          Connection_impl *c=connectionlist.begin(); 
          Connection_impl *tmp;
          while(c!=connectionlist.end()) 
            { 
             tmp=c->next;
             ((Abstractslot6 <P1,P2,P3,P4,P5,P6>*)c)->call(p1,p2,p3,p4,p5,p6); 
             c=tmp; 
            } 
          
         } 
    }; 


/**** connect_to_method   ****/
template<class T,class P1,class P2,class P3,class P4,class P5,class P6>
  class Concretecppslot6 : public Abstractslot6 <P1,P2,P3,P4,P5,P6>
  {
   private:
     T* obj;
     void (T::*method)(P1,P2,P3,P4,P5,P6);
     
   public:
     Concretecppslot6(T* receiver, void (T::*met)(P1,P2,P3,P4,P5,P6)  )
       : obj(receiver), method(met)  {}
     void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6) 
       {  (obj->*method)(p1,p2,p3,p4,p5,p6); 
       }
   };

template<class T,class T1,class P1,class P2,class P3,class P4,class P5,class P6>
  Connection connect_to_method(
    Signal6<P1,P2,P3,P4,P5,P6> &signal,
    T* receiver,void (T1::*method)(P1,P2,P3,P4,P5,P6) )
  {
   Connection_impl *slot=
     new Concretecppslot6<T,P1,P2,P3,P4,P5,P6>(receiver,method );
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_method with data  ****/
template<class T,class P1,class P2,class P3,class P4,class P5,class P6,class E>
  class Concretecppslot6cb : public Abstractslot6 <P1,P2,P3,P4,P5,P6>
  {
   private:
     T* obj;
     void (T::*method)(P1,P2,P3,P4,P5,P6,E);
     E cbdata;
   public:
     Concretecppslot6cb(T* receiver, void (T::*met)(P1,P2,P3,P4,P5,P6,E) ,E cbd )
       : obj(receiver), method(met) ,cbdata(cbd) {}
     void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6) 
       {  (obj->*method)(p1,p2,p3,p4,p5,p6,cbdata); 
       }
   };

template<class T,class T1,class P1,class P2,class P3,class P4,class P5,class P6,class E>
  Connection connect_to_method(
    Signal6<P1,P2,P3,P4,P5,P6> &signal,
    T* receiver,void (T1::*method)(P1,P2,P3,P4,P5,P6,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretecppslot6cb<T,P1,P2,P3,P4,P5,P6,E>(receiver,method ,cbd);
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function   ****/
template<class M,class P1,class P2,class P3,class P4,class P5,class P6>
class Concretegtkslot6 : public Abstractslot6 <P1,P2,P3,P4,P5,P6>
  {
   private:
     M func;
     
   public:
     Concretegtkslot6(M func_ )
       : func(func_)  {}
     void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6)
       {  func(p1,p2,p3,p4,p5,p6); }
     static void callback(GtkWidget * ,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,
       Concretegtkslot6<M,P1,P2,P3,P4,P5,P6>* s)
       {  s->call(p1,p2,p3,p4,p5,p6); }
  };

template<class P1,class P2,class P3,class P4,class P5,class P6>
inline Connection connect_to_function(
    Signal6 <P1,P2,P3,P4,P5,P6> &signal,
    void (*func)(P1,P2,P3,P4,P5,P6) )
  {
   Connection_impl *slot=
     new Concretegtkslot6<void (*)(P1,P2,P3,P4,P5,P6),P1,P2,P3,P4,P5,P6>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function with data  ****/
template<class M,class P1,class P2,class P3,class P4,class P5,class P6,class E>
class Concretegtkslot6cb : public Abstractslot6 <P1,P2,P3,P4,P5,P6>
  {
   private:
     M func;
     E cbdata;
   public:
     Concretegtkslot6cb(M func_ ,E cbd)
       : func(func_) ,cbdata(cbd) {}
     void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6)
       {  func(p1,p2,p3,p4,p5,p6,cbdata); }
     static void callback(GtkWidget * ,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,
       Concretegtkslot6cb<M,P1,P2,P3,P4,P5,P6,E>* s)
       {  s->call(p1,p2,p3,p4,p5,p6); }
  };

template<class P1,class P2,class P3,class P4,class P5,class P6,class E>
inline Connection connect_to_function(
    Signal6 <P1,P2,P3,P4,P5,P6> &signal,
    void (*func)(P1,P2,P3,P4,P5,P6,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretegtkslot6cb<void (*)(P1,P2,P3,P4,P5,P6,E),P1,P2,P3,P4,P5,P6,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal   ****/
template<class M,class P1,class P2,class P3,class P4,class P5,class P6>
  Connection connect_to_signal(
    Signal6 <P1,P2,P3,P4,P5,P6> &signal,
    M& func  )
  {
   Connection_impl *slot=
     new Concretegtkslot6<M&,P1,P2,P3,P4,P5,P6>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal with data  ****/
template<class M,class P1,class P2,class P3,class P4,class P5,class P6,class E>
  Connection connect_to_signal(
    Signal6 <P1,P2,P3,P4,P5,P6> &signal,
    M& func ,E cbd )
  {
   Connection_impl *slot=
     new Concretegtkslot6cb<M&,P1,P2,P3,P4,P5,P6,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }



/********************************************************************
*****  Signals with 6 Arguments with return type
********************************************************************/
template<class rettype,class P1,class P2,class P3,class P4,class P5,class P6> 
  class Abstractslot6_r : public Connection_impl 
    { 
     public: 
       virtual rettype call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6)=0; 
    }; 

template<class rettype,class P1,class P2,class P3,class P4,class P5,class P6>
  class Signal6_r 
    { 
       ConnImpl_List connectionlist; 
     public: 
       Connection_impl *begin() { return connectionlist.begin(); }
       Connection_impl *end() { return connectionlist.end(); }
       void insert_connection(Connection_impl *slot) 
         { 
          connectionlist.insert(slot); 
         } 
       rettype operator()(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6) 
         {rettype rval; 
          Connection_impl *c=connectionlist.begin(); 
          Connection_impl *tmp;
          while(c!=connectionlist.end()) 
            { 
             tmp=c->next;
             rval=((Abstractslot6_r <rettype,P1,P2,P3,P4,P5,P6>*)c)->call(p1,p2,p3,p4,p5,p6); 
             c=tmp; 
            } 
          return rval;
         } 
    }; 


/**** connect_to_method  wigh return ****/
template<class rettype,class T,class P1,class P2,class P3,class P4,class P5,class P6>
  class Concretecppslot6_r : public Abstractslot6_r <rettype,P1,P2,P3,P4,P5,P6>
  {
   private:
     T* obj;
     rettype (T::*method)(P1,P2,P3,P4,P5,P6);
     
   public:
     Concretecppslot6_r(T* receiver, rettype (T::*met)(P1,P2,P3,P4,P5,P6)  )
       : obj(receiver), method(met)  {}
     rettype call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6) 
       { return (obj->*method)(p1,p2,p3,p4,p5,p6); 
       }
   };

template<class rettype,class T,class T1,class P1,class P2,class P3,class P4,class P5,class P6>
  Connection connect_to_method(
    Signal6_r<rettype,P1,P2,P3,P4,P5,P6> &signal,
    T* receiver,rettype (T1::*method)(P1,P2,P3,P4,P5,P6) )
  {
   Connection_impl *slot=
     new Concretecppslot6_r<rettype,T,P1,P2,P3,P4,P5,P6>(receiver,method );
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_method with data wigh return ****/
template<class rettype,class T,class P1,class P2,class P3,class P4,class P5,class P6,class E>
  class Concretecppslot6cb_r : public Abstractslot6_r <rettype,P1,P2,P3,P4,P5,P6>
  {
   private:
     T* obj;
     rettype (T::*method)(P1,P2,P3,P4,P5,P6,E);
     E cbdata;
   public:
     Concretecppslot6cb_r(T* receiver, rettype (T::*met)(P1,P2,P3,P4,P5,P6,E) ,E cbd )
       : obj(receiver), method(met) ,cbdata(cbd) {}
     rettype call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6) 
       { return (obj->*method)(p1,p2,p3,p4,p5,p6,cbdata); 
       }
   };

template<class rettype,class T,class T1,class P1,class P2,class P3,class P4,class P5,class P6,class E>
  Connection connect_to_method(
    Signal6_r<rettype,P1,P2,P3,P4,P5,P6> &signal,
    T* receiver,rettype (T1::*method)(P1,P2,P3,P4,P5,P6,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretecppslot6cb_r<rettype,T,P1,P2,P3,P4,P5,P6,E>(receiver,method ,cbd);
   signal.insert_connection(slot);
   receiver->insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function  with return ****/
template<class rettype,class M,class P1,class P2,class P3,class P4,class P5,class P6>
class Concretegtkslot6_r : public Abstractslot6_r <rettype,P1,P2,P3,P4,P5,P6>
  {
   private:
     M func;
     
   public:
     Concretegtkslot6_r(M func_ )
       : func(func_)  {}
     rettype call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6)
       { return func(p1,p2,p3,p4,p5,p6); }
     static rettype callback(GtkWidget * ,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,
       Concretegtkslot6_r<rettype,M,P1,P2,P3,P4,P5,P6>* s)
       { return GTKMM_PROXY_RV_HACK s->call(p1,p2,p3,p4,p5,p6); }
  };

template<class rettype,class P1,class P2,class P3,class P4,class P5,class P6>
inline Connection connect_to_function(
    Signal6_r <rettype,P1,P2,P3,P4,P5,P6> &signal,
    rettype (*func)(P1,P2,P3,P4,P5,P6) )
  {
   Connection_impl *slot=
     new Concretegtkslot6_r<rettype,rettype (*)(P1,P2,P3,P4,P5,P6),P1,P2,P3,P4,P5,P6>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_function with data with return ****/
template<class rettype,class M,class P1,class P2,class P3,class P4,class P5,class P6,class E>
class Concretegtkslot6cb_r : public Abstractslot6_r <rettype,P1,P2,P3,P4,P5,P6>
  {
   private:
     M func;
     E cbdata;
   public:
     Concretegtkslot6cb_r(M func_ ,E cbd)
       : func(func_) ,cbdata(cbd) {}
     rettype call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6)
       { return func(p1,p2,p3,p4,p5,p6,cbdata); }
     static rettype callback(GtkWidget * ,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,
       Concretegtkslot6cb_r<rettype,M,P1,P2,P3,P4,P5,P6,E>* s)
       { return GTKMM_PROXY_RV_HACK s->call(p1,p2,p3,p4,p5,p6); }
  };

template<class rettype,class P1,class P2,class P3,class P4,class P5,class P6,class E>
inline Connection connect_to_function(
    Signal6_r <rettype,P1,P2,P3,P4,P5,P6> &signal,
    rettype (*func)(P1,P2,P3,P4,P5,P6,E) ,E cbd)
  {
   Connection_impl *slot=
     new Concretegtkslot6cb_r<rettype,rettype (*)(P1,P2,P3,P4,P5,P6,E),P1,P2,P3,P4,P5,P6,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal  with return ****/
template<class rettype,class M,class P1,class P2,class P3,class P4,class P5,class P6>
  Connection connect_to_signal(
    Signal6_r <rettype,P1,P2,P3,P4,P5,P6> &signal,
    M& func  )
  {
   Connection_impl *slot=
     new Concretegtkslot6_r<rettype,M&,P1,P2,P3,P4,P5,P6>(func );
   signal.insert_connection(slot);
   return Connection(slot);
  }


/**** connect_to_signal with data with return ****/
template<class rettype,class M,class P1,class P2,class P3,class P4,class P5,class P6,class E>
  Connection connect_to_signal(
    Signal6_r <rettype,P1,P2,P3,P4,P5,P6> &signal,
    M& func ,E cbd )
  {
   Connection_impl *slot=
     new Concretegtkslot6cb_r<rettype,M&,P1,P2,P3,P4,P5,P6,E>(func ,cbd);
   signal.insert_connection(slot);
   return Connection(slot);
  }






#endif
