comparison 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
comparison
equal deleted inserted replaced
11:43904fec5dca 12:bc29606a740c
1 /*******************************************************************************
2 * Copyright (c) 2006 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * IBM Corporation - initial API and implementation
10 * Port to the D programming language:
11 * Frank Benoit <benoit@tionex.de>
12 ******************************************************************************/
13
14 module org.eclipse.jface.internal.provisional.action.IToolBarContributionItem;
15
16 import org.eclipse.jface.action.IContributionItem;
17 import org.eclipse.jface.action.IContributionManager;
18 import org.eclipse.jface.action.IToolBarManager;
19
20 import java.lang.all;
21 import java.util.Set;
22
23 /**
24 * The intention of this interface is to provide in interface for
25 * ToolBarContributionItem so that the implementation can be replaced.
26 *
27 * <p>
28 * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
29 * part of a work in progress. There is a guarantee neither that this API will
30 * work nor that it will remain the same. Please do not use this API without
31 * consulting with the Platform/UI team.
32 * </p>
33 *
34 * @since 3.2
35 */
36 public interface IToolBarContributionItem : IContributionItem {
37
38 /**
39 * Returns the current height of the corresponding cool item.
40 *
41 * @return the current height
42 */
43 public int getCurrentHeight();
44
45 /**
46 * Returns the current width of the corresponding cool item.
47 *
48 * @return the current size
49 */
50 public int getCurrentWidth();
51
52 /**
53 * Returns the minimum number of tool items to show in the cool item.
54 *
55 * @return the minimum number of tool items to show, or <code>SHOW_ALL_ITEMS</code>
56 * if a value was not set
57 * @see #setMinimumItemsToShow(int)
58 */
59 public int getMinimumItemsToShow();
60
61 /**
62 * Returns whether chevron support is enabled.
63 *
64 * @return <code>true</code> if chevron support is enabled, <code>false</code>
65 * otherwise
66 */
67 public bool getUseChevron();
68
69 /**
70 * Sets the current height of the cool item. Update(SIZE) should be called
71 * to adjust the widget.
72 *
73 * @param currentHeight
74 * the current height to set
75 */
76 public void setCurrentHeight(int currentHeight);
77
78 /**
79 * Sets the current width of the cool item. Update(SIZE) should be called
80 * to adjust the widget.
81 *
82 * @param currentWidth
83 * the current width to set
84 */
85 public void setCurrentWidth(int currentWidth);
86
87 /**
88 * Sets the minimum number of tool items to show in the cool item. If this
89 * number is less than the total tool items, a chevron will appear and the
90 * hidden tool items appear in a drop down menu. By default, all the tool
91 * items are shown in the cool item.
92 *
93 * @param minimumItemsToShow
94 * the minimum number of tool items to show.
95 * @see #getMinimumItemsToShow()
96 * @see #setUseChevron(bool)
97 */
98 public void setMinimumItemsToShow(int minimumItemsToShow);
99
100 /**
101 * Enables or disables chevron support for the cool item. By default,
102 * chevron support is enabled.
103 *
104 * @param value
105 * <code>true</code> to enable chevron support, <code>false</code>
106 * otherwise.
107 */
108 public void setUseChevron(bool value);
109
110 /**
111 * Returns the internal tool bar manager of the contribution item.
112 *
113 * @return the tool bar manager, or <code>null</code> if one is not
114 * defined.
115 * @see IToolBarManager
116 */
117 public IToolBarManager getToolBarManager();
118
119 /**
120 * Returns the parent contribution manager, or <code>null</code> if this
121 * contribution item is not currently added to a contribution manager.
122 *
123 * @return the parent contribution manager, or <code>null</code>
124 *
125 * TODO may not need this, getToolBarManager may be enough.
126 */
127 public IContributionManager getParent();
128
129 }