Derive Debug, Clone, Copy for widgets
This commit is contained in:
parent
f25ce49e77
commit
caca3b6ef1
8 changed files with 8 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ use async_trait::async_trait;
|
|||
|
||||
use crate::{AsyncWidget, Frame, Pos, Size, Style, Widget};
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct Background<I> {
|
||||
inner: I,
|
||||
style: Style,
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ impl Default for BorderLook {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct Border<I> {
|
||||
inner: I,
|
||||
look: BorderLook,
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ use async_trait::async_trait;
|
|||
|
||||
use crate::{AsyncWidget, Frame, Pos, Size, Widget};
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct Cursor<I> {
|
||||
inner: I,
|
||||
at: Pos,
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ use async_trait::async_trait;
|
|||
|
||||
use crate::{AsyncWidget, Frame, Size, Widget};
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub enum Either<I1, I2> {
|
||||
First(I1),
|
||||
Second(I2),
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ use async_trait::async_trait;
|
|||
|
||||
use crate::{AsyncWidget, Frame, Pos, Size, Widget};
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct Float<I> {
|
||||
inner: I,
|
||||
horizontal: Option<f32>,
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ use async_trait::async_trait;
|
|||
|
||||
use crate::{AsyncWidget, Frame, Size, Widget};
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct Layer<I1, I2> {
|
||||
below: I1,
|
||||
above: I2,
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ use async_trait::async_trait;
|
|||
|
||||
use crate::{AsyncWidget, Frame, Pos, Size, Widget};
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct Padding<I> {
|
||||
inner: I,
|
||||
left: u16,
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ use async_trait::async_trait;
|
|||
|
||||
use crate::{AsyncWidget, Frame, Pos, Size, Styled, Widget, WidthDb};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Text {
|
||||
styled: Styled,
|
||||
wrap: bool,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue