Index: cpp/frams/neuro/geneticneuroparam.cpp
===================================================================
--- cpp/frams/neuro/geneticneuroparam.cpp	(revision 138)
+++ cpp/frams/neuro/geneticneuroparam.cpp	(revision 138)
@@ -0,0 +1,18 @@
+// This file is a part of the Framsticks GDK.
+// Copyright (C) 2002-2014  Maciej Komosinski and Szymon Ulatowski.  See LICENSE.txt for details.
+// Refer to http://www.framsticks.com/ for further information.
+
+#include "geneticneuroparam.h"
+#include <frams/neuro/neurolibrary.h>
+
+GeneticNeuroParam::GeneticNeuroParam(const char* groupname,const char* myname,
+				   const char* prefix,const char* typ)
+	:NeuroLibParam(groupname,myname,prefix),types(typ)
+{}
+
+long GeneticNeuroParam::getInt(int i)
+{return Neuro::getClass(i)->genactive;}
+
+int GeneticNeuroParam::setInt(int i,long v)
+{Neuro::getClass(i)->genactive=v;return PSET_CHANGED;}
+
Index: cpp/frams/neuro/geneticneuroparam.h
===================================================================
--- cpp/frams/neuro/geneticneuroparam.h	(revision 138)
+++ cpp/frams/neuro/geneticneuroparam.h	(revision 138)
@@ -0,0 +1,22 @@
+// This file is a part of the Framsticks GDK.
+// Copyright (C) 2002-2014  Maciej Komosinski and Szymon Ulatowski.  See LICENSE.txt for details.
+// Refer to http://www.framsticks.com/ for further information.
+
+#ifndef _GENETICNEUROPARAM_H_
+#define _GENETICNEUROPARAM_H_
+
+#include "neurolibparam.h"
+
+class GeneticNeuroParam: public NeuroLibParam
+{
+  protected:
+const char* types;
+  public:
+GeneticNeuroParam(const char* groupname,const char* myname, const char* prefix,const char* typ=0);
+
+long getInt(int i);
+int setInt(int i,long v);
+const char *type(int i) {return types?types:NeuroLibParam::type(i);}
+};
+
+#endif
Index: cpp/frams/neuro/neurolibparam.cpp
===================================================================
--- cpp/frams/neuro/neurolibparam.cpp	(revision 138)
+++ cpp/frams/neuro/neurolibparam.cpp	(revision 138)
@@ -0,0 +1,78 @@
+// This file is a part of the Framsticks GDK.
+// Copyright (C) 2002-2014  Maciej Komosinski and Szymon Ulatowski.  See LICENSE.txt for details.
+// Refer to http://www.framsticks.com/ for further information.
+
+#include <ctype.h>
+#include "neurolibparam.h"
+#include <frams/neuro/neurolibrary.h>
+
+NeuroLibParam::NeuroLibParam(const char* gr, const char* name, const char* pref)
+	:mygroup(gr),myname(name),myprefix(pref)
+{
+anode=NeuroLibrary::staticlibrary.classes.l_add.add(
+	STATRICKCALLBACK(this,&NeuroLibParam::neuroclassAdded,0));
+dnode=NeuroLibrary::staticlibrary.classes.l_postdel.add(
+	STATRICKCALLBACK(this,&NeuroLibParam::neuroclassRemoved,0));
+}
+
+NeuroLibParam::~NeuroLibParam()
+{
+NeuroLibrary::staticlibrary.classes.l_add.removeNode(anode);// remove(anode) tez powinno byc ok - do sprawdzenia
+NeuroLibrary::staticlibrary.classes.l_postdel.removeNode(dnode);
+}
+
+void NeuroLibParam::neuroclassAdded(void* data,long i)
+{onadd.action(i);}
+void NeuroLibParam::neuroclassRemoved(void* data,long i)
+{ondelete.action(i);}
+
+static bool isGoodName(const SString& name)
+{
+for(int i=0;i<name.len();i++)
+	if (!isalnum(name[i])) return false;
+return true;
+}
+
+const char *NeuroLibParam::id(int i)
+{
+static SString t;
+if (i>=Neuro::getClassCount()) return 0;
+t=myprefix;
+SString n=Neuro::getClass(i)->getName();
+if (isGoodName(n))
+	t+=n;
+else
+	{//jezeli w nazwie klasy neuronu sa "dziwne" znaki to zamiast tego uzywamy long name
+	// * -> Constant, | -> Bend_muscle, @ -> Rotation_muscle
+	n=Neuro::getClass(i)->getLongName();
+	for(char* p=n.directWrite();*p;p++)
+		if (*p==' ') *p='_';
+	n.endWrite();
+	t+=n;
+	}
+return t;
+}
+
+const char *NeuroLibParam::name(int i)
+{
+static SString t;
+t=Neuro::getClass(i)->getLongName();
+t+=" ("; t+=Neuro::getClassName(i); t+=")";
+return t;
+}
+
+const char *NeuroLibParam::help(int i)
+{
+static SString t;
+t=Neuro::getClass(i)->getSummary();
+return t;
+}
+
+int NeuroLibParam::grmember(int gi,int n)
+{
+return (gi==0)?
+	((n>=getPropCount())?-9999:n)
+	:
+	-9999;
+}
+
Index: cpp/frams/neuro/neurolibparam.h
===================================================================
--- cpp/frams/neuro/neurolibparam.h	(revision 138)
+++ cpp/frams/neuro/neurolibparam.h	(revision 138)
@@ -0,0 +1,52 @@
+// This file is a part of the Framsticks GDK.
+// Copyright (C) 2002-2014  Maciej Komosinski and Szymon Ulatowski.  See LICENSE.txt for details.
+// Refer to http://www.framsticks.com/ for further information.
+
+#ifndef _NEUROLIBPARAM_H_
+#define _NEUROLIBPARAM_H_
+
+#include <frams/param/mutparamiface.h>
+#include <frams/model/modelparts.h>
+
+class NeuroLibParam: public MutableParamInterface
+{
+const char* mygroup;
+const char* myname;
+const char* myprefix;
+CallbackNode *anode,*dnode;
+
+  public:
+NeuroLibParam(const char* gr=0, const char* name=0, const char* pref=0);
+~NeuroLibParam();
+
+#define STATRICKCLASS NeuroLibParam
+VIRTCALLBACKDEF(neuroclassAdded);
+VIRTCALLBACKDEF(neuroclassRemoved);
+#undef STATRICKCLASS
+
+int getGroupCount() {return 1;}
+int getPropCount()  {return Neuro::getClassCount();}
+
+const char* getName() {return myname;}
+const char *grname(int gi) {return (gi==0)?mygroup:0;}
+
+const char *id(int i);
+const char *name(int i);
+const char *help(int i);
+const char *type(int i) {return "d 0 1";}
+int flags(int i)        {return 0;}
+int group(int i)        {return 0;}
+int grmember(int gi,int n);
+void call(int i,ExtValue* args,ExtValue *ret) {}
+
+SString getString(int i) {return SString();}
+double getDouble(int) {return 0;}
+ExtObject getObject(int i) {return ExtObject();}
+ExtValue getExtValue(int i) {return ExtValue();}
+int setDouble(int i, double) {return 0;}
+int setString(int i, const SString &v) {return 0;}
+int setObject(int i, const ExtObject &v) {return 0;}
+int setExtValue(int i, const ExtValue &v) {return 0;}
+};
+
+#endif
