aboutsummaryrefslogtreecommitdiffstats
path: root/rule_api/src/com/android/ide/common/api/DrawingStyle.java
blob: 0712a21e914e887ca69d034f8f92a9a875a9d414 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
/*
 * Copyright (C) 2010 The Android Open Source Project
 *
 * Licensed under the Eclipse Public License, Version 1.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.eclipse.org/org/documents/epl-v10.php
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.ide.common.api;

import com.google.common.annotations.Beta;

/**
 * Drawing styles are used to distinguish the visual appearance of selection,
 * hovers, anchors, etc. Each style may have different colors, line thickness,
 * dashing style, transparency, etc.
 * <p>
 * <b>NOTE: This is not a public or final API; if you rely on this be prepared
 * to adjust your code for the next tools release.</b>
 * </p>
 */
@Beta
public enum DrawingStyle {
    /**
     * The style used to draw the selected views
     */
    SELECTION,

    /**
     * The style used to draw guidelines - overlay lines which indicate
     * significant geometric positions.
     */
    GUIDELINE,

    /**
     * The style used to guideline shadows
     */
    GUIDELINE_SHADOW,

    /**
     * The style used to draw guidelines, in particular shared edges and center lines; this
     * is a dashed edge.
     */
    GUIDELINE_DASHED,

    /**
     * The style used to draw distance annotations
     */
    DISTANCE,

    /**
     * The style used to draw grids
     */
    GRID,

    /**
     * The style used for hovered views (e.g. when the mouse is directly on top
     * of the view)
     */
    HOVER,

    /**
     * The style used for hovered views (e.g. when the mouse is directly on top
     * of the view), when the hover happens to be the same object as the selection
     */
    HOVER_SELECTION,

    /**
     * The style used to draw anchors (lines to the other views the given view
     * is anchored to)
     */
    ANCHOR,

    /**
     * The style used to draw outlines (the structure of views)
     */
    OUTLINE,

    /**
     * The style used to draw the recipient/target View of a drop. This is
     * typically going to be the bounding-box of the view into which you are
     * adding a new child.
     */
    DROP_RECIPIENT,

    /**
     * The style used to draw a potential drop area <b>within</b> a
     * {@link #DROP_RECIPIENT}. For example, if you are dragging into a view
     * with a LinearLayout, the {@link #DROP_RECIPIENT} will be the view itself,
     * whereas each possible insert position between two children will be a
     * {@link #DROP_ZONE}. If the mouse is over a {@link #DROP_ZONE} it should
     * be drawn using the style {@link #DROP_ZONE_ACTIVE}.
     */
    DROP_ZONE,

    /**
     * The style used to draw a currently active drop zone within a drop
     * recipient. See the documentation for {@link #DROP_ZONE} for details on
     * the distinction between {@link #DROP_RECIPIENT}, {@link #DROP_ZONE} and
     * {@link #DROP_ZONE_ACTIVE}.
     */
    DROP_ZONE_ACTIVE,

    /**
     * The style used to draw a preview of where a dropped view would appear if
     * it were to be dropped at a given location.
     */
    DROP_PREVIEW,

    /**
     * The style used to preview a resize operation. Similar to {@link #DROP_PREVIEW}
     * but usually fainter to work better in combination with guidelines which
     * are often overlaid during resize.
     */
    RESIZE_PREVIEW,

    /**
     * The style used to show a proposed resize bound which is being rejected (for example,
     * because there is no near edge to attach to in a RelativeLayout).
     */
    RESIZE_FAIL,

    /**
     * The style used to draw help/hint text.
     */
    HELP,

    /**
     * The style used to draw illegal/error/invalid markers
     */
    INVALID,

    /**
     * The style used to highlight dependencies
     */
    DEPENDENCY,

    /**
     * The style used to draw an invalid cycle
     */
    CYCLE,

    /**
     * The style used to highlight the currently dragged views during a layout
     * move (if they are not hidden)
     */
    DRAGGED,

    /**
     * The style used to draw empty containers of zero bounds (which are padded
     * a bit to make them visible during a drag or selection).
     */
    EMPTY,

    /**
     * A style used for unspecified purposes; can be used by a client to have
     * yet another color that is domain specific; using this color constant
     * rather than your own hardcoded value means that you will be guaranteed to
     * pick up a color that is themed properly and will look decent with the
     * rest of the colors
     */
    CUSTOM1,

    /**
     * A second styled used for unspecified purposes; see {@link #CUSTOM1} for
     * details.
     */
    CUSTOM2
}