Mercurial > projects > dwt2
comparison org.eclipse.jface/src/org/eclipse/jface/action/ICoolBarManager.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) 2003, 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 module org.eclipse.jface.action.ICoolBarManager; | |
14 | |
15 import org.eclipse.jface.action.IContributionManager; | |
16 import org.eclipse.jface.action.IToolBarManager; | |
17 import org.eclipse.jface.action.IMenuManager; | |
18 | |
19 import org.eclipse.swt.widgets.CoolBar; | |
20 | |
21 import java.lang.all; | |
22 import java.util.Set; | |
23 | |
24 /** | |
25 * The <code>ICoolBarManager</code> interface provides protocol for managing | |
26 * contributions to a cool bar. A cool bar manager delegates responsibility for | |
27 * creating child controls to its contribution items by calling | |
28 * {@link IContributionItem#fill(CoolBar, int)}. | |
29 * <p> | |
30 * This interface is internal to the framework; it should not be implemented | |
31 * outside the framework. This package provides a concrete cool bar manager | |
32 * implementation, {@link CoolBarManager}, which | |
33 * clients may instantiate or subclass. | |
34 * </p> | |
35 * | |
36 * @see ToolBarContributionItem | |
37 * @since 3.0 | |
38 */ | |
39 public interface ICoolBarManager : IContributionManager { | |
40 | |
41 /** | |
42 * Property name of a cool item's size (value <code>"size"</code>). | |
43 * <p> | |
44 * The cool bar manager uses this property to tell its cool items to update | |
45 * their size. | |
46 * </p> | |
47 * | |
48 * @see IContributionItem#update(String) @issue consider declaring this | |
49 * constant elsewhere | |
50 */ | |
51 public static const String SIZE = "size"; //$NON-NLS-1$ | |
52 | |
53 /** | |
54 * A convenience method to add a tool bar as a contribution item to this | |
55 * cool bar manager. Equivalent to <code>add(new ToolBarContributionManager(toolBarManager))</code>. | |
56 * | |
57 * @param toolBarManager | |
58 * the tool bar manager to be added | |
59 * @see ToolBarContributionItem | |
60 */ | |
61 public void add(IToolBarManager toolBarManager); | |
62 | |
63 /** | |
64 * Returns the context menu manager used by this cool bar manager. This | |
65 * context menu manager is used by the cool bar manager except for cool | |
66 * items that provide their own. | |
67 * | |
68 * @return the context menu manager, or <code>null</code> if none | |
69 * @see #setContextMenuManager | |
70 */ | |
71 public IMenuManager getContextMenuManager(); | |
72 | |
73 /** | |
74 * Returns whether the layout of the underlying cool bar widget is locked. | |
75 * | |
76 * @return <code>true</code> if cool bar layout is locked, <code>false</code> | |
77 * otherwise | |
78 */ | |
79 public bool getLockLayout(); | |
80 | |
81 /** | |
82 * Returns the style of the underlying cool bar widget. | |
83 * | |
84 * @return the style of the cool bar | |
85 */ | |
86 public int getStyle(); | |
87 | |
88 /** | |
89 * Sets the context menu of this cool bar manager to the given menu | |
90 * manager. | |
91 * | |
92 * @param menuManager | |
93 * the context menu manager, or <code>null</code> if none | |
94 * @see #getContextMenuManager | |
95 */ | |
96 public void setContextMenuManager(IMenuManager menuManager); | |
97 | |
98 /** | |
99 * Locks or unlocks the layout of the underlying cool bar widget. Once the | |
100 * cool bar is locked, cool items cannot be repositioned by the user. | |
101 * <p> | |
102 * Note that items can be added or removed programmatically even while the | |
103 * cool bar is locked. | |
104 * </p> | |
105 * | |
106 * @param value | |
107 * <code>true</code> to lock the cool bar, <code>false</code> | |
108 * to unlock | |
109 */ | |
110 public void setLockLayout(bool value); | |
111 | |
112 } |