iced-yoda/src/widget.rs

74 lines
2.2 KiB
Rust
Raw Normal View History

//! 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`].
#[cfg(not(target_arch = "wasm32"))]
mod platform {
pub use crate::renderer::widget::{
2020-07-10 02:50:47 +02:00
button, checkbox, container, pane_grid, pick_list, progress_bar, radio,
2020-07-28 18:07:46 +03:00
rule, scrollable, slider, text_input, tooltip, Column, Row, Space,
Text,
2020-04-05 04:38:10 +02:00
};
#[cfg(any(feature = "canvas", feature = "glow_canvas"))]
#[cfg_attr(
docsrs,
doc(cfg(any(feature = "canvas", feature = "glow_canvas")))
)]
pub use crate::renderer::widget::canvas;
2020-04-05 04:38:10 +02:00
2020-11-20 10:13:58 +01:00
#[cfg(any(feature = "qr_code", feature = "glow_qr_code"))]
#[cfg_attr(
docsrs,
doc(cfg(any(feature = "qr_code", feature = "glow_qr_code")))
)]
pub use crate::renderer::widget::qr_code;
2020-04-05 04:38:10 +02:00
#[cfg_attr(docsrs, doc(cfg(feature = "image")))]
pub mod image {
//! Display images in your user interface.
pub use crate::runtime::image::viewer;
pub use crate::runtime::image::{Handle, Image, Viewer};
}
2020-04-05 04:38:10 +02:00
#[cfg_attr(docsrs, doc(cfg(feature = "svg")))]
pub mod svg {
//! Display vector graphics in your user interface.
pub use crate::runtime::svg::{Handle, Svg};
}
#[doc(no_inline)]
pub use {
2020-07-10 02:50:47 +02:00
button::Button, checkbox::Checkbox, container::Container, image::Image,
pane_grid::PaneGrid, pick_list::PickList, progress_bar::ProgressBar,
2020-08-13 12:54:34 -05:00
radio::Radio, rule::Rule, scrollable::Scrollable, slider::Slider,
2020-07-28 18:07:46 +03:00
svg::Svg, text_input::TextInput, tooltip::Tooltip,
};
#[cfg(any(feature = "canvas", feature = "glow_canvas"))]
2020-04-01 04:34:14 +02:00
#[doc(no_inline)]
pub use canvas::Canvas;
2020-11-20 10:13:58 +01:00
#[cfg(any(feature = "qr_code", feature = "glow_qr_code"))]
#[doc(no_inline)]
pub use qr_code::QRCode;
}
#[cfg(target_arch = "wasm32")]
mod platform {
pub use iced_web::widget::*;
}
pub use platform::*;