Mercurial > projects > dwt-addons
diff dwtx/jface/internal/provisional/action/CoolBarManager2.d @ 35:ef4534de0cf9
remaining files
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 05 Apr 2008 04:49:22 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwtx/jface/internal/provisional/action/CoolBarManager2.d Sat Apr 05 04:49:22 2008 +0200 @@ -0,0 +1,110 @@ +/******************************************************************************* + * Copyright (c) 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 dwtx.jface.internal.provisional.action.CoolBarManager2; + +import dwtx.jface.action.IContributionItem; +import dwtx.jface.internal.provisional.action.ICoolBarManager2; + +import dwt.widgets.Composite; +import dwt.widgets.Control; +import dwt.widgets.CoolBar; +import dwtx.jface.action.CoolBarManager; + +import dwt.dwthelper.utils; + +/** + * Extends <code>CoolBarManager</code> to implement <code>ICoolBarManager2</code> + * + * <p> + * <strong>EXPERIMENTAL</strong>. This class or interface has been added as + * part of a work in progress. There is a guarantee neither that this API will + * work nor that it will remain the same. Please do not use this API without + * consulting with the Platform/UI team. + * </p> + * + * @since 3.2 +*/ +public class CoolBarManager2 : CoolBarManager, ICoolBarManager2 { + + // delegate to super + public override void refresh(){ + super.refresh(); + } + public override void dispose(){ + super.dispose(); + } + public override void setItems(IContributionItem[] newItems){ + super.setItems(newItems); + } + public override void resetItemOrder(){ + super.resetItemOrder(); + } + + /** + * Creates a new cool bar manager with the default style. Equivalent to + * <code>CoolBarManager(DWT.NONE)</code>. + */ + public this() { + super(); + } + + /** + * Creates a cool bar manager for an existing cool bar control. This + * manager becomes responsible for the control, and will dispose of it when + * the manager is disposed. + * + * @param coolBar + * the cool bar control + */ + public this(CoolBar coolBar) { + super(coolBar); + } + + /** + * Creates a cool bar manager with the given DWT style. Calling <code>createControl</code> + * will create the cool bar control. + * + * @param style + * the cool bar item style; see + * {@link dwt.widgets.CoolBar CoolBar}for for valid + * style bits + */ + public this(int style) { + super(style); + } + + /** + * Creates and returns this manager's cool bar control. Does not create a + * new control if one already exists. + * + * @param parent + * the parent control + * @return the cool bar control + * @since 3.2 + */ + public Control createControl2(Composite parent) { + return createControl(parent); + } + + /** + * Returns the control for this manager. + * + * @return the control, or <code>null</code> if none + * @since 3.2 + */ + public Control getControl2() { + return getControl(); + } + +}