EVOLUTION-MANAGER
Edit File: cli_div.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Generic CLI container</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for cli_div {cli}"><tr><td>cli_div {cli}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Generic CLI container</h2> <h3>Description</h3> <p>See <a href="containers.html">containers</a>. A <code>cli_div</code> container is special, because it may add new themes, that are valid within the container. </p> <h3>Usage</h3> <pre> cli_div( id = NULL, class = NULL, theme = NULL, .auto_close = TRUE, .envir = parent.frame() ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>id</code></td> <td> <p>Element id, a string. If <code>NULL</code>, then a new id is generated and returned.</p> </td></tr> <tr valign="top"><td><code>class</code></td> <td> <p>Class name, sting. Can be used in themes.</p> </td></tr> <tr valign="top"><td><code>theme</code></td> <td> <p>A custom theme for the container. See <a href="themes.html">themes</a>.</p> </td></tr> <tr valign="top"><td><code>.auto_close</code></td> <td> <p>Whether to close the container, when the calling function finishes (or <code>.envir</code> is removed, if specified).</p> </td></tr> <tr valign="top"><td><code>.envir</code></td> <td> <p>Environment to evaluate the glue expressions in. It is also used to auto-close the container if <code>.auto_close</code> is <code>TRUE</code>.</p> </td></tr> </table> <h3>Details</h3> <h4>Custom themes</h4> <div class="sourceCode r"><pre>d <- cli_div(theme = list(h1 = list(color = "cyan", "font-weight" = "bold"))) cli_h1("Custom title") cli_end(d) </pre></div> <div class="asciicast" style="color: #172431;font-family: 'Fira Code',Monaco,Consolas,Menlo,'Bitstream Vera Sans Mono','Powerline Symbols',monospace;line-height: 1.300000"><pre> #> #> <span style="font-weight: bold;color: #2AA198;">Custom title</span> </pre></div> <h4>Auto-closing</h4> <p>By default a <code>cli_div()</code> is closed automatically when the calling frame exits. </p> <div class="sourceCode r"><pre>div <- function() { cli_div(class = "tmp", theme = list(.tmp = list(color = "yellow"))) cli_text("This is yellow") } div() cli_text("This is not yellow any more") </pre></div> <div class="asciicast" style="color: #172431;font-family: 'Fira Code',Monaco,Consolas,Menlo,'Bitstream Vera Sans Mono','Powerline Symbols',monospace;line-height: 1.300000"><pre> #> <span style="color: #B58900;">This is yellow</span> #> This is not yellow any more </pre></div> <h3>Value</h3> <p>The id of the new container element, invisibly. </p> <hr /><div style="text-align: center;">[Package <em>cli</em> version 3.4.1 <a href="00Index.html">Index</a>]</div> </body></html>