-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from hecrj/improvement/docs
Documentation
- Loading branch information
Showing
88 changed files
with
3,949 additions
and
2,159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,38 @@ | ||
/// Alignment on the cross axis of a container. | ||
/// | ||
/// * On a [`Column`], it describes __horizontal__ alignment. | ||
/// * On a [`Row`], it describes __vertical__ alignment. | ||
/// | ||
/// [`Column`]: widget/struct.Column.html | ||
/// [`Row`]: widget/struct.Row.html | ||
/// Alignment on an axis of a container. | ||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | ||
pub enum Align { | ||
/// Align at the start of the cross axis. | ||
/// Align at the start of the axis. | ||
Start, | ||
|
||
/// Align at the center of the cross axis. | ||
/// Align at the center of the axis. | ||
Center, | ||
|
||
/// Align at the end of the cross axis. | ||
/// Align at the end of the axis. | ||
End, | ||
} | ||
|
||
/// The horizontal alignment of some resource. | ||
#[derive(Debug, Clone, Copy, PartialEq, Eq)] | ||
pub enum HorizontalAlignment { | ||
/// Align left | ||
Left, | ||
|
||
/// Horizontally centered | ||
Center, | ||
|
||
/// Align right | ||
Right, | ||
} | ||
|
||
/// The vertical alignment of some resource. | ||
#[derive(Debug, Clone, Copy, PartialEq, Eq)] | ||
pub enum VerticalAlignment { | ||
/// Align top | ||
Top, | ||
|
||
/// Vertically centered | ||
Center, | ||
|
||
/// Align bottom | ||
Bottom, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
use crate::Color; | ||
|
||
/// The background of some element. | ||
#[derive(Debug, Clone, Copy, PartialEq)] | ||
pub enum Background { | ||
/// A solid color | ||
Color(Color), | ||
// TODO: Add gradient and image variants | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
/// A font. | ||
#[derive(Debug, Clone, Copy)] | ||
pub enum Font { | ||
/// The default font. | ||
/// | ||
/// This is normally a font configured in a renderer or loaded from the | ||
/// system. | ||
Default, | ||
|
||
/// An external font. | ||
External { | ||
/// The name of the external font | ||
name: &'static str, | ||
|
||
/// The bytes of the external font | ||
bytes: &'static [u8], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,40 @@ | ||
pub mod widget; | ||
//! The core library of [Iced]. | ||
//! | ||
//! ![`iced_core` crate graph](https://github.com/hecrj/iced/blob/cae26cb7bc627f4a5b3bcf1cd023a0c552e8c65e/docs/graphs/core.png?raw=true) | ||
//! | ||
//! This library holds basic types that can be reused and re-exported in | ||
//! different runtime implementations. For instance, both [`iced_native`] and | ||
//! [`iced_web`] are built on top of `iced_core`. | ||
//! | ||
//! [Iced]: https://github.com/hecrj/iced | ||
//! [`iced_native`]: https://github.com/hecrj/iced/tree/master/native | ||
//! [`iced_web`]: https://github.com/hecrj/iced/tree/master/web | ||
#![deny(missing_docs)] | ||
#![deny(missing_debug_implementations)] | ||
#![deny(unused_results)] | ||
#![deny(unsafe_code)] | ||
#![deny(rust_2018_idioms)] | ||
|
||
mod align; | ||
mod background; | ||
mod color; | ||
#[cfg(feature = "command")] | ||
mod command; | ||
mod font; | ||
mod length; | ||
mod point; | ||
mod rectangle; | ||
mod vector; | ||
|
||
pub use align::Align; | ||
pub use align::{Align, HorizontalAlignment, VerticalAlignment}; | ||
pub use background::Background; | ||
pub use color::Color; | ||
#[cfg(feature = "command")] | ||
pub use command::Command; | ||
pub use font::Font; | ||
pub use length::Length; | ||
pub use point::Point; | ||
pub use rectangle::Rectangle; | ||
pub use vector::Vector; | ||
pub use widget::*; | ||
|
||
#[cfg(feature = "command")] | ||
mod command; | ||
|
||
#[cfg(feature = "command")] | ||
pub use command::Command; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.