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
pub use iced_winit::{
    Align, Background, Color, Command, Font, HorizontalAlignment, Length,
    VerticalAlignment,
};

pub mod widget {
    //! Display information and interactive controls in your application.
    //!
    //! # Re-exports
    //! For convenience, the contents of this module are available at the root
    //! module. Therefore, you can directly type:
    //!
    //! ```
    //! use iced::{button, Button};
    //! ```
    //!
    //! # Stateful widgets
    //! Some widgets need to keep track of __local state__.
    //!
    //! These widgets have their own module with a `State` type. For instance, a
    //! [`TextInput`] has some [`text_input::State`].
    //!
    //! [`TextInput`]: text_input/struct.TextInput.html
    //! [`text_input::State`]: text_input/struct.State.html
    pub mod button {
        //! Allow your users to perform actions by pressing a button.
        //!
        //! A [`Button`] has some local [`State`].
        //!
        //! [`Button`]: type.Button.html
        //! [`State`]: struct.State.html

        /// A widget that produces a message when clicked.
        ///
        /// This is an alias of an `iced_native` button with a default
        /// `Renderer`.
        pub type Button<'a, Message> =
            iced_winit::Button<'a, Message, iced_wgpu::Renderer>;

        pub use iced_winit::button::State;
    }

    pub mod scrollable {
        //! Navigate an endless amount of content with a scrollbar.

        /// A widget that can vertically display an infinite amount of content
        /// with a scrollbar.
        ///
        /// This is an alias of an `iced_native` scrollable with a default
        /// `Renderer`.
        pub type Scrollable<'a, Message> =
            iced_winit::Scrollable<'a, Message, iced_wgpu::Renderer>;

        pub use iced_winit::scrollable::State;
    }

    pub mod text_input {
        //! Ask for information using text fields.
        //!
        //! A [`TextInput`] has some local [`State`].
        //!
        //! [`TextInput`]: struct.TextInput.html
        //! [`State`]: struct.State.html
        pub use iced_winit::text_input::{State, TextInput};
    }

    pub mod slider {
        //! Display an interactive selector of a single value from a range of
        //! values.
        //!
        //! A [`Slider`] has some local [`State`].
        //!
        //! [`Slider`]: struct.Slider.html
        //! [`State`]: struct.State.html
        pub use iced_winit::slider::{Slider, State};
    }

    pub use iced_winit::{Checkbox, Image, Radio, Text};

    #[doc(no_inline)]
    pub use {
        button::Button, scrollable::Scrollable, slider::Slider,
        text_input::TextInput,
    };

    /// A container that distributes its contents vertically.
    ///
    /// This is an alias of an `iced_native` column with a default `Renderer`.
    pub type Column<'a, Message> =
        iced_winit::Column<'a, Message, iced_wgpu::Renderer>;

    /// A container that distributes its contents horizontally.
    ///
    /// This is an alias of an `iced_native` row with a default `Renderer`.
    pub type Row<'a, Message> =
        iced_winit::Row<'a, Message, iced_wgpu::Renderer>;

    /// An element decorating some content.
    ///
    /// This is an alias of an `iced_native` container with a default
    /// `Renderer`.
    pub type Container<'a, Message> =
        iced_winit::Container<'a, Message, iced_wgpu::Renderer>;
}

#[doc(no_inline)]
pub use widget::*;

/// A generic widget.
///
/// This is an alias of an `iced_native` element with a default `Renderer`.
pub type Element<'a, Message> =
    iced_winit::Element<'a, Message, iced_wgpu::Renderer>;