comparison dwtx/jface/text/IWidgetTokenKeeper.d @ 129:eb30df5ca28b

Added JFace Text sources
author Frank Benoit <benoit@tionex.de>
date Sat, 23 Aug 2008 19:10:48 +0200
parents
children c4fb132a086c
comparison
equal deleted inserted replaced
128:8df1d4193877 129:eb30df5ca28b
1 /*******************************************************************************
2 * Copyright (c) 2000, 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.text.IWidgetTokenKeeper;
15
16 import dwt.dwthelper.utils;
17
18 /**
19 * A widget token keeper may require a widget token from an
20 * {@link dwtx.jface.text.IWidgetTokenOwner} and release the token to the
21 * owner after usage. A widget token owner may request the token from the token
22 * keeper. The keeper may deny the return of the token.
23 * <p>
24 * The widget token owner and keeper interplay is used by a text viewer in
25 * order to manage the appearance and disappearance of addition, on-top popup
26 * windows such as text hovers, content assist, etc.
27 *
28 * In order to provide backward compatibility for clients of
29 * <code>IWidgetTokeKeeper</code>, extension interfaces are used as a means
30 * of evolution. The following extension interfaces exist:
31 * <ul>
32 * <li>{@link dwtx.jface.text.IWidgetTokenKeeperExtension} since version
33 * 3.0 introducing priorities when requesting a widget token and thus replacing
34 * the non-prioritized scheme. It also allows a client to force a widget token
35 * keeper to accept focus.</li>
36 * </ul>
37 *
38 * @see dwtx.jface.text.IWidgetTokenKeeperExtension
39 * @since 2.0
40 */
41 public interface IWidgetTokenKeeper {
42
43 /**
44 * The given widget token owner requests the widget token from this token
45 * keeper. Returns <code>true</code> if the token is released by this
46 * token keeper. Note, the keeper must not call
47 * <code>releaseWidgetToken(IWidgetTokenKeeper)</code> explicitly.
48 * <p>
49 * Replaced by
50 * {@link IWidgetTokenKeeperExtension#requestWidgetToken(IWidgetTokenOwner, int)}.
51 *
52 * @param owner the token owner
53 * @return <code>true</code> if token has been released <code>false</code>
54 * otherwise
55 */
56 bool requestWidgetToken(IWidgetTokenOwner owner);
57 }