Draft widget nodes and wire interaction
This commit is contained in:
parent
27ac85a9d9
commit
8834772fa7
10 changed files with 223 additions and 22 deletions
|
|
@ -40,9 +40,11 @@ use std::hash::Hash;
|
|||
/// 
|
||||
pub struct Button<'a, Message> {
|
||||
state: &'a mut State,
|
||||
label: String,
|
||||
/// The label of the button.
|
||||
pub label: String,
|
||||
class: Class,
|
||||
on_press: Option<Message>,
|
||||
/// The message to produce when the button is pressed
|
||||
pub on_press: Option<Message>,
|
||||
style: Style,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,8 +29,10 @@ use std::hash::Hash;
|
|||
/// ```
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Text<Color> {
|
||||
content: String,
|
||||
size: Option<u16>,
|
||||
/// The text contents
|
||||
pub content: String,
|
||||
/// The text size
|
||||
pub size: Option<u16>,
|
||||
color: Option<Color>,
|
||||
style: Style,
|
||||
horizontal_alignment: HorizontalAlignment,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue