.. Automatically generated file - do not modify.

.. class:: Gallery(self)
    
    This class supports the creation of an image gallery by handling the
    locking of images, providing an action that can show one or more images,
    and a providing method that creates buttons that use that action.
    
    .. attribute:: transition
    
        The transition that is used when changing images.
    
    .. attribute:: locked_button
    
        The default displayable used by make_button for a locked button.
    
    .. attribute:: hover_border
    
        The default hover border used by make_button.
    
    .. attribute:: idle_border
    
        The default idle border used by make_button.
    
    .. attribute:: unlocked_advance
    
        If true, the gallery will only advance through unlocked images.
    
    .. attribute:: navigation
    
        If true, the gallery will display navigation and slideshow
        buttons on top of the images.
    
        To customize the look of the navigation, you may override the
        gallery_navigation screen. The default screen is defined in
        common/00gallery.rpy
    
    .. attribute:: span_buttons
    
        If true, the gallery will advance between buttons.
    
    .. attribute:: slideshow_delay
    
        The time it will take for the gallery to advance between images
        in slideshow mode.

    .. method:: Action(name)
        
        An action that displays the images associated with the given button
        name.
    
    .. method:: Next(unlocked=False)
        
        Advances to the next image in the gallery.
        
        `unlocked`
            If true, only considers unlocked images.
    
    .. method:: Previous(unlocked=False)
        
        Goes to the previous image in the gallery.
        
        `unlocked`
            If true, only considers unlocked images.
    
    .. method:: Return(self)
        
        Stops displaying gallery images.
    
    .. method:: ToggleSlideshow(self)
        
        Toggles slideshow mode.
    
    .. method:: allprior(self)
        
        A condition that is true if all prior images associated with the
        current button have been unlocked.
    
    .. method:: button(name)
        
        Creates a new button, named `name`.
        
        `name`
            The name of the button being created.
    
    .. method:: condition(expression)
        
        A condition that is satisfied when an expression evaluates to true.
        
        `expression`
            A string giving a python expression.
    
    .. method:: display(*displayables)
        
        Adds a new image to the current button, where an image consists
        of one or more displayables.
    
    .. method:: get_fraction(name, format=u'{seen}/{total}')
        
        Returns a text string giving the number of unlocked images and total number of images in the button
        named `name`.
        
        `format`
            A python format string that's used to format the numbers. This has three values that
            can be substituted in:
        
            {seen}
                The number of images that have been seen.
            {total}
                The total number of images in the button.
            {locked}
                The number of images that are still locked.
    
    .. method:: image(*displayables)
        
        Adds a new image to the current button, where an image consists
        of one or more displayables.
    
    .. method:: make_button(name, unlocked, locked=None, hover_border=None, idle_border=None, **properties)
        
        This creates a button that displays the images associated with the given
        button name.
        
        `name`
            The name of the button that will be created.
        
        `unlocked`
            A displayable that is displayed for this button when it is
            unlocked.
        
        `locked`
            A displayable that is displayed for this button when it is
            locked. If None, the locked_button field of the gallery
            object is used instead.
        
        `hover_border`
            A displayable that is used to overlay this button when
            it is unlocked and has focus. If None, the hover_border
            field of the gallery object is used.
        
        `idle_border`
            A displayable that is used to overlay this button when
            it is unlocked but unfocused. If None, the idle_border
            field of the gallery object is used.
        
        Additional keyword arguments become style properties of the
        created button object.
    
    .. method:: transform(*transforms)
        
        Applies transforms to the last image registered. This should be
        called with the same number of transforms as the image has
        displayables. The transforms are applied to the corresponding
        displayables.
        
        If a transform is None, the default transform is used.
    
    .. method:: unlock(*images)
        
        A condition that takes one or more image names as argument, and
        is satisfied when all the named images have been seen by the
        player. The image names should be given as strings.
    
    .. method:: unlock_image(*images)
        
        A convenience method that is equivalent to calling image and unlock
        with the same parameters. This will cause an image to be displayed
        if it has been seen before.
        
        The images should be specified as strings giving image names.
    
