ó
mÜJ]c           @` sÁ  d  Z  d d l m Z m Z m Z m Z d d l Z e j e ƒ Z	 d d l
 m Z d d l m Z m Z m Z m Z m Z m Z m Z m Z m Z m Z m Z d d l m Z d	 d
 l m Z d, Z e d e f d „  ƒ  Yƒ Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ  d e f d „  ƒ  YZ! d  e f d! „  ƒ  YZ" d" e f d# „  ƒ  YZ# d$ e f d% „  ƒ  YZ$ d& e f d' „  ƒ  YZ% d( e f d) „  ƒ  YZ& d* e f d+ „  ƒ  YZ' d S(-   u4    Various kinds of input widgets and form controls.

i    (   t   absolute_importt   divisiont   print_functiont   unicode_literalsNi   (   t   abstract(   t   ColorHext   Datet   Dictt   Eithert   Floatt   Instancet   Intt   Listt   PositiveIntt   Stringt   Tuplei   (   t   Callbacki   (   t   Widgetu   AutocompleteInputu   ColorPickeru
   DatePickeru	   FileInputu   InputWidgetu   MultiSelectu   PasswordInputu   Selectu   Spinneru	   TextInputu   TextAreaInputt   InputWidgetc           B` s2   e  Z d  Z e d d d d ƒ Z e d „  ƒ Z RS(   u-    Abstract base class for input widgets.

    t   defaultu    t   helpu   
    Widget's label.
    c         C` sb   |  j  d ƒ } t | t ƒ r( t | ƒ St | t ƒ rA t | ƒ St | t ƒ rZ t | ƒ S| Sd  S(   Nu   value(   t   lookupt
   isinstanceR	   t   floatR   t   intR   t   str(   t   clst   valt   prop_obj(    (    s:   lib/python2.7/site-packages/bokeh/models/widgets/inputs.pyt   coerce_valueD   s    


(   t   __name__t
   __module__t   __doc__R   t   titlet   classmethodR   (    (    (    s:   lib/python2.7/site-packages/bokeh/models/widgets/inputs.pyR   :   s   	t	   FileInputc           B` st   e  Z d  Z e d d d e d d ƒ Z e d d d e d d ƒ Z e d d d e d d ƒ Z e d d d d ƒ Z RS(	   u]    Present a file-chooser dialog to users and return the contents of a
    selected file.

    R   u    t   readonlyR   uG   
    A base64-encoded string of the contents of the selected file.
    u-   
    The mime type of the selected file.
    uu   
    The filename of the selected file.
    The file path is not included as browsers do not allow access to it.
    u2  
    Comma-separated list of standard HTML file input filters that restrict what
    files the user can pick from. Values can be:

    `<file extension>`:
        Specific file extension(s) (e.g: .gif, .jpg, .png, .doc) are pickable

    `audio/*`:
        all sound files are pickable

    `video/*`:
        all video files are pickable

    `image/*`:
        all image files are pickable

    `<media type>`:
        A valid `IANA Media Type`_, with no parameters.

    .. _IANA Media Type: https://www.iana.org/assignments/media-types/media-types.xhtml
    (	   R   R   R    R   t   Truet   valuet	   mime_typet   filenamet   accept(    (    (    s:   lib/python2.7/site-packages/bokeh/models/widgets/inputs.pyR#   T   s   			t	   TextInputc           B` s_   e  Z d  Z e d d d d ƒ Z e d d d d ƒ Z e e d d ƒZ e d d d d ƒ Z	 RS(   u     Single-line input widget.

    R   u    R   u(   
    Initial or entered text value.
    u\   
    Initial or entered text value that triggers a callback whenever the value changes.
    uñ   
    A callback to run in the browser whenever the user unfocuses the
    ``TextInput`` widget by hitting Enter or clicking outside of the text box
    area.

    DEPRECATED: use .js_on_change or .on_change with "value" or "value_input"
    u,   
    Placeholder for empty input field.
    (
   R   R   R    R   R&   t   value_inputR
   R   t   callbackt   placeholder(    (    (    s:   lib/python2.7/site-packages/bokeh/models/widgets/inputs.pyR*   ~   s   				t   TextAreaInputc           B` sM   e  Z d  Z e d d d d ƒ Z e d d d d ƒ Z e d d d d ƒ Z RS(	   u    Multi-line input widget.

    R   i   R   uX   
    Specifies the width of the text area (in average character width). Default: 20
    i   uF   
    Specifies the height of the text area (in lines). Default: 2
    iô  u*   
    Max count of characters in field
    (   R   R   R    R   t   colst   rowst
   max_length(    (    (    s:   lib/python2.7/site-packages/bokeh/models/widgets/inputs.pyR.   ˜   s   		t   PasswordInputc           B` s   e  Z d  Z RS(   u   Single-line password input widget.
        Note: Despite ``PasswordInput`` inheriting from ``TextInput`` the
        password cannot be inspected on the field ``value``. Also, note that
        this field functionally just hides the input on the browser,
        transmitting safely a password as a callback, e.g., to a bokeh
        server would require some secure connection.

    (   R   R   R    (    (    (    s:   lib/python2.7/site-packages/bokeh/models/widgets/inputs.pyR2   ª   s   t   AutocompleteInputc           B` s5   e  Z d  Z e e d d ƒZ e d d d d ƒ Z RS(   u5    Single-line input widget with auto-completion.

    R   u}   
    A list of completion strings. This will be used to guide the
    user upon typing the beginning of a desired value.
    R   i   uU   
    The number of characters a user must type before completions are presented.
    (   R   R   R    R   R   t   completionsR   t   min_characters(    (    (    s:   lib/python2.7/site-packages/bokeh/models/widgets/inputs.pyR3   µ   s
   		t   Selectc           B` s•   e  Z d  Z e e e e e e e e ƒ e ƒ ƒ ƒ e e e e e e e e e ƒ e ƒ ƒ ƒ ƒ d d ƒZ	 e d d d d ƒ Z
 e e d d ƒZ RS(   u    Single-select widget.

    R   uŽ  
    Available selection options. Options may be provided either as a list of
    possible string values, or as a list of tuples, each of the form
    ``(value, label)``. In the latter case, the visible widget text for each
    value will be corresponding given label. Option groupings can be provided
    by supplying a dictionary object whose values are in the aforementioned
    list format
    R   u    u$   
    Initial or selected value.
    ub   
    A callback to run in the browser whenever the current Select dropdown
    value changes.
    (   R   R   R    R   R   R   R   R   R   t   optionsR&   R
   R   R,   (    (    (    s:   lib/python2.7/site-packages/bokeh/models/widgets/inputs.pyR6   Ä   s   '0			t   MultiSelectc           B` sk   e  Z d  Z e e e e e e ƒ ƒ d d ƒZ e e d d ƒZ e	 e
 d d ƒZ e d d d d ƒ Z RS(   u    Multi-select widget.

    R   u  
    Available selection options. Options may be provided either as a list of
    possible string values, or as a list of tuples, each of the form
    ``(value, label)``. In the latter case, the visible widget text for each
    value will be corresponding given label.
    u%   
    Initial or selected values.
    u\   
    A callback to run in the browser whenever the current selection value
    changes.
    R   i   uµ   
    The number of visible options in the dropdown list. (This uses the
    ``select`` HTML element's ``size`` attribute. Some browsers might not
    show less than 3 options.)
    (   R   R   R    R   R   R   R   R7   R&   R
   R   R,   R   t   size(    (    (    s:   lib/python2.7/site-packages/bokeh/models/widgets/inputs.pyR8   Ü   s   					t
   DatePickerc           B` sY   e  Z d  Z e d d ƒ Z e d d d d ƒ Z e d d d d ƒ Z e e	 d d ƒZ
 RS(   u)    Calendar-based date picker widget.

    R   u%   
    The initial or picked date.
    R   u+   
    Optional earliest allowable date.
    u)   
    Optional latest allowable date.
    uS   
    A callback to run in the browser whenever the current date value changes.
    N(   R   R   R    R   R&   t   Nonet   min_datet   max_dateR
   R   R,   (    (    (    s:   lib/python2.7/site-packages/bokeh/models/widgets/inputs.pyR:   ø   s   				t   ColorPickerc           B` s5   e  Z d  Z e d d d d ƒ Z e e d d ƒZ RS(   u£    Color picker widget

    .. warning::
        This widget as a limited support on *Internet Explorer* (it will be displayed
        as a simple text input).

    R   u   #000000R   uF   
    The initial color of the picked color (named or hexadecimal)
    uS   
    A callback to run in the browser whenever the current date value changes.
    (   R   R   R    R   t   colorR
   R   R,   (    (    (    s:   lib/python2.7/site-packages/bokeh/models/widgets/inputs.pyR>     s
   		t   Spinnerc           B` sh   e  Z d  Z e d d d d ƒ Z e d d d d ƒ Z e d d ƒ Z e d d ƒ Z e e	 d d	 ƒZ
 RS(
   u*    Spinner widget for numerical inputs

    R   i    R   u*   
    The initial value of the spinner
    i   u;   
    The step added or subtracted to the current value
    u*   
    Optional lowest allowable value.
    u+   
    Optional highest allowable value.
    u›   
    A callback to run in the browser whenever the user unfocuses the
    ``SpinBox`` widget by hitting Enter or clicking outside of the box
    area.
    (   R   R   R    R	   R&   t   stept   lowt   highR
   R   R,   (    (    (    s:   lib/python2.7/site-packages/bokeh/models/widgets/inputs.pyR@      s   					(   u   AutocompleteInputu   ColorPickeru
   DatePickeru	   FileInputu   InputWidgetu   MultiSelectu   PasswordInputu   Selectu   Spinneru	   TextInputu   TextAreaInput((   R    t
   __future__R    R   R   R   t   loggingt	   getLoggerR   t   logt   core.has_propsR   t   core.propertiesR   R   R   R   R	   R
   R   R   R   R   R   t	   callbacksR   t   widgetR   t   __all__R   R#   R*   R.   R2   R3   R6   R8   R:   R>   R@   (    (    (    s:   lib/python2.7/site-packages/bokeh/models/widgets/inputs.pyt   <module>	   s<   "L          *