comparison dwt/widgets/Scrollable.d @ 37:642f460a0908

Fixed a lot of compile errors, a "hello world" app compiles now
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Fri, 10 Oct 2008 12:29:48 +0200
parents 060cdd4457aa
children d8635bb48c7c
comparison
equal deleted inserted replaced
36:db5a898b2119 37:642f460a0908
118 checkWidget(); 118 checkWidget();
119 if (scrollView !is null) { 119 if (scrollView !is null) {
120 NSSize size = NSSize(); 120 NSSize size = NSSize();
121 size.width = width; 121 size.width = width;
122 size.height = height; 122 size.height = height;
123 int border = hasBorder() ? OS.NSBezelBorder : OS.NSNoBorder; 123 NSBorderType border = hasBorder() ? NSBezelBorder : NSNoBorder;
124 size = NSScrollView.frameSizeForContentSize(size, (style & DWT.H_SCROLL) !is 0, (style & DWT.V_SCROLL) !is 0, border); 124 size = NSScrollView.frameSizeForContentSize(size, (style & DWT.H_SCROLL) !is 0, (style & DWT.V_SCROLL) !is 0, border);
125 width = cast(int)size.width; 125 width = cast(int)size.width;
126 height = cast(int)size.height; 126 height = cast(int)size.height;
127 NSRect frame = scrollView.contentView().frame(); 127 NSRect frame = scrollView.contentView().frame();
128 x -= frame.x; 128 x -= frame.x;
136 ScrollBar bar = new ScrollBar (); 136 ScrollBar bar = new ScrollBar ();
137 bar.parent = this; 137 bar.parent = this;
138 bar.style = style; 138 bar.style = style;
139 bar.display = display; 139 bar.display = display;
140 NSScroller scroller; 140 NSScroller scroller;
141 int actionSelector; 141 String actionSelector;
142 if ((style & DWT.H_SCROLL) !is 0) { 142 if ((style & DWT.H_SCROLL) !is 0) {
143 scroller = scrollView.horizontalScroller(); 143 scroller = scrollView.horizontalScroller();
144 actionSelector = OS.sel_sendHorizontalSelection; 144 actionSelector = OS.sel_sendHorizontalSelection;
145 } else { 145 } else {
146 scroller = scrollView.verticalScroller(); 146 scroller = scrollView.verticalScroller();
147 actionSelector = OS.sel_sendVerticalSelection; 147 actionSelector = OS.sel_sendVerticalSelection;
148 } 148 }
149 bar.view = scroller; 149 bar.view = scroller;
150 bar.createJNIRef(); 150 //bar.createJNIRef();
151 scroller.setTag(bar.jniRef); 151 scroller.setTag(bar.jniRef);
152 if ((state & CANVAS) is 0) { 152 if ((state & CANVAS) is 0) {
153 bar.target = scroller.target(); 153 bar.target = scroller.target();
154 bar.actionSelector = scroller.action(); 154 bar.actionSelector = scroller.action();
155 } 155 }