~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/monomac/docs/en/MonoMac.Foundation/NSIndexPath.xml

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
    </Attribute>
16
16
  </Attributes>
17
17
  <Docs>
18
 
    <summary>Represents the path to a node in a tree.</summary>
19
 
    <remarks>To be added.</remarks>
 
18
    <summary>Represents the path to a node in a tree. In iOS this class is most commonly used to identify a row in a <see cref="T:MonoMac.UIKit.UITableView" />.</summary>
 
19
    <remarks>
 
20
      <para>The API used in iOS with <see cref="T:MonoMac.UIKit.UITableView" /> consists of a static method to create new objects and two properties. The <see cref="M:MonoMac.Foundation.NSIndexPath.FromRowSection(System.Int32,System.Int32)" /> method creates a new instance from row and section numbers. The properties <see cref="P:MonoMac.Foundation.NSIndexPath.Row" /> and <see cref="P:MonoMac.Foundation.NSIndexPath.Section" /> return the relevant values from populated instances.</para>
 
21
      <para>This class has other uses beyond <see cref="T:MonoMac.UIKit.UITableView" />, which would involve using the rest of the class's properties and methods.</para>
 
22
    </remarks>
 
23
    <related type="sample" href="http://samples.xamarin.com/Samples/ByGuid?guid=8325839c-471c-4409-8d96-caefe8a95d4a">Example_Data</related>
 
24
    <related type="sample" href="http://samples.xamarin.com/Samples/ByGuid?guid=23a2571b-45eb-4889-bb67-d88937cb68c1">monocatalog</related>
20
25
  </Docs>
21
26
  <Members>
22
27
    <Member MemberName=".ctor">
30
35
        <Attribute>
31
36
          <AttributeName>MonoMac.Foundation.Export("init")</AttributeName>
32
37
        </Attribute>
 
38
        <Attribute>
 
39
          <AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
 
40
        </Attribute>
33
41
      </Attributes>
34
42
      <Parameters />
35
43
      <Docs>
49
57
        <Attribute>
50
58
          <AttributeName>MonoMac.Foundation.Export("initWithCoder:")</AttributeName>
51
59
        </Attribute>
 
60
        <Attribute>
 
61
          <AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
 
62
        </Attribute>
52
63
      </Attributes>
53
64
      <Parameters>
54
65
        <Parameter Name="coder" Type="MonoMac.Foundation.NSCoder" />
66
77
      <AssemblyInfo>
67
78
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
68
79
      </AssemblyInfo>
 
80
      <Attributes>
 
81
        <Attribute>
 
82
          <AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
 
83
        </Attribute>
 
84
      </Attributes>
69
85
      <Parameters>
70
86
        <Parameter Name="t" Type="MonoMac.Foundation.NSObjectFlag" />
71
87
      </Parameters>
72
88
      <Docs>
73
89
        <param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>
74
 
        <summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
 
90
        <summary>Constructor to call on derived classes when the derived class has an [Export] constructor.</summary>
75
91
        <remarks>
76
 
          <para>This constructor should be called by derived classes when they completely construct the object in managed code and merely want the runtime to allocate and initialize the NSObject.   This is required to implement the two-step initialization process that Objective-C uses, the first step is to perform the object allocation, the second step is to initialize the object.   When you invoke the constructor that takes the NSObjectFlag.Empty you taking advatnage of a direct path that goes all the way up to NSObject to merely allocate the object's memory and bind the Objective-C and C# objects together.    The actual initialization of the object is up to you.</para>
77
 
          <para>This constructor is typically used by the binding generator to allocate the object, but prevent the actual initialization to take place.   Once the allocation has taken place, the constructor has to initialize the object.   With constructors generated by the binding generator this means that it manually invokes one of the "init" methods to initialize the object.</para>
78
 
          <para>It is your responsability to completely initialize the object if you chain up using the NSObjectFlag.Empty path.</para>
79
 
          <para>In general, if your constructors invokes the NSObjectFlag.Empty base implementation, then it should be calling an Objective-C init method.   If this is not the case, you should instead chain to the proper constructor in your class. </para>
80
 
          <para>The argument value is ignored and merely ensures that the only code that is executed is the construction phase is the basic NSObject allocation and runtime type registration.  Typically the chaining would look like this:</para>
 
92
          <para>This constructor should be called by derived classes when they are initialized using an [Export] attribute. The argument value is ignore, typically the chaining would look like this:</para>
81
93
          <example>
82
94
            <code lang="C#">
83
 
//
84
 
// The NSObjectFlag merely allocates the object and registers the
85
 
// C# class with the Objective-C runtime if necessary, but no actual
86
 
// initXxx method is invoked, that is done later in the constructor
87
 
//
88
 
// This is taken from MonoMac's source code:
89
 
//
90
 
[Export ("initWithFrame:")]
91
 
public UIView (System.Drawing.RectangleF frame) : base (NSObjectFlag.Empty)
92
 
{
93
 
// Invoke the init method now.
94
 
        var initWithFrame = new Selector ("initWithFrame:").Handle;
95
 
        if (IsDirectBinding)
96
 
                Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_RectangleF (this.Handle, initWithFrame, frame);
97
 
        else
98
 
                Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_RectangleF (this.SuperHandle, initWithFrame, frame);
99
 
}
 
95
public class MyClass : BaseClass {
 
96
    [Export ("initWithFoo:")]
 
97
    public MyClass (string foo) : base (NSObjectFlag.Empty)
 
98
    {
 
99
        ...
 
100
    }
100
101
</code>
101
102
          </example>
102
103
        </remarks>
109
110
      <AssemblyInfo>
110
111
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
111
112
      </AssemblyInfo>
 
113
      <Attributes>
 
114
        <Attribute>
 
115
          <AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
 
116
        </Attribute>
 
117
      </Attributes>
112
118
      <Parameters>
113
119
        <Parameter Name="handle" Type="System.IntPtr" />
114
120
      </Parameters>
155
161
        <Parameter Name="other" Type="MonoMac.Foundation.NSIndexPath" />
156
162
      </Parameters>
157
163
      <Docs>
158
 
        <param name="other">To be added.</param>
159
 
        <summary>To be added.</summary>
160
 
        <returns>To be added.</returns>
161
 
        <remarks>To be added.</remarks>
 
164
        <param name="other">Index-path to compare.</param>
 
165
        <summary>Indicates the depth-first traversal order of this object compared to <paramref name="other" /> (not required for use with iOS <see cref="T:MonoMac.UIKit.UITableView" />).</summary>
 
166
        <returns>NSComparisonResult { NSOrderedAscending = -1, NSOrderedSame = 0, NSOrderedDescending = 1 }</returns>
 
167
        <remarks>
 
168
        </remarks>
162
169
      </Docs>
163
170
    </Member>
164
171
    <Member MemberName="Create">
181
188
        </Parameter>
182
189
      </Parameters>
183
190
      <Docs>
184
 
        <param name="indexes">To be added.</param>
185
 
        <summary>To be added.</summary>
186
 
        <returns>To be added.</returns>
187
 
        <remarks>To be added.</remarks>
 
191
        <param name="indexes">Array of indexes to make the index-path.</param>
 
192
        <summary>Create a new index-path object with the specified objects (not required for use with iOS <see cref="T:MonoMac.UIKit.UITableView" />).</summary>
 
193
        <returns>
 
194
        </returns>
 
195
        <remarks>
 
196
        </remarks>
188
197
      </Docs>
189
198
    </Member>
190
199
    <Member MemberName="Create">
207
216
        </Parameter>
208
217
      </Parameters>
209
218
      <Docs>
210
 
        <param name="indexes">To be added.</param>
211
 
        <summary>To be added.</summary>
212
 
        <returns>To be added.</returns>
213
 
        <remarks>To be added.</remarks>
 
219
        <param name="indexes">Array of indexes to make the index-path.</param>
 
220
        <summary>Create a new index-path object with the specified objects (not required for use with iOS <see cref="T:MonoMac.UIKit.UITableView" />).</summary>
 
221
        <returns>
 
222
        </returns>
 
223
        <remarks>
 
224
        </remarks>
214
225
      </Docs>
215
226
    </Member>
216
227
    <Member MemberName="Equals">
227
238
        <Parameter Name="obj" Type="System.Object" />
228
239
      </Parameters>
229
240
      <Docs>
230
 
        <param name="obj">To be added.</param>
231
 
        <summary>To be added.</summary>
232
 
        <returns>To be added.</returns>
233
 
        <remarks>To be added.</remarks>
 
241
        <param name="obj">Index-path to compare.</param>
 
242
        <summary>Returns <see langword="true" /> if this object is equivalent to <paramref name="obj" />.</summary>
 
243
        <returns>
 
244
        </returns>
 
245
        <remarks>
 
246
        </remarks>
234
247
      </Docs>
235
248
    </Member>
236
249
    <Member MemberName="FromIndex">
252
265
        <Parameter Name="index" Type="System.UInt32" />
253
266
      </Parameters>
254
267
      <Docs>
255
 
        <param name="index">To be added.</param>
256
 
        <summary>To be added.</summary>
257
 
        <returns>To be added.</returns>
258
 
        <remarks>To be added.</remarks>
 
268
        <param name="index">Object to place in the index-path.</param>
 
269
        <summary>Create a new index-path object with the specified object (not required for use with iOS <see cref="T:MonoMac.UIKit.UITableView" />).</summary>
 
270
        <returns>
 
271
        </returns>
 
272
        <remarks>
 
273
        </remarks>
259
274
      </Docs>
260
275
    </Member>
261
276
    <Member MemberName="FromIndexes">
277
292
        <Parameter Name="indexes" Type="System.UInt32[]" />
278
293
      </Parameters>
279
294
      <Docs>
280
 
        <param name="indexes">To be added.</param>
281
 
        <summary>To be added.</summary>
282
 
        <returns>To be added.</returns>
283
 
        <remarks>To be added.</remarks>
284
 
      </Docs>
285
 
    </Member>
286
 
    <Member MemberName="FromRowSection">
287
 
      <MemberSignature Language="C#" Value="public static MonoMac.Foundation.NSIndexPath FromRowSection (int row, int section);" />
288
 
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class MonoMac.Foundation.NSIndexPath FromRowSection(int32 row, int32 section) cil managed" />
289
 
      <MemberType>Method</MemberType>
290
 
      <AssemblyInfo>
291
 
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
292
 
      </AssemblyInfo>
293
 
      <Attributes>
294
 
        <Attribute>
295
 
          <AttributeName>MonoMac.Foundation.Export("indexPathForRow:inSection:")</AttributeName>
296
 
        </Attribute>
297
 
      </Attributes>
298
 
      <ReturnValue>
299
 
        <ReturnType>MonoMac.Foundation.NSIndexPath</ReturnType>
300
 
      </ReturnValue>
301
 
      <Parameters>
302
 
        <Parameter Name="row" Type="System.Int32" />
303
 
        <Parameter Name="section" Type="System.Int32" />
304
 
      </Parameters>
305
 
      <Docs>
306
 
        <param name="row">To be added.</param>
307
 
        <param name="section">To be added.</param>
308
 
        <summary>To be added.</summary>
309
 
        <returns>To be added.</returns>
310
 
        <remarks>To be added.</remarks>
 
295
        <param name="indexes">Array of indexes to make the index-path.</param>
 
296
        <summary>Create a new index-path object with the specified objects (not required for use with iOS <see cref="T:MonoMac.UIKit.UITableView" />).</summary>
 
297
        <returns>
 
298
        </returns>
 
299
        <remarks>
 
300
        </remarks>
311
301
      </Docs>
312
302
    </Member>
313
303
    <Member MemberName="GetHashCode">
322
312
      </ReturnValue>
323
313
      <Parameters />
324
314
      <Docs>
325
 
        <summary>To be added.</summary>
326
 
        <returns>To be added.</returns>
327
 
        <remarks>To be added.</remarks>
 
315
        <summary>Generates a hash code for the current instance.</summary>
 
316
        <returns>A int containing the hash code for this instance.</returns>
 
317
        <remarks>The algorithm used to generate the hash code is unspecified.</remarks>
328
318
      </Docs>
329
319
    </Member>
330
320
    <Member MemberName="GetIndexes">
339
329
      </ReturnValue>
340
330
      <Parameters />
341
331
      <Docs>
342
 
        <summary>To be added.</summary>
343
 
        <returns>To be added.</returns>
344
 
        <remarks>To be added.</remarks>
 
332
        <summary>Copies the objects contained in the index-path to an array (not required for use with iOS <see cref="T:MonoMac.UIKit.UITableView" />).</summary>
 
333
        <returns>
 
334
        </returns>
 
335
        <remarks>
 
336
        </remarks>
345
337
      </Docs>
346
338
    </Member>
347
339
    <Member MemberName="IndexAtPosition">
363
355
        <Parameter Name="position" Type="System.Int32" />
364
356
      </Parameters>
365
357
      <Docs>
366
 
        <param name="position">To be added.</param>
367
 
        <summary>To be added.</summary>
368
 
        <returns>To be added.</returns>
369
 
        <remarks>To be added.</remarks>
 
358
        <param name="position">Position of index to return.</param>
 
359
        <summary>Return the index at the given <paramref name="position" /> in the index-path (not required for use with iOS <see cref="T:MonoMac.UIKit.UITableView" />).</summary>
 
360
        <returns>
 
361
        </returns>
 
362
        <remarks>
 
363
        </remarks>
370
364
      </Docs>
371
365
    </Member>
372
366
    <Member MemberName="IndexPathByAddingIndex">
388
382
        <Parameter Name="index" Type="System.UInt32" />
389
383
      </Parameters>
390
384
      <Docs>
391
 
        <param name="index">To be added.</param>
392
 
        <summary>To be added.</summary>
393
 
        <returns>To be added.</returns>
394
 
        <remarks>To be added.</remarks>
 
385
        <param name="index">Index to be appended.</param>
 
386
        <summary>Returns a new index-path containing those in this object plus the new <paramref name="index" /> (not required for use with iOS <see cref="T:MonoMac.UIKit.UITableView" />).</summary>
 
387
        <returns>
 
388
        </returns>
 
389
        <remarks>
 
390
        </remarks>
395
391
      </Docs>
396
392
    </Member>
397
393
    <Member MemberName="IndexPathByRemovingLastIndex">
411
407
      </ReturnValue>
412
408
      <Parameters />
413
409
      <Docs>
414
 
        <summary>To be added.</summary>
415
 
        <returns>To be added.</returns>
416
 
        <remarks>To be added.</remarks>
 
410
        <summary>Returns a new index-path with the last one removed (not required for use with iOS <see cref="T:MonoMac.UIKit.UITableView" />).</summary>
 
411
        <returns>
 
412
        </returns>
 
413
        <remarks>
 
414
        </remarks>
417
415
      </Docs>
418
416
    </Member>
419
417
    <Member MemberName="Length">
432
430
        <ReturnType>System.Int32</ReturnType>
433
431
      </ReturnValue>
434
432
      <Docs>
435
 
        <summary>To be added.</summary>
436
 
        <value>To be added.</value>
437
 
        <remarks>To be added.</remarks>
438
 
      </Docs>
439
 
    </Member>
440
 
    <Member MemberName="Row">
441
 
      <MemberSignature Language="C#" Value="public virtual int Row { get; }" />
442
 
      <MemberSignature Language="ILAsm" Value=".property instance int32 Row" />
443
 
      <MemberType>Property</MemberType>
444
 
      <AssemblyInfo>
445
 
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
446
 
      </AssemblyInfo>
447
 
      <Attributes>
448
 
        <Attribute>
449
 
          <AttributeName>get: MonoMac.Foundation.Export("row")</AttributeName>
450
 
        </Attribute>
451
 
      </Attributes>
452
 
      <ReturnValue>
453
 
        <ReturnType>System.Int32</ReturnType>
454
 
      </ReturnValue>
455
 
      <Docs>
456
 
        <summary>To be added.</summary>
457
 
        <value>To be added.</value>
458
 
        <remarks>To be added.</remarks>
459
 
      </Docs>
460
 
    </Member>
461
 
    <Member MemberName="Section">
462
 
      <MemberSignature Language="C#" Value="public virtual int Section { get; }" />
463
 
      <MemberSignature Language="ILAsm" Value=".property instance int32 Section" />
464
 
      <MemberType>Property</MemberType>
465
 
      <AssemblyInfo>
466
 
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
467
 
      </AssemblyInfo>
468
 
      <Attributes>
469
 
        <Attribute>
470
 
          <AttributeName>get: MonoMac.Foundation.Export("section")</AttributeName>
471
 
        </Attribute>
472
 
      </Attributes>
473
 
      <ReturnValue>
474
 
        <ReturnType>System.Int32</ReturnType>
475
 
      </ReturnValue>
476
 
      <Docs>
477
 
        <summary>To be added.</summary>
478
 
        <value>To be added.</value>
479
 
        <remarks>To be added.</remarks>
 
433
        <summary>The number of indexes in the index-path (not required for use with iOS <see cref="T:MonoMac.UIKit.UITableView" />).</summary>
 
434
        <value>
 
435
        </value>
 
436
        <remarks>
 
437
        </remarks>
480
438
      </Docs>
481
439
    </Member>
482
440
  </Members>