olc.html 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <html><head><title>Python: olc</title>
  3. </head><body bgcolor="#f0f0f8">
  4. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
  5. <tr bgcolor="#7799ee">
  6. <td valign=bottom>&nbsp;<br>
  7. <font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>olc</strong></big></big></font></td
  8. ><td align=right valign=bottom
  9. ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br>(built-in)</font></td></tr></table>
  10. <p><tt>This&nbsp;is&nbsp;the&nbsp;Python&nbsp;wrapper&nbsp;for&nbsp;the&nbsp;online&nbsp;creation&nbsp;module.&nbsp;Allows&nbsp;users<br>
  11. to&nbsp;set&nbsp;up&nbsp;new&nbsp;menus&nbsp;and&nbsp;handlers&nbsp;for&nbsp;editing&nbsp;data,&nbsp;such&nbsp;as&nbsp;characters,<br>
  12. while&nbsp;online.</tt></p>
  13. <p>
  14. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  15. <tr bgcolor="#eeaa77">
  16. <td colspan=3 valign=bottom>&nbsp;<br>
  17. <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
  18. <tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  19. <td width="100%"><dl><dt><a name="-do_olc"><strong>do_olc</strong></a>(...)</dt><dd><tt><a href="#-do_olc">do_olc</a>(sock,&nbsp;menu_func,&nbsp;chooser_func,&nbsp;parse_func,&nbsp;saver_func,&nbsp;data,&nbsp;autosave=False)<br>
  20. &nbsp;<br>
  21. Entry&nbsp;point&nbsp;to&nbsp;the&nbsp;olc&nbsp;system.&nbsp;See&nbsp;olc2/olc.h&nbsp;for&nbsp;documentation.</tt></dd></dl>
  22. <dl><dt><a name="-extend"><strong>extend</strong></a>(...)</dt><dd><tt><a href="#-extend">extend</a>(olc_type,&nbsp;optname,&nbsp;menu_func,&nbsp;chooser_func,&nbsp;parse_func&nbsp;=&nbsp;None,<br>
  23. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fromproto_func&nbsp;=&nbsp;None,&nbsp;toproto_func&nbsp;=&nbsp;None)<br>
  24. &nbsp;<br>
  25. Register&nbsp;a&nbsp;new&nbsp;olc&nbsp;menu&nbsp;extender.&nbsp;Types&nbsp;are&nbsp;medit,&nbsp;redit,&nbsp;and&nbsp;oedit.&nbsp;See<br>
  26. olc2/olc_extender.h&nbsp;for&nbsp;documentation.</tt></dd></dl>
  27. <dl><dt><a name="-item_add_olc"><strong>item_add_olc</strong></a>(...)</dt><dd><tt><a href="#-item_add_olc">item_add_olc</a>(itemtype,&nbsp;menu_func,&nbsp;chooser_func,&nbsp;parse_func,<br>
  28. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fromproto_func,&nbsp;toproto_func)<br>
  29. &nbsp;<br>
  30. Register&nbsp;a&nbsp;new&nbsp;olc&nbsp;handler&nbsp;for&nbsp;an&nbsp;item&nbsp;type.&nbsp;See&nbsp;items/iedit.h&nbsp;for<br>
  31. documentation.</tt></dd></dl>
  32. </td></tr></table><p>
  33. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  34. <tr bgcolor="#55aa55">
  35. <td colspan=3 valign=bottom>&nbsp;<br>
  36. <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
  37. <tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  38. <td width="100%"><strong>MENU_CHOICE_INVALID</strong> = -1<br>
  39. <strong>MENU_CHOICE_OK</strong> = -2<br>
  40. <strong>MENU_NOCHOICE</strong> = 0</td></tr></table>
  41. </body></html>