comparison 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
comparison
equal deleted inserted replaced
34:b3c8e32d406f 35:ef4534de0cf9
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.CoolBarManager2;
15
16 import dwtx.jface.action.IContributionItem;
17 import dwtx.jface.internal.provisional.action.ICoolBarManager2;
18
19 import dwt.widgets.Composite;
20 import dwt.widgets.Control;
21 import dwt.widgets.CoolBar;
22 import dwtx.jface.action.CoolBarManager;
23
24 import dwt.dwthelper.utils;
25
26 /**
27 * Extends <code>CoolBarManager</code> to implement <code>ICoolBarManager2</code>
28 *
29 * <p>
30 * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
31 * part of a work in progress. There is a guarantee neither that this API will
32 * work nor that it will remain the same. Please do not use this API without
33 * consulting with the Platform/UI team.
34 * </p>
35 *
36 * @since 3.2
37 */
38 public class CoolBarManager2 : CoolBarManager, ICoolBarManager2 {
39
40 // delegate to super
41 public override void refresh(){
42 super.refresh();
43 }
44 public override void dispose(){
45 super.dispose();
46 }
47 public override void setItems(IContributionItem[] newItems){
48 super.setItems(newItems);
49 }
50 public override void resetItemOrder(){
51 super.resetItemOrder();
52 }
53
54 /**
55 * Creates a new cool bar manager with the default style. Equivalent to
56 * <code>CoolBarManager(DWT.NONE)</code>.
57 */
58 public this() {
59 super();
60 }
61
62 /**
63 * Creates a cool bar manager for an existing cool bar control. This
64 * manager becomes responsible for the control, and will dispose of it when
65 * the manager is disposed.
66 *
67 * @param coolBar
68 * the cool bar control
69 */
70 public this(CoolBar coolBar) {
71 super(coolBar);
72 }
73
74 /**
75 * Creates a cool bar manager with the given DWT style. Calling <code>createControl</code>
76 * will create the cool bar control.
77 *
78 * @param style
79 * the cool bar item style; see
80 * {@link dwt.widgets.CoolBar CoolBar}for for valid
81 * style bits
82 */
83 public this(int style) {
84 super(style);
85 }
86
87 /**
88 * Creates and returns this manager's cool bar control. Does not create a
89 * new control if one already exists.
90 *
91 * @param parent
92 * the parent control
93 * @return the cool bar control
94 * @since 3.2
95 */
96 public Control createControl2(Composite parent) {
97 return createControl(parent);
98 }
99
100 /**
101 * Returns the control for this manager.
102 *
103 * @return the control, or <code>null</code> if none
104 * @since 3.2
105 */
106 public Control getControl2() {
107 return getControl();
108 }
109
110 }