1/*******************************************************************************
2 * Copyright (c) 2011 Google, Inc.
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 *    Google, Inc. - initial API and implementation
10 *******************************************************************************/
11package org.eclipse.wb.core.controls.flyout;
12
13/**
14 * Provider for preferences of flyout control of {@link FlyoutControlComposite}.
15 *
16 * @author scheglov_ke
17 * @coverage core.control
18 */
19public interface IFlyoutPreferences {
20  ////////////////////////////////////////////////////////////////////////////
21  //
22  // Docking constants
23  //
24  ////////////////////////////////////////////////////////////////////////////
25  int DOCK_WEST = 1;
26  int DOCK_EAST = 2;
27  int DOCK_NORTH = 4;
28  int DOCK_SOUTH = 8;
29  ////////////////////////////////////////////////////////////////////////////
30  //
31  // State constants
32  //
33  ////////////////////////////////////////////////////////////////////////////
34  int STATE_OPEN = 0;
35  int STATE_COLLAPSED = 1;
36  int STATE_EXPANDED = 2;
37
38  ////////////////////////////////////////////////////////////////////////////
39  //
40  // Access
41  //
42  ////////////////////////////////////////////////////////////////////////////
43  /**
44   * @return the docking location - {@link #DOCK_WEST}, {@link #DOCK_EAST}, {@link #DOCK_NORTH} or
45   *         {@link #DOCK_SOUTH}.
46   */
47  int getDockLocation();
48
49  /**
50   * @return the state of flyout - {@link #STATE_OPEN} or {@link #STATE_COLLAPSED}.
51   */
52  int getState();
53
54  /**
55   * @return the width of flyout.
56   */
57  int getWidth();
58
59  ////////////////////////////////////////////////////////////////////////////
60  //
61  // Modification
62  //
63  ////////////////////////////////////////////////////////////////////////////
64  /**
65   * Sets the docking location.
66   */
67  void setDockLocation(int location);
68
69  /**
70   * Sets the state of flyout - {@link #STATE_OPEN} or {@link #STATE_COLLAPSED}.
71   */
72  void setState(int state);
73
74  /**
75   * Sets the width of flyout.
76   */
77  void setWidth(int width);
78}
79