805 lines
20 KiB
HTML
805 lines
20 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
|
|
<title>UPBodyEvent Class Reference</title>
|
|
<meta id="xcode-display" name="xcode-display" content="render"/>
|
|
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
|
|
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
|
|
<meta name="generator" content="appledoc 2.2 (build 961)" />
|
|
</head>
|
|
<body>
|
|
<header id="top_header">
|
|
<div id="library" class="hideInXcode">
|
|
<h1><a id="libraryTitle" href="../index.html">UPPlatformSDK </a></h1>
|
|
<a id="developerHome" href="../index.html">Jawbone</a>
|
|
</div>
|
|
|
|
<div id="title" role="banner">
|
|
<h1 class="hideInXcode">UPBodyEvent Class Reference</h1>
|
|
</div>
|
|
<ul id="headerButtons" role="toolbar">
|
|
<li id="toc_button">
|
|
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
|
|
</li>
|
|
<li id="jumpto_button" role="navigation">
|
|
<select id="jumpTo">
|
|
<option value="top">Jump To…</option>
|
|
|
|
<option value="overview">Overview</option>
|
|
|
|
|
|
|
|
|
|
<option value="tasks">Tasks</option>
|
|
|
|
|
|
|
|
|
|
|
|
<option value="properties">Properties</option>
|
|
|
|
<option value="//api/name/bmi"> bmi</option>
|
|
|
|
<option value="//api/name/bodyFat"> bodyFat</option>
|
|
|
|
<option value="//api/name/leanMass"> leanMass</option>
|
|
|
|
<option value="//api/name/weight"> weight</option>
|
|
|
|
|
|
|
|
|
|
<option value="class_methods">Class Methods</option>
|
|
|
|
<option value="//api/name/eventWithTitle:weight:bodyFat:leanMass:bmi:note:image:"> + eventWithTitle:weight:bodyFat:leanMass:bmi:note:image:</option>
|
|
|
|
<option value="//api/name/eventWithTitle:weight:bodyFat:leanMass:bmi:note:imageURL:"> + eventWithTitle:weight:bodyFat:leanMass:bmi:note:imageURL:</option>
|
|
|
|
|
|
|
|
|
|
<option value="instance_methods">Instance Methods</option>
|
|
|
|
<option value="//api/name/apiType"> - apiType</option>
|
|
|
|
<option value="//api/name/decodeFromDictionary:"> - decodeFromDictionary:</option>
|
|
|
|
<option value="//api/name/encodeToDictionary"> - encodeToDictionary</option>
|
|
|
|
|
|
|
|
</select>
|
|
</li>
|
|
</ul>
|
|
</header>
|
|
<nav id="tocContainer" class="isShowingTOC">
|
|
<ul id="toc" role="tree">
|
|
|
|
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>
|
|
|
|
|
|
|
|
|
|
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
|
|
|
|
</ul></li>
|
|
|
|
|
|
|
|
|
|
|
|
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#properties">Properties</a></span><ul>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/bmi">bmi</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/bodyFat">bodyFat</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/leanMass">leanMass</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/weight">weight</a></span></li>
|
|
|
|
</ul></li>
|
|
|
|
|
|
|
|
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#class_methods">Class Methods</a></span><ul>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/eventWithTitle:weight:bodyFat:leanMass:bmi:note:image:">eventWithTitle:weight:bodyFat:leanMass:bmi:note:image:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/eventWithTitle:weight:bodyFat:leanMass:bmi:note:imageURL:">eventWithTitle:weight:bodyFat:leanMass:bmi:note:imageURL:</a></span></li>
|
|
|
|
</ul></li>
|
|
|
|
|
|
|
|
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/apiType">apiType</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/decodeFromDictionary:">decodeFromDictionary:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/encodeToDictionary">encodeToDictionary</a></span></li>
|
|
|
|
</ul></li>
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
<article>
|
|
<div id="contents" class="isShowingTOC" role="main">
|
|
<a title="UPBodyEvent Class Reference" name="top"></a>
|
|
<div class="main-navigation navigation-top">
|
|
<ul>
|
|
<li><a href="../index.html">Index</a></li>
|
|
<li><a href="../hierarchy.html">Hierarchy</a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="header">
|
|
<div class="section-header">
|
|
<h1 class="title title-header">UPBodyEvent Class Reference</h1>
|
|
</div>
|
|
</div>
|
|
<div id="container">
|
|
|
|
<div class="section section-specification"><table cellspacing="0"><tbody>
|
|
<tr>
|
|
<td class="specification-title">Inherits from</td>
|
|
<td class="specification-value"><a href="../Classes/UPGenericEvent.html">UPGenericEvent</a> : <a href="../Classes/UPBaseEvent.html">UPBaseEvent</a> : NSObject</td>
|
|
</tr><tr>
|
|
<td class="specification-title">Declared in</td>
|
|
<td class="specification-value">UPBodyEventAPI.h<br />UPBodyEventAPI.m</td>
|
|
</tr>
|
|
</tbody></table></div>
|
|
|
|
|
|
|
|
|
|
<div class="section section-overview">
|
|
<a title="Overview" name="overview"></a>
|
|
<h2 class="subtitle subtitle-overview">Overview</h2>
|
|
<p>A body event describes body characteristics, like <a href="#//api/name/weight">weight</a> and body fat.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="section section-tasks">
|
|
<a title="Tasks" name="tasks"></a>
|
|
<h2 class="subtitle subtitle-tasks">Tasks</h2>
|
|
|
|
|
|
|
|
<h3 class="subsubtitle task-title">Other Methods</h3>
|
|
|
|
<ul class="task-list">
|
|
<li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/eventWithTitle:weight:bodyFat:leanMass:bmi:note:image:">+ eventWithTitle:weight:bodyFat:leanMass:bmi:note:image:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/eventWithTitle:weight:bodyFat:leanMass:bmi:note:imageURL:">+ eventWithTitle:weight:bodyFat:leanMass:bmi:note:imageURL:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/weight"> weight</a></code>
|
|
</span>
|
|
<span class="task-item-suffix">property</span>
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/bodyFat"> bodyFat</a></code>
|
|
</span>
|
|
<span class="task-item-suffix">property</span>
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/leanMass"> leanMass</a></code>
|
|
</span>
|
|
<span class="task-item-suffix">property</span>
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/bmi"> bmi</a></code>
|
|
</span>
|
|
<span class="task-item-suffix">property</span>
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
<h3 class="subsubtitle task-title">Other Methods</h3>
|
|
|
|
<ul class="task-list">
|
|
<li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/apiType">– apiType</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/decodeFromDictionary:">– decodeFromDictionary:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/encodeToDictionary">– encodeToDictionary</a></code>
|
|
</span>
|
|
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="section section-methods">
|
|
<a title="Properties" name="properties"></a>
|
|
<h2 class="subtitle subtitle-methods">Properties</h2>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/bmi" title="bmi"></a>
|
|
<h3 class="subsubtitle method-title">bmi</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Body Mass Index.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (nonatomic, strong) NSNumber *bmi</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>Body Mass Index.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">UPBodyEventAPI.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/bodyFat" title="bodyFat"></a>
|
|
<h3 class="subsubtitle method-title">bodyFat</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Body fat percentage.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (nonatomic, strong) NSNumber *bodyFat</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>Body fat percentage.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">UPBodyEventAPI.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/leanMass" title="leanMass"></a>
|
|
<h3 class="subsubtitle method-title">leanMass</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Lean mass percentage.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (nonatomic, strong) NSNumber *leanMass</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>Lean mass percentage.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">UPBodyEventAPI.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/weight" title="weight"></a>
|
|
<h3 class="subsubtitle method-title">weight</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Weight in kilograms.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (nonatomic, strong) NSNumber *weight</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>Weight in kilograms.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">UPBodyEventAPI.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="section section-methods">
|
|
<a title="Class Methods" name="class_methods"></a>
|
|
<h2 class="subtitle subtitle-methods">Class Methods</h2>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/eventWithTitle:weight:bodyFat:leanMass:bmi:note:image:" title="eventWithTitle:weight:bodyFat:leanMass:bmi:note:image:"></a>
|
|
<h3 class="subsubtitle method-title">eventWithTitle:weight:bodyFat:leanMass:bmi:note:image:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Create a new body event with supplied parameters for the currently authenticated user.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>+ (UPBodyEvent *)eventWithTitle:(NSString *)<em>title</em> weight:(NSNumber *)<em>weight</em> bodyFat:(NSNumber *)<em>bodyFat</em> leanMass:(NSNumber *)<em>leanMass</em> bmi:(NSNumber *)<em>bmi</em> note:(NSString *)<em>note</em> image:(UPImage *)<em>image</em></code></div>
|
|
|
|
|
|
|
|
<div class="method-subsection arguments-section parameters">
|
|
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>title</em></dt>
|
|
<dd><p>Title of the new event.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>weight</em></dt>
|
|
<dd><p>Weight in kilograms.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>bodyFat</em></dt>
|
|
<dd><p>Body fat percentage.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>leanMass</em></dt>
|
|
<dd><p>Lean mass percentage.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>bmi</em></dt>
|
|
<dd><p>Body Mass Index.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>note</em></dt>
|
|
<dd><p>Notes associated with the event.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>image</em></dt>
|
|
<dd><p>Image to include in the event.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>Create a new body event with supplied parameters for the currently authenticated user.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">UPBodyEventAPI.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/eventWithTitle:weight:bodyFat:leanMass:bmi:note:imageURL:" title="eventWithTitle:weight:bodyFat:leanMass:bmi:note:imageURL:"></a>
|
|
<h3 class="subsubtitle method-title">eventWithTitle:weight:bodyFat:leanMass:bmi:note:imageURL:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Create a new body event with supplied parameters for the currently authenticated user.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>+ (UPBodyEvent *)eventWithTitle:(NSString *)<em>title</em> weight:(NSNumber *)<em>weight</em> bodyFat:(NSNumber *)<em>bodyFat</em> leanMass:(NSNumber *)<em>leanMass</em> bmi:(NSNumber *)<em>bmi</em> note:(NSString *)<em>note</em> imageURL:(NSString *)<em>imageURL</em></code></div>
|
|
|
|
|
|
|
|
<div class="method-subsection arguments-section parameters">
|
|
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>title</em></dt>
|
|
<dd><p>Title of the new event.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>weight</em></dt>
|
|
<dd><p>Weight in kilograms.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>bodyFat</em></dt>
|
|
<dd><p>Body fat percentage.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>leanMass</em></dt>
|
|
<dd><p>Lean mass percentage.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>bmi</em></dt>
|
|
<dd><p>Body Mass Index.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>note</em></dt>
|
|
<dd><p>Notes associated with the event.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>image</em></dt>
|
|
<dd><p>URL of the image to include in the event.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>Create a new body event with supplied parameters for the currently authenticated user.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">UPBodyEventAPI.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="section section-methods">
|
|
<a title="Instance Methods" name="instance_methods"></a>
|
|
<h2 class="subtitle subtitle-methods">Instance Methods</h2>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/apiType" title="apiType"></a>
|
|
<h3 class="subsubtitle method-title">apiType</h3>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (NSString *)apiType</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">UPBaseEventAPI.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/decodeFromDictionary:" title="decodeFromDictionary:"></a>
|
|
<h3 class="subsubtitle method-title">decodeFromDictionary:</h3>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)decodeFromDictionary:(NSDictionary *)<em>dictionary</em></code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">UPBaseEventAPI.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/encodeToDictionary" title="encodeToDictionary"></a>
|
|
<h3 class="subsubtitle method-title">encodeToDictionary</h3>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (NSDictionary *)encodeToDictionary</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">UPBaseEventAPI.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<div class="main-navigation navigation-bottom">
|
|
<ul>
|
|
<li><a href="../index.html">Index</a></li>
|
|
<li><a href="../hierarchy.html">Hierarchy</a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="footer">
|
|
<hr />
|
|
<div class="footer-copyright">
|
|
<p><span class="copyright">© 2014 Jawbone. All rights reserved. (Last updated: 2014-06-13)</span><br />
|
|
|
|
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</article>
|
|
<script type="text/javascript">
|
|
function jumpToChange()
|
|
{
|
|
window.location.hash = this.options[this.selectedIndex].value;
|
|
}
|
|
|
|
function toggleTOC()
|
|
{
|
|
var contents = document.getElementById('contents');
|
|
var tocContainer = document.getElementById('tocContainer');
|
|
|
|
if (this.getAttribute('class') == 'open')
|
|
{
|
|
this.setAttribute('class', '');
|
|
contents.setAttribute('class', '');
|
|
tocContainer.setAttribute('class', '');
|
|
|
|
window.name = "hideTOC";
|
|
}
|
|
else
|
|
{
|
|
this.setAttribute('class', 'open');
|
|
contents.setAttribute('class', 'isShowingTOC');
|
|
tocContainer.setAttribute('class', 'isShowingTOC');
|
|
|
|
window.name = "";
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function toggleTOCEntryChildren(e)
|
|
{
|
|
e.stopPropagation();
|
|
var currentClass = this.getAttribute('class');
|
|
if (currentClass == 'children') {
|
|
this.setAttribute('class', 'children open');
|
|
}
|
|
else if (currentClass == 'children open') {
|
|
this.setAttribute('class', 'children');
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function tocEntryClick(e)
|
|
{
|
|
e.stopPropagation();
|
|
return true;
|
|
}
|
|
|
|
function init()
|
|
{
|
|
var selectElement = document.getElementById('jumpTo');
|
|
selectElement.addEventListener('change', jumpToChange, false);
|
|
|
|
var tocButton = document.getElementById('table_of_contents');
|
|
tocButton.addEventListener('click', toggleTOC, false);
|
|
|
|
var taskTreeItem = document.getElementById('task_treeitem');
|
|
if (taskTreeItem.getElementsByTagName('li').length > 0)
|
|
{
|
|
taskTreeItem.setAttribute('class', 'children');
|
|
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
|
|
}
|
|
|
|
var tocList = document.getElementById('toc');
|
|
|
|
var tocEntries = tocList.getElementsByTagName('li');
|
|
for (var i = 0; i < tocEntries.length; i++) {
|
|
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
|
|
}
|
|
|
|
var tocLinks = tocList.getElementsByTagName('a');
|
|
for (var i = 0; i < tocLinks.length; i++) {
|
|
tocLinks[i].addEventListener('click', tocEntryClick, false);
|
|
}
|
|
|
|
if (window.name == "hideTOC") {
|
|
toggleTOC.call(tocButton);
|
|
}
|
|
}
|
|
|
|
window.onload = init;
|
|
|
|
// If showing in Xcode, hide the TOC and Header
|
|
if (navigator.userAgent.match(/xcode/i)) {
|
|
document.getElementById("contents").className = "hideInXcode"
|
|
document.getElementById("tocContainer").className = "hideInXcode"
|
|
document.getElementById("top_header").className = "hideInXcode"
|
|
}
|
|
|
|
</script>
|
|
</body>
|
|
</html> |