// Generated by admPyClass.pl do not edit !
// addItem -> void addItem (str ) 
static tp_obj zzpy_addItem(TP)
 {
  tp_obj self = tp_getraw(tp);
  TinyParams pm(tp);
  ADM_scriptDFMenuHelper *me = (ADM_scriptDFMenuHelper *)pm.asThis(&self, ADM_PYID_DF_INTEGER);

  const char *p0 = pm.asString();
  me->addItem(p0); 
 return tp_None;
}
tp_obj zzpy__pyDFMenu_get(tp_vm *vm)
{
  tp_obj self = tp_getraw(vm);
  IScriptEngine *engine = (IScriptEngine*)tp_get(vm, vm->builtins, tp_string("userdata")).data.val;
  IEditor *editor = engine->editor();
  TinyParams pm(vm);
  ADM_scriptDFMenuHelper *me=(ADM_scriptDFMenuHelper *)pm.asThis(&self, ADM_PYID_DF_INTEGER);
  char const *key = pm.asString();
  if (!strcmp(key, "index"))
  {
     if(!me) pm.raise("pyDFMenu:No this!");
     return tp_number(me->index());
  }
  if (!strcmp(key, "addItem"))
  {
     return tp_method(vm, self, zzpy_addItem);
  }
  return tp_get(vm, self, tp_string(key));
}
tp_obj zzpy__pyDFMenu_set(tp_vm *vm)
{
  tp_obj self = tp_getraw(vm);
  IScriptEngine *engine = (IScriptEngine*)tp_get(vm, vm->builtins, tp_string("userdata")).data.val;
  IEditor *editor = engine->editor();
  TinyParams pm(vm);
  ADM_scriptDFMenuHelper *me = (ADM_scriptDFMenuHelper *)pm.asThis(&self, ADM_PYID_DF_INTEGER);
  char const *key = pm.asString();
  if (!strcmp(key, "index"))
  {
     if(!me) pm.raise("pyDFMenu:No this!");
     int val = pm.asInt();
     me->setIndex(val);
     return tp_None;
  }
  return tp_None;
}
// Dctor
static void myDtorpyDFMenu(tp_vm *vm,tp_obj self)
{
  ADM_scriptDFMenuHelper *cookie = (ADM_scriptDFMenuHelper *)self.data.val;
  if (cookie) delete cookie;
  self.data.val = NULL;
}
// Ctor (str)
static tp_obj myCtorpyDFMenu(tp_vm *vm)
{
  tp_obj self = tp_getraw(vm);
  TinyParams pm(vm);
  const char *p0 = pm.asString();
  ADM_scriptDFMenuHelper *me = new ADM_scriptDFMenuHelper(p0);
  tp_obj cdata = tp_data(vm, ADM_PYID_DF_INTEGER, me);
  cdata.data.info->xfree = myDtorpyDFMenu;
  tp_set(vm, self, tp_string("cdata"), cdata);
  return tp_None;
}
static tp_obj zzpy__pyDFMenu_help(TP)
{
	PythonEngine *engine = (PythonEngine*)tp_get(tp, tp->builtins, tp_string("userdata")).data.val;

	engine->callEventHandlers(IScriptEngine::Information, NULL, -1, "addItem(str)\n");

	return tp_None;
};
tp_obj initClasspyDFMenu(tp_vm *vm)
{
  tp_obj myClass = tp_class(vm);
  tp_set(vm,myClass, tp_string("__init__"), tp_fnc(vm,myCtorpyDFMenu));
  tp_set(vm,myClass, tp_string("__set__"), tp_fnc(vm,zzpy__pyDFMenu_set));
  tp_set(vm,myClass, tp_string("__get__"), tp_fnc(vm,zzpy__pyDFMenu_get));
  tp_set(vm,myClass, tp_string("help"), tp_fnc(vm,zzpy__pyDFMenu_help));
  return myClass;
}
