<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><title>Python: polc.renderers</title> </head><body bgcolor="#f0f0f8"> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> <tr bgcolor="#7799ee"> <td valign=bottom> <br> <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="polc.html"><font color="#ffffff">polc</font></a>.renderers</strong></big></big></font></td ><td align=right valign=bottom ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/mud/nakedmud-mod/lib/pymodules/polc/renderers.py">/mud/nakedmud-mod/lib/pymodules/polc/renderers.py</a></font></td></tr></table> <p><tt>################################################################################<br> #<br> # Four Worlds<br> # Copyright (c) 2009-????<br> #<br> # Package: polc<br> # File: renderers.py<br> #<br> # The automatic Python OLC system, capable of generating an online content editor<br> # for a given Python class or dict by using dictionaries to discover properties.<br> #<br> # Rendering of values for display in the OLC menu.<br> #<br> # Author: Stendec<br> #<br> ################################################################################</tt></p> <p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#aa55cc"> <td colspan=3 valign=bottom> <br> <font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="auxiliary.html">auxiliary</a><br> </td><td width="25%" valign=top><a href="copy.html">copy</a><br> </td><td width="25%" valign=top><a href="mudsys.html">mudsys</a><br> </td><td width="25%" valign=top><a href="storage.html">storage</a><br> </td></tr></table></td></tr></table><p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#eeaa77"> <td colspan=3 valign=bottom> <br> <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> <tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> <td width="100%"><dl><dt><a name="-fancy_key"><strong>fancy_key</strong></a>(key)</dt><dd><tt>Attempt to make a key name fancy. If it's in an array of default names, return the<br> corresponding fancy name. Otherwise, convert underscores to spaces and make it<br> title case.</tt></dd></dl> <dl><dt><a name="-format_string"><strong>format_string</strong></a>(...)</dt><dd><tt><a href="#-format_string">format_string</a>(text, indent=True, width=80)<br> <br> Format a block of text to be of the specified width, possibly indenting<br> paragraphs.</tt></dd></dl> <dl><dt><strong>highlight_color</strong> <em>lambda</em> v</dt></dl> <dl><dt><a name="-render_bool"><strong>render_bool</strong></a>(sock, data, key, value)</dt><dd><tt>Render a boolean value for the automatic OLC system.</tt></dd></dl> <dl><dt><a name="-render_choice"><strong>render_choice</strong></a>(sock, data, key, value)</dt><dd><tt>Render a choice for the automatic OLC system.</tt></dd></dl> <dl><dt><a name="-render_choice_list"><strong>render_choice_list</strong></a>(sock, data, key, value)</dt><dd><tt>Render a list of choices for the automatic OLC system.</tt></dd></dl> <dl><dt><a name="-render_choice_select"><strong>render_choice_select</strong></a>(sock, data, key, value)</dt><dd><tt>Render a list of choices to select from for the prompt after selecting a key.</tt></dd></dl> <dl><dt><a name="-render_list"><strong>render_list</strong></a>(sock, data, key, value)</dt><dd><tt>Render a list for the automatic OLC system. Strings are<br> output without being escaped and surrounded in quotation<br> marks.</tt></dd></dl> <dl><dt><a name="-render_number"><strong>render_number</strong></a>(sock, data, key, value)</dt><dd><tt>Render a number value for the automatic OLC system.</tt></dd></dl> <dl><dt><a name="-render_string"><strong>render_string</strong></a>(sock, data, key, value)</dt><dd><tt>Render a string value for the automatic OLC system.</tt></dd></dl> <dl><dt><a name="-render_subitem"><strong>render_subitem</strong></a>(sock, data, key, value)</dt><dd><tt>Render a subitem key for the automatic OLC system.</tt></dd></dl> </td></tr></table><p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#55aa55"> <td colspan=3 valign=bottom> <br> <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> <tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> <td width="100%"><strong>StringTypes</strong> = (<type 'str'>, <type 'unicode'>)<br> <strong>fancy_keys</strong> = {'desc': 'Description', 'edesc': 'Extra Descriptions', 'mdesc': 'Room Description for Multiple Occurences', 'mname': 'Name for Multiple Occurences', 'rdesc': 'Room Description'}<br> <strong>menukeys</strong> = '1234567890ABCDEFGHIJKLMNOPRSTUVWXYZ'</td></tr></table> </body></html>