comparison dstep/appkit/NSImageCell.d @ 16:19885b43130e

Huge update, the bridge actually works now
author Jacob Carlborg <doob@me.com>
date Sun, 03 Jan 2010 22:06:11 +0100
parents
children b9de51448c6b
comparison
equal deleted inserted replaced
15:7ff919f595d5 16:19885b43130e
1 /**
2 * Copyright: Copyright (c) 2009 Jacob Carlborg.
3 * Authors: Jacob Carlborg
4 * Version: Initial created: Sep 24, 2009
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
6 */
7 module dstep.appkit.NSImageCell;
8
9 import dstep.appkit.NSCell;
10 import dstep.appkit.NSImage;
11 import dstep.foundation.NSCoder;
12 import dstep.foundation.NSObjCRuntime;
13 import dstep.foundation.NSObject;
14 import dstep.foundation.NSZone;
15 import dstep.objc.bridge.Bridge;
16 import dstep.objc.objc;
17
18 alias NSUInteger NSImageAlignment;
19 alias NSUInteger NSImageFrameStyle;
20
21 enum
22 {
23 NSImageAlignCenter = 0,
24 NSImageAlignTop,
25 NSImageAlignTopLeft,
26 NSImageAlignTopRight,
27 NSImageAlignLeft,
28 NSImageAlignBottom,
29 NSImageAlignBottomLeft,
30 NSImageAlignBottomRight,
31 NSImageAlignRight
32 }
33
34 enum
35 {
36 NSImageFrameNone = 0,
37 NSImageFramePhoto,
38 NSImageFrameGrayBezel,
39 NSImageFrameGroove,
40 NSImageFrameButton
41 }
42
43 class NSImageCell : NSCell, INSCopying, INSCoding
44 {
45 mixin (ObjcWrap);
46
47 this (NSCoder aDecoder)
48 {
49 super(typeof(this).alloc.initWithCoder(aDecoder).objcObject);
50 }
51
52 void encodeWithCoder (NSCoder aCoder)
53 {
54 return invokeObjcSelf!(void, "encodeWithCoder:", NSCoder)(aCoder);
55 }
56
57 typeof(this) initWithCoder (NSCoder aDecoder)
58 {
59 return invokeObjcSelf!(typeof(this), "initWithCoder:", NSCoder)(aDecoder);
60 }
61
62 typeof(this) copyWithZone (NSZone* zone)
63 {
64 return invokeObjcSelf!(typeof(this), "copyWithZone:", NSZone*)(zone);
65 }
66
67 uint imageAlignment ()
68 {
69 return invokeObjcSelf!(uint, "imageAlignment");
70 }
71
72 void setImageAlignment (uint newAlign)
73 {
74 return invokeObjcSelf!(void, "setImageAlignment:", uint)(newAlign);
75 }
76
77 uint imageScaling ()
78 {
79 return invokeObjcSelf!(uint, "imageScaling");
80 }
81
82 void setImageScaling (uint newScaling)
83 {
84 return invokeObjcSelf!(void, "setImageScaling:", uint)(newScaling);
85 }
86
87 uint imageFrameStyle ()
88 {
89 return invokeObjcSelf!(uint, "imageFrameStyle");
90 }
91
92 void setImageFrameStyle (uint newStyle)
93 {
94 return invokeObjcSelf!(void, "setImageFrameStyle:", uint)(newStyle);
95 }
96
97 }
98