comparison dwtx/jface/text/link/ILinkedModeListener.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, 2005 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 dwtx.jface.text.link.ILinkedModeListener;
14
15 import dwt.dwthelper.utils;
16
17 /**
18 * Protocol used by {@link LinkedModeModel}s to communicate state changes, such
19 * as leaving linked mode, suspending it due to a child mode coming up, and
20 * resuming after a child mode has left.
21 * <p>
22 * This interface may implemented by clients.
23 * </p>
24 *
25 * @since 3.0
26 */
27 public interface ILinkedModeListener {
28
29 /** Flag to <code>leave</code> specifying no special action. */
30 int NONE= 0;
31 /**
32 * Flag to <code>leave</code> specifying that all nested modes should
33 * exit.
34 */
35 int EXIT_ALL= 1 << 0;
36 /**
37 * Flag to <code>leave</code> specifying that the caret should be moved to
38 * the exit position.
39 */
40 int UPDATE_CARET= 1 << 1;
41 /**
42 * Flag to <code>leave</code> specifying that a UI of a parent mode should
43 * select the current position.
44 */
45 int SELECT= 1 << 2;
46 /**
47 * Flag to <code>leave</code> specifying that document content outside of
48 * a linked position was modified.
49 */
50 int EXTERNAL_MODIFICATION= 1 << 3;
51
52 /**
53 * The leave event occurs when linked is left.
54 *
55 * @param model the model being left
56 * @param flags the reason and commands for leaving linked mode
57 */
58 void left(LinkedModeModel model, int flags);
59
60 /**
61 * The suspend event occurs when a nested linked mode is installed within
62 * <code>model</code>.
63 *
64 * @param model the model being suspended due to a nested model being
65 * installed
66 */
67 void suspend(LinkedModeModel model);
68
69 /**
70 * The resume event occurs when a nested linked mode exits.
71 *
72 * @param model the linked mode model being resumed due to a nested mode
73 * exiting
74 * @param flags the commands to execute when resuming after suspend
75 */
76 void resume(LinkedModeModel model, int flags);
77 }