summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSViewController.java
blob: 666102aab03f7744b1a0ade4a68c73c39bb1062a (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*******************************************************************************
 * Copyright (c) 2000, 2008 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.swt.internal.cocoa;

public class NSViewController extends NSResponder {

public NSViewController() {
	super();
}

public NSViewController(int id) {
	super(id);
}

public boolean commitEditing() {
	return OS.objc_msgSend(this.id, OS.sel_commitEditing) != 0;
}

public void commitEditingWithDelegate(id delegate, int didCommitSelector, int contextInfo) {
	OS.objc_msgSend(this.id, OS.sel_commitEditingWithDelegate_1didCommitSelector_1contextInfo_1, delegate != null ? delegate.id : 0, didCommitSelector, contextInfo);
}

public void discardEditing() {
	OS.objc_msgSend(this.id, OS.sel_discardEditing);
}

public id initWithNibName(NSString nibNameOrNil, NSBundle nibBundleOrNil) {
	int result = OS.objc_msgSend(this.id, OS.sel_initWithNibName_1bundle_1, nibNameOrNil != null ? nibNameOrNil.id : 0, nibBundleOrNil != null ? nibBundleOrNil.id : 0);
	return result != 0 ? new id(result) : null;
}

public void loadView() {
	OS.objc_msgSend(this.id, OS.sel_loadView);
}

public NSBundle nibBundle() {
	int result = OS.objc_msgSend(this.id, OS.sel_nibBundle);
	return result != 0 ? new NSBundle(result) : null;
}

public NSString nibName() {
	int result = OS.objc_msgSend(this.id, OS.sel_nibName);
	return result != 0 ? new NSString(result) : null;
}

public id representedObject() {
	int result = OS.objc_msgSend(this.id, OS.sel_representedObject);
	return result != 0 ? new id(result) : null;
}

public void setRepresentedObject(id representedObject) {
	OS.objc_msgSend(this.id, OS.sel_setRepresentedObject_1, representedObject != null ? representedObject.id : 0);
}

public void setTitle(NSString title) {
	OS.objc_msgSend(this.id, OS.sel_setTitle_1, title != null ? title.id : 0);
}

public void setView(NSView view) {
	OS.objc_msgSend(this.id, OS.sel_setView_1, view != null ? view.id : 0);
}

public NSString title() {
	int result = OS.objc_msgSend(this.id, OS.sel_title);
	return result != 0 ? new NSString(result) : null;
}

public NSView view() {
	int result = OS.objc_msgSend(this.id, OS.sel_view);
	return result != 0 ? new NSView(result) : null;
}

}