Mercurial > projects > dwt-mac
annotate dwt/internal/cocoa/NSMutableParagraphStyle.d @ 139:86fc761a24ae
Fixes #11
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Thu, 04 Jun 2009 23:23:10 +0200 |
parents | 62202ce0039f |
children |
rev | line source |
---|---|
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
1 /******************************************************************************* |
45 | 2 * Copyright (c) 2000, 2008 IBM Corporation and others. |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
3 * All rights reserved. This program and the accompanying materials |
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
4 * are made available under the terms of the Eclipse Public License v1.0 |
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
5 * which accompanies this distribution, and is available at |
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
6 * http://www.eclipse.org/legal/epl-v10.html |
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
7 * |
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
8 * Contributors: |
45 | 9 * IBM Corporation - initial API and implementation |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
10 * |
13
f565d3a95c0a
Ported dwt.internal
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
1
diff
changeset
|
11 * Port to the D programming language: |
45 | 12 * Jacob Carlborg <doob@me.com> |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
13 *******************************************************************************/ |
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
14 module dwt.internal.cocoa.NSMutableParagraphStyle; |
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
15 |
45 | 16 import dwt.dwthelper.utils; |
17 import dwt.internal.c.Carbon; | |
18 import cocoa = dwt.internal.cocoa.id; | |
1
8b48be5454ce
The internal cocoa classes compile now
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
0
diff
changeset
|
19 import dwt.internal.cocoa.NSArray; |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
20 import dwt.internal.cocoa.NSParagraphStyle; |
45 | 21 import dwt.internal.cocoa.NSText; |
1
8b48be5454ce
The internal cocoa classes compile now
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
0
diff
changeset
|
22 import dwt.internal.cocoa.NSTextTab; |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
23 import dwt.internal.cocoa.OS; |
60
62202ce0039f
Updated and fixed many modules to 3.514
Jacob Carlborg <doob@me.com>
parents:
45
diff
changeset
|
24 import dwt.internal.objc.cocoa.Cocoa; |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
25 import objc = dwt.internal.objc.runtime; |
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
26 |
45 | 27 public class NSMutableParagraphStyle : NSParagraphStyle { |
28 | |
29 public this() { | |
30 super(); | |
31 } | |
32 | |
33 public this(objc.id id) { | |
34 super(id); | |
35 } | |
36 | |
37 public this(cocoa.id id) { | |
38 super(id); | |
39 } | |
40 | |
41 public void addTabStop(NSTextTab anObject) { | |
42 OS.objc_msgSend(this.id, OS.sel_addTabStop_, anObject !is null ? anObject.id : null); | |
43 } | |
44 | |
45 public void setAlignment(NSTextAlignment alignment) { | |
46 OS.objc_msgSend(this.id, OS.sel_setAlignment_, alignment); | |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
47 } |
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
48 |
45 | 49 public void setDefaultTabInterval(CGFloat aFloat) { |
50 OS.objc_msgSend(this.id, OS.sel_setDefaultTabInterval_, aFloat); | |
51 } | |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
52 |
45 | 53 public void setFirstLineHeadIndent(CGFloat aFloat) { |
54 OS.objc_msgSend(this.id, OS.sel_setFirstLineHeadIndent_, aFloat); | |
55 } | |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
56 |
45 | 57 public void setLineBreakMode(NSLineBreakMode mode) { |
58 OS.objc_msgSend(this.id, OS.sel_setLineBreakMode_, mode); | |
59 } | |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
60 |
45 | 61 public void setLineSpacing(CGFloat aFloat) { |
62 OS.objc_msgSend(this.id, OS.sel_setLineSpacing_, aFloat); | |
63 } | |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
64 |
45 | 65 public void setTabStops(NSArray array) { |
66 OS.objc_msgSend(this.id, OS.sel_setTabStops_, array !is null ? array.id : null); | |
67 } | |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
68 |
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
69 } |