86
92
<AssemblyVersion>0.0.0.0</AssemblyVersion>
96
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
89
100
<Parameter Name="t" Type="MonoMac.Foundation.NSObjectFlag" />
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>
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>
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
107
// This is taken from MonoMac's source code:
109
[Export ("initWithFrame:")]
110
public UIView (System.Drawing.RectangleF frame) : base (NSObjectFlag.Empty)
112
// Invoke the init method now.
113
var initWithFrame = new Selector ("initWithFrame:").Handle;
115
Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_RectangleF (this.Handle, initWithFrame, frame);
117
Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_RectangleF (this.SuperHandle, initWithFrame, frame);
109
public class MyClass : BaseClass {
110
[Export ("initWithFoo:")]
111
public MyClass (string foo) : base (NSObjectFlag.Empty)
150
151
<ReturnType>MonoMac.Foundation.NSString</ReturnType>
153
<summary>To be added.</summary>
154
<value>To be added.</value>
154
<summary>Represents the value associated with the constant kCAAlignmentCenter</summary>
155
157
<remarks>To be added.</remarks>
166
168
<ReturnType>MonoMac.Foundation.NSString</ReturnType>
169
<summary>To be added.</summary>
170
<value>To be added.</value>
171
<summary>Represents the value associated with the constant kCAAlignmentJustified</summary>
171
174
<remarks>To be added.</remarks>
182
185
<ReturnType>MonoMac.Foundation.NSString</ReturnType>
185
<summary>To be added.</summary>
186
<value>To be added.</value>
188
<summary>Represents the value associated with the constant kCAAlignmentLeft</summary>
187
191
<remarks>To be added.</remarks>
222
226
<ReturnType>MonoMac.Foundation.NSString</ReturnType>
225
<summary>To be added.</summary>
226
<value>To be added.</value>
229
<summary>Represents the value associated with the constant kCAAlignmentNatural</summary>
227
232
<remarks>To be added.</remarks>
238
243
<ReturnType>MonoMac.Foundation.NSString</ReturnType>
241
<summary>To be added.</summary>
242
<value>To be added.</value>
246
<summary>Represents the value associated with the constant kCAAlignmentRight</summary>
243
249
<remarks>To be added.</remarks>
254
260
<ReturnType>MonoMac.Foundation.NSAttributedString</ReturnType>
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>
268
This sets the attributed string to display on the layer. The attributed string should contain CoreText attributes.
272
void DrawHelloWorld (CATextLayer myTextLayer)
274
var hello = new NSAttributedString ("Hello, world",
275
new CTStringAttributes () {
276
ForegroundColorFromContext = true,
277
Font = new CTFont ("Arial", 24)
280
myTextLayer.AttributedString = hello;
262
287
<Member MemberName="ClassHandle">
456
481
<ReturnType>MonoMac.Foundation.NSString</ReturnType>
459
<summary>To be added.</summary>
460
<value>To be added.</value>
484
<summary>Represents the value associated with the constant kCATruncationEnd</summary>
461
487
<remarks>To be added.</remarks>
472
498
<ReturnType>MonoMac.Foundation.NSString</ReturnType>
475
<summary>To be added.</summary>
476
<value>To be added.</value>
501
<summary>Represents the value associated with the constant kCATruncationMiddle</summary>
477
504
<remarks>To be added.</remarks>
488
515
<ReturnType>MonoMac.Foundation.NSString</ReturnType>
491
<summary>To be added.</summary>
492
<value>To be added.</value>
518
<summary>Represents the value associated with the constant kCATruncationStart</summary>
493
521
<remarks>To be added.</remarks>
528
556
<ReturnType>MonoMac.Foundation.NSString</ReturnType>
531
<summary>To be added.</summary>
532
<value>To be added.</value>
559
<summary>Represents the value associated with the constant kCATruncationNone</summary>
533
562
<remarks>To be added.</remarks>