use std::{slice::SliceIndex, ops::RangeBounds, fmt::Debug};
use qwutils::RefClonable;
use super::*;
pub mod sub;
pub use sub::*;
pub mod standard;
pub trait WidgetPath<E>:
Into<E::WidgetPath> +
From<E::WidgetPath> +
RefClonable +
Clone +
Sized +
Debug +
'static
where E: Env {
fn attach_subpath(&mut self, sub: &Self);
#[inline]
fn attached_subpath(mut self, sub: &Self) -> Self {
self.attach_subpath(sub);
self
}
fn strip_prefix(&self, prefix: &Self) -> Result<Self,()>;
fn resolves_thru_child_id(child: E::WidgetID, sub_path: &Self) -> Option<ResolvesThruResult<E>>;
fn resolves_thru_child_path(child_path: &Self, sub_path: &Self) -> Option<ResolvesThruResult<E>>;
fn for_child_widget_id(&self, child: E::WidgetID) -> Self;
fn for_child_widget_path(&self, child_path: &Self) -> Self;
fn _dest_widget(&self) -> Option<E::WidgetID> {
None
}
#[deprecated]
fn exact_eq(&self, o: &Self) -> bool;
fn dest_eq(&self, o: &Self) -> bool;
fn parent(&self) -> Option<Self>;
fn is_empty(&self) -> bool;
fn empty() -> Self;
#[inline]
fn with_env<F: Env<WidgetPath=E::WidgetPath>>(self) -> Self where E::WidgetPath: WidgetPath<F> {
self
}
}
pub struct ResolvesThruResult<E> where E: Env {
pub sub_path: E::WidgetPath,
}
#[inline]
pub fn rc_path_with_env<E: Env, F: Env<WidgetPath=E::WidgetPath>>(e: E::WidgetPath) -> F::WidgetPath where E::WidgetPath: WidgetPath<F> {
e
}