diff options
Diffstat (limited to 'docs/Classes/SDLAddCommand.html')
-rw-r--r-- | docs/Classes/SDLAddCommand.html | 257 |
1 files changed, 216 insertions, 41 deletions
diff --git a/docs/Classes/SDLAddCommand.html b/docs/Classes/SDLAddCommand.html index fc09daec2..06e3483d7 100644 --- a/docs/Classes/SDLAddCommand.html +++ b/docs/Classes/SDLAddCommand.html @@ -7,6 +7,8 @@ <li><a href="#section--initWithId:vrCommands:handler:">-initWithId:vrCommands:handler:</a></li> <li><a href="#section--initWithId:vrCommands:menuName:handler:">-initWithId:vrCommands:menuName:handler:</a></li> <li><a href="#section--initWithId:vrCommands:menuName:parentId:position:iconValue:iconType:handler:">-initWithId:vrCommands:menuName:parentId:position:iconValue:iconType:handler:</a></li> + <li><a href="#section--initWithId:vrCommands:menuName:parentId:position:iconValue:iconType:iconIsTemplate:handler:">-initWithId:vrCommands:menuName:parentId:position:iconValue:iconType:iconIsTemplate:handler:</a></li> + <li><a href="#section--initWithId:vrCommands:menuName:parentId:position:icon:handler:">-initWithId:vrCommands:menuName:parentId:position:icon:handler:</a></li> <li><a href="#section-handler">handler</a></li> <li><a href="#section-cmdID">cmdID</a></li> <li><a href="#section-menuParams">menuParams</a></li> @@ -16,29 +18,28 @@ <h3>Overview</h3> -<p>This class will add a command to the application’s Command Menu SDLMenuParams</p> +<p>This class will add a command to the application’s Command Menu</p> -<p>A command will be added to the end of the list of elements in - the Command Menu under the following conditions: - <li>When a SDLCommand is added with no SDLMenuParams value provided</li> - <li>When a SDLMenuParams value is provided with a SDLMenuParam.position value - greater than or equal to the number of menu items currently defined in the - menu specified by the SDLMenuParam.parentID value</li></p> +<p>A command will be added to the end of the list of elements in the Command Menu under the following conditions:</p> -<p>The set of choices which the application builds using SDLAddCommand can be a - mixture of: - <li>Choices having only VR synonym definitions, but no SDLMenuParams definitions - </li> - <li>Choices having only SDLMenuParams definitions, but no VR synonym definitions - </li> - <li>Choices having both SDLMenuParams and VR synonym definitions</li></p> +<ol> +<li>When a SDLAddCommand is added with no SDLMenuParams value provided.</li> +<li>When a SDLMenuParams value is provided with a SDLMenuParam.position value greater than or equal to the number of menu items currently defined in the menu specified by the SDLMenuParam.parentID value.</li> +</ol> -<p>HMILevel needs to be FULL, LIMITED or BACKGROUD</p> +<p>The set of choices which the application builds using SDLAddCommand can be a mixture of:</p> -<p>@since SDL 1.0</p> +<ol> +<li>Choices having only VR synonym definitions, but no SDLMenuParams definitions</li> +<li>Choices having only SDLMenuParams definitions, but no VR synonym definitions</li> +<li>Choices having both SDLMenuParams and VR synonym definitions</li> +</ol> + +<p>HMILevel needs to be FULL, LIMITED or BACKGROUD + @since SDL 1.0</p> <div class="aside aside-see"> <p class="aside-title">See</p> - SDLDeleteCommand SDLAddSubMenu SDLDeleteSubMenu + SDLDeleteCommand, SDLAddSubMenu, SDLDeleteSubMenu </div> @@ -48,7 +49,7 @@ -initWithHandler: </h3> - <p>Construct a SDLAddCommand with a handler callback when an event occurs.</p> + <p>Constructs a SDLAddCommand with a handler callback when an event occurs.</p> @@ -65,23 +66,28 @@ <h4>Parameters</h4> <dl> <dt>handler</dt> - <dd><p>A callback that will be called when a button event occurs for the command</p></dd> + <dd><p>A callback that is called when a button event occurs for the command.</p></dd> </dl> <div> <h4>Return Value</h4> - <p>An SDLAddCommand object</p> + <p>A SDLAddCommand object</p> </div> <h3 id="section--initWithId:vrCommands:handler:"> -initWithId:vrCommands:handler: </h3> - <p>Undocumented</p> + <p>Convenience init for creating a voice command menu item.</p> + +<p>@discussion This menu item can only be triggered by the VR system and does not show up in the HMI application menu.</p> <h4>Objective-C</h4> - <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">instancetype</span><span class="p">)</span><span class="nf">initWithId</span><span class="p">:(</span><span class="n">UInt32</span><span class="p">)</span><span class="nv">commandId</span> <span class="nf">vrCommands</span><span class="p">:(</span><span class="n">nullable</span> <span class="n">NSArray</span><span class="o"><</span><span class="n">NSString</span> <span class="o">*></span> <span class="o">*</span><span class="p">)</span><span class="nv">vrCommands</span> <span class="nf">handler</span><span class="p">:(</span><span class="n">nullable</span> <span class="n"><a href="../Type Definitions.html#/c:SDLNotificationConstants.h@T@SDLRPCCommandNotificationHandler">SDLRPCCommandNotificationHandler</a></span><span class="p">)</span><span class="nv">handler</span><span class="p">;</span></code></pre> + <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nonnull</span> <span class="n">instancetype</span><span class="p">)</span><span class="nf">initWithId</span><span class="p">:(</span><span class="n">UInt32</span><span class="p">)</span><span class="nv">commandId</span> + <span class="nf">vrCommands</span><span class="p">:(</span><span class="n">nullable</span> <span class="n">NSArray</span><span class="o"><</span><span class="n">NSString</span> <span class="o">*></span> <span class="o">*</span><span class="p">)</span><span class="nv">vrCommands</span> + <span class="nf">handler</span><span class="p">:(</span><span class="n">nullable</span> <span class="n"><a href="../Type Definitions.html#/c:SDLNotificationConstants.h@T@SDLRPCCommandNotificationHandler">SDLRPCCommandNotificationHandler</a></span><span class="p">)</span> + <span class="n"><a href="../Classes/SDLAddCommand.html#/c:objc(cs)SDLAddCommand(py)handler">handler</a></span><span class="p">;</span></code></pre> <h4>Swift</h4> @@ -89,17 +95,34 @@ + <h4>Parameters</h4> + <dl> + <dt>commandId</dt> + <dd><p>A unique id for the menu item.</p></dd> + <dt>vrCommands</dt> + <dd><p>One or more voice recognition phrases. If recognized by the VR system, the handler will be called.</p></dd> + <dt>handler</dt> + <dd><p>Called when the VR system recognizes a phrase in <code><a href="../Classes/SDLAddCommand.html#/c:objc(cs)SDLAddCommand(py)vrCommands">vrCommands</a></code></p></dd> + </dl> + <div> + <h4>Return Value</h4> + <p>A SDLAddCommand object</p> + </div> <h3 id="section--initWithId:vrCommands:menuName:handler:"> -initWithId:vrCommands:menuName:handler: </h3> - <p>Undocumented</p> + <p>Convenience init for creating a menu item with text.</p> <h4>Objective-C</h4> - <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">instancetype</span><span class="p">)</span><span class="nf">initWithId</span><span class="p">:(</span><span class="n">UInt32</span><span class="p">)</span><span class="nv">commandId</span> <span class="nf">vrCommands</span><span class="p">:(</span><span class="n">nullable</span> <span class="n">NSArray</span><span class="o"><</span><span class="n">NSString</span> <span class="o">*></span> <span class="o">*</span><span class="p">)</span><span class="nv">vrCommands</span> <span class="nf">menuName</span><span class="p">:(</span><span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">menuName</span> <span class="nf">handler</span><span class="p">:(</span><span class="n">nullable</span> <span class="n"><a href="../Type Definitions.html#/c:SDLNotificationConstants.h@T@SDLRPCCommandNotificationHandler">SDLRPCCommandNotificationHandler</a></span><span class="p">)</span><span class="nv">handler</span><span class="p">;</span></code></pre> + <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nonnull</span> <span class="n">instancetype</span><span class="p">)</span><span class="nf">initWithId</span><span class="p">:(</span><span class="n">UInt32</span><span class="p">)</span><span class="nv">commandId</span> + <span class="nf">vrCommands</span><span class="p">:(</span><span class="n">nullable</span> <span class="n">NSArray</span><span class="o"><</span><span class="n">NSString</span> <span class="o">*></span> <span class="o">*</span><span class="p">)</span><span class="nv">vrCommands</span> + <span class="nf">menuName</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">menuName</span> + <span class="nf">handler</span><span class="p">:(</span><span class="n">nullable</span> <span class="n"><a href="../Type Definitions.html#/c:SDLNotificationConstants.h@T@SDLRPCCommandNotificationHandler">SDLRPCCommandNotificationHandler</a></span><span class="p">)</span> + <span class="n"><a href="../Classes/SDLAddCommand.html#/c:objc(cs)SDLAddCommand(py)handler">handler</a></span><span class="p">;</span></code></pre> <h4>Swift</h4> @@ -107,17 +130,45 @@ + <h4>Parameters</h4> + <dl> + <dt>commandId</dt> + <dd><p>A unique id for the menu item.</p></dd> + <dt>vrCommands</dt> + <dd><p>One or more voice recognition phrases. If recognized by the VR system, the handler will be called.</p></dd> + <dt>menuName</dt> + <dd><p>The text that will appear in the menu.</p></dd> + <dt>handler</dt> + <dd><p>Called when the menu item is selected and/or when the VR system recognizes a phrase in <code><a href="../Classes/SDLAddCommand.html#/c:objc(cs)SDLAddCommand(py)vrCommands">vrCommands</a></code></p></dd> + </dl> + <div> + <h4>Return Value</h4> + <p>A SDLAddCommand object</p> + </div> <h3 id="section--initWithId:vrCommands:menuName:parentId:position:iconValue:iconType:handler:"> -initWithId:vrCommands:menuName:parentId:position:iconValue:iconType:handler: </h3> - <p>Undocumented</p> + <p>Convenience init for creating a menu item with text and a custom icon.</p> +<div class="aside aside-warning"> + <p class="aside-title">Warning</p> + <p>The icon must be uploaded to Core before being displayed in the menu.</p> + +</div> <h4>Objective-C</h4> - <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">instancetype</span><span class="p">)</span><span class="nf">initWithId</span><span class="p">:(</span><span class="n">UInt32</span><span class="p">)</span><span class="nv">commandId</span> <span class="nf">vrCommands</span><span class="p">:(</span><span class="n">nullable</span> <span class="n">NSArray</span><span class="o"><</span><span class="n">NSString</span> <span class="o">*></span> <span class="o">*</span><span class="p">)</span><span class="nv">vrCommands</span> <span class="nf">menuName</span><span class="p">:(</span><span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">menuName</span> <span class="nf">parentId</span><span class="p">:(</span><span class="n">UInt32</span><span class="p">)</span><span class="nv">parentId</span> <span class="nf">position</span><span class="p">:(</span><span class="n">UInt16</span><span class="p">)</span><span class="nv">position</span> <span class="nf">iconValue</span><span class="p">:(</span><span class="n">nullable</span> <span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">iconValue</span> <span class="nf">iconType</span><span class="p">:(</span><span class="n">nullable</span> <span class="n"><a href="../Type Definitions.html#/c:SDLImageType.h@T@SDLImageType">SDLImageType</a></span><span class="p">)</span><span class="nv">iconType</span> <span class="nf">handler</span><span class="p">:(</span><span class="n">nullable</span> <span class="n"><a href="../Type Definitions.html#/c:SDLNotificationConstants.h@T@SDLRPCCommandNotificationHandler">SDLRPCCommandNotificationHandler</a></span><span class="p">)</span><span class="nv">handler</span><span class="p">;</span></code></pre> + <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nonnull</span> <span class="n">instancetype</span><span class="p">)</span><span class="nf">initWithId</span><span class="p">:(</span><span class="n">UInt32</span><span class="p">)</span><span class="nv">commandId</span> + <span class="nf">vrCommands</span><span class="p">:(</span><span class="n">nullable</span> <span class="n">NSArray</span><span class="o"><</span><span class="n">NSString</span> <span class="o">*></span> <span class="o">*</span><span class="p">)</span><span class="nv">vrCommands</span> + <span class="nf">menuName</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">menuName</span> + <span class="nf">parentId</span><span class="p">:(</span><span class="n">UInt32</span><span class="p">)</span><span class="nv">parentId</span> + <span class="nf">position</span><span class="p">:(</span><span class="n">UInt16</span><span class="p">)</span><span class="nv">position</span> + <span class="nf">iconValue</span><span class="p">:(</span><span class="n">nullable</span> <span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">iconValue</span> + <span class="nf">iconType</span><span class="p">:(</span><span class="n">nullable</span> <span class="n"><a href="../Type Definitions.html#/c:SDLImageType.h@T@SDLImageType">SDLImageType</a></span><span class="p">)</span><span class="nv">iconType</span> + <span class="nf">handler</span><span class="p">:(</span><span class="n">nullable</span> <span class="n"><a href="../Type Definitions.html#/c:SDLNotificationConstants.h@T@SDLRPCCommandNotificationHandler">SDLRPCCommandNotificationHandler</a></span><span class="p">)</span> + <span class="n"><a href="../Classes/SDLAddCommand.html#/c:objc(cs)SDLAddCommand(py)handler">handler</a></span><span class="p">;</span></code></pre> <h4>Swift</h4> @@ -125,6 +176,137 @@ + <h4>Parameters</h4> + <dl> + <dt>commandId</dt> + <dd><p>A unique id for the menu item.</p></dd> + <dt>vrCommands</dt> + <dd><p>One or more voice recognition phrases. If recognized by the VR system, the handler will be called.</p></dd> + <dt>menuName</dt> + <dd><p>The text that will appear in the menu.</p></dd> + <dt>parentId</dt> + <dd><p>The command id of the parent menu if menu item is in a submenu. If not in a submenu, the parentId is 0.</p></dd> + <dt>position</dt> + <dd><p>The menu item’s row number in the menu.</p></dd> + <dt>iconValue</dt> + <dd><p>The unique name used to upload the image to Core.</p></dd> + <dt>iconType</dt> + <dd><p>Whether the image is static or dynamic.</p></dd> + <dt>handler</dt> + <dd><p>Called when the menu item is selected and/or when the VR system recognizes a phrase in <code><a href="../Classes/SDLAddCommand.html#/c:objc(cs)SDLAddCommand(py)vrCommands">vrCommands</a></code></p></dd> + </dl> + <div> + <h4>Return Value</h4> + <p>A SDLAddCommand object</p> + </div> + + <h3 id="section--initWithId:vrCommands:menuName:parentId:position:iconValue:iconType:iconIsTemplate:handler:"> + -initWithId:vrCommands:menuName:parentId:position:iconValue:iconType:iconIsTemplate:handler: + </h3> + + <p>Convenience init for creating a menu item with text and a custom icon.</p> +<div class="aside aside-warning"> + <p class="aside-title">Warning</p> + <p>The icon must be uploaded to Core before being displayed in the menu.</p> + +</div> + + + + <h4>Objective-C</h4> + <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nonnull</span> <span class="n">instancetype</span><span class="p">)</span><span class="nf">initWithId</span><span class="p">:(</span><span class="n">UInt32</span><span class="p">)</span><span class="nv">commandId</span> + <span class="nf">vrCommands</span><span class="p">:(</span><span class="n">nullable</span> <span class="n">NSArray</span><span class="o"><</span><span class="n">NSString</span> <span class="o">*></span> <span class="o">*</span><span class="p">)</span><span class="nv">vrCommands</span> + <span class="nf">menuName</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">menuName</span> + <span class="nf">parentId</span><span class="p">:(</span><span class="n">UInt32</span><span class="p">)</span><span class="nv">parentId</span> + <span class="nf">position</span><span class="p">:(</span><span class="n">UInt16</span><span class="p">)</span><span class="nv">position</span> + <span class="nf">iconValue</span><span class="p">:(</span><span class="n">nullable</span> <span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">iconValue</span> + <span class="nf">iconType</span><span class="p">:(</span><span class="n">nullable</span> <span class="n"><a href="../Type Definitions.html#/c:SDLImageType.h@T@SDLImageType">SDLImageType</a></span><span class="p">)</span><span class="nv">iconType</span> + <span class="nf">iconIsTemplate</span><span class="p">:(</span><span class="n">BOOL</span><span class="p">)</span><span class="nv">iconIsTemplate</span> + <span class="nf">handler</span><span class="p">:(</span><span class="n">nullable</span> <span class="n"><a href="../Type Definitions.html#/c:SDLNotificationConstants.h@T@SDLRPCCommandNotificationHandler">SDLRPCCommandNotificationHandler</a></span><span class="p">)</span> + <span class="n"><a href="../Classes/SDLAddCommand.html#/c:objc(cs)SDLAddCommand(py)handler">handler</a></span><span class="p">;</span></code></pre> + + + <h4>Swift</h4> + <pre class="highlight swift"><code><span class="nf">init</span><span class="p">(</span><span class="n">id</span> <span class="nv">commandId</span><span class="p">:</span> <span class="kt">UInt32</span><span class="p">,</span> <span class="nv">vrCommands</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span><span class="p">]?,</span> <span class="nv">menuName</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">parentId</span><span class="p">:</span> <span class="kt">UInt32</span><span class="p">,</span> <span class="nv">position</span><span class="p">:</span> <span class="kt">UInt16</span><span class="p">,</span> <span class="nv">iconValue</span><span class="p">:</span> <span class="kt">String</span><span class="p">?,</span> <span class="nv">iconType</span><span class="p">:</span> <span class="kt"><a href="../Type Definitions.html#/c:SDLImageType.h@T@SDLImageType">SDLImageType</a></span><span class="p">?,</span> <span class="nv">iconIsTemplate</span><span class="p">:</span> <span class="kt">Bool</span><span class="p">,</span> <span class="nv">handler</span><span class="p">:</span> <span class="kt"><a href="../Type Definitions.html#/c:SDLNotificationConstants.h@T@SDLRPCCommandNotificationHandler">SDLRPCCommandNotificationHandler</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre> + + + + <h4>Parameters</h4> + <dl> + <dt>commandId</dt> + <dd><p>A unique id for the menu item.</p></dd> + <dt>vrCommands</dt> + <dd><p>One or more voice recognition phrases. If recognized by the VR system, the handler will be called.</p></dd> + <dt>menuName</dt> + <dd><p>The text that will appear in the menu.</p></dd> + <dt>parentId</dt> + <dd><p>The command id of the parent menu if menu item is in a submenu. If not in a submenu, the parentId is 0.</p></dd> + <dt>position</dt> + <dd><p>The menu item’s row number in the menu.</p></dd> + <dt>iconValue</dt> + <dd><p>The unique name used to upload the image to Core.</p></dd> + <dt>iconType</dt> + <dd><p>Whether the image is static or dynamic.</p></dd> + <dt>iconIsTemplate</dt> + <dd><p>Whether or not the image is a template that can be (re)colored by the SDL HMI</p></dd> + <dt>handler</dt> + <dd><p>Called when the menu item is selected and/or when the VR system recognizes a phrase in <code><a href="../Classes/SDLAddCommand.html#/c:objc(cs)SDLAddCommand(py)vrCommands">vrCommands</a></code></p></dd> + </dl> + <div> + <h4>Return Value</h4> + <p>A SDLAddCommand object</p> + </div> + + <h3 id="section--initWithId:vrCommands:menuName:parentId:position:icon:handler:"> + -initWithId:vrCommands:menuName:parentId:position:icon:handler: + </h3> + + <p>Convenience init for creating a menu item with text and a custom icon.</p> +<div class="aside aside-warning"> + <p class="aside-title">Warning</p> + <p>The icon must be uploaded to Core before being displayed in the menu.</p> + +</div> + + + + <h4>Objective-C</h4> + <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nonnull</span> <span class="n">instancetype</span><span class="p">)</span><span class="nf">initWithId</span><span class="p">:(</span><span class="n">UInt32</span><span class="p">)</span><span class="nv">commandId</span> + <span class="nf">vrCommands</span><span class="p">:(</span><span class="n">nullable</span> <span class="n">NSArray</span><span class="o"><</span><span class="n">NSString</span> <span class="o">*></span> <span class="o">*</span><span class="p">)</span><span class="nv">vrCommands</span> + <span class="nf">menuName</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">menuName</span> + <span class="nf">parentId</span><span class="p">:(</span><span class="n">UInt32</span><span class="p">)</span><span class="nv">parentId</span> + <span class="nf">position</span><span class="p">:(</span><span class="n">UInt16</span><span class="p">)</span><span class="nv">position</span> + <span class="nf">icon</span><span class="p">:(</span><span class="n">nullable</span> <span class="n"><a href="../Classes/SDLImage.html">SDLImage</a></span> <span class="o">*</span><span class="p">)</span><span class="nv">icon</span> + <span class="nf">handler</span><span class="p">:(</span><span class="n">nullable</span> <span class="n"><a href="../Type Definitions.html#/c:SDLNotificationConstants.h@T@SDLRPCCommandNotificationHandler">SDLRPCCommandNotificationHandler</a></span><span class="p">)</span> + <span class="n"><a href="../Classes/SDLAddCommand.html#/c:objc(cs)SDLAddCommand(py)handler">handler</a></span><span class="p">;</span></code></pre> + + + <h4>Swift</h4> + <pre class="highlight swift"><code><span class="nf">init</span><span class="p">(</span><span class="n">id</span> <span class="nv">commandId</span><span class="p">:</span> <span class="kt">UInt32</span><span class="p">,</span> <span class="nv">vrCommands</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span><span class="p">]?,</span> <span class="nv">menuName</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">parentId</span><span class="p">:</span> <span class="kt">UInt32</span><span class="p">,</span> <span class="nv">position</span><span class="p">:</span> <span class="kt">UInt16</span><span class="p">,</span> <span class="nv">icon</span><span class="p">:</span> <span class="kt"><a href="../Classes/SDLImage.html">SDLImage</a></span><span class="p">?,</span> <span class="nv">handler</span><span class="p">:</span> <span class="kt"><a href="../Type Definitions.html#/c:SDLNotificationConstants.h@T@SDLRPCCommandNotificationHandler">SDLRPCCommandNotificationHandler</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre> + + + + <h4>Parameters</h4> + <dl> + <dt>commandId</dt> + <dd><p>A unique id for the menu item.</p></dd> + <dt>vrCommands</dt> + <dd><p>One or more voice recognition phrases. If recognized by the VR system, the handler will be called.</p></dd> + <dt>menuName</dt> + <dd><p>The text that will appear in the menu.</p></dd> + <dt>parentId</dt> + <dd><p>The command id of the parent menu if menu item is in a submenu. If not in a submenu, the parentId is 0.</p></dd> + <dt>position</dt> + <dd><p>The menu item’s row number in the menu.</p></dd> + <dt>icon</dt> + <dd><p>A image that appears next to the <code>menuName</code> text.</p></dd> + <dt>handler</dt> + <dd><p>Called when the menu item is selected and/or when the VR system recognizes a phrase in <code><a href="../Classes/SDLAddCommand.html#/c:objc(cs)SDLAddCommand(py)vrCommands">vrCommands</a></code></p></dd> + </dl> + <div> + <h4>Return Value</h4> + <p>A SDLAddCommand object</p> + </div> <h3 id="section-handler"> handler @@ -133,7 +315,7 @@ <p>A handler that will let you know when the button you created is subscribed.</p> <div class="aside aside-warning"> <p class="aside-title">Warning</p> - This will only work if you use SDLManager. + This will only work if you use <code><a href="../Classes/SDLManager.html">SDLManager</a></code>. </div> @@ -154,9 +336,9 @@ cmdID </h3> - <p>A Unique Command ID that identifies the command</p> + <p>A unique id that identifies the command.</p> -<p>@discussion Is returned in an <em>SDLOnCommand</em> notification to identify the command selected by the user</p> +<p>@discussion Is returned in an <code><a href="../Classes/SDLOnCommand.html">SDLOnCommand</a></code> notification to identify the command selected by the user</p> <p>Required, Integer, 0 - 2,000,000,000</p> @@ -176,12 +358,9 @@ menuParams </h3> - <p>a <em>SDLMenuParams</em> pointer which will defined the command and how it is added to the Command Menu</p> - -<p>@discussion If provided, this will define the command and how it is added to the - Command Menu</p> + <p>A <code><a href="../Classes/SDLMenuParams.html">SDLMenuParams</a></code> pointer which defines the command and how it is added to the command menu.</p> -<p>If null, commands will not be accessible through the HMI application menu</p> +<p>@discussion If provided, this will define the command and how it is added to the command menu. If null, commands will not be accessible through the HMI application menu.</p> <p>Optional</p> @@ -203,9 +382,7 @@ <p>An array of strings to be used as VR synonyms for this command.</p> -<p>@discussion If provided, defines one or more VR phrases the recognition of any of which triggers the <em>SDLOnCommand</em> notification with this cmdID</p> - -<p>If null, commands will not be accessible by voice commands (when the user hits push-to-talk)</p> +<p>@discussion If provided, defines one or more VR phrases the recognition of any of which triggers the <code><a href="../Classes/SDLOnCommand.html">SDLOnCommand</a></code> notification with this cmdID. If null, commands will not be accessible by voice commands (when the user hits push-to-talk).</p> <p>Optional, Array of Strings, Max String length 99 chars, Array size 1 - 100</p> @@ -226,11 +403,9 @@ cmdIcon </h3> - <p>Image struct containing a static or dynamic icon</p> - -<p>@discussion If provided, defines the image to be be shown along with a command</p> + <p>Image struct containing a static or dynamic icon.</p> -<p>If omitted on supported displays, no (or the default if applicable) icon will be displayed</p> +<p>@discussion If provided, defines the image to be be shown along with a command. If omitted on supported displays, no (or the default if applicable) icon will be displayed</p> <p>Optional</p> |