# HG changeset patch # User Frank Benoit # Date 1201817960 -3600 # Node ID 17f8449522fdbb69f0752bf67c04e28941d48875 # Parent 29cb72deba3de64d150c7679ad0f4085ddb759b9 overloads second walkthrough diff -r 29cb72deba3d -r 17f8449522fd dwt/custom/CBannerLayout.d --- a/dwt/custom/CBannerLayout.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/custom/CBannerLayout.d Thu Jan 31 23:19:20 2008 +0100 @@ -1,4 +1,4 @@ -/******************************************************************************* +/******************************************************************************* * Copyright (c) 2000, 2006 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 @@ -32,7 +32,7 @@ */ class CBannerLayout : Layout { -protected Point computeSize(Composite composite, int wHint, int hHint, bool flushCache) { +protected override Point computeSize(Composite composite, int wHint, int hHint, bool flushCache) { CBanner banner = cast(CBanner)composite; Control left = banner.left; Control right = banner.right; @@ -111,12 +111,12 @@ } return c.getBorderWidth () * 2; } -protected bool flushCache(Control control) { +protected override bool flushCache(Control control) { Object data = control.getLayoutData(); if ( auto ld = cast(CLayoutData)data ) ld.flushCache(); return true; } -protected void layout(Composite composite, bool flushCache) { +protected override void layout(Composite composite, bool flushCache) { CBanner banner = cast(CBanner)composite; Control left = banner.left; Control right = banner.right; diff -r 29cb72deba3d -r 17f8449522fd dwt/custom/CTabFolderLayout.d --- a/dwt/custom/CTabFolderLayout.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/custom/CTabFolderLayout.d Thu Jan 31 23:19:20 2008 +0100 @@ -1,4 +1,4 @@ -/******************************************************************************* +/******************************************************************************* * Copyright (c) 2000, 2005 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 @@ -28,7 +28,7 @@ * @see CTabFolder */ class CTabFolderLayout : Layout { -protected Point computeSize(Composite composite, int wHint, int hHint, bool flushCache) { +protected override Point computeSize(Composite composite, int wHint, int hHint, bool flushCache) { CTabFolder folder = cast(CTabFolder)composite; CTabItem[] items = folder.items; // preferred width of tab area to show all tabs @@ -74,10 +74,10 @@ return new Point (minWidth, minHeight); } -protected bool flushCache(Control control) { +protected override bool flushCache(Control control) { return true; } -protected void layout(Composite composite, bool flushCache) { +protected override void layout(Composite composite, bool flushCache) { CTabFolder folder = cast(CTabFolder)composite; // resize content if (folder.selectedIndex !is -1) { diff -r 29cb72deba3d -r 17f8449522fd dwt/custom/SashFormLayout.d --- a/dwt/custom/SashFormLayout.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/custom/SashFormLayout.d Thu Jan 31 23:19:20 2008 +0100 @@ -1,4 +1,4 @@ -/******************************************************************************* +/******************************************************************************* * Copyright (c) 2000, 2005 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 @@ -29,7 +29,7 @@ * @see SashForm */ class SashFormLayout : Layout { -protected Point computeSize(Composite composite, int wHint, int hHint, bool flushCache) { +protected override Point computeSize(Composite composite, int wHint, int hHint, bool flushCache) { SashForm sashForm = cast(SashForm)composite; Control[] cArray = sashForm.getControls(true); int width = 0; @@ -90,11 +90,11 @@ return new Point(width, height); } -protected bool flushCache(Control control) { +protected override bool flushCache(Control control) { return true; } -protected void layout(Composite composite, bool flushCache) { +protected override void layout(Composite composite, bool flushCache) { SashForm sashForm = cast(SashForm)composite; Rectangle area = sashForm.getClientArea(); if (area.width <= 1 || area.height <= 1) return; diff -r 29cb72deba3d -r 17f8449522fd dwt/custom/ScrolledCompositeLayout.d --- a/dwt/custom/ScrolledCompositeLayout.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/custom/ScrolledCompositeLayout.d Thu Jan 31 23:19:20 2008 +0100 @@ -1,4 +1,4 @@ -/******************************************************************************* +/******************************************************************************* * Copyright (c) 2000, 2006 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 @@ -35,7 +35,7 @@ static final int DEFAULT_WIDTH = 64; static final int DEFAULT_HEIGHT = 64; -protected Point computeSize(Composite composite, int wHint, int hHint, bool flushCache) { +protected override Point computeSize(Composite composite, int wHint, int hHint, bool flushCache) { ScrolledComposite sc = cast(ScrolledComposite)composite; Point size = new Point(DEFAULT_WIDTH, DEFAULT_HEIGHT); if (sc.content !is null) { @@ -51,11 +51,11 @@ return size; } -protected bool flushCache(Control control) { +protected override bool flushCache(Control control) { return true; } -protected void layout(Composite composite, bool flushCache) { +protected override void layout(Composite composite, bool flushCache) { if (inLayout) return; ScrolledComposite sc = cast(ScrolledComposite)composite; if (sc.content is null) return; diff -r 29cb72deba3d -r 17f8449522fd dwt/custom/StackLayout.d --- a/dwt/custom/StackLayout.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/custom/StackLayout.d Thu Jan 31 23:19:20 2008 +0100 @@ -94,7 +94,7 @@ */ public Control topControl; -protected Point computeSize(Composite composite, int wHint, int hHint, bool flushCache) { +protected override Point computeSize(Composite composite, int wHint, int hHint, bool flushCache) { Control children[] = composite.getChildren(); int maxWidth = 0; int maxHeight = 0; @@ -110,11 +110,11 @@ return new Point(width, height); } -protected bool flushCache(Control control) { +protected override bool flushCache(Control control) { return true; } -protected void layout(Composite composite, bool flushCache) { +protected override void layout(Composite composite, bool flushCache) { Control children[] = composite.getChildren(); Rectangle rect = composite.getClientArea(); rect.x += marginWidth; diff -r 29cb72deba3d -r 17f8449522fd dwt/custom/StyleRange.d --- a/dwt/custom/StyleRange.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/custom/StyleRange.d Thu Jan 31 23:19:20 2008 +0100 @@ -155,7 +155,7 @@ * * @return a shallow copy of this StyleRange */ -public Object clone() { +public /+override+/ Object clone() { return new StyleRange( start, length, foreground, background, fontStyle ); } diff -r 29cb72deba3d -r 17f8449522fd dwt/custom/TableEditor.d --- a/dwt/custom/TableEditor.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/custom/TableEditor.d Thu Jan 31 23:19:20 2008 +0100 @@ -114,7 +114,7 @@ // To be consistent with older versions of DWT, grabVertical defaults to true grabVertical = true; } -Rectangle computeBounds () { +override Rectangle computeBounds () { if (item is null || column is -1 || item.isDisposed()) return new Rectangle(0, 0, 0, 0); Rectangle cell = item.getBounds(column); Rectangle rect = item.getImageBounds(column); diff -r 29cb72deba3d -r 17f8449522fd dwt/custom/TableTreeEditor.d --- a/dwt/custom/TableTreeEditor.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/custom/TableTreeEditor.d Thu Jan 31 23:19:20 2008 +0100 @@ -150,7 +150,7 @@ grabVertical = true; } -Rectangle computeBounds () { +override Rectangle computeBounds () { if (item is null || column is -1 || item.isDisposed() || item.tableItem is null) return new Rectangle(0, 0, 0, 0); Rectangle cell = item.getBounds(column); Rectangle area = tableTree.getClientArea(); diff -r 29cb72deba3d -r 17f8449522fd dwt/custom/TreeEditor.d --- a/dwt/custom/TreeEditor.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/custom/TreeEditor.d Thu Jan 31 23:19:20 2008 +0100 @@ -142,7 +142,7 @@ grabVertical = true; } -Rectangle computeBounds () { +override Rectangle computeBounds () { if (item is null || column is -1 || item.isDisposed()) return new Rectangle(0, 0, 0, 0); Rectangle cell = item.getBounds(column); Rectangle rect = item.getImageBounds(column); diff -r 29cb72deba3d -r 17f8449522fd dwt/custom/ViewFormLayout.d --- a/dwt/custom/ViewFormLayout.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/custom/ViewFormLayout.d Thu Jan 31 23:19:20 2008 +0100 @@ -1,4 +1,4 @@ -/******************************************************************************* +/******************************************************************************* * Copyright (c) 2000, 2005 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 @@ -30,7 +30,7 @@ */ class ViewFormLayout : Layout { -protected Point computeSize(Composite composite, int wHint, int hHint, bool flushCache) { +protected override Point computeSize(Composite composite, int wHint, int hHint, bool flushCache) { ViewForm form = cast(ViewForm)composite; Control left = form.topLeft; Control center = form.topCenter; @@ -106,13 +106,13 @@ return c.getBorderWidth () * 2; } -protected bool flushCache(Control control) { +protected override bool flushCache(Control control) { Object data = control.getLayoutData(); if ( auto ld = cast(CLayoutData)data ) ld.flushCache(); return true; } -protected void layout(Composite composite, bool flushCache) { +protected override void layout(Composite composite, bool flushCache) { ViewForm form = cast(ViewForm)composite; Control left = form.topLeft; Control center = form.topCenter; diff -r 29cb72deba3d -r 17f8449522fd dwt/dnd/ByteArrayTransfer.d --- a/dwt/dnd/ByteArrayTransfer.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/dnd/ByteArrayTransfer.d Thu Jan 31 23:19:20 2008 +0100 @@ -154,7 +154,7 @@ * @param transferData an empty TransferData object; this * object will be filled in on return with the platform specific format of the data */ -protected void javaToNative (Object object, TransferData transferData) { +protected override void javaToNative (Object object, TransferData transferData) { transferData.result = 0; if (!checkByteArray(object) || !isSupportedType(transferData)) { DND.error(DND.ERROR_INVALID_DATA); @@ -182,7 +182,7 @@ * @return a java byte[] containing the converted data if the * conversion was successful; otherwise null */ -protected Object nativeToJava(TransferData transferData) { +protected override Object nativeToJava(TransferData transferData) { if ( !isSupportedType(transferData) || transferData.pValue is null) return null; int size = transferData.format * transferData.length / 8; if (size is 0) return null; diff -r 29cb72deba3d -r 17f8449522fd dwt/dnd/DragSource.d --- a/dwt/dnd/DragSource.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/dnd/DragSource.d Thu Jan 31 23:19:20 2008 +0100 @@ -1,4 +1,4 @@ -/******************************************************************************* +/******************************************************************************* * Copyright (c) 2000, 2007 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 @@ -307,7 +307,7 @@ addListener (DND.DragEnd, typedListener); } -protected void checkSubclass () { +protected override void checkSubclass () { char[] name = this.classinfo.name; char[] validName = DragSource.stringof; if ( validName !=/*eq*/ name ) { diff -r 29cb72deba3d -r 17f8449522fd dwt/dnd/DropTarget.d --- a/dwt/dnd/DropTarget.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/dnd/DropTarget.d Thu Jan 31 23:19:20 2008 +0100 @@ -367,7 +367,7 @@ addListener (DND.DropAccept, typedListener); } -protected void checkSubclass () { +protected override void checkSubclass () { char[] name = this.classinfo.name; char[] validName = DropTarget.stringof; if ( validName !=/*eq*/ name ) { diff -r 29cb72deba3d -r 17f8449522fd dwt/dnd/FileTransfer.d --- a/dwt/dnd/FileTransfer.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/dnd/FileTransfer.d Thu Jan 31 23:19:20 2008 +0100 @@ -1,4 +1,4 @@ -/******************************************************************************* +/******************************************************************************* * Copyright (c) 2000, 2005 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 @@ -72,7 +72,7 @@ * @param transferData an empty TransferData object; this * object will be filled in on return with the platform specific format of the data */ -public void javaToNative(Object object, TransferData transferData) { +public override void javaToNative(Object object, TransferData transferData) { transferData.result = 0; if (!checkFile(object) || !isSupportedType(transferData)) { DND.error(DND.ERROR_INVALID_DATA); @@ -123,7 +123,7 @@ * @return a java String[] containing a list of file names if the * conversion was successful; otherwise null */ -public Object nativeToJava(TransferData transferData) { +public override Object nativeToJava(TransferData transferData) { if ( !isSupportedType(transferData) || transferData.pValue is null || transferData.length <= 0 ) return null; char[] temp = transferData.pValue[ 0 .. transferData.length ]; char*[] files; @@ -174,11 +174,11 @@ return new ArrayWrapperString2( fileNames ); } -protected int[] getTypeIds(){ +protected override int[] getTypeIds(){ return [URI_LIST_ID]; } -protected char[][] getTypeNames(){ +protected override char[][] getTypeNames(){ return [URI_LIST]; } @@ -195,7 +195,7 @@ return true; } -protected bool validate(Object object) { +protected override bool validate(Object object) { return checkFile(object); } } diff -r 29cb72deba3d -r 17f8449522fd dwt/dnd/HTMLTransfer.d --- a/dwt/dnd/HTMLTransfer.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/dnd/HTMLTransfer.d Thu Jan 31 23:19:20 2008 +0100 @@ -1,4 +1,4 @@ -/******************************************************************************* +/******************************************************************************* * Copyright (c) 2000, 2005 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 @@ -67,7 +67,7 @@ * @param transferData an empty TransferData object; this * object will be filled in on return with the platform specific format of the data */ -public void javaToNative (Object object, TransferData transferData){ +public override void javaToNative (Object object, TransferData transferData){ transferData.result = 0; if (!checkHTML(object) || !isSupportedType(transferData)) { DND.error(DND.ERROR_INVALID_DATA); @@ -92,7 +92,7 @@ * @return a java String containing HTML text if the * conversion was successful; otherwise null */ -public Object nativeToJava(TransferData transferData){ +public override Object nativeToJava(TransferData transferData){ if ( !isSupportedType(transferData) || transferData.pValue is null ) return null; /* Ensure byteCount is a multiple of 2 bytes */ int size = (transferData.format * transferData.length / 8) / 2 * 2; @@ -100,11 +100,11 @@ char[] chars = transferData.pValue[ 0 .. size ].dup; return new ArrayWrapperString( chars[ 0 .. tango.text.Util.locate( chars, '\0' ) ] ); } -protected int[] getTypeIds() { +protected override int[] getTypeIds() { return [TEXT_HTML_ID, TEXT_HTML2_ID]; } -protected char[][] getTypeNames() { +protected override char[][] getTypeNames() { return [TEXT_HTML, TEXT_HTML2]; } @@ -116,7 +116,7 @@ return true; } -protected bool validate(Object object) { +protected override bool validate(Object object) { return checkHTML(object); } } diff -r 29cb72deba3d -r 17f8449522fd dwt/dnd/RTFTransfer.d --- a/dwt/dnd/RTFTransfer.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/dnd/RTFTransfer.d Thu Jan 31 23:19:20 2008 +0100 @@ -1,4 +1,4 @@ -/******************************************************************************* +/******************************************************************************* * Copyright (c) 2000, 2005 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 @@ -71,7 +71,7 @@ * @param transferData an empty TransferData object; this * object will be filled in on return with the platform specific format of the data */ -public void javaToNative (Object object, TransferData transferData){ +public override void javaToNative (Object object, TransferData transferData){ transferData.result = 0; if (!checkRTF(object) || !isSupportedType(transferData)) { DND.error(DND.ERROR_INVALID_DATA); @@ -97,7 +97,7 @@ * @return a java String containing RTF text if the * conversion was successful; otherwise null */ -public Object nativeToJava(TransferData transferData){ +public override Object nativeToJava(TransferData transferData){ if ( !isSupportedType(transferData) || transferData.pValue is null ) return null; int size = transferData.format * transferData.length / 8; if (size is 0) return null; @@ -106,11 +106,11 @@ return new ArrayWrapperString( chars[ 0 .. tango.text.Util.locate( chars, '\0' ) ] ); } -protected int[] getTypeIds() { +protected override int[] getTypeIds() { return [TEXT_RTF_ID, TEXT_RTF2_ID, APPLICATION_RTF_ID]; } -protected char[][] getTypeNames() { +protected override char[][] getTypeNames() { return [TEXT_RTF, TEXT_RTF2, APPLICATION_RTF]; } @@ -121,7 +121,7 @@ return astr.array.length > 0; } -protected bool validate(Object object) { +protected override bool validate(Object object) { return checkRTF(object); } } diff -r 29cb72deba3d -r 17f8449522fd dwt/dnd/TextTransfer.d --- a/dwt/dnd/TextTransfer.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/dnd/TextTransfer.d Thu Jan 31 23:19:20 2008 +0100 @@ -1,4 +1,4 @@ -/******************************************************************************* +/******************************************************************************* * Copyright (c) 2000, 2006 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 @@ -74,7 +74,7 @@ * * @see Transfer#javaToNative */ -public void javaToNative (Object object, TransferData transferData) { +override public void javaToNative (Object object, TransferData transferData) { transferData.result = 0; if (!checkText(object) || !isSupportedType(transferData)) { DND.error(DND.ERROR_INVALID_DATA); @@ -125,7 +125,7 @@ * * @see Transfer#nativeToJava */ -public Object nativeToJava(TransferData transferData){ +override public Object nativeToJava(TransferData transferData){ if (!isSupportedType(transferData) || transferData.pValue is null) return null; char** list; int count = OS.gdk_text_property_to_utf8_list(transferData.type, transferData.format, transferData.pValue, transferData.length, &list); @@ -135,11 +135,11 @@ return new ArrayWrapperString( utf8 ); } -protected int[] getTypeIds() { +override protected int[] getTypeIds() { return [UTF8_STRING_ID, COMPOUND_TEXT_ID, STRING_ID]; } -protected char[][] getTypeNames() { +override protected char[][] getTypeNames() { return [UTF8_STRING, COMPOUND_TEXT, STRING]; } @@ -150,7 +150,7 @@ return astr.array.length > 0; } -protected bool validate(Object object) { +protected override bool validate(Object object) { return checkText(object); } } diff -r 29cb72deba3d -r 17f8449522fd dwt/internal/image/GIFFileFormat.d --- a/dwt/internal/image/GIFFileFormat.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/internal/image/GIFFileFormat.d Thu Jan 31 23:19:20 2008 +0100 @@ -58,7 +58,7 @@ return new PaletteData(colors); } - bool isFileFormat(LEDataInputStream stream) { + override bool isFileFormat(LEDataInputStream stream) { try { byte[3] signature; stream.read(signature); @@ -73,7 +73,7 @@ * Load the GIF image(s) stored in the input stream. * Return an array of ImageData representing the image(s). */ - ImageData[] loadFromByteStream() { + override ImageData[] loadFromByteStream() { byte[3] signatureBytes; byte[3] versionBytes; byte[7] block; @@ -440,7 +440,7 @@ return new PaletteData(colors); } - void unloadIntoByteStream(ImageLoader loader) { + override void unloadIntoByteStream(ImageLoader loader) { /* Step 1: Acquire GIF parameters. */ ImageData[] data = loader.data; diff -r 29cb72deba3d -r 17f8449522fd dwt/internal/image/JPEGDecoder.d --- a/dwt/internal/image/JPEGDecoder.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/internal/image/JPEGDecoder.d Thu Jan 31 23:19:20 2008 +0100 @@ -408,11 +408,11 @@ saved = new savable_state(); /* Other state at start of MCU */ } - void start_pass (jpeg_decompress_struct cinfo) { + override void start_pass (jpeg_decompress_struct cinfo) { start_pass_huff_decoder(cinfo); } - bool decode_mcu (jpeg_decompress_struct cinfo, short[][] MCU_data) { + override bool decode_mcu (jpeg_decompress_struct cinfo, short[][] MCU_data) { huff_entropy_decoder entropy = this; int blkn; // BITREAD_STATE_VARS; @@ -785,11 +785,11 @@ saved = new savable_state(); /* Other state at start of MCU */ } - void start_pass (jpeg_decompress_struct cinfo) { + override void start_pass (jpeg_decompress_struct cinfo) { start_pass_phuff_decoder(cinfo); } - bool decode_mcu (jpeg_decompress_struct cinfo, short[][] MCU_data) { + override bool decode_mcu (jpeg_decompress_struct cinfo, short[][] MCU_data) { bool is_DC_band = (cinfo.Ss is 0); if (cinfo.Ah is 0) { if (is_DC_band) diff -r 29cb72deba3d -r 17f8449522fd dwt/internal/image/JPEGFileFormat.d --- a/dwt/internal/image/JPEGFileFormat.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/internal/image/JPEGFileFormat.d Thu Jan 31 23:19:20 2008 +0100 @@ -1,4 +1,4 @@ -/******************************************************************************* +/******************************************************************************* * Copyright (c) 2000, 2006 IBM Corporation and others. * All rights reserved. This source file is made available under the terms contained in the README file * accompanying this program. The README file should be located in the about_files directory of the @@ -1369,7 +1369,7 @@ } } } -bool isFileFormat(LEDataInputStream stream) { +override bool isFileFormat(LEDataInputStream stream) { try { JPEGStartOfImage soi = new JPEGStartOfImage(stream); stream.unread(soi.reference); @@ -1390,7 +1390,7 @@ && dataUnit[rIndex + 5] is 0 && dataUnit[rIndex + 6] is 0 && dataUnit[rIndex + 7] is 0; } -ImageData[] loadFromByteStream() { +override ImageData[] loadFromByteStream() { //TEMPORARY CODE //PORTING_FIXME if (/+System.getProperty("dwt.internal.image.JPEGFileFormat_3.2") is null+/ true ) { @@ -1771,7 +1771,7 @@ destIndex += compWidth; } } -void unloadIntoByteStream(ImageLoader loader) { +override void unloadIntoByteStream(ImageLoader loader) { ImageData image = loader.data[0]; if (!(new JPEGStartOfImage()).writeToStream(outputStream)) { DWT.error(DWT.ERROR_IO); diff -r 29cb72deba3d -r 17f8449522fd dwt/internal/image/OS2BMPFileFormat.d --- a/dwt/internal/image/OS2BMPFileFormat.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/internal/image/OS2BMPFileFormat.d Thu Jan 31 23:19:20 2008 +0100 @@ -1,4 +1,4 @@ -/******************************************************************************* +/******************************************************************************* * Copyright (c) 2000, 2005 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 @@ -28,7 +28,7 @@ static final int BMPHeaderFixedSize = 12; int width, height, bitCount; -bool isFileFormat(LEDataInputStream stream) { +override bool isFileFormat(LEDataInputStream stream) { try { byte[] header = new byte[18]; stream.read(header); @@ -72,7 +72,7 @@ DWT.error(DWT.ERROR_INVALID_IMAGE); return header; } -ImageData[] loadFromByteStream() { +override ImageData[] loadFromByteStream() { int[] fileHeader = loadFileHeader(); byte[] infoHeader = new byte[BMPHeaderFixedSize]; try { @@ -209,7 +209,7 @@ * Unload a DeviceIndependentImage using Windows .BMP format into the given * byte stream. */ -void unloadIntoByteStream(ImageLoader loader) { +override void unloadIntoByteStream(ImageLoader loader) { ImageData image = loader.data[0]; byte[] rgbs; int numCols; diff -r 29cb72deba3d -r 17f8449522fd dwt/internal/image/PNGFileFormat.d --- a/dwt/internal/image/PNGFileFormat.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/internal/image/PNGFileFormat.d Thu Jan 31 23:19:20 2008 +0100 @@ -57,7 +57,7 @@ /** * Load the PNG image from the byte stream. */ -ImageData[] loadFromByteStream() { +override ImageData[] loadFromByteStream() { try { readSignature(); PngChunkReader chunkReader = new PngChunkReader(inputStream); @@ -159,11 +159,11 @@ } } } -void unloadIntoByteStream(ImageLoader loader) { +override void unloadIntoByteStream(ImageLoader loader) { PngEncoder encoder = new PngEncoder(loader); encoder.encode(outputStream); } -bool isFileFormat(LEDataInputStream stream) { +override bool isFileFormat(LEDataInputStream stream) { try { byte[] signature = new byte[SIGNATURE_LENGTH]; stream.read(signature); diff -r 29cb72deba3d -r 17f8449522fd dwt/internal/image/PngIdatChunk.d --- a/dwt/internal/image/PngIdatChunk.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/internal/image/PngIdatChunk.d Thu Jan 31 23:19:20 2008 +0100 @@ -1,4 +1,4 @@ -/******************************************************************************* +/******************************************************************************* * Copyright (c) 2000, 2006 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 @@ -40,14 +40,14 @@ super(reference); } -int getChunkType() { +override int getChunkType() { return CHUNK_IDAT; } /** * Answer whether the chunk is a valid IDAT chunk. */ -void validate(PngFileReadState readState, PngIhdrChunk headerChunk) { +override void validate(PngFileReadState readState, PngIhdrChunk headerChunk) { if (!readState.readIHDR || (headerChunk.getMustHavePalette() && !readState.readPLTE) || readState.readIEND) diff -r 29cb72deba3d -r 17f8449522fd dwt/internal/image/PngIendChunk.d --- a/dwt/internal/image/PngIendChunk.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/internal/image/PngIendChunk.d Thu Jan 31 23:19:20 2008 +0100 @@ -30,7 +30,7 @@ super(reference); } -int getChunkType() { +override int getChunkType() { return CHUNK_IEND; } diff -r 29cb72deba3d -r 17f8449522fd dwt/internal/image/PngIhdrChunk.d --- a/dwt/internal/image/PngIhdrChunk.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/internal/image/PngIhdrChunk.d Thu Jan 31 23:19:20 2008 +0100 @@ -1,4 +1,4 @@ -/******************************************************************************* +/******************************************************************************* * Copyright (c) 2000, 2006 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 @@ -82,7 +82,7 @@ interlaceMethod = reference[INTERLACE_METHOD_OFFSET]; } -int getChunkType() { +override int getChunkType() { return CHUNK_IHDR; } @@ -218,7 +218,7 @@ /** * Answer whether the chunk is a valid IHDR chunk. */ -void validate(PngFileReadState readState, PngIhdrChunk headerChunk) { +override void validate(PngFileReadState readState, PngIhdrChunk headerChunk) { // An IHDR chunk is invalid if any other chunk has // been read. if (readState.readIHDR diff -r 29cb72deba3d -r 17f8449522fd dwt/internal/image/PngPlteChunk.d --- a/dwt/internal/image/PngPlteChunk.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/internal/image/PngPlteChunk.d Thu Jan 31 23:19:20 2008 +0100 @@ -1,4 +1,4 @@ -/******************************************************************************* +/******************************************************************************* * Copyright (c) 2000, 2006 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 @@ -39,7 +39,7 @@ paletteSize = length / 3; } -int getChunkType() { +override int getChunkType() { return CHUNK_PLTE; } @@ -87,7 +87,7 @@ /** * Answer whether the chunk is a valid PLTE chunk. */ -void validate(PngFileReadState readState, PngIhdrChunk headerChunk) { +override void validate(PngFileReadState readState, PngIhdrChunk headerChunk) { // A PLTE chunk is invalid if no IHDR has been read or if any PLTE, // IDAT, or IEND chunk has been read. if (!readState.readIHDR diff -r 29cb72deba3d -r 17f8449522fd dwt/internal/image/PngTrnsChunk.d --- a/dwt/internal/image/PngTrnsChunk.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/internal/image/PngTrnsChunk.d Thu Jan 31 23:19:20 2008 +0100 @@ -42,7 +42,7 @@ super(reference); } -int getChunkType() { +override int getChunkType() { return CHUNK_tRNS; } diff -r 29cb72deba3d -r 17f8449522fd dwt/internal/image/TIFFFileFormat.d --- a/dwt/internal/image/TIFFFileFormat.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/internal/image/TIFFFileFormat.d Thu Jan 31 23:19:20 2008 +0100 @@ -1,4 +1,4 @@ -/******************************************************************************* +/******************************************************************************* * Copyright (c) 2000, 2005 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 @@ -27,7 +27,7 @@ */ final class TIFFFileFormat : FileFormat { -bool isFileFormat(LEDataInputStream stream) { +override bool isFileFormat(LEDataInputStream stream) { try { byte[] header = new byte[4]; stream.read(header); @@ -43,7 +43,7 @@ } } -ImageData[] loadFromByteStream() { +override ImageData[] loadFromByteStream() { byte[] header = new byte[8]; bool isLittleEndian; ImageData[] images = new ImageData[0]; @@ -70,7 +70,7 @@ return images; } -void unloadIntoByteStream(ImageLoader loader) { +override void unloadIntoByteStream(ImageLoader loader) { /* We do not currently support writing multi-page tiff, * so we use the first image data in the loader's array. */ ImageData image = loader.data[0]; diff -r 29cb72deba3d -r 17f8449522fd dwt/internal/image/WinBMPFileFormat.d --- a/dwt/internal/image/WinBMPFileFormat.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/internal/image/WinBMPFileFormat.d Thu Jan 31 23:19:20 2008 +0100 @@ -331,7 +331,7 @@ } return 1; } -bool isFileFormat(LEDataInputStream stream) { +override bool isFileFormat(LEDataInputStream stream) { try { byte[] header = new byte[18]; stream.read(header); @@ -393,7 +393,7 @@ DWT.error(DWT.ERROR_INVALID_IMAGE); return header; } -ImageData[] loadFromByteStream() { +override ImageData[] loadFromByteStream() { int[] fileHeader = loadFileHeader(); byte[] infoHeader = new byte[BMPHeaderFixedSize]; try { @@ -598,7 +598,7 @@ * Unload a DeviceIndependentImage using Windows .BMP format into the given * byte stream. */ -void unloadIntoByteStream(ImageLoader loader) { +override void unloadIntoByteStream(ImageLoader loader) { ImageData image = loader.data[0]; byte[] rgbs; int numCols; diff -r 29cb72deba3d -r 17f8449522fd dwt/internal/image/WinICOFileFormat.d --- a/dwt/internal/image/WinICOFileFormat.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/internal/image/WinICOFileFormat.d Thu Jan 31 23:19:20 2008 +0100 @@ -1,4 +1,4 @@ -/******************************************************************************* +/******************************************************************************* * Copyright (c) 2000, 2006 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 @@ -54,7 +54,7 @@ int paletteSize = i.palette.colors !is null ? i.palette.colors.length * 4 : 0; return WinBMPFileFormat.BMPHeaderFixedSize + paletteSize + dataSize; } -bool isFileFormat(LEDataInputStream stream) { +override bool isFileFormat(LEDataInputStream stream) { try { byte[] header = new byte[4]; stream.read(header); @@ -116,7 +116,7 @@ DWT.error(DWT.ERROR_INVALID_IMAGE); return numIcons; } -ImageData[] loadFromByteStream() { +override ImageData[] loadFromByteStream() { int numIcons = loadFileHeader(inputStream); int[][] headers = loadIconHeaders(numIcons); ImageData[] icons = new ImageData[headers.length]; @@ -266,7 +266,7 @@ DWT.error(DWT.ERROR_IO, e); } } -void unloadIntoByteStream(ImageLoader loader) { +override void unloadIntoByteStream(ImageLoader loader) { /* We do not currently support writing multi-image ico, * so we use the first image data in the loader's array. */ ImageData image = loader.data[0]; diff -r 29cb72deba3d -r 17f8449522fd dwt/layout/FillLayout.d --- a/dwt/layout/FillLayout.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/layout/FillLayout.d Thu Jan 31 23:19:20 2008 +0100 @@ -111,7 +111,7 @@ this.type = type; } -protected Point computeSize (Composite composite, int wHint, int hHint, bool flushCache) { +protected override Point computeSize (Composite composite, int wHint, int hHint, bool flushCache) { Control [] children = composite.getChildren (); int count = children.length; int maxWidth = 0, maxHeight = 0; @@ -173,7 +173,7 @@ return size; } -protected bool flushCache (Control control) { +protected override bool flushCache (Control control) { Object data = control.getLayoutData(); if (data !is null) (cast(FillData)data).flushCache(); return true; @@ -186,7 +186,7 @@ return string[ index + 1 .. string.length ]; } -protected void layout (Composite composite, bool flushCache) { +protected override void layout (Composite composite, bool flushCache) { Rectangle rect = composite.getClientArea (); Control [] children = composite.getChildren (); int count = children.length; diff -r 29cb72deba3d -r 17f8449522fd dwt/layout/FormLayout.d --- a/dwt/layout/FormLayout.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/layout/FormLayout.d Thu Jan 31 23:19:20 2008 +0100 @@ -247,14 +247,14 @@ return height.solveY (data.getHeight (control, flushCache)); } -protected Point computeSize (Composite composite, int wHint, int hHint, bool flushCache) { +protected override Point computeSize (Composite composite, int wHint, int hHint, bool flushCache) { Point size = layout (composite, false, 0, 0, wHint, hHint, flushCache); if (wHint !is DWT.DEFAULT) size.x = wHint; if (hHint !is DWT.DEFAULT) size.y = hHint; return size; } -protected bool flushCache (Control control) { +protected override bool flushCache (Control control) { Object data = control.getLayoutData (); if (data !is null) (cast(FormData) data).flushCache (); return true; @@ -287,7 +287,7 @@ return width.solveY (data.getWidth (control, flushCache)); } -protected void layout (Composite composite, bool flushCache) { +protected override void layout (Composite composite, bool flushCache) { Rectangle rect = composite.getClientArea (); int x = rect.x + marginLeft + marginWidth; int y = rect.y + marginTop + marginHeight; diff -r 29cb72deba3d -r 17f8449522fd dwt/layout/GridLayout.d --- a/dwt/layout/GridLayout.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/layout/GridLayout.d Thu Jan 31 23:19:20 2008 +0100 @@ -170,14 +170,14 @@ this.makeColumnsEqualWidth = makeColumnsEqualWidth; } -protected Point computeSize (Composite composite, int wHint, int hHint, bool flushCache_) { +protected override Point computeSize (Composite composite, int wHint, int hHint, bool flushCache_) { Point size = layout (composite, false, 0, 0, wHint, hHint, flushCache_); if (wHint !is DWT.DEFAULT) size.x = wHint; if (hHint !is DWT.DEFAULT) size.y = hHint; return size; } -protected bool flushCache (Control control) { +protected override bool flushCache (Control control) { Object data = control.getLayoutData (); if (data !is null) (cast(GridData) data).flushCache (); return true; @@ -200,7 +200,7 @@ return null; } -protected void layout (Composite composite, bool flushCache_) { +protected override void layout (Composite composite, bool flushCache_) { Rectangle rect = composite.getClientArea (); layout (composite, true, rect.x, rect.y, rect.width, rect.height, flushCache_); } diff -r 29cb72deba3d -r 17f8449522fd dwt/layout/RowLayout.d --- a/dwt/layout/RowLayout.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/layout/RowLayout.d Thu Jan 31 23:19:20 2008 +0100 @@ -194,7 +194,7 @@ this.type = type; } -protected Point computeSize (Composite composite, int wHint, int hHint, bool flushCache_) { +protected override Point computeSize (Composite composite, int wHint, int hHint, bool flushCache_) { Point extent; if (type is DWT.HORIZONTAL) { extent = layoutHorizontal (composite, false, (wHint !is DWT.DEFAULT) && wrap, wHint, flushCache_); @@ -216,7 +216,7 @@ return control.computeSize (wHint, hHint, flushCache_); } -protected bool flushCache (Control control) { +protected override bool flushCache (Control control) { return true; } @@ -227,7 +227,7 @@ return string[ index + 1 .. string.length ]; } -protected void layout (Composite composite, bool flushCache_) { +protected override void layout (Composite composite, bool flushCache_) { Rectangle clientArea = composite.getClientArea (); if (type is DWT.HORIZONTAL) { layoutHorizontal (composite, true, wrap, clientArea.width, flushCache_); diff -r 29cb72deba3d -r 17f8449522fd dwt/printing/PrintDialog.d --- a/dwt/printing/PrintDialog.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/printing/PrintDialog.d Thu Jan 31 23:19:20 2008 +0100 @@ -103,7 +103,7 @@ checkSubclass (); } -protected void checkSubclass() { +protected override void checkSubclass() { } /** diff -r 29cb72deba3d -r 17f8449522fd dwt/printing/Printer.d --- a/dwt/printing/Printer.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/printing/Printer.d Thu Jan 31 23:19:20 2008 +0100 @@ -361,7 +361,7 @@ * This method is called internally by the dispose * mechanism of the Device class. */ -protected void release () { +protected override void release () { super.release(); /* Dispose the default font */ @@ -415,7 +415,7 @@ * This method is called internally by the dispose * mechanism of the Device class. */ -protected void destroy () { +protected override void destroy () { if (printer !is null) OS.g_object_unref (printer); if (settings !is null) OS.g_object_unref (settings); if (pageSetup !is null) OS.g_object_unref (pageSetup); @@ -629,7 +629,7 @@ * mechanism of the Device class. * @param deviceData the device data */ -protected void create(DeviceData deviceData) { +protected override void create(DeviceData deviceData) { this.data = cast(PrinterData)deviceData; if (OS.GTK_VERSION < OS.buildVERSION (2, 10, 0)) DWT.error(DWT.ERROR_NO_HANDLES); printer = gtkPrinterFromPrinterData(); @@ -648,7 +648,7 @@ * * @see #create */ -protected void init() { +protected override void init() { super.init (); settings = OS.gtk_print_settings_new(); pageSetup = OS.gtk_page_setup_new(); diff -r 29cb72deba3d -r 17f8449522fd dwt/widgets/Button.d --- a/dwt/widgets/Button.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/widgets/Button.d Thu Jan 31 23:19:20 2008 +0100 @@ -432,14 +432,14 @@ return false; } -override bool mnemonicHit (char key) { +override bool mnemonicHit (wchar key) { if (labelHandle is null) return false; bool result = super.mnemonicHit (labelHandle, key); if (result) setFocus (); return result; } -override bool mnemonicMatch (char key) { +override bool mnemonicMatch (wchar key) { if (labelHandle is null) return false; return mnemonicMatch (labelHandle, key); } @@ -772,7 +772,6 @@ if (arrowHandle !is null) OS.gtk_widget_show (arrowHandle); } -alias Control.traversalCode traversalCode; override int traversalCode (int key, GdkEventKey* event) { int code = super.traversalCode (key, event); if ((style & DWT.RADIO) !is 0) code |= DWT.TRAVERSE_ARROW_NEXT | DWT.TRAVERSE_ARROW_PREVIOUS; diff -r 29cb72deba3d -r 17f8449522fd dwt/widgets/Canvas.d --- a/dwt/widgets/Canvas.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/widgets/Canvas.d Thu Jan 31 23:19:20 2008 +0100 @@ -102,7 +102,7 @@ * * @since 3.2 */ -public void drawBackground (GC gc, int x, int y, int width, int height) { +override public void drawBackground (GC gc, int x, int y, int width, int height) { checkWidget (); if (gc is null) error (DWT.ERROR_NULL_ARGUMENT); if (gc.isDisposed ()) error (DWT.ERROR_INVALID_ARGUMENT); @@ -281,7 +281,6 @@ if (isFocus) caret.setFocus (); } -alias Composite.setBounds setBounds; override int setBounds (int x, int y, int width, int height, bool move, bool resize) { bool isFocus = caret !is null && caret.isFocusCaret (); if (isFocus) caret.killFocus (); diff -r 29cb72deba3d -r 17f8449522fd dwt/widgets/Caret.d --- a/dwt/widgets/Caret.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/widgets/Caret.d Thu Jan 31 23:19:20 2008 +0100 @@ -12,21 +12,6 @@ *******************************************************************************/ module dwt.widgets.Caret; -/+ -class Caret{ - int blinkRate; - bool blinkCaret(); - int x, y, width, height; - - bool isFocusCaret () ; - void killFocus () ; - void setFocus (); - void release(bool); - bool isDisposed(); - public void setFont (Font font) ; -} -+/ - import dwt.DWT; import dwt.internal.gtk.OS; import dwt.graphics.Image; @@ -99,7 +84,7 @@ return hideCaret (); } -void createWidget (int index) { +override void createWidget (int index) { super.createWidget (index); blinkRate = display.getCaretBlinkTime (); isVisible_ = true; @@ -293,12 +278,12 @@ if (isVisible_) hideCaret (); } -void releaseParent () { +override void releaseParent () { super.releaseParent (); if (this is parent.getCaret ()) parent.setCaret (null); } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); if (display.currentCaret is this) { hideCaret (); diff -r 29cb72deba3d -r 17f8449522fd dwt/widgets/Combo.d --- a/dwt/widgets/Combo.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/widgets/Combo.d Thu Jan 31 23:19:20 2008 +0100 @@ -324,7 +324,7 @@ return style; } -protected void checkSubclass () { +protected override void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } @@ -431,7 +431,7 @@ if (entryHandle !is null) OS.gtk_editable_copy_clipboard (entryHandle); } -void createHandle (int index) { +override void createHandle (int index) { state |= HANDLE | MENU; fixedHandle = cast(GtkWidget*)OS.g_object_new (display.gtk_fixed_get_type (), null); if (fixedHandle is null) error (DWT.ERROR_NO_HANDLES); @@ -601,14 +601,14 @@ return super.focusHandle (); } -bool hasFocus () { +override bool hasFocus () { if (super.hasFocus ()) return true; if (entryHandle !is null && OS.GTK_WIDGET_HAS_FOCUS (entryHandle)) return true; if (listHandle !is null && OS.GTK_WIDGET_HAS_FOCUS (listHandle)) return true; return false; } -void hookEvents () { +override void hookEvents () { super.hookEvents (); if (OS.GTK_VERSION >= OS.buildVERSION(2, 4, 0)) { OS.g_signal_connect_closure (handle, OS.changed.ptr, display.closures [CHANGED], true); @@ -1249,7 +1249,7 @@ return -1; } -GdkDrawable* paintWindow () { +override GdkDrawable* paintWindow () { auto childHandle = entryHandle !is null ? entryHandle : handle; OS.gtk_widget_realize (childHandle); auto window = OS.GTK_WIDGET_WINDOW (childHandle); @@ -1563,7 +1563,7 @@ } } -int setBounds (int x, int y, int width, int height, bool move, bool resize) { +override int setBounds (int x, int y, int width, int height, bool move, bool resize) { int newHeight = resize ? getTextHeight () : height; return super.setBounds (x, y, width, newHeight, move, resize); } @@ -1602,8 +1602,7 @@ } } -alias Composite.setForegroundColor setForegroundColor; -void setForegroundColor (GdkColor* color) { +override void setForegroundColor (GdkColor* color) { super.setForegroundColor (color); if (OS.GTK_VERSION >= OS.buildVERSION (2, 4, 0)) { if (entryHandle !is null) setForegroundColor (entryHandle, color); @@ -1731,7 +1730,7 @@ } } -void setOrientation() { +override void setOrientation() { super.setOrientation(); if ((style & DWT.RIGHT_TO_LEFT) !is 0) { if (listHandle !is null) OS.gtk_widget_set_direction (listHandle, OS.GTK_TEXT_DIR_RTL); @@ -1890,7 +1889,7 @@ if (entryHandle !is null) OS.gtk_entry_set_max_length (entryHandle, limit); } -void setToolTipText (Shell shell, char[] newString) { +override void setToolTipText (Shell shell, char[] newString) { if (entryHandle !is null) shell.setToolTipText (entryHandle, newString); if (buttonHandle !is null) shell.setToolTipText (buttonHandle, newString); } diff -r 29cb72deba3d -r 17f8449522fd dwt/widgets/Composite.d --- a/dwt/widgets/Composite.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/widgets/Composite.d Thu Jan 31 23:19:20 2008 +0100 @@ -441,7 +441,6 @@ } } -alias Scrollable.fixStyle fixStyle; override void fixStyle () { super.fixStyle (); if (scrolledHandle is null) fixStyle (handle); @@ -500,7 +499,6 @@ return super.focusHandle (); } -alias Scrollable.forceFocus forceFocus; override bool forceFocus (GtkWidget* focusHandle) { if (socketHandle !is null) OS.GTK_WIDGET_SET_FLAGS (focusHandle, OS.GTK_CAN_FOCUS); bool result = super.forceFocus (focusHandle); @@ -1004,7 +1002,6 @@ } } -alias Scrollable.moveAbove moveAbove; void moveAbove (GtkWidget* child, GtkWidget* sibling) { if (child is sibling) return; auto parentHandle = parentingHandle (); @@ -1180,7 +1177,6 @@ } } -alias Scrollable.setBounds setBounds; override int setBounds (int x, int y, int width, int height, bool move, bool resize) { int result = super.setBounds (x, y, width, height, move, resize); if ((result & RESIZED) !is 0 && layout_ !is null) { @@ -1349,7 +1345,7 @@ return super.translateTraversal (keyEvent); } -void updateBackgroundMode () { +override void updateBackgroundMode () { super.updateBackgroundMode (); Control [] children = _getChildren (); for (int i = 0; i < children.length; i++) { @@ -1357,7 +1353,7 @@ } } -void updateLayout (bool all) { +override void updateLayout (bool all) { Composite parent = findDeferredControl (); if (parent !is null) { parent.state |= LAYOUT_CHILD; diff -r 29cb72deba3d -r 17f8449522fd dwt/widgets/Control.d --- a/dwt/widgets/Control.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/widgets/Control.d Thu Jan 31 23:19:20 2008 +0100 @@ -2889,11 +2889,11 @@ return parent.menuShell (); } -bool mnemonicHit (char key) { +bool mnemonicHit (wchar key) { return false; } -bool mnemonicMatch (char key) { +bool mnemonicMatch (wchar key) { return false; } diff -r 29cb72deba3d -r 17f8449522fd dwt/widgets/CoolBar.d --- a/dwt/widgets/CoolBar.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/widgets/CoolBar.d Thu Jan 31 23:19:20 2008 +0100 @@ -142,7 +142,7 @@ if (this.cursor !is null) return; super.setCursor (cursor); } -protected void checkSubclass () { +protected override void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } @@ -779,7 +779,7 @@ void onResize () { layoutItems (); } -void removeControl (Control control) { +override void removeControl (Control control) { super.removeControl (control); CoolItem [] items = getItems (); for (int i=0; i= OS.buildVERSION (2, 4, 0)) { fixedHandle = cast(GtkWidget*)OS.g_object_new (display.gtk_fixed_get_type (), null); @@ -230,7 +230,7 @@ layoutItems (index, true); } -void createWidget (int index) { +override void createWidget (int index) { super.createWidget (index); items = new ExpandItem [4]; } @@ -259,11 +259,10 @@ layoutItems (index, true); } -GtkWidget* eventHandle () { +override GtkWidget* eventHandle () { return OS.GTK_VERSION >= OS.buildVERSION (2, 4, 0) ? fixedHandle : handle; } -alias Composite.forceFocus forceFocus; override bool forceFocus (GtkWidget* focusHandle) { if (OS.GTK_VERSION >= OS.buildVERSION (2, 4, 0)) { if (lastFocus !is null && lastFocus.setFocus ()) return true; @@ -275,7 +274,7 @@ return super.forceFocus (focusHandle); } -bool hasFocus () { +override bool hasFocus () { if (OS.GTK_VERSION >= OS.buildVERSION (2, 4, 0)) { for (int i=0; i= OS.buildVERSION (2, 4, 0) ? fixedHandle : handle; } -void releaseChildren (bool destroy) { +override void releaseChildren (bool destroy) { for (int i = 0; i < itemCount; i++) { ExpandItem item = items [i]; if (item !is null && !item.isDisposed ()) { @@ -596,7 +595,7 @@ eventTable.unhook (DWT.Collapse, listener); } -int setBounds (int x, int y, int width, int height, bool move, bool resize) { +override int setBounds (int x, int y, int width, int height, bool move, bool resize) { int result = super.setBounds (x, y, width, height, move, resize); if (OS.GTK_VERSION < OS.buildVERSION (2, 4, 0)) { if (resize) { @@ -616,7 +615,7 @@ return result; } -void setFontDescription (PangoFontDescription* font) { +override void setFontDescription (PangoFontDescription* font) { super.setFontDescription (font); if (OS.GTK_VERSION >= OS.buildVERSION (2, 4, 0)) { for (int i = 0; i < itemCount; i++) { @@ -626,7 +625,7 @@ } } -void setForegroundColor (GdkColor* color) { +override void setForegroundColor (GdkColor* color) { super.setForegroundColor (color); if (OS.GTK_VERSION >= OS.buildVERSION (2, 4, 0)) { for (int i = 0; i < itemCount; i++) { @@ -711,7 +710,7 @@ layoutItems (index + 1, true); } -void updateScrollBarValue (ScrollBar bar) { +override void updateScrollBarValue (ScrollBar bar) { yCurrentScroll = bar.getSelection(); layoutItems (0, false); } diff -r 29cb72deba3d -r 17f8449522fd dwt/widgets/ExpandItem.d --- a/dwt/widgets/ExpandItem.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/widgets/ExpandItem.d Thu Jan 31 23:19:20 2008 +0100 @@ -134,11 +134,11 @@ createWidget (index); } -protected void checkSubclass () { +protected override void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } -void createHandle (int index) { +override void createHandle (int index) { if (OS.GTK_VERSION >= OS.buildVERSION (2, 4, 0)) { state |= HANDLE; handle = OS.gtk_expander_new (null); @@ -159,13 +159,13 @@ } } -void createWidget (int index) { +override void createWidget (int index) { super.createWidget (index); showWidget (index); parent.createItem (this, style, index); } -void deregister() { +override void deregister() { super.deregister(); if (OS.GTK_VERSION >= OS.buildVERSION (2, 4, 0)) { display.removeWidget (clientHandle); @@ -175,7 +175,7 @@ } } -void destroyWidget () { +override void destroyWidget () { parent.destroyItem (this); super.destroyWidget (); } @@ -368,7 +368,7 @@ return OS.GTK_WIDGET_HAS_FOCUS (handle); } -void hookEvents () { +override void hookEvents () { super.hookEvents (); if (OS.GTK_VERSION >= OS.buildVERSION (2, 4, 0)) { OS.g_signal_connect_closure (handle, OS.activate.ptr, display.closures [ACTIVATE], false); @@ -390,7 +390,7 @@ } } -void register () { +override void register () { super.register (); if (OS.GTK_VERSION >= OS.buildVERSION (2, 4, 0)) { display.addWidget (clientHandle, this); @@ -400,13 +400,13 @@ } } -void releaseHandle () { +override void releaseHandle () { super.releaseHandle (); clientHandle = boxHandle = labelHandle = imageHandle = null; parent = null; } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); if (imageList !is null) imageList.dispose (); if (OS.GTK_VERSION >= OS.buildVERSION (2, 4, 0)) { @@ -614,7 +614,6 @@ } } -alias Item.windowProc windowProc; override int /*long*/ windowProc (GtkWidget* handle, int /*long*/ user_data) { switch (cast(int)/*64*/user_data) { case ACTIVATE_INVERSE: { diff -r 29cb72deba3d -r 17f8449522fd dwt/widgets/Group.d --- a/dwt/widgets/Group.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/widgets/Group.d Thu Jan 31 23:19:20 2008 +0100 @@ -102,11 +102,11 @@ return style & ~(DWT.H_SCROLL | DWT.V_SCROLL); } -protected void checkSubclass () { +protected override void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } -GtkWidget* clientHandle () { +override GtkWidget* clientHandle () { return clientHandle_; } @@ -128,7 +128,7 @@ return new Rectangle (x, y, width, height); } -void createHandle(int index) { +override void createHandle(int index) { state |= HANDLE | THEME_BACKGROUND; fixedHandle = cast(GtkWidget*)OS.g_object_new (display.gtk_fixed_get_type (), null); if (fixedHandle is null) error (DWT.ERROR_NO_HANDLES); @@ -157,21 +157,21 @@ } } -void deregister () { +override void deregister () { super.deregister (); display.removeWidget (clientHandle_); display.removeWidget (labelHandle); } -void enableWidget (bool enabled) { +override void enableWidget (bool enabled) { OS.gtk_widget_set_sensitive (labelHandle, enabled); } -GtkWidget* eventHandle () { +override GtkWidget* eventHandle () { return fixedHandle; } -char[] getNameText () { +override char[] getNameText () { return getText (); } @@ -199,16 +199,14 @@ } } -alias Composite.mnemonicHit mnemonicHit; -override bool mnemonicHit (char key) { +override bool mnemonicHit (wchar key) { if (labelHandle is null) return false; bool result = super.mnemonicHit (labelHandle, key); if (result) setFocus (); return result; } -alias Composite.mnemonicMatch mnemonicMatch; -override bool mnemonicMatch (char key) { +override bool mnemonicMatch (wchar key) { if (labelHandle is null) return false; return mnemonicMatch (labelHandle, key); } @@ -234,7 +232,6 @@ text = null; } -alias Composite.setBackgroundColor setBackgroundColor; override void setBackgroundColor (GdkColor* color) { super.setBackgroundColor (color); setBackgroundColor(fixedHandle, color); @@ -245,7 +242,6 @@ OS.gtk_widget_modify_font (labelHandle, font); } -alias Composite.setForegroundColor setForegroundColor; override void setForegroundColor (GdkColor* color) { super.setForegroundColor (color); setForegroundColor (labelHandle, color); @@ -297,7 +293,7 @@ } } -void showWidget () { +override void showWidget () { super.showWidget (); if (clientHandle_ !is null) OS.gtk_widget_show (clientHandle_); if (labelHandle !is null) OS.gtk_widget_show (labelHandle); diff -r 29cb72deba3d -r 17f8449522fd dwt/widgets/Item.d --- a/dwt/widgets/Item.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/widgets/Item.d Thu Jan 31 23:19:20 2008 +0100 @@ -99,7 +99,7 @@ this (parent, style); } -protected void checkSubclass () { +protected override void checkSubclass () { /* Do Nothing - Subclassing is allowed */ } @@ -119,7 +119,7 @@ return image; } -char[] getNameText () { +override char[] getNameText () { return getText (); } @@ -139,7 +139,7 @@ return text; } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); text = null; image = null; diff -r 29cb72deba3d -r 17f8449522fd dwt/widgets/Label.d --- a/dwt/widgets/Label.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/widgets/Label.d Thu Jan 31 23:19:20 2008 +0100 @@ -109,7 +109,7 @@ return checkBits (style, DWT.LEFT, DWT.CENTER, DWT.RIGHT, 0, 0, 0); } -void addRelation (Control control) { +override void addRelation (Control control) { if (!control.isDescribedByLabel ()) return; if (labelHandle is null) return; auto accessible = OS.gtk_widget_get_accessible (labelHandle); @@ -182,7 +182,7 @@ return size; } -void createHandle (int index) { +override void createHandle (int index) { state |= HANDLE | THEME_BACKGROUND; fixedHandle = cast(GtkWidget*)OS.g_object_new (display.gtk_fixed_get_type (), null); if (fixedHandle is null) error (DWT.ERROR_NO_HANDLES); @@ -235,19 +235,19 @@ } } -void createWidget (int index) { +override void createWidget (int index) { super.createWidget (index); text = ""; } -void deregister () { +override void deregister () { super.deregister (); if (frameHandle !is null) display.removeWidget (frameHandle); if (labelHandle !is null) display.removeWidget (labelHandle); if (imageHandle !is null) display.removeWidget (imageHandle); } -GtkWidget* eventHandle () { +override GtkWidget* eventHandle () { return fixedHandle; } @@ -298,7 +298,7 @@ return image; } -char[] getNameText () { +override char[] getNameText () { return getText (); } @@ -320,18 +320,18 @@ return text; } -void hookEvents () { +override void hookEvents () { super.hookEvents(); if (labelHandle !is null) { OS.g_signal_connect_closure_by_id (labelHandle, display.signalIds [MNEMONIC_ACTIVATE], 0, display.closures [MNEMONIC_ACTIVATE], false); } } -bool isDescribedByLabel () { +override bool isDescribedByLabel () { return false; } -override bool mnemonicHit (char key) { +override bool mnemonicHit (wchar key) { if (labelHandle is null) return false; bool result = super.mnemonicHit (labelHandle, key); if (result) { @@ -353,8 +353,7 @@ return result; } -alias Control.mnemonicMatch mnemonicMatch; -override bool mnemonicMatch (char key) { +override bool mnemonicMatch (wchar key) { if (labelHandle is null) return false; return mnemonicMatch (labelHandle, key); } @@ -379,7 +378,7 @@ text = null; } -void resizeHandle (int width, int height) { +override void resizeHandle (int width, int height) { OS.gtk_widget_set_size_request (fixedHandle, width, height); OS.gtk_widget_set_size_request (frameHandle !is null ? frameHandle : handle, width, height); } @@ -424,7 +423,6 @@ } } -alias Control.setBackgroundColor setBackgroundColor; override void setBackgroundColor (GdkColor* color) { super.setBackgroundColor (color); setBackgroundColor(fixedHandle, color); @@ -432,8 +430,7 @@ if (imageHandle !is null) setBackgroundColor(imageHandle, color); } -alias Control.setBounds setBounds; -int setBounds (int x, int y, int width, int height, bool move, bool resize) { +override int setBounds (int x, int y, int width, int height, bool move, bool resize) { /* * Bug in GTK. For some reason, when the label is * wrappable and its container is resized, it does not @@ -486,7 +483,6 @@ if (imageHandle !is null) OS.gtk_widget_modify_font (imageHandle, font); } -alias Control.setForegroundColor setForegroundColor; override void setForegroundColor (GdkColor* color) { super.setForegroundColor (color); setForegroundColor (fixedHandle, color); @@ -494,7 +490,7 @@ if (imageHandle !is null) setForegroundColor (imageHandle, color); } -void setOrientation () { +override void setOrientation () { super.setOrientation (); if ((style & DWT.RIGHT_TO_LEFT) !is 0) { if (labelHandle !is null) OS.gtk_widget_set_direction (labelHandle, OS.GTK_TEXT_DIR_RTL); @@ -580,7 +576,7 @@ OS.gtk_widget_show (labelHandle); } -void showWidget () { +override void showWidget () { super.showWidget (); if (frameHandle !is null) OS.gtk_widget_show (frameHandle); if (labelHandle !is null) OS.gtk_widget_show (labelHandle); diff -r 29cb72deba3d -r 17f8449522fd dwt/widgets/Link.d --- a/dwt/widgets/Link.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/widgets/Link.d Thu Jan 31 23:19:20 2008 +0100 @@ -179,7 +179,7 @@ return new Point (width, height); } -void createHandle(int index) { +override void createHandle(int index) { state |= HANDLE | THEME_BACKGROUND; handle = cast(GtkWidget*)OS.g_object_new (display.gtk_fixed_get_type (), null); if (handle is null) DWT.error (DWT.ERROR_NO_HANDLES); @@ -195,14 +195,14 @@ focusIndex = -1; } -void createWidget (int index) { +override void createWidget (int index) { super.createWidget (index); layout.setFont (getFont ()); text = ""; initAccessible (); } -void enableWidget (bool enabled) { +override void enableWidget (bool enabled) { super.enableWidget (enabled); if (isDisposed ()) return; TextStyle linkStyle = new TextStyle (null, enabled ? linkColor : disabledColor, null); @@ -214,8 +214,7 @@ redraw (); } -alias Control.fixStyle fixStyle; -void fixStyle () { +override void fixStyle () { fixStyle (handle); } @@ -267,7 +266,7 @@ }); } -char[] getNameText () { +override char[] getNameText () { return getText (); } @@ -485,7 +484,7 @@ return result; } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); if (layout !is null) layout.dispose (); layout = null; @@ -672,7 +671,7 @@ return mnemonic; } -int setBounds(int x, int y, int width, int height, bool move, bool resize) { +override int setBounds(int x, int y, int width, int height, bool move, bool resize) { int result = super.setBounds (x, y, width,height, move, resize); if ((result & RESIZED) !is 0) { layout.setWidth (width > 0 ? width : -1); @@ -681,7 +680,7 @@ return result; } -void setFontDescription (PangoFontDescription* font) { +override void setFontDescription (PangoFontDescription* font) { super.setFontDescription (font); layout.setFont (Font.gtk_new (display, font)); } @@ -735,7 +734,7 @@ redraw (); } -void showWidget () { +override void showWidget () { super.showWidget (); fixStyle (handle); } diff -r 29cb72deba3d -r 17f8449522fd dwt/widgets/List.d --- a/dwt/widgets/List.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/widgets/List.d Thu Jan 31 23:19:20 2008 +0100 @@ -194,7 +194,7 @@ return checkBits (style, DWT.SINGLE, DWT.MULTI, 0, 0, 0, 0); } -void createHandle (int index) { +override void createHandle (int index) { state |= HANDLE; fixedHandle = cast(GtkWidget*)OS.g_object_new (display.gtk_fixed_get_type (), null); if (fixedHandle is null) error (DWT.ERROR_NO_HANDLES); @@ -374,7 +374,6 @@ OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, null, null, udCHANGED); } -alias Scrollable.dragDetect dragDetect; override bool dragDetect (int x, int y, bool filter, bool* consume) { bool selected = false; if (filter) { @@ -394,11 +393,11 @@ return dragDetect; } -GdkDrawable* eventWindow () { +override GdkDrawable* eventWindow () { return paintWindow (); } -GdkColor* getBackgroundColor () { +override GdkColor* getBackgroundColor () { return getBaseColor (); } @@ -812,7 +811,7 @@ postEvent (DWT.DefaultSelection); } -void hookEvents () { +override void hookEvents () { super.hookEvents(); auto selection = OS.gtk_tree_view_get_selection(cast(GtkTreeView*)handle); OS.g_signal_connect_closure (selection, OS.changed.ptr, display.closures [CHANGED], false); @@ -895,17 +894,17 @@ return answer; } -GdkDrawable* paintWindow () { +override GdkDrawable* paintWindow () { OS.gtk_widget_realize (handle); return OS.gtk_tree_view_get_bin_window (cast(GtkTreeView*)handle); } -void register () { +override void register () { super.register (); display.addWidget (cast(GtkWidget*)OS.gtk_tree_view_get_selection (cast(GtkTreeView*)handle), this); } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); if (modelHandle !is null) OS.g_object_unref (modelHandle); modelHandle = null; @@ -1242,12 +1241,11 @@ OS.gtk_tree_path_free (path); } -void setBackgroundColor (GdkColor* color) { +override void setBackgroundColor (GdkColor* color) { super.setBackgroundColor (color); OS.gtk_widget_modify_base (handle, 0, color); } -alias Scrollable.setBounds setBounds; override int setBounds (int x, int y, int width, int height, bool move, bool resize) { int result = super.setBounds (x, y, width, height, move, resize); /* diff -r 29cb72deba3d -r 17f8449522fd dwt/widgets/Menu.d --- a/dwt/widgets/Menu.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/widgets/Menu.d Thu Jan 31 23:19:20 2008 +0100 @@ -267,7 +267,7 @@ addListener (DWT.Help, typedListener); } -void createHandle (int index) { +override void createHandle (int index) { state |= HANDLE; if ((style & DWT.BAR) !is 0) { handle = OS.gtk_menu_bar_new (); @@ -311,7 +311,7 @@ OS.gtk_menu_item_set_submenu (cast(GtkMenuItem*)imItem, imSubmenu); } -void createWidget (int index) { +override void createWidget (int index) { checkOrientation (parent); super.createWidget (index); parent.addMenu (this); @@ -468,7 +468,7 @@ return items; } -char[] getNameText () { +override char[] getNameText () { char[] result = ""; MenuItem [] items = getItems (); int length_ = items.length; @@ -618,7 +618,7 @@ return 0; } -void hookEvents () { +override void hookEvents () { super.hookEvents (); OS.g_signal_connect_closure_by_id (handle, display.signalIds [SHOW], 0, display.closures [SHOW], false); OS.g_signal_connect_closure_by_id (handle, display.signalIds [HIDE], 0, display.closures [HIDE], false); @@ -724,7 +724,7 @@ if (push_in !is null) *push_in = 1; } -void releaseChildren (bool destroy) { +override void releaseChildren (bool destroy) { MenuItem [] items = getItems (); for (int i=0; i= OS.buildVERSION (2, 6, 0)) { OS.g_signal_connect_closure (handle, OS.change_value.ptr, display.closures [CHANGE_VALUE], false); @@ -451,18 +451,18 @@ return getVisible () && getParent ().isVisible (); } -void register () { +override void register () { super.register (); if (adjustmentHandle !is null) display.addWidget (cast(GtkWidget*)adjustmentHandle, this); } -void releaseParent () { +override void releaseParent () { super.releaseParent (); if (parent.horizontalBar is this) parent.horizontalBar = null; if (parent.verticalBar is this) parent.verticalBar = null; } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); parent = null; } diff -r 29cb72deba3d -r 17f8449522fd dwt/widgets/Scrollable.d --- a/dwt/widgets/Scrollable.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/widgets/Scrollable.d Thu Jan 31 23:19:20 2008 +0100 @@ -313,16 +313,16 @@ super.redrawWidget (x, y, width, height, redrawAll, all, trim); if ((OS.GTK_WIDGET_FLAGS (handle) & OS.GTK_REALIZED) is 0) return; if (!trim) return; - auto topHandle = topHandle (), paintHandle = paintHandle (); - if (topHandle is paintHandle) return; - auto window = OS.GTK_WIDGET_WINDOW (topHandle); + auto topHandle_ = topHandle (), paintHandle_ = paintHandle (); + if (topHandle_ is paintHandle_) return; + auto window = OS.GTK_WIDGET_WINDOW (topHandle_); GdkRectangle* rect = new GdkRectangle (); if (redrawAll) { - rect.width = OS.GTK_WIDGET_WIDTH (topHandle); - rect.height = OS.GTK_WIDGET_HEIGHT (topHandle); + rect.width = OS.GTK_WIDGET_WIDTH (topHandle_); + rect.height = OS.GTK_WIDGET_HEIGHT (topHandle_); } else { int destX, destY; - OS.gtk_widget_translate_coordinates (cast(GtkWidget*)paintHandle, topHandle, x, y, &destX, &destY); + OS.gtk_widget_translate_coordinates (cast(GtkWidget*)paintHandle_, topHandle_, x, y, &destX, &destY); rect.x = destX; rect.y = destY; rect.width = width; diff -r 29cb72deba3d -r 17f8449522fd dwt/widgets/Shell.d --- a/dwt/widgets/Shell.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/widgets/Shell.d Thu Jan 31 23:19:20 2008 +0100 @@ -601,7 +601,6 @@ return trim; } -alias Decorations.createHandle createHandle; override void createHandle (int index) { state |= HANDLE | CANVAS; if (shellHandle is null) { @@ -803,7 +802,6 @@ } } -alias Decorations.fixStyle fixStyle; override void fixStyle (GtkWidget* handle) { } @@ -1209,8 +1207,7 @@ } } -alias Decorations.setBounds setBounds; -int setBounds (int x, int y, int width, int height, bool move, bool resize) { +override int setBounds (int x, int y, int width, int height, bool move, bool resize) { /* * Bug in GTK. When either of the location or size of * a shell is changed while the shell is maximized, the @@ -1254,7 +1251,7 @@ return result; } -void gtk_setCursor (GdkCursor* cursor) { +override void gtk_setCursor (GdkCursor* cursor) { if (enableWindow !is null) { OS.gdk_window_set_cursor (cast(GdkDrawable*)enableWindow, cursor); if (!OS.GDK_WINDOWING_X11 ()) { @@ -1344,7 +1341,7 @@ checkWidget(); } -void setInitialBounds () { +override void setInitialBounds () { if ((state & FOREIGN_HANDLE) !is 0) return; dwt.widgets.Monitor.Monitor monitor = getMonitor (); Rectangle rect = monitor.getClientArea (); @@ -1482,7 +1479,7 @@ /* * Shells are never labelled by other widgets, so no initialization is needed. */ -void setRelations() { +override void setRelations() { } public override void setText (char[] string) { @@ -1583,8 +1580,7 @@ } } -alias Decorations.setZOrder setZOrder; -void setZOrder (Control sibling, bool above, bool fixRelations) { +override void setZOrder (Control sibling, bool above, bool fixRelations) { /* * Bug in GTK+. Changing the toplevel window Z-order causes * X to send a resize event. Before the shell is mapped, these @@ -1638,7 +1634,7 @@ return 0; } -bool traverseEscape () { +override bool traverseEscape () { if (parent is null) return false; if (!isVisible () || !isEnabled ()) return false; close (); diff -r 29cb72deba3d -r 17f8449522fd dwt/widgets/Slider.d --- a/dwt/widgets/Slider.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/widgets/Slider.d Thu Jan 31 23:19:20 2008 +0100 @@ -464,7 +464,7 @@ OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, null, null, udVALUE_CHANGED); } -void setOrientation () { +override void setOrientation () { super.setOrientation (); if ((style & DWT.RIGHT_TO_LEFT) !is 0) { if ((style & DWT.HORIZONTAL) !is 0) { diff -r 29cb72deba3d -r 17f8449522fd dwt/widgets/Spinner.d --- a/dwt/widgets/Spinner.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/widgets/Spinner.d Thu Jan 31 23:19:20 2008 +0100 @@ -195,7 +195,7 @@ return style & ~(DWT.H_SCROLL | DWT.V_SCROLL); } -protected void checkSubclass () { +protected override void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } @@ -318,11 +318,11 @@ if (imContext !is null) display.removeWidget (cast(GtkWidget*)imContext); } -GdkDrawable* eventWindow () { +override GdkDrawable* eventWindow () { return paintWindow (); } -GtkWidget* enterExitHandle () { +override GtkWidget* enterExitHandle () { return fixedHandle; } @@ -359,7 +359,7 @@ gdkEventKey = null; } -GdkColor* getBackgroundColor () { +override GdkColor* getBackgroundColor () { return getBaseColor (); } @@ -372,7 +372,7 @@ return 0; } -GdkColor* getForegroundColor () { +override GdkColor* getForegroundColor () { return getTextColor (); } @@ -669,7 +669,7 @@ return OS.GTK_ENTRY_IM_CONTEXT (cast(GtkEntry*)handle); } -GdkDrawable* paintWindow () { +override GdkDrawable* paintWindow () { auto window = super.paintWindow (); auto children = OS.gdk_window_get_children (window); if (children !is null) window = cast(GdkDrawable*)OS.g_list_data (children); @@ -694,13 +694,13 @@ OS.gtk_editable_paste_clipboard (cast(GtkEditable*)handle); } -void register () { +override void register () { super.register (); auto imContext = imContext (); if (imContext !is null) display.addWidget (cast(GtkWidget*)imContext, this); } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); fixIM (); } @@ -778,7 +778,7 @@ eventTable.unhook (DWT.Verify, listener); } -void setBackgroundColor (GdkColor* color) { +override void setBackgroundColor (GdkColor* color) { super.setBackgroundColor (color); OS.gtk_widget_modify_base (handle, 0, color); } @@ -790,7 +790,7 @@ if (cursor is null) OS.gdk_cursor_destroy (defaultCursor); } -void setFontDescription (PangoFontDescription* font) { +override void setFontDescription (PangoFontDescription* font) { super.setFontDescription (font); } @@ -1003,7 +1003,7 @@ OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, null, null, udVALUE_CHANGED); } -bool translateTraversal (GdkEventKey* keyEvent) { +override bool translateTraversal (GdkEventKey* keyEvent) { int key = keyEvent.keyval; switch (key) { case OS.GDK_KP_Enter: diff -r 29cb72deba3d -r 17f8449522fd dwt/widgets/TabFolder.d --- a/dwt/widgets/TabFolder.d Thu Jan 31 20:26:30 2008 +0100 +++ b/dwt/widgets/TabFolder.d Thu Jan 31 23:19:20 2008 +0100 @@ -109,11 +109,11 @@ return style & ~(DWT.H_SCROLL | DWT.V_SCROLL); } -protected void checkSubclass () { +protected override void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } -GtkStyle* childStyle () { +override GtkStyle* childStyle () { auto rcStyle = OS.gtk_widget_get_modifier_style (handle); if ((OS.gtk_rc_style_get_color_flags (rcStyle, 0) & OS.GTK_RC_BG) !is 0) return null; OS.gtk_widget_realize (handle); @@ -152,7 +152,7 @@ addListener(DWT.DefaultSelection,typedListener); } -GtkWidget* clientHandle () { +override GtkWidget* clientHandle () { int index = OS.gtk_notebook_get_current_page (handle); if (index !is -1 && items [index] !is null) { return items [index].pageHandle; @@ -193,7 +193,7 @@ return new Rectangle (x, y, width, height); } -void createHandle (int index) { +override void createHandle (int index) { state |= HANDLE; fixedHandle = cast(GtkWidget*)OS.g_object_new (display.gtk_fixed_get_type (), null); if (fixedHandle is null) error (DWT.ERROR_NO_HANDLES); @@ -208,7 +208,7 @@ } } -void createWidget (int index) { +override void createWidget (int index) { super.createWidget(index); items = new TabItem [4]; } @@ -296,7 +296,7 @@ } } -GtkWidget* eventHandle () { +override GtkWidget* eventHandle () { return fixedHandle; } @@ -432,7 +432,7 @@ return 0; } -void hookEvents () { +override void hookEvents () { super.hookEvents (); OS.g_signal_connect_closure (handle, OS.switch_page.ptr, display.closures [SWITCH_PAGE], false); } @@ -467,7 +467,7 @@ return -1; } -Point minimumSize (int wHint, int hHint, bool flushCache) { +override Point minimumSize (int wHint, int hHint, bool flushCache) { Control [] children = _getChildren (); int width = 0, height = 0; for (int i=0; i