Mercurial > projects > dwt2
diff org.eclipse.jface/src/org/eclipse/jface/internal/provisional/action/IToolBarContributionItem.d @ 12:bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 14 Mar 2009 18:23:29 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.eclipse.jface/src/org/eclipse/jface/internal/provisional/action/IToolBarContributionItem.d Sat Mar 14 18:23:29 2009 +0100 @@ -0,0 +1,129 @@ +/******************************************************************************* + * 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 org.eclipse.jface.internal.provisional.action.IToolBarContributionItem; + +import org.eclipse.jface.action.IContributionItem; +import org.eclipse.jface.action.IContributionManager; +import org.eclipse.jface.action.IToolBarManager; + +import java.lang.all; +import java.util.Set; + +/** + * The intention of this interface is to provide in interface for + * ToolBarContributionItem so that the implementation can be replaced. + * + * <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 interface IToolBarContributionItem : IContributionItem { + + /** + * Returns the current height of the corresponding cool item. + * + * @return the current height + */ + public int getCurrentHeight(); + + /** + * Returns the current width of the corresponding cool item. + * + * @return the current size + */ + public int getCurrentWidth(); + + /** + * Returns the minimum number of tool items to show in the cool item. + * + * @return the minimum number of tool items to show, or <code>SHOW_ALL_ITEMS</code> + * if a value was not set + * @see #setMinimumItemsToShow(int) + */ + public int getMinimumItemsToShow(); + + /** + * Returns whether chevron support is enabled. + * + * @return <code>true</code> if chevron support is enabled, <code>false</code> + * otherwise + */ + public bool getUseChevron(); + + /** + * Sets the current height of the cool item. Update(SIZE) should be called + * to adjust the widget. + * + * @param currentHeight + * the current height to set + */ + public void setCurrentHeight(int currentHeight); + + /** + * Sets the current width of the cool item. Update(SIZE) should be called + * to adjust the widget. + * + * @param currentWidth + * the current width to set + */ + public void setCurrentWidth(int currentWidth); + + /** + * Sets the minimum number of tool items to show in the cool item. If this + * number is less than the total tool items, a chevron will appear and the + * hidden tool items appear in a drop down menu. By default, all the tool + * items are shown in the cool item. + * + * @param minimumItemsToShow + * the minimum number of tool items to show. + * @see #getMinimumItemsToShow() + * @see #setUseChevron(bool) + */ + public void setMinimumItemsToShow(int minimumItemsToShow); + + /** + * Enables or disables chevron support for the cool item. By default, + * chevron support is enabled. + * + * @param value + * <code>true</code> to enable chevron support, <code>false</code> + * otherwise. + */ + public void setUseChevron(bool value); + + /** + * Returns the internal tool bar manager of the contribution item. + * + * @return the tool bar manager, or <code>null</code> if one is not + * defined. + * @see IToolBarManager + */ + public IToolBarManager getToolBarManager(); + + /** + * Returns the parent contribution manager, or <code>null</code> if this + * contribution item is not currently added to a contribution manager. + * + * @return the parent contribution manager, or <code>null</code> + * + * TODO may not need this, getToolBarManager may be enough. + */ + public IContributionManager getParent(); + +}