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

« back to all changes in this revision

Viewing changes to external/monomac/docs/en/MonoMac.CoreAnimation/CATextLayer.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:
49
49
        <Attribute>
50
50
          <AttributeName>MonoMac.Foundation.Export("init")</AttributeName>
51
51
        </Attribute>
 
52
        <Attribute>
 
53
          <AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
 
54
        </Attribute>
52
55
      </Attributes>
53
56
      <Parameters />
54
57
      <Docs>
68
71
        <Attribute>
69
72
          <AttributeName>MonoMac.Foundation.Export("initWithCoder:")</AttributeName>
70
73
        </Attribute>
 
74
        <Attribute>
 
75
          <AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
 
76
        </Attribute>
71
77
      </Attributes>
72
78
      <Parameters>
73
79
        <Parameter Name="coder" Type="MonoMac.Foundation.NSCoder" />
85
91
      <AssemblyInfo>
86
92
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
87
93
      </AssemblyInfo>
 
94
      <Attributes>
 
95
        <Attribute>
 
96
          <AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
 
97
        </Attribute>
 
98
      </Attributes>
88
99
      <Parameters>
89
100
        <Parameter Name="t" Type="MonoMac.Foundation.NSObjectFlag" />
90
101
      </Parameters>
91
102
      <Docs>
92
103
        <param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>
93
 
        <summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
 
104
        <summary>Constructor to call on derived classes when the derived class has an [Export] constructor.</summary>
94
105
        <remarks>
95
 
          <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>
96
 
          <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>
97
 
          <para>It is your responsability to completely initialize the object if you chain up using the NSObjectFlag.Empty path.</para>
98
 
          <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>
99
 
          <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>
 
106
          <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>
100
107
          <example>
101
108
            <code lang="C#">
102
 
//
103
 
// The NSObjectFlag merely allocates the object and registers the
104
 
// C# class with the Objective-C runtime if necessary, but no actual
105
 
// initXxx method is invoked, that is done later in the constructor
106
 
//
107
 
// This is taken from MonoMac's source code:
108
 
//
109
 
[Export ("initWithFrame:")]
110
 
public UIView (System.Drawing.RectangleF frame) : base (NSObjectFlag.Empty)
111
 
{
112
 
// Invoke the init method now.
113
 
        var initWithFrame = new Selector ("initWithFrame:").Handle;
114
 
        if (IsDirectBinding)
115
 
                Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_RectangleF (this.Handle, initWithFrame, frame);
116
 
        else
117
 
                Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_RectangleF (this.SuperHandle, initWithFrame, frame);
118
 
}
 
109
public class MyClass : BaseClass {
 
110
    [Export ("initWithFoo:")]
 
111
    public MyClass (string foo) : base (NSObjectFlag.Empty)
 
112
    {
 
113
        ...
 
114
    }
119
115
</code>
120
116
          </example>
121
117
        </remarks>
128
124
      <AssemblyInfo>
129
125
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
130
126
      </AssemblyInfo>
 
127
      <Attributes>
 
128
        <Attribute>
 
129
          <AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
 
130
        </Attribute>
 
131
      </Attributes>
131
132
      <Parameters>
132
133
        <Parameter Name="handle" Type="System.IntPtr" />
133
134
      </Parameters>
150
151
        <ReturnType>MonoMac.Foundation.NSString</ReturnType>
151
152
      </ReturnValue>
152
153
      <Docs>
153
 
        <summary>To be added.</summary>
154
 
        <value>To be added.</value>
 
154
        <summary>Represents the value associated with the constant kCAAlignmentCenter</summary>
 
155
        <value>
 
156
        </value>
155
157
        <remarks>To be added.</remarks>
156
158
      </Docs>
157
159
    </Member>
166
168
        <ReturnType>MonoMac.Foundation.NSString</ReturnType>
167
169
      </ReturnValue>
168
170
      <Docs>
169
 
        <summary>To be added.</summary>
170
 
        <value>To be added.</value>
 
171
        <summary>Represents the value associated with the constant kCAAlignmentJustified</summary>
 
172
        <value>
 
173
        </value>
171
174
        <remarks>To be added.</remarks>
172
175
      </Docs>
173
176
    </Member>
182
185
        <ReturnType>MonoMac.Foundation.NSString</ReturnType>
183
186
      </ReturnValue>
184
187
      <Docs>
185
 
        <summary>To be added.</summary>
186
 
        <value>To be added.</value>
 
188
        <summary>Represents the value associated with the constant kCAAlignmentLeft</summary>
 
189
        <value>
 
190
        </value>
187
191
        <remarks>To be added.</remarks>
188
192
      </Docs>
189
193
    </Member>
222
226
        <ReturnType>MonoMac.Foundation.NSString</ReturnType>
223
227
      </ReturnValue>
224
228
      <Docs>
225
 
        <summary>To be added.</summary>
226
 
        <value>To be added.</value>
 
229
        <summary>Represents the value associated with the constant kCAAlignmentNatural</summary>
 
230
        <value>
 
231
        </value>
227
232
        <remarks>To be added.</remarks>
228
233
      </Docs>
229
234
    </Member>
238
243
        <ReturnType>MonoMac.Foundation.NSString</ReturnType>
239
244
      </ReturnValue>
240
245
      <Docs>
241
 
        <summary>To be added.</summary>
242
 
        <value>To be added.</value>
 
246
        <summary>Represents the value associated with the constant kCAAlignmentRight</summary>
 
247
        <value>
 
248
        </value>
243
249
        <remarks>To be added.</remarks>
244
250
      </Docs>
245
251
    </Member>
254
260
        <ReturnType>MonoMac.Foundation.NSAttributedString</ReturnType>
255
261
      </ReturnValue>
256
262
      <Docs>
257
 
        <summary>To be added.</summary>
258
 
        <value>To be added.</value>
259
 
        <remarks>To be added.</remarks>
 
263
        <summary>Sets the attributed string to display.</summary>
 
264
        <value>
 
265
        </value>
 
266
        <remarks>
 
267
          <para>
 
268
            This sets the attributed string to display on the layer.   The attributed string should contain CoreText attributes.
 
269
          </para>
 
270
          <example>
 
271
            <code lang="c#">
 
272
void DrawHelloWorld (CATextLayer myTextLayer)
 
273
{
 
274
    var hello = new NSAttributedString ("Hello, world",
 
275
           new CTStringAttributes () {
 
276
                  ForegroundColorFromContext =  true,
 
277
                  Font = new CTFont ("Arial", 24)
 
278
           });
 
279
 
 
280
    myTextLayer.AttributedString = hello;
 
281
}    
 
282
</code>
 
283
          </example>
 
284
        </remarks>
260
285
      </Docs>
261
286
    </Member>
262
287
    <Member MemberName="ClassHandle">
456
481
        <ReturnType>MonoMac.Foundation.NSString</ReturnType>
457
482
      </ReturnValue>
458
483
      <Docs>
459
 
        <summary>To be added.</summary>
460
 
        <value>To be added.</value>
 
484
        <summary>Represents the value associated with the constant kCATruncationEnd</summary>
 
485
        <value>
 
486
        </value>
461
487
        <remarks>To be added.</remarks>
462
488
      </Docs>
463
489
    </Member>
472
498
        <ReturnType>MonoMac.Foundation.NSString</ReturnType>
473
499
      </ReturnValue>
474
500
      <Docs>
475
 
        <summary>To be added.</summary>
476
 
        <value>To be added.</value>
 
501
        <summary>Represents the value associated with the constant kCATruncationMiddle</summary>
 
502
        <value>
 
503
        </value>
477
504
        <remarks>To be added.</remarks>
478
505
      </Docs>
479
506
    </Member>
488
515
        <ReturnType>MonoMac.Foundation.NSString</ReturnType>
489
516
      </ReturnValue>
490
517
      <Docs>
491
 
        <summary>To be added.</summary>
492
 
        <value>To be added.</value>
 
518
        <summary>Represents the value associated with the constant kCATruncationStart</summary>
 
519
        <value>
 
520
        </value>
493
521
        <remarks>To be added.</remarks>
494
522
      </Docs>
495
523
    </Member>
528
556
        <ReturnType>MonoMac.Foundation.NSString</ReturnType>
529
557
      </ReturnValue>
530
558
      <Docs>
531
 
        <summary>To be added.</summary>
532
 
        <value>To be added.</value>
 
559
        <summary>Represents the value associated with the constant kCATruncationNone</summary>
 
560
        <value>
 
561
        </value>
533
562
        <remarks>To be added.</remarks>
534
563
      </Docs>
535
564
    </Member>