1 /* 2 * Copyright (C) 2010 The Android Open Source Project 3 * 4 * Licensed under the Eclipse Public License, Version 1.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.eclipse.org/org/documents/epl-v10.php 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.ide.common.api; 18 19 import com.google.common.annotations.Beta; 20 21 /** 22 * Drawing styles are used to distinguish the visual appearance of selection, 23 * hovers, anchors, etc. Each style may have different colors, line thickness, 24 * dashing style, transparency, etc. 25 * <p> 26 * <b>NOTE: This is not a public or final API; if you rely on this be prepared 27 * to adjust your code for the next tools release.</b> 28 * </p> 29 */ 30 @Beta 31 public enum DrawingStyle { 32 /** 33 * The style used to draw the selected views 34 */ 35 SELECTION, 36 37 /** 38 * The style used to draw guidelines - overlay lines which indicate 39 * significant geometric positions. 40 */ 41 GUIDELINE, 42 43 /** 44 * The style used to guideline shadows 45 */ 46 GUIDELINE_SHADOW, 47 48 /** 49 * The style used to draw guidelines, in particular shared edges and center lines; this 50 * is a dashed edge. 51 */ 52 GUIDELINE_DASHED, 53 54 /** 55 * The style used to draw distance annotations 56 */ 57 DISTANCE, 58 59 /** 60 * The style used to draw grids 61 */ 62 GRID, 63 64 /** 65 * The style used for hovered views (e.g. when the mouse is directly on top 66 * of the view) 67 */ 68 HOVER, 69 70 /** 71 * The style used for hovered views (e.g. when the mouse is directly on top 72 * of the view), when the hover happens to be the same object as the selection 73 */ 74 HOVER_SELECTION, 75 76 /** 77 * The style used to draw anchors (lines to the other views the given view 78 * is anchored to) 79 */ 80 ANCHOR, 81 82 /** 83 * The style used to draw outlines (the structure of views) 84 */ 85 OUTLINE, 86 87 /** 88 * The style used to draw the recipient/target View of a drop. This is 89 * typically going to be the bounding-box of the view into which you are 90 * adding a new child. 91 */ 92 DROP_RECIPIENT, 93 94 /** 95 * The style used to draw a potential drop area <b>within</b> a 96 * {@link #DROP_RECIPIENT}. For example, if you are dragging into a view 97 * with a LinearLayout, the {@link #DROP_RECIPIENT} will be the view itself, 98 * whereas each possible insert position between two children will be a 99 * {@link #DROP_ZONE}. If the mouse is over a {@link #DROP_ZONE} it should 100 * be drawn using the style {@link #DROP_ZONE_ACTIVE}. 101 */ 102 DROP_ZONE, 103 104 /** 105 * The style used to draw a currently active drop zone within a drop 106 * recipient. See the documentation for {@link #DROP_ZONE} for details on 107 * the distinction between {@link #DROP_RECIPIENT}, {@link #DROP_ZONE} and 108 * {@link #DROP_ZONE_ACTIVE}. 109 */ 110 DROP_ZONE_ACTIVE, 111 112 /** 113 * The style used to draw a preview of where a dropped view would appear if 114 * it were to be dropped at a given location. 115 */ 116 DROP_PREVIEW, 117 118 /** 119 * The style used to preview a resize operation. Similar to {@link #DROP_PREVIEW} 120 * but usually fainter to work better in combination with guidelines which 121 * are often overlaid during resize. 122 */ 123 RESIZE_PREVIEW, 124 125 /** 126 * The style used to show a proposed resize bound which is being rejected (for example, 127 * because there is no near edge to attach to in a RelativeLayout). 128 */ 129 RESIZE_FAIL, 130 131 /** 132 * The style used to draw help/hint text. 133 */ 134 HELP, 135 136 /** 137 * The style used to draw illegal/error/invalid markers 138 */ 139 INVALID, 140 141 /** 142 * The style used to highlight dependencies 143 */ 144 DEPENDENCY, 145 146 /** 147 * The style used to draw an invalid cycle 148 */ 149 CYCLE, 150 151 /** 152 * The style used to highlight the currently dragged views during a layout 153 * move (if they are not hidden) 154 */ 155 DRAGGED, 156 157 /** 158 * The style used to draw empty containers of zero bounds (which are padded 159 * a bit to make them visible during a drag or selection). 160 */ 161 EMPTY, 162 163 /** 164 * A style used for unspecified purposes; can be used by a client to have 165 * yet another color that is domain specific; using this color constant 166 * rather than your own hardcoded value means that you will be guaranteed to 167 * pick up a color that is themed properly and will look decent with the 168 * rest of the colors 169 */ 170 CUSTOM1, 171 172 /** 173 * A second styled used for unspecified purposes; see {@link #CUSTOM1} for 174 * details. 175 */ 176 CUSTOM2 177 } 178