diff options
author | hut <hut@lavabit.com> | 2010-01-13 05:51:27 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-01-13 05:51:27 +0100 |
commit | b3556b21e23eb3381b220e0d3319d94b3a89e0ac (patch) | |
tree | 453f160878fd0499907d9bcfd3d32f11084aa50c /doc/pydoc/ranger.gui.colorscheme.html | |
parent | 0cfc59d6028c6b43e1dc323b94c84a8157db1859 (diff) | |
download | ranger-b3556b21e23eb3381b220e0d3319d94b3a89e0ac.tar.gz |
updated pydoc documentation
Diffstat (limited to 'doc/pydoc/ranger.gui.colorscheme.html')
-rw-r--r-- | doc/pydoc/ranger.gui.colorscheme.html | 45 |
1 files changed, 40 insertions, 5 deletions
diff --git a/doc/pydoc/ranger.gui.colorscheme.html b/doc/pydoc/ranger.gui.colorscheme.html index 5bc0e2df..d7b07f59 100644 --- a/doc/pydoc/ranger.gui.colorscheme.html +++ b/doc/pydoc/ranger.gui.colorscheme.html @@ -9,7 +9,31 @@ <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="ranger.html"><font color="#ffffff">ranger</font></a>.<a href="ranger.gui.html"><font color="#ffffff">gui</font></a>.colorscheme</strong></big></big></font></td ><td align=right valign=bottom ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/hut/work/ranger/ranger/gui/colorscheme.py">/home/hut/work/ranger/ranger/gui/colorscheme.py</a></font></td></tr></table> - <p></p> + <p><tt>Colorschemes define colors for specific contexts.<br> + <br> +Generally, this works by passing a set of keywords (strings) to<br> +the colorscheme.get() method to receive the tuple (fg, bg, attr).<br> +fg, bg are the foreground and background colors and attr is the attribute.<br> +The values are specified in ranger.gui.color.<br> + <br> +A colorscheme must...<br> + <br> +1. be inside either of these directories:<br> +~/.ranger/colorschemes/<br> +path/to/ranger/colorschemes/<br> + <br> +2. be a subclass of ranger.gui.colorscheme.<a href="#ColorScheme">ColorScheme</a><br> + <br> +3. implement a use(self, context) method which returns (fg, bg, attr).<br> +context is a struct which contains all entries of CONTEXT_KEYS,<br> +associated with either True or False.<br> + <br> +define which colorscheme to use by having this to your options.py:<br> +from ranger import colorschemes<br> +colorscheme = colorschemes.filename<br> + <br> +If your colorscheme-file contains more than one colorscheme, specify it with:<br> +colorscheme = colorschemes.filename.classname</tt></p> <p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ee77aa"> @@ -31,13 +55,24 @@ <td colspan=3 valign=bottom> <br> <font color="#000000" face="helvetica, arial"><a name="ColorScheme">class <strong>ColorScheme</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr> -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> +<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> +<td colspan=2><tt>This is the class that colorschemes must inherit from.<br> + <br> +it defines <a href="#ColorScheme-get">get</a>() <br> +it defines the <a href="#ColorScheme-get">get</a>() method, which returns the color tuple<br> +which fits to the given keys.<br> </tt></td></tr> +<tr><td> </td> <td width="100%">Methods defined here:<br> <dl><dt><a name="ColorScheme-__init__"><strong>__init__</strong></a>(self)</dt></dl> -<dl><dt><a name="ColorScheme-get"><strong>get</strong></a>(self, *keys)</dt><dd><tt>Determine the (fg, bg, attr) tuple or get it from cache</tt></dd></dl> +<dl><dt><a name="ColorScheme-get"><strong>get</strong></a>(self, *keys)</dt><dd><tt>Returns the (fg, bg, attr) for the given keys.<br> + <br> +Using this function rather than <a href="#ColorScheme-use">use</a>() will cache all<br> +colors for faster access.</tt></dd></dl> -<dl><dt><a name="ColorScheme-get_attr"><strong>get_attr</strong></a>(self, *keys)</dt><dd><tt>Returns the curses attr integer for the specified keys</tt></dd></dl> +<dl><dt><a name="ColorScheme-get_attr"><strong>get_attr</strong></a>(self, *keys)</dt><dd><tt>Returns the curses attribute for the specified keys<br> + <br> +Ready to use for curses.setattr()</tt></dd></dl> <dl><dt><a name="ColorScheme-use"><strong>use</strong></a>(self, context)</dt><dd><tt>Use the colorscheme to determine the (fg, bg, attr) tuple.<br> This is a dummy function which always returns default_colors.<br> @@ -58,5 +93,5 @@ Data descriptors defined here:<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>CONTEXT_KEYS</strong> = ['reset', 'error', 'in_browser', 'in_statusbar', 'in_titlebar', 'in_console', 'in_notify', 'in_taskview', 'directory', 'file', 'hostname', 'executable', 'media', 'link', 'video', 'audio', 'image', 'media', 'document', 'container', ...]</td></tr></table> +<td width="100%"><strong>CONTEXT_KEYS</strong> = ['reset', 'error', 'in_browser', 'in_statusbar', 'in_titlebar', 'in_console', 'in_pager', 'in_taskview', 'directory', 'file', 'hostname', 'executable', 'media', 'link', 'video', 'audio', 'image', 'media', 'document', 'container', ...]</td></tr></table> </body></html> \ No newline at end of file |