blob: 139f2bf15369d48b59d969333baae493ef6fcc9f (
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
|
using System;
using System.Linq;
using Foundation;
using AppKit;
using ObjCRuntime;
namespace macdoc
{
public class MonodocDocumentController : NSDocumentController
{
public MonodocDocumentController () : base ()
{
}
// We only have one type of document so force every request to use it
public override Class DocumentClassForType (string typeName)
{
return new Class (typeof (MyDocument));
}
public override string TypeForUrl (NSUrl inAbsoluteUrl, out NSError outError)
{
outError = null;
return "MyDocument";
}
public MyDocument CurrentMyDocument {
get {
return (MyDocument)CurrentDocument;
}
}
}
}
|