Files
SwiftTerm/docs/Structs/CharacterStyle.html

521 lines
26 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en">
<head>
<title>CharacterStyle Structure Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Struct/CharacterStyle" class="dashAnchor"></a>
<a title="CharacterStyle Structure Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">SwiftTerm 1.0 Docs</a> (61% documented)</p>
<p class="header-right"><a href="https://github.com/migueldeicaza/SwiftTerm"><img src="../img/gh.png"/>View on GitHub</a></p>
<p class="header-right"><a href="dash-feed://https%3A%2F%2Fmigueldeicaza%2Egithub%2Eio%2FSwiftTerm%2Fdocsets%2FSwiftTerm%2Exml"><img src="../img/dash.png"/>Install in Dash</a></p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html">SwiftTerm Reference</a>
<img id="carat" src="../img/carat.png" />
CharacterStyle Structure Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/HeadlessTerminal.html">HeadlessTerminal</a>
</li>
<li class="nav-group-task">
<a href="../Classes/LocalProcess.html">LocalProcess</a>
</li>
<li class="nav-group-task">
<a href="../Classes/LocalProcessTerminalView.html">LocalProcessTerminalView</a>
</li>
<li class="nav-group-task">
<a href="../Classes/PseudoTerminalHelpers.html">PseudoTerminalHelpers</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Terminal.html">Terminal</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Terminal/MouseMode.html">– MouseMode</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Terminal/WindowManipulationCommand.html">– WindowManipulationCommand</a>
</li>
<li class="nav-group-task">
<a href="../Classes/TerminalDebugView.html">TerminalDebugView</a>
</li>
<li class="nav-group-task">
<a href="../Classes/TerminalView.html">TerminalView</a>
</li>
<li class="nav-group-task">
<a href="../Classes/TerminalView/Options.html">– Options</a>
</li>
<li class="nav-group-task">
<a href="../Classes/TerminalView.html">TerminalView</a>
</li>
<li class="nav-group-task">
<a href="../Classes/TerminalView/Options.html">– Options</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Enums/CursorStyle.html">CursorStyle</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Extensions/TerminalViewDelegate.html">TerminalViewDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Protocols/LocalProcessDelegate.html">LocalProcessDelegate</a>
</li>
<li class="nav-group-task">
<a href="../Protocols/LocalProcessTerminalViewDelegate.html">LocalProcessTerminalViewDelegate</a>
</li>
<li class="nav-group-task">
<a href="../Protocols/TerminalDelegate.html">TerminalDelegate</a>
</li>
<li class="nav-group-task">
<a href="../Protocols/TerminalViewDelegate.html">TerminalViewDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Structs/Attribute.html">Attribute</a>
</li>
<li class="nav-group-task">
<a href="../Structs/Attribute/Color.html">– Color</a>
</li>
<li class="nav-group-task">
<a href="../Structs/CharData.html">CharData</a>
</li>
<li class="nav-group-task">
<a href="../Structs/CharacterStyle.html">CharacterStyle</a>
</li>
<li class="nav-group-task">
<a href="../Structs/TerminalOptions.html">TerminalOptions</a>
</li>
<li class="nav-group-task">
<a href="../Structs/TinyAtom.html">TinyAtom</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>CharacterStyle</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">CharacterStyle</span> <span class="p">:</span> <span class="kt">OptionSet</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
</div>
</div>
<p>This option set describes the character style for a cell, this includes
information about the font to use as well as decorations on the text</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:SY8rawValue03RawB0Qzvp"></a>
<a name="//apple_ref/swift/Property/rawValue" class="dashAnchor"></a>
<a class="token" href="#/s:SY8rawValue03RawB0Qzvp">rawValue</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">rawValue</span><span class="p">:</span> <span class="kt">UInt8</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:9SwiftTerm14CharacterStyleV8rawValueACs5UInt8V_tcfc"></a>
<a name="//apple_ref/swift/Method/init(rawValue:)" class="dashAnchor"></a>
<a class="token" href="#/s:9SwiftTerm14CharacterStyleV8rawValueACs5UInt8V_tcfc">init(rawValue:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Constructs a character attribute from a raw value.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">rawValue</span><span class="p">:</span> <span class="kt">UInt8</span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L19-L22">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:9SwiftTerm14CharacterStyleV9attributeACs5Int32V_tcfc"></a>
<a name="//apple_ref/swift/Method/init(attribute:)" class="dashAnchor"></a>
<a class="token" href="#/s:9SwiftTerm14CharacterStyleV9attributeACs5Int32V_tcfc">init(attribute:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Constructs the CharacterStyle from a CharData.attribute that encodes the foreground, background and flags</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">attribute</span><span class="p">:</span> <span class="kt">Int32</span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L27-L30">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:9SwiftTerm14CharacterStyleV4noneACvpZ"></a>
<a name="//apple_ref/swift/Variable/none" class="dashAnchor"></a>
<a class="token" href="#/s:9SwiftTerm14CharacterStyleV4noneACvpZ">none</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Empty style</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">none</span><span class="p">:</span> <span class="kt">CharacterStyle</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L33">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:9SwiftTerm14CharacterStyleV4boldACvpZ"></a>
<a name="//apple_ref/swift/Variable/bold" class="dashAnchor"></a>
<a class="token" href="#/s:9SwiftTerm14CharacterStyleV4boldACvpZ">bold</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Use a bold font</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">bold</span><span class="p">:</span> <span class="kt">CharacterStyle</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L35">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:9SwiftTerm14CharacterStyleV9underlineACvpZ"></a>
<a name="//apple_ref/swift/Variable/underline" class="dashAnchor"></a>
<a class="token" href="#/s:9SwiftTerm14CharacterStyleV9underlineACvpZ">underline</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Underline the currentlin line</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">underline</span><span class="p">:</span> <span class="kt">CharacterStyle</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L37">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:9SwiftTerm14CharacterStyleV5blinkACvpZ"></a>
<a name="//apple_ref/swift/Variable/blink" class="dashAnchor"></a>
<a class="token" href="#/s:9SwiftTerm14CharacterStyleV5blinkACvpZ">blink</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The text should blink</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">blink</span><span class="p">:</span> <span class="kt">CharacterStyle</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L39">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:9SwiftTerm14CharacterStyleV7inverseACvpZ"></a>
<a name="//apple_ref/swift/Variable/inverse" class="dashAnchor"></a>
<a class="token" href="#/s:9SwiftTerm14CharacterStyleV7inverseACvpZ">inverse</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The text should be inverted (background and foreground are swapped)</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">inverse</span><span class="p">:</span> <span class="kt">CharacterStyle</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L41">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:9SwiftTerm14CharacterStyleV9invisibleACvpZ"></a>
<a name="//apple_ref/swift/Variable/invisible" class="dashAnchor"></a>
<a class="token" href="#/s:9SwiftTerm14CharacterStyleV9invisibleACvpZ">invisible</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The text should be replaced with white space - there is a debate as to what to do about it when copy/pasting
code as different terminal emulators have taken conflicting takes, so your UI driver might have to choose</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">invisible</span><span class="p">:</span> <span class="kt">CharacterStyle</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L44">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:9SwiftTerm14CharacterStyleV3dimACvpZ"></a>
<a name="//apple_ref/swift/Variable/dim" class="dashAnchor"></a>
<a class="token" href="#/s:9SwiftTerm14CharacterStyleV3dimACvpZ">dim</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Font should be rendered more lightly, implementation specific</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">dim</span><span class="p">:</span> <span class="kt">CharacterStyle</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L46">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:9SwiftTerm14CharacterStyleV6italicACvpZ"></a>
<a name="//apple_ref/swift/Variable/italic" class="dashAnchor"></a>
<a class="token" href="#/s:9SwiftTerm14CharacterStyleV6italicACvpZ">italic</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Use italic fonts</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">italic</span><span class="p">:</span> <span class="kt">CharacterStyle</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L48">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:9SwiftTerm14CharacterStyleV10crossedOutACvpZ"></a>
<a name="//apple_ref/swift/Variable/crossedOut" class="dashAnchor"></a>
<a class="token" href="#/s:9SwiftTerm14CharacterStyleV10crossedOutACvpZ">crossedOut</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Cross out the text</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">crossedOut</span><span class="p">:</span> <span class="kt">CharacterStyle</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L50">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2020 <a class="link" href="https://tirania.org/" target="_blank" rel="external">Miguel de Icaza</a>. All rights reserved. (Last updated: 2020-04-28)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>