Changeset 82
- Timestamp:
- 12/29/05 08:01:36 (3 years ago)
- Files:
-
- trunk/current/win32/import/.poseidon (modified) (1 diff)
- trunk/current/win32/import/dwt/accessibility/accessible.d (modified) (3 diffs)
- trunk/current/win32/import/dwt/all.d (modified) (1 diff)
- trunk/current/win32/import/dwt/browser/browser.d (modified) (1 diff)
- trunk/current/win32/import/dwt/browser/website.d (modified) (6 diffs)
- trunk/current/win32/import/dwt/custom/busyindicator.d (modified) (1 diff)
- trunk/current/win32/import/dwt/custom/cbanner.d (modified) (9 diffs)
- trunk/current/win32/import/dwt/custom/clabel.d (modified) (1 diff)
- trunk/current/win32/import/dwt/custom/ctabfolder.d (modified) (7 diffs)
- trunk/current/win32/import/dwt/custom/ctabfolderevents.d (added)
- trunk/current/win32/import/dwt/custom/sashform.d (modified) (3 diffs)
- trunk/current/win32/import/dwt/custom/styledtext.d (modified) (5 diffs)
- trunk/current/win32/import/dwt/custom/styledtexthelper.d (modified) (4 diffs)
- trunk/current/win32/import/dwt/custom/tabletree.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/dnd/bytearraytransfer.d (modified) (9 diffs)
- trunk/current/win32/import/dwt/dnd/clipboard-bak.d.old (added)
- trunk/current/win32/import/dwt/dnd/clipboard.d (modified) (28 diffs)
- trunk/current/win32/import/dwt/dnd/dnd.d (modified) (4 diffs)
- trunk/current/win32/import/dwt/dnd/dndevent.d (modified) (1 diff)
- trunk/current/win32/import/dwt/dnd/dndlistener.d (modified) (1 diff)
- trunk/current/win32/import/dwt/dnd/dragsource.d (modified) (24 diffs)
- trunk/current/win32/import/dwt/dnd/dragsourceevent.d (modified) (1 diff)
- trunk/current/win32/import/dwt/dnd/dragsourcelistener.d (modified) (1 diff)
- trunk/current/win32/import/dwt/dnd/droptarget.d (modified) (18 diffs)
- trunk/current/win32/import/dwt/dnd/droptargetevent.d (modified) (1 diff)
- trunk/current/win32/import/dwt/dnd/droptargetlistener.d (modified) (1 diff)
- trunk/current/win32/import/dwt/dnd/filetransfer.d (modified) (9 diffs)
- trunk/current/win32/import/dwt/dnd/nodragundereffect.d (modified) (1 diff)
- trunk/current/win32/import/dwt/dnd/oleenumformatetc.d (modified) (10 diffs)
- trunk/current/win32/import/dwt/dnd/rtftransfer.d (modified) (10 diffs)
- trunk/current/win32/import/dwt/dnd/tabledragundereffect.d (modified) (3 diffs)
- trunk/current/win32/import/dwt/dnd/texttransfer.d (modified) (9 diffs)
- trunk/current/win32/import/dwt/dnd/transfer.d (modified) (5 diffs)
- trunk/current/win32/import/dwt/dnd/transferdata.d (modified) (1 diff)
- trunk/current/win32/import/dwt/dnd/treedragundereffect.d (modified) (4 diffs)
- trunk/current/win32/import/dwt/events/listeners.d (modified) (1 diff)
- trunk/current/win32/import/dwt/events/typedevent.d (modified) (1 diff)
- trunk/current/win32/import/dwt/extra/fileversion.d (modified) (3 diffs)
- trunk/current/win32/import/dwt/extra/make-dwtextra-lib.bat (modified) (1 diff)
- trunk/current/win32/import/dwt/extra/scintilla.d (modified) (4 diffs)
- trunk/current/win32/import/dwt/graphics/color.d (modified) (1 diff)
- trunk/current/win32/import/dwt/graphics/cursor.d (modified) (1 diff)
- trunk/current/win32/import/dwt/graphics/device.d (modified) (1 diff)
- trunk/current/win32/import/dwt/graphics/drawable.d (modified) (1 diff)
- trunk/current/win32/import/dwt/graphics/font.d (modified) (1 diff)
- trunk/current/win32/import/dwt/graphics/fontdata.d (modified) (1 diff)
- trunk/current/win32/import/dwt/graphics/gc.d (modified) (1 diff)
- trunk/current/win32/import/dwt/graphics/gcdata.d (modified) (1 diff)
- trunk/current/win32/import/dwt/graphics/region.d (modified) (1 diff)
- trunk/current/win32/import/dwt/graphics/textlayout.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/internal/bidiutil.d (modified) (1 diff)
- trunk/current/win32/import/dwt/internal/converter.d (modified) (11 diffs)
- trunk/current/win32/import/dwt/internal/image/giffileformat.d (modified) (3 diffs)
- trunk/current/win32/import/dwt/internal/image/jpegfileformat.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/internal/image/lzwcodec.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/internal/image/tifffileformat.d (modified) (1 diff)
- trunk/current/win32/import/dwt/internal/image/winicofileformat.d (modified) (1 diff)
- trunk/current/win32/import/dwt/internal/ole/win32/DOCOBJ.d (modified) (1 diff)
- trunk/current/win32/import/dwt/internal/ole/win32/EXDISP.d (modified) (1 diff)
- trunk/current/win32/import/dwt/internal/ole/win32/MSHTMHST.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/internal/ole/win32/OAIDL.d (modified) (1 diff)
- trunk/current/win32/import/dwt/internal/ole/win32/OBJIDL.d (modified) (3 diffs)
- trunk/current/win32/import/dwt/internal/ole/win32/OLEIDL.d (modified) (1 diff)
- trunk/current/win32/import/dwt/internal/ole/win32/com.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/internal/ole/win32/comapi.d (modified) (1 diff)
- trunk/current/win32/import/dwt/internal/ole/win32/comtypes.d (modified) (4 diffs)
- trunk/current/win32/import/dwt/internal/ole/win32/extras.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/internal/ole/win32/ifs.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/internal/win32/os.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/internal/win32/winapi.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/internal/win32/wintypes.d (modified) (5 diffs)
- trunk/current/win32/import/dwt/ole/win32/ole.d (modified) (1 diff)
- trunk/current/win32/import/dwt/ole/win32/oleautomation.d (modified) (1 diff)
- trunk/current/win32/import/dwt/ole/win32/oleclientsite.d (modified) (9 diffs)
- trunk/current/win32/import/dwt/ole/win32/olecontrolsite.d (modified) (6 diffs)
- trunk/current/win32/import/dwt/ole/win32/oleeventsink.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/ole/win32/oleframe.d (modified) (4 diffs)
- trunk/current/win32/import/dwt/ole/win32/olepropertychangesink.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/ole/win32/variant.d (modified) (3 diffs)
- trunk/current/win32/import/dwt/printing/printdialog.d (modified) (1 diff)
- trunk/current/win32/import/dwt/program/program.d (modified) (1 diff)
- trunk/current/win32/import/dwt/util/javatypes.d (modified) (5 diffs)
- trunk/current/win32/import/dwt/util/resourcemanager.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/util/util.d (modified) (3 diffs)
- trunk/current/win32/import/dwt/widgets/button.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/canvas.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/caret.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/colordialog.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/widgets/combo.d (modified) (6 diffs)
- trunk/current/win32/import/dwt/widgets/composite.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/control.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/coolbar.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/widgets/coolitem.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/decorations.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/directorydialog.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/widgets/display.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/widgets/filedialog.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/widgets/fontdialog.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/widgets/group.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/imagelist.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/widgets/item.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/label.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/link.d (modified) (24 diffs)
- trunk/current/win32/import/dwt/widgets/list.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/widgets/menu.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/menuitem.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/messagebox.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/widgets/monitor.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/progressbar.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/runnablelock.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/sash.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/scale.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/scrollable.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/scrollbar.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/shell.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/widgets/slider.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/synchronizer.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/tabfolder.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/tabitem.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/table.d (modified) (2 diffs)
- trunk/current/win32/import/dwt/widgets/tablecolumn.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/tableitem.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/text-last.d.last (added)
- trunk/current/win32/import/dwt/widgets/text.d (modified) (29 diffs)
- trunk/current/win32/import/dwt/widgets/text3.d3 (added)
- trunk/current/win32/import/dwt/widgets/toolbar.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/toolitem.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/tracker.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/tray.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/trayitem.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/tree.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/treeitem.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/typedlistener.d (modified) (1 diff)
- trunk/current/win32/import/dwt/widgets/widget.d (modified) (1 diff)
- trunk/current/win32/import/make-dwt-lib.bat (modified) (1 diff)
- trunk/current/win32/lib/oleacc_dwt.lib (added)
- trunk/current/win32/packages/dwt/examples/controlexample/run-build.bat (modified) (1 diff)
- trunk/current/win32/packages/dwt/examples/controlexample/run-dmd.bat (modified) (1 diff)
- trunk/current/win32/packages/dwt/examples/dnd (added)
- trunk/current/win32/packages/dwt/examples/dnd/DetermineData.d (added)
- trunk/current/win32/packages/dwt/examples/dnd/SimpleDNDExample.d (added)
- trunk/current/win32/packages/dwt/examples/dnd/clipboard1.d (added)
- trunk/current/win32/packages/dwt/examples/dnd/clipboard2.d (added)
- trunk/current/win32/packages/dwt/examples/dnd/dndMyType.d (added)
- trunk/current/win32/packages/dwt/examples/dnd/dndtree.d (added)
- trunk/current/win32/packages/dwt/examples/dnd/run-build.bat (added)
- trunk/current/win32/packages/dwt/examples/misc/cbannertest.d (added)
- trunk/current/win32/packages/dwt/examples/misc/run-build.bat (modified) (1 diff)
- trunk/current/win32/packages/dwt/examples/ole_com/run-dmd-excel.bat (deleted)
- trunk/current/win32/packages/dwt/examples/ole_com/run-dmd_browser.bat (deleted)
- trunk/current/win32/packages/dwt/examples/ole_com/run-dmd_thinbrowser.bat (deleted)
- trunk/current/win32/packages/dwt/vc/DProject.dsp (deleted)
- trunk/current/win32/packages/dwt/vc/DProject.dsw (deleted)
- trunk/current/win32/packages/dwt/vc/DProject.ncb (deleted)
- trunk/current/win32/packages/dwt/vc/DProject.suo (modified) (previous)
- trunk/current/win32/packages/dwt/vc/DProject.vcproj (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/current/win32/import/.poseidon
r79 r82 6 6 <showemptyfolder>0</showemptyfolder> 7 7 <buildSpec> 8 <buildOption>-gui -clean -full -w -unittest -debug -g -version=OLE_COM </buildOption>8 <buildOption>-gui -clean -full -w -unittest -debug -g -version=OLE_COM -version=DRAG_DROP</buildOption> 9 9 <mainFile>dwt\all.d</mainFile> 10 10 </buildSpec> trunk/current/win32/import/dwt/accessibility/accessible.d
r76 r82 29 29 private import dwt.util.vector; 30 30 private import dwt.util.javatypes; 31 private import dwt.internal.win32.wintypes; 31 32 private import dwt.internal.ole.win32.ifs; 32 33 private import dwt.internal.ole.win32.OAIDL; 34 private import dwt.internal.ole.win32.extras; 33 35 34 36 35 37 class _IAccessibleImpl : IAccessible { 38 39 private import std.c.windows.windows; 40 private import std.c.windows.com; 36 41 37 42 Accessible parent; … … 108 113 109 114 class _IEnumVARIANTImpl : IEnumVARIANT { 115 116 private import std.c.windows.windows; 117 private import std.c.windows.com; 118 110 119 Accessible parent; 111 120 this(Accessible a) { parent = a; } … … 146 155 public class Accessible { 147 156 157 private import std.c.windows.windows; 158 private import std.c.windows.com; 148 159 private import std.thread; 149 160 trunk/current/win32/import/dwt/all.d
r81 r82 83 83 public import dwt.custom.controleditor; 84 84 public import dwt.custom.ctabfolder; 85 public import dwt.custom.ctabfolderevents; 85 86 public import dwt.custom.ctabitem; 86 87 public import dwt.custom.popuplist; trunk/current/win32/import/dwt/browser/browser.d
r76 r82 35 35 private import dwt.util.util; 36 36 private import dwt.util.vector; 37 38 private import dwt.internal.ole.win32.OAIDL; 39 private import dwt.internal.ole.win32.OBJIDL; 40 private import dwt.internal.ole.win32.OLEIDL; 41 private import dwt.internal.ole.win32.DOCOBJ; 42 private import dwt.internal.ole.win32.extras; 43 private import dwt.internal.ole.win32.MSHTMHST; 44 private import dwt.internal.ole.win32.ifs; 45 37 46 38 47 //IID IID_IWebBrowser = { 0x8856F961,0x340A, 0x11D0, [0xA9, 0x6B, cast(ubyte)0x00, cast(ubyte)0xC0, cast(ubyte)0x4F, cast(ubyte)0xD7, cast(ubyte)0x05, cast(ubyte)0xA2]}; trunk/current/win32/import/dwt/browser/website.d
r76 r82 25 25 private import dwt.ole.win32.oleautomation; 26 26 private import dwt.ole.win32.olecontrolsite; 27 private import dwt.internal.ole.win32.OAIDL; 28 private import dwt.internal.ole.win32.OBJIDL; 29 private import dwt.internal.ole.win32.OLEIDL; 30 private import dwt.internal.ole.win32.DOCOBJ; 31 private import dwt.internal.ole.win32.extras; 32 private import dwt.internal.ole.win32.MSHTMHST; 33 private import dwt.internal.ole.win32.ifs; 27 34 private import dwt.widgets.composite; 28 35 private import dwt.widgets.event; 29 36 private import dwt.widgets.menu; 30 37 private import dwt.widgets.shell; 38 private import dwt.ole.win32.variant; 39 40 31 41 32 42 33 43 class _IDocHostUIHandlerImpl : IDocHostUIHandler { 44 45 private import std.c.windows.windows; 46 private import std.c.windows.com; 47 34 48 WebSite parent; 35 49 this(WebSite p) { parent = p; } … … 51 65 HRESULT OnDocWindowActivate( BOOL fActivate ) {return COM.E_NOTIMPL; } 52 66 HRESULT OnFrameWindowActivate( BOOL fActivate ) {return COM.E_NOTIMPL; } 53 HRESULT ResizeBorder( LP CRECT prcBorder, IOleInPlaceUIWindow pUIWindow, BOOL fRameWindow ){return COM.E_NOTIMPL; }67 HRESULT ResizeBorder( LPRECT prcBorder, IOleInPlaceUIWindow pUIWindow, BOOL fRameWindow ){return COM.E_NOTIMPL; } 54 68 HRESULT TranslateAccelerator( LPMSG lpMsg, GUID * pguidCmdGroup, DWORD nCmdID ){ 55 69 return parent.TranslateAccelerator(lpMsg, pguidCmdGroup, nCmdID ); … … 63 77 64 78 class _IDocHostShowUIImpl : IDocHostShowUI { 79 80 private import std.c.windows.windows; 81 private import std.c.windows.com; 82 83 65 84 WebSite parent; 66 85 this(WebSite p) { parent = p; } … … 86 105 87 106 class _IServiceProviderImpl : IServiceProvider { 107 108 private import std.c.windows.windows; 109 private import std.c.windows.com; 110 111 88 112 WebSite parent; 89 113 this(WebSite p) { parent = p; } … … 105 129 106 130 class _IInternetSecurityManagerImpl : IInternetSecurityManager { 131 132 private import std.c.windows.windows; 133 private import std.c.windows.com; 134 135 107 136 WebSite parent; 108 137 this(WebSite p) { parent = p; } … … 136 165 137 166 class WebSite : OleControlSite { 167 168 private import std.c.windows.windows; 169 private import std.c.windows.com; 170 138 171 139 172 _IDocHostUIHandlerImpl iDocHostUIHandler; trunk/current/win32/import/dwt/custom/busyindicator.d
r76 r82 11 11 module dwt.custom.busyindicator; 12 12 13 14 /** 15 * This is absolutely not useful for D. 16 * To show a busy (wait) cursor in D, use an auto class instead, 17 * in the constructor, set the cursor to busy shape 18 * in the destructor of the class, restore the normal cursor automatically. 19 */ 13 20 14 21 private import dwt.dwt; trunk/current/win32/import/dwt/custom/cbanner.d
r81 r82 13 13 /** 14 14 * This class has been updated to Eclispe/SWT 3.10 15 * <Shawn Liu> (2005.12.2 6)15 * <Shawn Liu> (2005.12.27) 16 16 */ 17 17 … … 88 88 static int BEZIER_LEFT = 30; 89 89 static int MIN_LEFT = 10; 90 // static int MIN_RIGHT = 160;91 90 92 91 static int BORDER1 = DWT.COLOR_WIDGET_HIGHLIGHT_SHADOW; … … 187 186 } 188 187 189 /+ the following two removed @since 3.10190 191 public Point computeSize(int wHint, int hHint, boolean changed) {192 checkWidget();193 boolean showCurve = cast(boolean)(left !is null && right !is null);194 int height = hHint;195 int width = wHint;196 197 Point bottomSize = new Point(0, 0);198 if (bottom !is null) {199 Point trim = bottom.computeSize(width, DWT.DEFAULT);200 trim.x = trim.x - width;201 bottomSize = bottom.computeSize(width == DWT.DEFAULT ? DWT.DEFAULT : width - trim.x, DWT.DEFAULT);202 if (height != DWT.DEFAULT) {203 bottomSize.y = Math.min(bottomSize.y, height);204 height -= bottomSize.y + BORDER_TOP + BORDER_STRIPE + BORDER_BOTTOM;205 }206 }207 if (showCurve && height != DWT.DEFAULT ) height -= BORDER_TOP + BORDER_BOTTOM + 2*BORDER_STRIPE;208 Point rightSize = new Point(0, 0);209 if (right !is null) {210 Point trim = right.computeSize(rightWidth, height);211 trim.x = trim.x - rightWidth;212 rightSize = right.computeSize(rightWidth == DWT.DEFAULT ? DWT.DEFAULT : rightWidth - trim.x, rightWidth == DWT.DEFAULT ? DWT.DEFAULT : height);213 if (width != DWT.DEFAULT) {214 rightSize.x = Math.min(rightSize.x, width);215 width -= rightSize.x + curve_width - 2* curve_indent;216 width = Math.max(width, MIN_LEFT);217 }218 }219 Point leftSize = new Point(0, 0);220 if (left !is null) {221 Point trim = left.computeSize(width, DWT.DEFAULT);222 trim.x = trim.x - width;223 leftSize = left.computeSize(width == DWT.DEFAULT ? DWT.DEFAULT : width - trim.x, DWT.DEFAULT);224 }225 int w = 0, h = 0;226 h += bottomSize.y;227 if (bottom !is null && (left !is null || right !is null)) h += BORDER_TOP + BORDER_BOTTOM + BORDER_STRIPE;228 w += leftSize.x + rightSize.x;229 if (showCurve) {230 w += curve_width - 2*curve_indent;231 h += BORDER_TOP + BORDER_BOTTOM + 2*BORDER_STRIPE;232 }233 h += left !is null ? leftSize.y : rightSize.y;234 235 if (wHint != DWT.DEFAULT) w = wHint;236 if (hHint != DWT.DEFAULT) h = hHint;237 238 return new Point(w, h);239 }240 public Rectangle computeTrim (int x, int y, int width, int height) {241 checkWidget ();242 return new Rectangle(x, y, width, height);243 }244 +/245 246 188 /** 247 189 * Returns the Control that appears on the bottom side of the banner. … … 338 280 return simple; 339 281 } 340 341 /+ removed @since 3.1342 public void layout (boolean changed) {343 checkWidget();344 Point size = getSize();345 boolean showCurve = cast(boolean)(left !is null && right !is null);346 int width = size.x;347 int height = size.y;348 349 Point bottomSize = new Point(0, 0);350 if (bottom !is null) {351 Point trim = bottom.computeSize(width, DWT.DEFAULT);352 trim.x = trim.x - width;353 bottomSize = bottom.computeSize(width - trim.x, DWT.DEFAULT);354 bottomSize.y = Math.min(bottomSize.y, height);355 height -= bottomSize.y + BORDER_TOP + BORDER_BOTTOM + BORDER_STRIPE;356 }357 358 if (showCurve) height -= BORDER_TOP + BORDER_BOTTOM + 2*BORDER_STRIPE;359 height = Math.max(0, height);360 Point rightSize = new Point(0,0);361 if (right !is null) {362 Point trim = right.computeSize(rightWidth, height);363 trim.x = trim.x - rightWidth;364 rightSize = right.computeSize(rightWidth == DWT.DEFAULT ? DWT.DEFAULT : rightWidth - trim.x, rightWidth == DWT.DEFAULT ? DWT.DEFAULT : height);365 rightSize.x = Math.min(rightSize.x, width);366 width -= rightSize.x + curve_width - 2*curve_indent;367 width = Math.max(width, MIN_LEFT);368 }369 370 Point leftSize = new Point(0, 0);371 if (left !is null) {372 Point trim = left.computeSize(width, DWT.DEFAULT);373 trim.x = trim.x - width;374 leftSize = left.computeSize(width - trim.x, DWT.DEFAULT);375 }376 377 int x = 0;378 int y = 0;379 int oldStart = curveStart;380 Rectangle leftRect = null;381 Rectangle rightRect = null;382 Rectangle bottomRect = null;383 if (bottom !is null) {384 bottomRect = new Rectangle(x, y+size.y-bottomSize.y, bottomSize.x, bottomSize.y);385 }386 if (showCurve) y += BORDER_TOP + BORDER_STRIPE;387 if(left !is null) {388 leftRect = new Rectangle(x, y, leftSize.x, leftSize.y);389 curveStart = x + leftSize.x - curve_indent;390 x += leftSize.x + curve_width - 2*curve_indent;391 }392 if (right !is null) {393 rightRect = new Rectangle(x, y, rightSize.x, rightSize.y);394 }395 if (curveStart < oldStart) {396 redraw(curveStart - CURVE_TAIL, 0, oldStart + curve_width - curveStart + CURVE_TAIL + 5, size.y, false);397 }398 if (curveStart > oldStart) {399 redraw(oldStart - CURVE_TAIL, 0, curveStart + curve_width - oldStart + CURVE_TAIL + 5, size.y, false);400 }401 curveRect = new Rectangle(curveStart, 0, curve_width, size.y);402 update();403 if (bottomRect !is null) bottom.setBounds(bottomRect);404 if (rightRect !is null) right.setBounds(rightRect);405 if (leftRect !is null) left.setBounds(leftRect);406 }407 +/408 282 409 283 void onDispose() { … … 425 299 if (dragging) { 426 300 Point size = getSize(); 427 // if (!(0 < x && x < size.x)) return;428 // rightWidth = size.x - x - rightDragDisplacement;429 // rightWidth = Math.max(MIN_RIGHT, rightWidth);430 // super.layout();431 301 if (!(0 < x && x < size.x)) return; 432 302 rightWidth = Math.max(0, size.x - x - rightDragDisplacement); … … 458 328 if (bottom !is null && (left !is null || right !is null)) { 459 329 gc.setForeground(border1); 460 // int y = bottom.getBounds().y - BORDER_BOTTOM - BORDER_STRIPE;461 330 int y = bottom.getBounds().y - BORDER_STRIPE - 1; 462 331 gc.drawLine(0, y, size.x, y); … … 469 338 int y = 0; 470 339 line1[index++] = x + 1; 471 line1[index++] = size.y - BORDER_STRIPE; 340 line1[index++] = size.y - BORDER_STRIPE; 472 341 for (int i = 0; i < curve.length/2; i++) { 473 342 line1[index++]=x+curve[2*i]; … … 486 355 index = 0; 487 356 for (int i = 0; i < line1.length/2; i++) { 488 line2[index] = line1[index++] - 1; 489 line2[index] = line1[index++]; 357 line2[index] = line1[index] - 1; 358 index++; 359 line2[index] = line1[index]; 360 index++; 490 361 } 491 362 int[] line3 = new int[line1.length]; 492 363 index = 0; 493 364 for (int i = 0; i < line1.length/2; i++) { 494 line3[index] = line1[index++] + 1; 495 line3[index] = line1[index++]; 365 line3[index] = line1[index] + 1; 366 index++; 367 line3[index] = line1[index]; 368 index++; 496 369 } 497 370 DWTRGB from = border1.getRGB(); … … 525 398 void onResize() { 526 399 updateCurve(getSize().y); 527 // super.layout();528 400 } 529 401 /** trunk/current/win32/import/dwt/custom/clabel.d
r76 r82 582 582 if (getDisplay().getDepth() < 15) { 583 583 // Don't use gradients on low color displays 584 Color[] ColorArr; 585 ColorArr ~= colors; 586 colors = ColorArr; 587 int[] intArr = new int[0]; 588 percents = intArr; 584 Color newColor = colors[--$]; 585 colors = null; 586 colors ~= newColor; 587 percents = null; 589 588 } 590 589 for (int i = 0; i < percents.length; i++) { trunk/current/win32/import/dwt/custom/ctabfolder.d
r76 r82 14 14 private import dwt.dwt; 15 15 16 private import dwt.internal.converter; 17 private import dwt.internal.dwteventlistener; 18 private import dwt.events.typedevent; 19 private import dwt.custom.ctabitem; 20 21 version(OLE_COM){ 16 17 18 version(OLE_COM) 19 { 22 20 private import dwt.accessibility.acc; 23 21 private import dwt.accessibility.accessible; … … 25 23 } 26 24 27 private import dwt.events.listeners; 25 private import dwt.custom.ctabfolderevents; 26 private import dwt.custom.ctabitem; 28 27 private import dwt.events.adapters; 29 28 private import dwt.events.events; 30 29 private import dwt.events.listeners; 31 30 private import dwt.graphics.color; 32 31 private import dwt.graphics.font; … … 38 37 private import dwt.graphics.region; 39 38 private import dwt.graphics.rgb; 40 private import dwt.widgets.composite; 41 private import dwt.widgets.control; 39 private import dwt.internal.converter; 40 private import dwt.util.eventhandler; 41 private import dwt.util.javatypes; 42 private import dwt.util.util; 42 43 private import dwt.widgets.display; 43 44 private import dwt.widgets.event; … … 48 49 private import dwt.widgets.shell; 49 50 private import dwt.widgets.typedlistener; 50 private import dwt.widgets.widget; 51 private import dwt.util.javatypes; 52 private import dwt.util.util; 53 private import dwt.util.eventhandler; 54 55 56 57 //public interface CTabFolderListener : DWTEventListener { 58 // 59 ///** 60 // * Sent when the user clicks on the close button of an item in the CTabFolder. The item being closed is specified 61 // * in the event.item field. Setting the event.doit field to false will stop the CTabItem from closing. 62 // * When the CTabItem is closed, it is disposed. The contents of the CTabItem (see CTabItem#setControl) will be 63 // * made not visible when the CTabItem is closed. 64 // * 65 // * @param event an event indicating the item being closed 66 // */ 67 //public void itemClosed(CTabFolderEvent event); 68 //} 69 70 71 /** 72 * 73 */ 74 public class CTabFolderEvent : TypedEvent { 75 /** 76 * The tab item for the operation. 77 */ 78 public Widget item; 79 80 /** 81 * A flag indicating whether the operation should be allowed. 82 * Setting this field to <code>false</code> will cancel the operation. 83 * Applies to the close and showList events. 84 */ 85 public boolean doit; 86 87 /** 88 * The widget-relative, x coordinate of the chevron button 89 * at the time of the event. Applies to the showList event. 90 * 91 * @since 3.0 92 */ 93 public int x; 94 /** 95 * The widget-relative, y coordinate of the chevron button 96 * at the time of the event. Applies to the showList event. 97 * 98 * @since 3.0 99 */ 100 public int y; 101 /** 102 * The width of the chevron button at the time of the event. 103 * Applies to the showList event. Applies to the showList event. 104 * 105 * @since 3.0 106 */ 107 public int width; 108 /** 109 * The height of the chevron button at the time of the event. 110 * Applies to the showList event. 111 * 112 * @since 3.0 113 */ 114 public int height; 115 116 /** 117 * delegate style event handler wants the following customized data 118 */ 119 Object cData; 120 // Object[] cDatas; 121 122 /** 123 * Constructs a new instance of this class. 124 * 125 * @param w the widget that fired the event 126 */ 127 this(Widget w) { 128 super(w); 129 } 130 131 /** 132 * Returns a string containing a concise, human-readable 133 * description of the receiver. 134 * 135 * @return a string representation of the event 136 */ 137 public char[] toString() { 138 139 char[] string = (super.toString())[0..--$];// remove trailing '}' 140 string = std.string.format(string 141 , " item=" , item ? item.toString() : "null" 142 , " doit=" , doit 143 , " x=" , x 144 , " y=" , y 145 , " width=" , width 146 , " height=" , height 147 , "}"); 148 return string; 149 } 150 151 } 152 153 154 //public class CTabFolderAdapter : CTabFolderListener { 155 // public void itemClosed(CTabFolderEvent event){} 156 //} 157 158 159 /** 160 * Classes which implement this interface provide methods 161 * that deal with the events that are generated by the CTabFolder 162 * control. 163 * <p> 164 * After creating an instance of a class that implements 165 * this interface it can be added to a CTabFolder using the 166 * <code>addCTabFolder2Listener</code> method and removed using 167 * the <code>removeCTabFolder2Listener</code> method. When 168 * events occurs in a CTabFolder the appropriate method 169 * will be invoked. 170 * </p> 171 * 172 * @see CTabFolder2Adapter 173 * @see CTabFolderEvent 174 * 175 * @since 3.0 176 */ 177 public interface CTabFolder2Listener : DWTEventListener { 178 179 /** 180 * Sent when the user clicks on the close button of an item in the CTabFolder. 181 * The item being closed is specified in the event.item field. 182 * Setting the event.doit field to false will stop the CTabItem from closing. 183 * When the CTabItem is closed, it is disposed. The contents of the 184 * CTabItem (see CTabItem.setControl) will be made not visible when 185 * the CTabItem is closed. 186 * 187 * @param event an event indicating the item being closed 188 */ 189 public void close(CTabFolderEvent event); 190 191 /** 192 * Sent when the user clicks on the minimize button of a CTabFolder. 193 * The state of the CTabFolder does not change automatically - it 194 * is up to the application to change the state of the CTabFolder 195 * in response to this event using CTabFolder.setMinimized(true). 196 * 197 * @param event an event containing information about the minimize 198 * 199 * @see CTabFolder#getMinimized() 200 * @see CTabFolder#setMinimized(boolean) 201 * @see CTabFolder#setMinimizeVisible(boolean) 202 */ 203 public void minimize(CTabFolderEvent event); 204 205 /** 206 * Sent when the user clicks on the maximize button of a CTabFolder. 207 * The state of the CTabFolder does not change automatically - it 208 * is up to the application to change the state of the CTabFolder 209 * in response to this event using CTabFolder.setMaximized(true). 210 * 211 * @param event an event containing information about the maximize 212 * 213 * @see CTabFolder#getMaximized() 214 * @see CTabFolder#setMaximized(boolean) 215 * @see CTabFolder#setMaximizeVisible(boolean) 216 */ 217 public void maximize(CTabFolderEvent event); 218 219 /** 220 * Sent when the user clicks on the restore button of a CTabFolder. 221 * This event is sent either to restore the CTabFolder from the 222 * minimized state or from the maximized state. To determine 223 * which restore is requested, use CTabFolder.getMinimized() or 224 * CTabFolder.getMaximized() to determine the current state. 225 * The state of the CTabFolder does not change automatically - it 226 * is up to the application to change the state of the CTabFolder 227 * in response to this event using CTabFolder.setMaximized(false) 228 * or CTabFolder.setMinimized(false). 229 * 230 * @param event an event containing information about the restore 231 * 232 * @see CTabFolder#getMinimized() 233 * @see CTabFolder#getMaximized() 234 * @see CTabFolder#setMinimized(boolean) 235 * @see CTabFolder#setMinimizeVisible(boolean) 236 * @see CTabFolder#setMaximized(boolean) 237 * @see CTabFolder#setMaximizeVisible(boolean) 238 */ 239 public void restore(CTabFolderEvent event); 240 241 /** 242 * Sent when the user clicks on the chevron button of the CTabFolder. 243 * A chevron appears in the CTabFolder when there are more tabs 244 * than can be displayed at the current widget size. To select a 245 * tab that is not currently visible, the user clicks on the 246 * chevron and selects a tab item from a list. By default, the 247 * CTabFolder provides a list
