67
73
<AssemblyVersion>0.0.0.0</AssemblyVersion>
77
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
70
81
<Parameter Name="t" Type="MonoMac.Foundation.NSObjectFlag" />
73
84
<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>
85
<summary>Constructor to call on derived classes when the derived class has an [Export] constructor.</summary>
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>
87
<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>
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
88
// This is taken from MonoMac's source code:
90
[Export ("initWithFrame:")]
91
public UIView (System.Drawing.RectangleF frame) : base (NSObjectFlag.Empty)
93
// Invoke the init method now.
94
var initWithFrame = new Selector ("initWithFrame:").Handle;
96
Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_RectangleF (this.Handle, initWithFrame, frame);
98
Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_RectangleF (this.SuperHandle, initWithFrame, frame);
90
public class MyClass : BaseClass {
91
[Export ("initWithFoo:")]
92
public MyClass (string foo) : base (NSObjectFlag.Empty)
197
198
<summary>Notification constant for Checkpoint</summary>
198
199
<value>NSString constant, should be used as a token to NSNotificationCenter.</value>
200
<para id="tool-remark">This constant can be used with the <see cref="T:MonoMac.Foundation.NSNotificationCenter" /> to register a listener for this notification.</para>
204
NSNotificationCenter.DefaultCenter.AddObserver (NSUndoManager.CheckpointNotification, (notification) => Console.WriteLine ("Received the notification NSUndoManager", notification);
201
<para id="tool-remark">This constant can be used with the <see cref="T:MonoTouch.Foundation.NSNotificationCenter" /> to register a listener for this notification. This is an NSString instead of a string, because these values can be used as tokens in some native libraries instead of being used purely for their actual string content. The 'notification' parameter to the callback contains extra information that is specific to the notification type.</para>
202
<para id="tool-remark">If you want to subscribe to this notification, you can use the convenience <see cref="T:NSUndoManager+Notifications" />.<see cref="M:NSUndoManager+Notifications.ObserveCheckpoint" /> method which offers strongly typed access to the parameters of the notification.</para>
203
<para>The following example shows how to use the strongly typed Notifications class, to take the guesswork out of the available properties in the notification:</para>
211
notification = NSUndoManager.Notifications.ObserveCheckpoint ((sender, args) => {
212
/* Access strongly typed args */
213
Console.WriteLine ("Notification: {0}", args.Notification);
216
// To stop listening:
217
notification.Dispose ();
222
NSObject notification;
223
void Callback (object sender, Checkpoint args)
225
// Access strongly typed args
226
Console.WriteLine ("Notification: {0}", args.Notification);
231
notification = NSUndoManager.Notifications.ObserveCheckpoint (Callback);
236
notification.Dispose ();
239
<para>The following example shows how to use the notification with the DefaultCenter API:</para>
243
NSNotificationCenter.DefaultCenter.AddObserver (
244
NSUndoManager.CheckpointNotification, (notification) => {Console.WriteLine ("Received the notification NSUndoManager", notification); }
248
289
<summary>Notification constant for DidCloseUndoGroup</summary>
249
290
<value>NSString constant, should be used as a token to NSNotificationCenter.</value>
251
<para id="tool-remark">This constant can be used with the <see cref="T:MonoMac.Foundation.NSNotificationCenter" /> to register a listener for this notification.</para>
255
NSNotificationCenter.DefaultCenter.AddObserver (NSUndoManager.DidCloseUndoGroupNotification, (notification) => Console.WriteLine ("Received the notification NSUndoManager", notification);
292
<para id="tool-remark">This constant can be used with the <see cref="T:MonoTouch.Foundation.NSNotificationCenter" /> to register a listener for this notification. This is an NSString instead of a string, because these values can be used as tokens in some native libraries instead of being used purely for their actual string content. The 'notification' parameter to the callback contains extra information that is specific to the notification type.</para>
293
<para id="tool-remark">If you want to subscribe to this notification, you can use the convenience <see cref="T:NSUndoManager+Notifications" />.<see cref="M:NSUndoManager+Notifications.ObserveDidCloseUndoGroup" /> method which offers strongly typed access to the parameters of the notification.</para>
294
<para>The following example shows how to use the strongly typed Notifications class, to take the guesswork out of the available properties in the notification:</para>
302
notification = NSUndoManager.Notifications.ObserveDidCloseUndoGroup ((sender, args) => {
303
/* Access strongly typed args */
304
Console.WriteLine ("Notification: {0}", args.Notification);
306
Console.WriteLine ("Discardable", args.Discardable);
309
// To stop listening:
310
notification.Dispose ();
315
NSObject notification;
316
void Callback (object sender, DidCloseUndoGroup args)
318
// Access strongly typed args
319
Console.WriteLine ("Notification: {0}", args.Notification);
321
Console.WriteLine ("Discardable", args.Discardable);
326
notification = NSUndoManager.Notifications.ObserveDidCloseUndoGroup (Callback);
331
notification.Dispose ();
334
<para>The following example shows how to use the notification with the DefaultCenter API:</para>
338
NSNotificationCenter.DefaultCenter.AddObserver (
339
NSUndoManager.DidCloseUndoGroupNotification, (notification) => {Console.WriteLine ("Received the notification NSUndoManager", notification); }
283
368
<summary>Notification constant for DidOpenUndoGroup</summary>
284
369
<value>NSString constant, should be used as a token to NSNotificationCenter.</value>
286
<para id="tool-remark">This constant can be used with the <see cref="T:MonoMac.Foundation.NSNotificationCenter" /> to register a listener for this notification.</para>
290
NSNotificationCenter.DefaultCenter.AddObserver (NSUndoManager.DidOpenUndoGroupNotification, (notification) => Console.WriteLine ("Received the notification NSUndoManager", notification);
371
<para id="tool-remark">This constant can be used with the <see cref="T:MonoTouch.Foundation.NSNotificationCenter" /> to register a listener for this notification. This is an NSString instead of a string, because these values can be used as tokens in some native libraries instead of being used purely for their actual string content. The 'notification' parameter to the callback contains extra information that is specific to the notification type.</para>
372
<para id="tool-remark">If you want to subscribe to this notification, you can use the convenience <see cref="T:NSUndoManager+Notifications" />.<see cref="M:NSUndoManager+Notifications.ObserveDidOpenUndoGroup" /> method which offers strongly typed access to the parameters of the notification.</para>
373
<para>The following example shows how to use the strongly typed Notifications class, to take the guesswork out of the available properties in the notification:</para>
381
notification = NSUndoManager.Notifications.ObserveDidOpenUndoGroup ((sender, args) => {
382
/* Access strongly typed args */
383
Console.WriteLine ("Notification: {0}", args.Notification);
386
// To stop listening:
387
notification.Dispose ();
392
NSObject notification;
393
void Callback (object sender, DidOpenUndoGroup args)
395
// Access strongly typed args
396
Console.WriteLine ("Notification: {0}", args.Notification);
401
notification = NSUndoManager.Notifications.ObserveDidOpenUndoGroup (Callback);
406
notification.Dispose ();
409
<para>The following example shows how to use the notification with the DefaultCenter API:</para>
413
NSNotificationCenter.DefaultCenter.AddObserver (
414
NSUndoManager.DidOpenUndoGroupNotification, (notification) => {Console.WriteLine ("Received the notification NSUndoManager", notification); }
318
443
<summary>Notification constant for DidRedoChange</summary>
319
444
<value>NSString constant, should be used as a token to NSNotificationCenter.</value>
321
<para id="tool-remark">This constant can be used with the <see cref="T:MonoMac.Foundation.NSNotificationCenter" /> to register a listener for this notification.</para>
325
NSNotificationCenter.DefaultCenter.AddObserver (NSUndoManager.DidRedoChangeNotification, (notification) => Console.WriteLine ("Received the notification NSUndoManager", notification);
446
<para id="tool-remark">This constant can be used with the <see cref="T:MonoTouch.Foundation.NSNotificationCenter" /> to register a listener for this notification. This is an NSString instead of a string, because these values can be used as tokens in some native libraries instead of being used purely for their actual string content. The 'notification' parameter to the callback contains extra information that is specific to the notification type.</para>
447
<para id="tool-remark">If you want to subscribe to this notification, you can use the convenience <see cref="T:NSUndoManager+Notifications" />.<see cref="M:NSUndoManager+Notifications.ObserveDidRedoChange" /> method which offers strongly typed access to the parameters of the notification.</para>
448
<para>The following example shows how to use the strongly typed Notifications class, to take the guesswork out of the available properties in the notification:</para>
456
notification = NSUndoManager.Notifications.ObserveDidRedoChange ((sender, args) => {
457
/* Access strongly typed args */
458
Console.WriteLine ("Notification: {0}", args.Notification);
461
// To stop listening:
462
notification.Dispose ();
467
NSObject notification;
468
void Callback (object sender, DidRedoChange args)
470
// Access strongly typed args
471
Console.WriteLine ("Notification: {0}", args.Notification);
476
notification = NSUndoManager.Notifications.ObserveDidRedoChange (Callback);
481
notification.Dispose ();
484
<para>The following example shows how to use the notification with the DefaultCenter API:</para>
488
NSNotificationCenter.DefaultCenter.AddObserver (
489
NSUndoManager.DidRedoChangeNotification, (notification) => {Console.WriteLine ("Received the notification NSUndoManager", notification); }
353
518
<summary>Notification constant for DidUndoChange</summary>
354
519
<value>NSString constant, should be used as a token to NSNotificationCenter.</value>
356
<para id="tool-remark">This constant can be used with the <see cref="T:MonoMac.Foundation.NSNotificationCenter" /> to register a listener for this notification.</para>
360
NSNotificationCenter.DefaultCenter.AddObserver (NSUndoManager.DidUndoChangeNotification, (notification) => Console.WriteLine ("Received the notification NSUndoManager", notification);
521
<para id="tool-remark">This constant can be used with the <see cref="T:MonoTouch.Foundation.NSNotificationCenter" /> to register a listener for this notification. This is an NSString instead of a string, because these values can be used as tokens in some native libraries instead of being used purely for their actual string content. The 'notification' parameter to the callback contains extra information that is specific to the notification type.</para>
522
<para id="tool-remark">If you want to subscribe to this notification, you can use the convenience <see cref="T:NSUndoManager+Notifications" />.<see cref="M:NSUndoManager+Notifications.ObserveDidUndoChange" /> method which offers strongly typed access to the parameters of the notification.</para>
523
<para>The following example shows how to use the strongly typed Notifications class, to take the guesswork out of the available properties in the notification:</para>
531
notification = NSUndoManager.Notifications.ObserveDidUndoChange ((sender, args) => {
532
/* Access strongly typed args */
533
Console.WriteLine ("Notification: {0}", args.Notification);
536
// To stop listening:
537
notification.Dispose ();
542
NSObject notification;
543
void Callback (object sender, DidUndoChange args)
545
// Access strongly typed args
546
Console.WriteLine ("Notification: {0}", args.Notification);
551
notification = NSUndoManager.Notifications.ObserveDidUndoChange (Callback);
556
notification.Dispose ();
559
<para>The following example shows how to use the notification with the DefaultCenter API:</para>
563
NSNotificationCenter.DefaultCenter.AddObserver (
564
NSUndoManager.DidUndoChangeNotification, (notification) => {Console.WriteLine ("Received the notification NSUndoManager", notification); }
469
674
<ReturnType>MonoMac.Foundation.NSString</ReturnType>
472
<summary>To be added.</summary>
473
<value>To be added.</value>
677
<summary>Represents the value associated with the constant NSUndoManagerGroupIsDiscardableKey</summary>
474
680
<remarks>To be added.</remarks>
1008
1220
<summary>Notification constant for WillCloseUndoGroup</summary>
1009
1221
<value>NSString constant, should be used as a token to NSNotificationCenter.</value>
1011
<para id="tool-remark">This constant can be used with the <see cref="T:MonoMac.Foundation.NSNotificationCenter" /> to register a listener for this notification.</para>
1015
NSNotificationCenter.DefaultCenter.AddObserver (NSUndoManager.WillCloseUndoGroupNotification, (notification) => Console.WriteLine ("Received the notification NSUndoManager", notification);
1223
<para id="tool-remark">This constant can be used with the <see cref="T:MonoTouch.Foundation.NSNotificationCenter" /> to register a listener for this notification. This is an NSString instead of a string, because these values can be used as tokens in some native libraries instead of being used purely for their actual string content. The 'notification' parameter to the callback contains extra information that is specific to the notification type.</para>
1224
<para id="tool-remark">If you want to subscribe to this notification, you can use the convenience <see cref="T:NSUndoManager+Notifications" />.<see cref="M:NSUndoManager+Notifications.ObserveWillCloseUndoGroup" /> method which offers strongly typed access to the parameters of the notification.</para>
1225
<para>The following example shows how to use the strongly typed Notifications class, to take the guesswork out of the available properties in the notification:</para>
1233
notification = NSUndoManager.Notifications.ObserveWillCloseUndoGroup ((sender, args) => {
1234
/* Access strongly typed args */
1235
Console.WriteLine ("Notification: {0}", args.Notification);
1237
Console.WriteLine ("Discardable", args.Discardable);
1240
// To stop listening:
1241
notification.Dispose ();
1246
NSObject notification;
1247
void Callback (object sender, WillCloseUndoGroup args)
1249
// Access strongly typed args
1250
Console.WriteLine ("Notification: {0}", args.Notification);
1252
Console.WriteLine ("Discardable", args.Discardable);
1257
notification = NSUndoManager.Notifications.ObserveWillCloseUndoGroup (Callback);
1262
notification.Dispose ();
1265
<para>The following example shows how to use the notification with the DefaultCenter API:</para>
1269
NSNotificationCenter.DefaultCenter.AddObserver (
1270
NSUndoManager.WillCloseUndoGroupNotification, (notification) => {Console.WriteLine ("Received the notification NSUndoManager", notification); }
1018
1273
// Method style
1043
1299
<summary>Notification constant for WillRedoChange</summary>
1044
1300
<value>NSString constant, should be used as a token to NSNotificationCenter.</value>
1046
<para id="tool-remark">This constant can be used with the <see cref="T:MonoMac.Foundation.NSNotificationCenter" /> to register a listener for this notification.</para>
1050
NSNotificationCenter.DefaultCenter.AddObserver (NSUndoManager.WillRedoChangeNotification, (notification) => Console.WriteLine ("Received the notification NSUndoManager", notification);
1302
<para id="tool-remark">This constant can be used with the <see cref="T:MonoTouch.Foundation.NSNotificationCenter" /> to register a listener for this notification. This is an NSString instead of a string, because these values can be used as tokens in some native libraries instead of being used purely for their actual string content. The 'notification' parameter to the callback contains extra information that is specific to the notification type.</para>
1303
<para id="tool-remark">If you want to subscribe to this notification, you can use the convenience <see cref="T:NSUndoManager+Notifications" />.<see cref="M:NSUndoManager+Notifications.ObserveWillRedoChange" /> method which offers strongly typed access to the parameters of the notification.</para>
1304
<para>The following example shows how to use the strongly typed Notifications class, to take the guesswork out of the available properties in the notification:</para>
1312
notification = NSUndoManager.Notifications.ObserveWillRedoChange ((sender, args) => {
1313
/* Access strongly typed args */
1314
Console.WriteLine ("Notification: {0}", args.Notification);
1317
// To stop listening:
1318
notification.Dispose ();
1323
NSObject notification;
1324
void Callback (object sender, WillRedoChange args)
1326
// Access strongly typed args
1327
Console.WriteLine ("Notification: {0}", args.Notification);
1332
notification = NSUndoManager.Notifications.ObserveWillRedoChange (Callback);
1337
notification.Dispose ();
1340
<para>The following example shows how to use the notification with the DefaultCenter API:</para>
1344
NSNotificationCenter.DefaultCenter.AddObserver (
1345
NSUndoManager.WillRedoChangeNotification, (notification) => {Console.WriteLine ("Received the notification NSUndoManager", notification); }
1053
1348
// Method style
1078
1374
<summary>Notification constant for WillUndoChange</summary>
1079
1375
<value>NSString constant, should be used as a token to NSNotificationCenter.</value>
1081
<para id="tool-remark">This constant can be used with the <see cref="T:MonoMac.Foundation.NSNotificationCenter" /> to register a listener for this notification.</para>
1085
NSNotificationCenter.DefaultCenter.AddObserver (NSUndoManager.WillUndoChangeNotification, (notification) => Console.WriteLine ("Received the notification NSUndoManager", notification);
1377
<para id="tool-remark">This constant can be used with the <see cref="T:MonoTouch.Foundation.NSNotificationCenter" /> to register a listener for this notification. This is an NSString instead of a string, because these values can be used as tokens in some native libraries instead of being used purely for their actual string content. The 'notification' parameter to the callback contains extra information that is specific to the notification type.</para>
1378
<para id="tool-remark">If you want to subscribe to this notification, you can use the convenience <see cref="T:NSUndoManager+Notifications" />.<see cref="M:NSUndoManager+Notifications.ObserveWillUndoChange" /> method which offers strongly typed access to the parameters of the notification.</para>
1379
<para>The following example shows how to use the strongly typed Notifications class, to take the guesswork out of the available properties in the notification:</para>
1387
notification = NSUndoManager.Notifications.ObserveWillUndoChange ((sender, args) => {
1388
/* Access strongly typed args */
1389
Console.WriteLine ("Notification: {0}", args.Notification);
1392
// To stop listening:
1393
notification.Dispose ();
1398
NSObject notification;
1399
void Callback (object sender, WillUndoChange args)
1401
// Access strongly typed args
1402
Console.WriteLine ("Notification: {0}", args.Notification);
1407
notification = NSUndoManager.Notifications.ObserveWillUndoChange (Callback);
1412
notification.Dispose ();
1415
<para>The following example shows how to use the notification with the DefaultCenter API:</para>
1419
NSNotificationCenter.DefaultCenter.AddObserver (
1420
NSUndoManager.WillUndoChangeNotification, (notification) => {Console.WriteLine ("Received the notification NSUndoManager", notification); }
1088
1423
// Method style