// Generated by admPyClass.pl from binding/pyDialogFactory.admPyClass, DO NOT edit !
// addControl -> void addControl(ptr@ADM_scriptDFBaseHelper)
static tp_obj zzpy_addControl(TP)
{
  tp_obj self = tp_getraw(tp);
  TinyParams pm(tp);
  ADM_scriptDialogFactoryHelper *me = (ADM_scriptDialogFactoryHelper *)pm.asThis(&self, ADM_PYID_DIALOGF);

  ADM_scriptDFBaseHelper *p0 = ( ADM_scriptDFBaseHelper *)pm.asObjectPointer();
  me->addControl(p0);
  return tp_None;
}
// show -> int run(void)
static tp_obj zzpy_show(TP)
{
  tp_obj self = tp_getraw(tp);
  TinyParams pm(tp);
  ADM_scriptDialogFactoryHelper *me = (ADM_scriptDialogFactoryHelper *)pm.asThis(&self, ADM_PYID_DIALOGF);

  int r = me->run();
  return tp_number(r);
}
tp_obj zzpy__pyDialogFactory_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_scriptDialogFactoryHelper *me = (ADM_scriptDialogFactoryHelper *)pm.asThis(&self, ADM_PYID_DIALOGF);
  char const *key = pm.asString();
  if (!strcmp(key, "addControl"))
  {
    return tp_method(vm, self, zzpy_addControl);
  }
  if (!strcmp(key, "show"))
  {
    return tp_method(vm, self, zzpy_show);
  }
  return tp_get(vm, self, tp_string(key));
}
tp_obj zzpy__pyDialogFactory_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_scriptDialogFactoryHelper *me = (ADM_scriptDialogFactoryHelper *)pm.asThis(&self, ADM_PYID_DIALOGF);
  char const *key = pm.asString();
  return tp_None;
}
// Dctor
static void myDtorpyDialogFactory(tp_vm *vm,tp_obj self)
{
  ADM_scriptDialogFactoryHelper *cookie = (ADM_scriptDialogFactoryHelper *)self.data.val;
  if (cookie) delete cookie;
  self.data.val = NULL;
}
// Ctor (str)
static tp_obj myCtorpyDialogFactory(tp_vm *vm)
{
  tp_obj self = tp_getraw(vm);
  TinyParams pm(vm);
  const char *p0 = pm.asString();
  ADM_scriptDialogFactoryHelper *me = new ADM_scriptDialogFactoryHelper(p0);
  tp_obj cdata = tp_data(vm, ADM_PYID_DIALOGF, me);
  cdata.data.info->xfree = myDtorpyDialogFactory;
  tp_set(vm, self, tp_string("cdata"), cdata);
  return tp_None;
}
static tp_obj zzpy__pyDialogFactory_help(TP)
{
  PythonEngine *engine = (PythonEngine*)tp_get(tp, tp->builtins, tp_string("userdata")).data.val;

  engine->callEventHandlers(IScriptEngine::Information, NULL, -1, "constructor:\n");
  engine->callEventHandlers(IScriptEngine::Information, NULL, -1, "obj	DialogFactory(str title)\n");
  engine->callEventHandlers(IScriptEngine::Information, NULL, -1, "methods:\n");
  engine->callEventHandlers(IScriptEngine::Information, NULL, -1, "void\t addControl(ptr@ADM_scriptDFBaseHelper)\n");
  engine->callEventHandlers(IScriptEngine::Information, NULL, -1, "int\t show()\n");

  return tp_None;
}
tp_obj initClasspyDialogFactory(tp_vm *vm)
{
  tp_obj myClass = tp_class(vm);
  tp_set(vm,myClass, tp_string("__init__"), tp_fnc(vm,myCtorpyDialogFactory));
  tp_set(vm,myClass, tp_string("__set__"), tp_fnc(vm,zzpy__pyDialogFactory_set));
  tp_set(vm,myClass, tp_string("__get__"), tp_fnc(vm,zzpy__pyDialogFactory_get));
  tp_set(vm,myClass, tp_string("help"), tp_fnc(vm,zzpy__pyDialogFactory_help));
  return myClass;
}
