Mercurial > projects > dwt-win
diff dwt/custom/CTabFolderEvent.d @ 155:a5afe31f5cdd
Added custom controls
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 14 Feb 2008 19:18:37 +0100 |
parents | |
children | ab60f3309436 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/custom/CTabFolderEvent.d Thu Feb 14 19:18:37 2008 +0100 @@ -0,0 +1,95 @@ +/******************************************************************************* + * 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 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + * Port to the D programming language: + * Frank Benoit <benoit@tionex.de> + *******************************************************************************/ +module dwt.custom.CTabFolderEvent; + + + +import dwt.events.TypedEvent; +import dwt.widgets.Widget; + +import tango.util.Convert; + +/** + * + */ +public class CTabFolderEvent : TypedEvent { + /** + * The tab item for the operation. + */ + public Widget item; + + /** + * A flag indicating whether the operation should be allowed. + * Setting this field to <code>false</code> will cancel the operation. + * Applies to the close and showList events. + */ + public bool doit; + + /** + * The widget-relative, x coordinate of the chevron button + * at the time of the event. Applies to the showList event. + * + * @since 3.0 + */ + public int x; + /** + * The widget-relative, y coordinate of the chevron button + * at the time of the event. Applies to the showList event. + * + * @since 3.0 + */ + public int y; + /** + * The width of the chevron button at the time of the event. + * Applies to the showList event. + * + * @since 3.0 + */ + public int width; + /** + * The height of the chevron button at the time of the event. + * Applies to the showList event. + * + * @since 3.0 + */ + public int height; + + static final long serialVersionUID = 3760566386225066807L; + +/** + * Constructs a new instance of this class. + * + * @param w the widget that fired the event + */ +this(Widget w) { + super(w); +} + +/** + * Returns a string containing a concise, human-readable + * description of the receiver. + * + * @return a string representation of the event + */ +public override char[] toString() { + char[] string = super.toString (); + return string[0.. $ - 1] // remove trailing '}' + ~ " item=" ~ to!(char[])(item) + ~ " doit=" ~ to!(char[])(doit) + ~ " x=" ~ to!(char[])(x) + ~ " y=" ~ to!(char[])(y) + ~ " width=" ~ to!(char[])(width) + ~ " height=" ~ to!(char[])(height) + ~ "}"; +} +}