Add retained paints and shared text selection
This commit is contained in:
1 parent
1e6d3b1edd
commit
a33fbca966
42 files changed
+2424
-470
No files matched your search
@@ -15,6 +15,16 @@ pub use tag::*;
|
||||
pub use view::*;
|
||||
pub use widgets::*;
|
||||
|
||||
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
|
||||
pub enum ChildOrder {
|
||||
/// The order in which the parent drew its children.
|
||||
#[default]
|
||||
Draw,
|
||||
/// Ascending visual position on one screen axis. Equal positions keep
|
||||
/// draw order; the resolved coordinates are sorted only when queried.
|
||||
Axis(Axis),
|
||||
}
|
||||
|
||||
pub trait Widget: Any {
|
||||
fn draw(&mut self, painter: &mut Painter);
|
||||
|
||||
@@ -34,6 +44,10 @@ pub trait Widget: Any {
|
||||
accesskit::Role::Unknown
|
||||
}
|
||||
|
||||
fn child_order(&self) -> ChildOrder {
|
||||
ChildOrder::Draw
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
fn tick(&mut self, now: std::time::Instant) -> bool {
|
||||
false
|
||||
|
||||
Reference in new issue
Block a user