1 /*******************************************************************************
2  * Copyright (c) 2000, 2009 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *******************************************************************************/
14 package org.eclipse.ui.internal.navigator.framelist;
15 
16 /**
17  * A frame source is the source of frames which appear in a frame list.
18  * The frame list asks for the current frame whenever it switches
19  * to another frame, so that the context can be restored when the
20  * frame becomes current again.
21  *
22  * @see FrameList
23  * @since 3.4
24  */
25 public interface IFrameSource {
26 
27 	/**
28 	 * Frame constant indicating the current frame.
29 	 */
30 	public static final int CURRENT_FRAME = 0x0001;
31 
32 	/**
33 	 * Frame constant indicating the frame for the selection.
34 	 */
35 	public static final int SELECTION_FRAME = 0x0002;
36 
37 	/**
38 	 * Frame constant indicating the parent frame.
39 	 */
40 	public static final int PARENT_FRAME = 0x0003;
41 
42 	/**
43 	 * Flag constant indicating that the full context should be captured.
44 	 */
45 	public static final int FULL_CONTEXT = 0x0001;
46 
47 	/**
48 	 * Returns a new frame describing the state of the source.
49 	 * If the <code>FULL_CONTEXT</code> flag is specified, then the full
50 	 * context of the source should be captured by the frame.
51 	 * Otherwise, only the visible aspects of the frame, such as the name and tool tip text,
52 	 * will be used.
53 	 *
54 	 * @param whichFrame one of the frame constants defined in this interface
55 	 * @param flags a bit-wise OR of the flag constants defined in this interface
56 	 * @return a new frame describing the current state of the source
57 	 */
getFrame(int whichFrame, int flags)58 	public Frame getFrame(int whichFrame, int flags);
59 }
60