summaryrefslogtreecommitdiff
path: root/docs/Classes/SDLAddSubMenu.html
blob: 801355b669d54d00addb06128a91afef717e04b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<h1>SDLAddSubMenu Class Reference</h1>

<h3>Section Contents</h3>

<ul>
  <li><a href="#section--init">-init</a></li>
  <li><a href="#section--initWithDictionary:">-initWithDictionary:</a></li>
  <li><a href="#section-menuID">menuID</a></li>
  <li><a href="#section-position">position</a></li>
  <li><a href="#section-menuName">menuName</a></li>
</ul>

<h3>Overview</h3>

<p>Add a SDLSubMenu to the Command Menu
 <p>
 A SDLSubMenu can only be added to the Top Level Menu (i.e.a SDLSubMenu cannot be
 added to a SDLSubMenu), and may only contain commands as children
 <p>
 <p>
 <b>HMILevel needs to be FULL, LIMITED or BACKGROUD</b>
 </p></p>

<p>Since <b>SmartDeviceLink 1.0</b><br>
 see SDLDeleteSubMenu SDLAddCommand SDLDeleteCommand</p>


<section class="section task-group-section">
  <h3 id="section--init">
      -init
  </h3>
  
  <p>Constructs a new SDLAddSubMenu object</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">-</span> <span class="p">(</span><span class="n">instancetype</span><span class="p">)</span><span class="n">init</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="nf">init</span><span class="o">!</span><span class="p">()</span></code></pre>

  
  
  
  <h3 id="section--initWithDictionary:">
      -initWithDictionary:
  </h3>
  
  <p>Constructs a new SDLAddSubMenu object indicated by the dictionary parameter
 <p></p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">-</span> <span class="p">(</span><span class="n">instancetype</span><span class="p">)</span><span class="nf">initWithDictionary</span><span class="p">:(</span><span class="n">NSMutableDictionary</span> <span class="o">*</span><span class="p">)</span><span class="nv">dict</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="nf">init</span><span class="o">!</span><span class="p">(</span><span class="n">dictionary</span> <span class="nv">dict</span><span class="p">:</span> <span class="kt">NSMutableDictionary</span><span class="o">!</span><span class="p">)</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>dict</dt>
      <dd><p>The dictionary to use</p>
</dd>
  </dl>
  
  <h3 id="section-menuID">
      menuID
  </h3>
  
  <p>@abstract a Menu ID that identifies a sub menu
@discussion This value is used in
<i>SDLAddCommand</i> to which SDLSubMenu is the parent of the command being added
<p></p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">atomic</span><span class="p">)</span> <span class="n">NSNumber</span> <span class="o">*</span><span class="n">menuID</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="k">var</span> <span class="nv">menuID</span><span class="p">:</span> <span class="kt">NSNumber</span><span class="o">!</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section-position">
      position
  </h3>
  
  <p>@abstract a position of menu
@discussion An NSNumber pointer representing the position within the items
           of the top level Command Menu. 0 will insert at the front, 1
           will insert after the first existing element, etc. Position of
           any submenu will always be located before the return and exit
           options
           <p>
           <b>Notes: </b><br/>
           <ul>
           <li>
           Min Value: 0; Max Value: 1000</li>
           <li>If position is greater or equal than the number of items
           on top level, the sub menu will be appended by the end</li>
           <li>If this parameter is omitted, the entry will be added at
           the end of the list</li>
           </ul></p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">atomic</span><span class="p">)</span> <span class="n">NSNumber</span> <span class="o">*</span><span class="n">position</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="k">var</span> <span class="nv">position</span><span class="p">:</span> <span class="kt">NSNumber</span><span class="o">!</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section-menuName">
      menuName
  </h3>
  
  <p>@abstract a menuName which is displayed representing this submenu item
@discussion NSString which will be displayed representing this submenu item</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">atomic</span><span class="p">)</span> <span class="n">NSString</span> <span class="o">*</span><span class="n">menuName</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="k">var</span> <span class="nv">menuName</span><span class="p">:</span> <span class="kt">String</span><span class="o">!</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
</section>