Write documentation for input
This commit is contained in:
parent
fafad2dfca
commit
a14b8bffc0
7 changed files with 17 additions and 2 deletions
|
|
@ -1,3 +1,4 @@
|
|||
//! Map your system events into input events that Iced can understand.
|
||||
pub mod keyboard;
|
||||
pub mod mouse;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
/// The state of a button.
|
||||
#[derive(Debug, Hash, Ord, PartialOrd, PartialEq, Eq, Clone, Copy)]
|
||||
pub enum ButtonState {
|
||||
/// The button is pressed.
|
||||
Pressed,
|
||||
|
||||
/// The button is __not__ pressed.
|
||||
Released,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//! Build keyboard events.
|
||||
mod event;
|
||||
mod key_code;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//! Build mouse events.
|
||||
mod button;
|
||||
mod event;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,15 @@
|
|||
/// The button of a mouse.
|
||||
#[derive(Debug, Hash, PartialEq, Eq, Clone, Copy)]
|
||||
pub enum Button {
|
||||
/// The left mouse button.
|
||||
Left,
|
||||
|
||||
/// The right mouse button.
|
||||
Right,
|
||||
|
||||
/// The middle (wheel) button.
|
||||
Middle,
|
||||
|
||||
/// Some other button.
|
||||
Other(u8),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//! Write your own renderer!
|
||||
//! Write your own renderer.
|
||||
//!
|
||||
//! There is not a common entrypoint or trait for a __renderer__ in Iced.
|
||||
//! Instead, every [`Widget`] constrains its generic `Renderer` type as
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//! Use the built-in widgets or create your own!
|
||||
//! Use the built-in widgets or create your own.
|
||||
//!
|
||||
//! # Built-in widgets
|
||||
//! Every built-in drawable widget has its own module with a `Renderer` trait
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue