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