25
|
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 dwtx.jface.internal.provisional.action.IToolBarContributionItem;
|
|
15
|
|
16 import dwtx.jface.action.IContributionItem;
|
|
17 import dwtx.jface.action.IContributionManager;
|
|
18 import dwtx.jface.action.IToolBarManager;
|
|
19
|
|
20 import dwt.dwthelper.utils;
|
|
21
|
|
22 /**
|
|
23 * The intention of this interface is to provide in interface for
|
|
24 * ToolBarContributionItem so that the implementation can be replaced.
|
|
25 *
|
|
26 * <p>
|
|
27 * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
|
|
28 * part of a work in progress. There is a guarantee neither that this API will
|
|
29 * work nor that it will remain the same. Please do not use this API without
|
|
30 * consulting with the Platform/UI team.
|
|
31 * </p>
|
|
32 *
|
|
33 * @since 3.2
|
|
34 */
|
|
35 public interface IToolBarContributionItem : IContributionItem {
|
|
36
|
|
37 /**
|
|
38 * Returns the current height of the corresponding cool item.
|
|
39 *
|
|
40 * @return the current height
|
|
41 */
|
|
42 public int getCurrentHeight();
|
|
43
|
|
44 /**
|
|
45 * Returns the current width of the corresponding cool item.
|
|
46 *
|
|
47 * @return the current size
|
|
48 */
|
|
49 public int getCurrentWidth();
|
|
50
|
|
51 /**
|
|
52 * Returns the minimum number of tool items to show in the cool item.
|
|
53 *
|
|
54 * @return the minimum number of tool items to show, or <code>SHOW_ALL_ITEMS</code>
|
|
55 * if a value was not set
|
|
56 * @see #setMinimumItemsToShow(int)
|
|
57 */
|
|
58 public int getMinimumItemsToShow();
|
|
59
|
|
60 /**
|
|
61 * Returns whether chevron support is enabled.
|
|
62 *
|
|
63 * @return <code>true</code> if chevron support is enabled, <code>false</code>
|
|
64 * otherwise
|
|
65 */
|
|
66 public bool getUseChevron();
|
|
67
|
|
68 /**
|
|
69 * Sets the current height of the cool item. Update(SIZE) should be called
|
|
70 * to adjust the widget.
|
|
71 *
|
|
72 * @param currentHeight
|
|
73 * the current height to set
|
|
74 */
|
|
75 public void setCurrentHeight(int currentHeight);
|
|
76
|
|
77 /**
|
|
78 * Sets the current width of the cool item. Update(SIZE) should be called
|
|
79 * to adjust the widget.
|
|
80 *
|
|
81 * @param currentWidth
|
|
82 * the current width to set
|
|
83 */
|
|
84 public void setCurrentWidth(int currentWidth);
|
|
85
|
|
86 /**
|
|
87 * Sets the minimum number of tool items to show in the cool item. If this
|
|
88 * number is less than the total tool items, a chevron will appear and the
|
|
89 * hidden tool items appear in a drop down menu. By default, all the tool
|
|
90 * items are shown in the cool item.
|
|
91 *
|
|
92 * @param minimumItemsToShow
|
|
93 * the minimum number of tool items to show.
|
|
94 * @see #getMinimumItemsToShow()
|
|
95 * @see #setUseChevron(bool)
|
|
96 */
|
|
97 public void setMinimumItemsToShow(int minimumItemsToShow);
|
|
98
|
|
99 /**
|
|
100 * Enables or disables chevron support for the cool item. By default,
|
|
101 * chevron support is enabled.
|
|
102 *
|
|
103 * @param value
|
|
104 * <code>true</code> to enable chevron support, <code>false</code>
|
|
105 * otherwise.
|
|
106 */
|
|
107 public void setUseChevron(bool value);
|
|
108
|
|
109 /**
|
|
110 * Returns the internal tool bar manager of the contribution item.
|
|
111 *
|
|
112 * @return the tool bar manager, or <code>null</code> if one is not
|
|
113 * defined.
|
|
114 * @see IToolBarManager
|
|
115 */
|
|
116 public IToolBarManager getToolBarManager();
|
|
117
|
|
118 /**
|
|
119 * Returns the parent contribution manager, or <code>null</code> if this
|
|
120 * contribution item is not currently added to a contribution manager.
|
|
121 *
|
|
122 * @return the parent contribution manager, or <code>null</code>
|
|
123 *
|
|
124 * TODO may not need this, getToolBarManager may be enough.
|
|
125 */
|
|
126 public IContributionManager getParent();
|
|
127
|
|
128 }
|