pub struct TextBox<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache>where
E: Env,
Text: 'w,
Scroll: 'w,
Curs: 'w,
CursorStickX: 'w,
GlyphCache: 'w,{
pub size: ESize<E>,
pub style: EStyle<E>,
pub text: Text,
pub scroll: Scroll,
pub cursor: Curs,
pub cursor_stick_x: CursorStickX,
pub glyph_cache: GlyphCache,
/* private fields */
}
Fields§
§size: ESize<E>
§style: EStyle<E>
§text: Text
§scroll: Scroll
§cursor: Curs
§cursor_stick_x: CursorStickX
§glyph_cache: GlyphCache
Implementations§
Source§impl<'w, E> TextBox<'w, E, String, (u32, u32), Cursor, Option<u32>, LocalGlyphCache<E>>where
E: Env,
impl<'w, E> TextBox<'w, E, String, (u32, u32), Cursor, Option<u32>, LocalGlyphCache<E>>where
E: Env,
Source§impl<'w, E, Text> TextBox<'w, E, Text, RemoteState<E, (u32, u32)>, RemoteState<E, Cursor>, RemoteState<E, Option<u32>>, RemoteState<E, LocalGlyphCache<E>>>
impl<'w, E, Text> TextBox<'w, E, Text, RemoteState<E, (u32, u32)>, RemoteState<E, Cursor>, RemoteState<E, Option<u32>>, RemoteState<E, LocalGlyphCache<E>>>
Source§impl<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache> TextBox<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache>where
E: Env,
Text: 'w,
Scroll: 'w,
Curs: 'w,
CursorStickX: 'w,
GlyphCache: 'w,
impl<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache> TextBox<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache>where
E: Env,
Text: 'w,
Scroll: 'w,
Curs: 'w,
CursorStickX: 'w,
GlyphCache: 'w,
pub fn with_text<T>(
self,
text: T,
) -> TextBox<'w, E, T, Scroll, Curs, CursorStickX, GlyphCache>where
T: 'w,
pub fn with_states<PScroll, CCurs, XCursorStickX>(
self,
scroll: PScroll,
cursor: CCurs,
cursor_stick_x: XCursorStickX,
) -> TextBox<'w, E, Text, PScroll, CCurs, XCursorStickX, GlyphCache>where
PScroll: 'w,
CCurs: 'w,
XCursorStickX: 'w,
pub fn with_size(self, s: ESize<E>) -> Self
pub fn with_style(self, style: EStyle<E>) -> Self
Trait Implementations§
Source§impl<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache> ITextBoxMut<E> for TextBox<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache>where
E: Env,
ERenderer<E>: RenderStdWidgets<E>,
EEvent<E>: StdVarSup<E>,
E::Context: CtxStdState<E> + CtxClipboardAccess<E>,
Text: CaptionMut<E> + ValidationMut<E> + 'w,
Scroll: AtomStateMut<E, (u32, u32)>,
Curs: AtomStateMut<E, Cursor>,
CursorStickX: AtomStateMut<E, Option<u32>>,
GlyphCache: AtomStateMut<E, LocalGlyphCache<E>> + Clone,
impl<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache> ITextBoxMut<E> for TextBox<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache>where
E: Env,
ERenderer<E>: RenderStdWidgets<E>,
EEvent<E>: StdVarSup<E>,
E::Context: CtxStdState<E> + CtxClipboardAccess<E>,
Text: CaptionMut<E> + ValidationMut<E> + 'w,
Scroll: AtomStateMut<E, (u32, u32)>,
Curs: AtomStateMut<E, Cursor>,
CursorStickX: AtomStateMut<E, Option<u32>>,
GlyphCache: AtomStateMut<E, LocalGlyphCache<E>> + Clone,
fn insert_text(&mut self, s: &str, ctx: &mut E::Context)
fn remove_selection_or_n(&mut self, n: u32, ctx: &mut E::Context)
fn remove_selection(&mut self, ctx: &mut E::Context) -> bool
fn move_cursor_x(&mut self, o: i32, skip_unselect: bool, ctx: &mut E::Context)
fn move_cursor_y( &mut self, o: i32, skip_unselect: bool, ctx: &mut E::Context, b: &Bounds, )
fn _m( &mut self, mouse_down: Option<MouseDown<E>>, mouse_pressed: bool, mouse: Offset, b: Bounds, ctx: &mut E::Context, )
fn scroll_to_cursor(&mut self, ctx: &mut E::Context, b: &Bounds)
Source§impl<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache> Widget<E> for TextBox<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache>where
E: Env,
ERenderer<E>: RenderStdWidgets<E>,
EEvent<E>: StdVarSup<E>,
E::Context: CtxStdState<E> + CtxClipboardAccess<E>,
Text: Caption<E> + Validation<E> + 'w,
Scroll: AtomState<E, (u32, u32)>,
Curs: AtomState<E, Cursor>,
CursorStickX: AtomState<E, Option<u32>>,
GlyphCache: AtomState<E, LocalGlyphCache<E>> + Clone,
impl<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache> Widget<E> for TextBox<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache>where
E: Env,
ERenderer<E>: RenderStdWidgets<E>,
EEvent<E>: StdVarSup<E>,
E::Context: CtxStdState<E> + CtxClipboardAccess<E>,
Text: Caption<E> + Validation<E> + 'w,
Scroll: AtomState<E, (u32, u32)>,
Curs: AtomState<E, Cursor>,
CursorStickX: AtomState<E, Option<u32>>,
GlyphCache: AtomState<E, LocalGlyphCache<E>> + Clone,
fn id(&self) -> E::WidgetID
Source§fn _render(&self, l: Link<'_, E>, r: &mut RenderLink<'_, E>)
fn _render(&self, l: Link<'_, E>, r: &mut RenderLink<'_, E>)
Source§fn _event_direct(&self, l: Link<'_, E>, e: &EventCompound<E>) -> EventResp
fn _event_direct(&self, l: Link<'_, E>, e: &EventCompound<E>) -> EventResp
Source§fn into_childs<'a>(self: Box<Self>) -> Vec<Resolvable<'a, E>>where
Self: 'a,
fn into_childs<'a>(self: Box<Self>) -> Vec<Resolvable<'a, E>>where
Self: 'a,
CHILDS Read more
Source§fn child_bounds(
&self,
_: Link<'_, E>,
_: &Bounds,
e: &EStyle<E>,
_: bool,
) -> Result<Vec<Bounds>, ()>
fn child_bounds( &self, _: Link<'_, E>, _: &Bounds, e: &EStyle<E>, _: bool, ) -> Result<Vec<Bounds>, ()>
LAYOUT Read more
Source§fn into_child<'a>(self: Box<Self>, _: usize) -> Result<Resolvable<'a, E>, ()>where
Self: 'a,
fn into_child<'a>(self: Box<Self>, _: usize) -> Result<Resolvable<'a, E>, ()>where
Self: 'a,
CHILDS Read more
Source§fn resolve<'s>(
&'s self,
i: E::WidgetPath,
) -> Result<Resolvable<'s, E>, GuionError<E>>
fn resolve<'s>( &'s self, i: E::WidgetPath, ) -> Result<Resolvable<'s, E>, GuionError<E>>
RESOLVING
Resolve a deep child item by the given relative path Read more
Resolve a deep child item by the given relative path Read more
Source§fn into_resolve<'w>(
self: Box<Self>,
i: E::WidgetPath,
) -> Result<Resolvable<'w, E>, GuionError<E>>where
Self: 'w,
fn into_resolve<'w>(
self: Box<Self>,
i: E::WidgetPath,
) -> Result<Resolvable<'w, E>, GuionError<E>>where
Self: 'w,
RESOLVING
Resolve a deep child item by the given relative path Read more
Resolve a deep child item by the given relative path Read more
Source§fn resolve_child(
&self,
sub_path: &E::WidgetPath,
) -> Result<(usize, E::WidgetPath), GuionError<E>>
fn resolve_child( &self, sub_path: &E::WidgetPath, ) -> Result<(usize, E::WidgetPath), GuionError<E>>
RESOLVING
To (or through) which child path would the given sub_path resolve? Read more
To (or through) which child path would the given sub_path resolve? Read more
Source§fn trace_bounds(
&self,
l: Link<'_, E>,
i: E::WidgetPath,
b: &Bounds,
e: &EStyle<E>,
force: bool,
) -> Result<Bounds, GuionError<E>>
fn trace_bounds( &self, l: Link<'_, E>, i: E::WidgetPath, b: &Bounds, e: &EStyle<E>, force: bool, ) -> Result<Bounds, GuionError<E>>
LAYOUT Read more
Source§fn in_parent_path(&self, parent: E::WidgetPath) -> E::WidgetPath
fn in_parent_path(&self, parent: E::WidgetPath) -> E::WidgetPath
👎Deprecated
RESOLVING
Attach widget’s id to the given parent path Read more
Attach widget’s id to the given parent path Read more
Source§fn resolved_by_path(
&self,
sub_path: &E::WidgetPath,
) -> Option<ResolvesThruResult<E>>
fn resolved_by_path( &self, sub_path: &E::WidgetPath, ) -> Option<ResolvesThruResult<E>>
👎Deprecated
fn _focus_on_mouse_down(&self) -> bool
fn _tabulate_by_tab(&self) -> bool
Source§fn _tabulate_next_child(
&self,
_l: Link<'_, E>,
origin: TabulateNextChildOrigin,
dir: TabulateDirection,
) -> TabulateNextChildResponse
fn _tabulate_next_child( &self, _l: Link<'_, E>, origin: TabulateNextChildOrigin, dir: TabulateDirection, ) -> TabulateNextChildResponse
Determines the next child in this widget in the tabulation step
fn _tabulate( &self, l: Link<'_, E>, op: TabulateOrigin<E>, dir: TabulateDirection, ) -> Result<TabulateResponse<E>, GuionError<E>>
fn inner(&self) -> Option<&dyn Widget<E>>
fn innest(&self) -> Option<&dyn Widget<E>>
fn debug_type_name(&self, dest: &mut Vec<&'static str>)
fn debugged_type_name(&self) -> Vec<&'static str>
Source§fn box_ref<'s>(&'s self) -> WidgetRef<'s, E>
fn box_ref<'s>(&'s self) -> WidgetRef<'s, E>
BOXING
Box reference of this widget immutable. Use
Box reference of this widget immutable. Use
WidgetMut::box_mut
to box into mutable WidgetRef
. Read moreSource§fn box_box<'w>(self: Box<Self>) -> WidgetRef<'w, E>where
Self: 'w,
fn box_box<'w>(self: Box<Self>) -> WidgetRef<'w, E>where
Self: 'w,
BOXING
Move widget into box immutable. Use
Move widget into box immutable. Use
WidgetMut::box_box_mut
to box into mutable WidgetRef
. Read moreSource§fn boxed<'w>(self) -> WidgetRef<'w, E>where
Self: Sized + 'w,
fn boxed<'w>(self) -> WidgetRef<'w, E>where
Self: Sized + 'w,
BOXING
Move widget into box immutable. Use
Move widget into box immutable. Use
WidgetMut::boxed_mut
to box into mutable WidgetRef
. Read morefn gen_diag_error_resolve_fail( &self, sub_path: &E::WidgetPath, op: &'static str, ) -> GuionError<E>
Source§impl<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache> WidgetMut<E> for TextBox<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache>where
E: Env,
ERenderer<E>: RenderStdWidgets<E>,
EEvent<E>: StdVarSup<E>,
E::Context: CtxStdState<E> + CtxClipboardAccess<E>,
Text: CaptionMut<E> + ValidationMut<E> + 'w,
Scroll: AtomStateMut<E, (u32, u32)>,
Curs: AtomStateMut<E, Cursor>,
CursorStickX: AtomStateMut<E, Option<u32>>,
GlyphCache: AtomStateMut<E, LocalGlyphCache<E>> + Clone,
impl<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache> WidgetMut<E> for TextBox<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache>where
E: Env,
ERenderer<E>: RenderStdWidgets<E>,
EEvent<E>: StdVarSup<E>,
E::Context: CtxStdState<E> + CtxClipboardAccess<E>,
Text: CaptionMut<E> + ValidationMut<E> + 'w,
Scroll: AtomStateMut<E, (u32, u32)>,
Curs: AtomStateMut<E, Cursor>,
CursorStickX: AtomStateMut<E, Option<u32>>,
GlyphCache: AtomStateMut<E, LocalGlyphCache<E>> + Clone,
Source§fn into_childs_mut<'a>(self: Box<Self>) -> Vec<ResolvableMut<'a, E>>where
Self: 'a,
fn into_childs_mut<'a>(self: Box<Self>) -> Vec<ResolvableMut<'a, E>>where
Self: 'a,
CHILDS Read more
Source§fn into_child_mut<'a>(
self: Box<Self>,
_: usize,
) -> Result<ResolvableMut<'a, E>, ()>where
Self: 'a,
fn into_child_mut<'a>(
self: Box<Self>,
_: usize,
) -> Result<ResolvableMut<'a, E>, ()>where
Self: 'a,
CHILDS Read more
Source§fn message(&mut self, m: E::Message)
fn message(&mut self, m: E::Message)
EVENT
An alternative way to pass mutations. See [Widgets::message] and [link::enqueue_message] Read more
An alternative way to pass mutations. See [Widgets::message] and [link::enqueue_message] Read more
fn _set_invalid(&mut self, v: bool)
Source§fn resolve_mut<'s>(
&'s mut self,
i: E::WidgetPath,
) -> Result<ResolvableMut<'s, E>, GuionError<E>>
fn resolve_mut<'s>( &'s mut self, i: E::WidgetPath, ) -> Result<ResolvableMut<'s, E>, GuionError<E>>
RESOLVING
Resolve a deep child item by the given relative path Read more
Resolve a deep child item by the given relative path Read more
Source§fn into_resolve_mut<'w>(
self: Box<Self>,
i: E::WidgetPath,
) -> Result<ResolvableMut<'w, E>, GuionError<E>>where
Self: 'w,
fn into_resolve_mut<'w>(
self: Box<Self>,
i: E::WidgetPath,
) -> Result<ResolvableMut<'w, E>, GuionError<E>>where
Self: 'w,
RESOLVING
Resolve a deep child item by the given relative path Read more
Resolve a deep child item by the given relative path Read more
Source§fn resolve_child_mut(
&mut self,
sub_path: &E::WidgetPath,
) -> Result<(usize, E::WidgetPath), GuionError<E>>
fn resolve_child_mut( &mut self, sub_path: &E::WidgetPath, ) -> Result<(usize, E::WidgetPath), GuionError<E>>
RESOLVING
To (or through) which child path would the given sub_path resolve? Read more
To (or through) which child path would the given sub_path resolve? Read more
fn inner_mut(&mut self) -> Option<&mut dyn WidgetMut<E>>
fn pass(self) -> Selfwhere
Self: Sized,
fn debug_type_name_mut(&mut self, dest: &mut Vec<&'static str>)
fn debugged_type_name_mut(&mut self) -> Vec<&'static str>
Source§fn box_mut<'s>(&'s mut self) -> WidgetRefMut<'s, E>
fn box_mut<'s>(&'s mut self) -> WidgetRefMut<'s, E>
BOXING
Box mut reference of this widget Read more
Box mut reference of this widget Read more
Source§fn box_box_mut<'w>(self: Box<Self>) -> WidgetRefMut<'w, E>where
Self: 'w,
fn box_box_mut<'w>(self: Box<Self>) -> WidgetRefMut<'w, E>where
Self: 'w,
BOXING
Move widget into box Read more
Move widget into box Read more
Source§fn boxed_mut<'w>(self) -> WidgetRefMut<'w, E>where
Self: Sized + 'w,
fn boxed_mut<'w>(self) -> WidgetRefMut<'w, E>where
Self: Sized + 'w,
BOXING
Move widget into box Read more
Move widget into box Read more
fn gen_diag_error_resolve_fail_mut( &mut self, sub_path: &E::WidgetPath, op: &'static str, ) -> GuionError<E>
impl<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache> ITextBox<E> for TextBox<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache>where
E: Env,
Text: 'w,
Scroll: 'w,
Curs: 'w,
CursorStickX: 'w,
GlyphCache: 'w,
Auto Trait Implementations§
impl<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache> Freeze for TextBox<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache>
impl<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache> RefUnwindSafe for TextBox<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache>where
<E as Env>::WidgetID: RefUnwindSafe,
<<E as Env>::Backend as Backend<E>>::Size: RefUnwindSafe,
<<E as Env>::Backend as Backend<E>>::Style: RefUnwindSafe,
Text: RefUnwindSafe,
Scroll: RefUnwindSafe,
Curs: RefUnwindSafe,
CursorStickX: RefUnwindSafe,
GlyphCache: RefUnwindSafe,
impl<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache> Send for TextBox<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache>
impl<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache> Sync for TextBox<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache>
impl<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache> Unpin for TextBox<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache>
impl<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache> !UnwindSafe for TextBox<'w, E, Text, Scroll, Curs, CursorStickX, GlyphCache>
Blanket Implementations§
Source§impl<E, T> AsWidget<E> for T
impl<E, T> AsWidget<E> for T
Source§fn as_ref(&self) -> Resolvable<'_, E>
fn as_ref(&self) -> Resolvable<'_, E>
Source§fn into_ref<'w>(self) -> Resolvable<'w, E>where
T: 'w,
fn into_ref<'w>(self) -> Resolvable<'w, E>where
T: 'w,
Source§impl<E, T> AsWidgetMut<E> for T
impl<E, T> AsWidgetMut<E> for T
Source§fn as_mut(&mut self) -> ResolvableMut<'_, E>
fn as_mut(&mut self) -> ResolvableMut<'_, E>
IMPL
ResolvableMut::from_widget
can be used to create a ResolvableMut
from a (immediate) WidgetMut
Read moreSource§fn into_mut<'w>(self) -> ResolvableMut<'w, E>where
T: 'w,
fn into_mut<'w>(self) -> ResolvableMut<'w, E>where
T: 'w,
IMPL
ResolvableMut::from_widget
can be used to create a ResolvableMut
from a (immediate) WidgetMut
Read moreSource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more