Files
SwiftTerm/docs/Structs/Attribute.html
2020-05-30 23:42:41 -04:00

356 lines
17 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>Attribute 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/Attribute" class="dashAnchor"></a>
<a title="Attribute Structure Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">SwiftTerm 1.0 Docs</a> (65% 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" />
Attribute 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/Color.html">Color</a>
</li>
<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/TerminalAccessory.html">TerminalAccessory</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/Font.html">– Font</a>
</li>
<li class="nav-group-task">
<a href="../Classes/TerminalView.html">TerminalView</a>
</li>
<li class="nav-group-task">
<a href="../Classes/TerminalView/Font.html">– Font</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>
<li class="nav-group-name">
<a href="../Typealiases.html">Type Aliases</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Typealiases.html#/s:9SwiftTerm7TTImagea">TTImage</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>Attribute</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">Attribute</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
</div>
</div>
<p>Attribute contains the foreground and background color information for the invidual
cells, as well as the character style of the cell (bold, underline, inverse) that the character
should be drawn as.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:9SwiftTerm9AttributeV5ColorO"></a>
<a name="//apple_ref/swift/Enum/Color" class="dashAnchor"></a>
<a class="token" href="#/s:9SwiftTerm9AttributeV5ColorO">Color</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The various ways in which the color was expressed</p>
<a href="../Structs/Attribute/Color.html" class="slightly-smaller">See more</a>
</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">enum</span> <span class="kt">Color</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L60-L93">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:9SwiftTerm9AttributeV5emptyACvpZ"></a>
<a name="//apple_ref/swift/Variable/empty" class="dashAnchor"></a>
<a class="token" href="#/s:9SwiftTerm9AttributeV5emptyACvpZ">empty</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The empty attribute is configured to be use the defaultColor for the foreground, and the
defaultInvertedColor for the background and an emptu 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">empty</span><span class="p">:</span> <span class="kt">Attribute</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L97">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:9SwiftTerm9AttributeV2fgAC5ColorOvp"></a>
<a name="//apple_ref/swift/Property/fg" class="dashAnchor"></a>
<a class="token" href="#/s:9SwiftTerm9AttributeV2fgAC5ColorOvp">fg</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Foreground and background colors</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">private(set)</span> <span class="k">var</span> <span class="nv">fg</span><span class="p">:</span> <span class="kt"><a href="../Structs/Attribute/Color.html">Color</a></span> <span class="p">{</span> <span class="k">get</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#L100">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:9SwiftTerm9AttributeV2bgAC5ColorOvp"></a>
<a name="//apple_ref/swift/Property/bg" class="dashAnchor"></a>
<a class="token" href="#/s:9SwiftTerm9AttributeV2bgAC5ColorOvp">bg</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="kd">private(set)</span> <span class="k">var</span> <span class="nv">bg</span><span class="p">:</span> <span class="kt"><a href="../Structs/Attribute/Color.html">Color</a></span> <span class="p">{</span> <span class="k">get</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#L100">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:9SwiftTerm9AttributeV5styleAA14CharacterStyleVvp"></a>
<a name="//apple_ref/swift/Property/style" class="dashAnchor"></a>
<a class="token" href="#/s:9SwiftTerm9AttributeV5styleAA14CharacterStyleVvp">style</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Undocumented</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">private(set)</span> <span class="k">var</span> <span class="nv">style</span><span class="p">:</span> <span class="kt"><a href="../Structs/CharacterStyle.html">CharacterStyle</a></span> <span class="p">{</span> <span class="k">get</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#L">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:SQ2eeoiySbx_xtFZ"></a>
<a name="//apple_ref/swift/Method/==(_:_:)" class="dashAnchor"></a>
<a class="token" href="#/s:SQ2eeoiySbx_xtFZ">==(_:<wbr>_:<wbr>)</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="kd">static</span> <span class="kd">func</span> <span class="o">==</span> <span class="p">(</span><span class="nv">lhs</span><span class="p">:</span> <span class="kt">Attribute</span><span class="p">,</span> <span class="nv">rhs</span><span class="p">:</span> <span class="kt">Attribute</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Bool</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/CharData.swift#L104-L107">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-05-30)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>