Struct SendToBox
pub struct SendToBox { /* private fields */ }Expand description
The box beside a context menu.
Implementations§
§impl SendToBox
impl SendToBox
pub fn new() -> SendToBox
pub fn is_open(&self) -> bool
pub fn is_drawn(&self) -> bool
pub fn is_drawn(&self) -> bool
Whether any of it is on screen: open, arriving with its menu, or leaving with it.
pub fn is_focused(&self) -> bool
pub fn is_focused(&self) -> bool
The keyboard is in the box (Tab brought it here, or it opened).
pub fn recipients(&self) -> &[Recipient]
pub fn recipients(&self) -> &[Recipient]
The recipients on their chips, the new agent among them.
pub fn addressed(&self) -> bool
pub fn addressed(&self) -> bool
Whether the session named whom it goes to, so nobody is searched for and the chips stay.
pub fn subjects(&self) -> &[SharedSelection]
pub fn subjects(&self) -> &[SharedSelection]
What the message is about, on its chips.
pub fn hovered_row(&self) -> Option<usize>
pub fn hovered_row(&self) -> Option<usize>
The row the keyboard is on among the recipients found.
pub fn focus(&self) -> SendToFocus
pub fn focus(&self) -> SendToFocus
Which field the keyboard is in.
pub fn set_about(&mut self, about: Option<SharedSelection>)
pub fn set_about(&mut self, about: Option<SharedSelection>)
Say what the box is about: the chip it starts with.
pub fn open(&mut self, draft: Option<&str>, to: &[Recipient])
pub fn open(&mut self, draft: Option<&str>, to: &[Recipient])
Show the box about what the menu acts on, with draft in its message
field (a sentence typed into the menu that no row answered), and to
to when the session names whom it goes to — the one place a report
goes — else to the agent a message makes, which the person may change.
pub fn unfocus(&mut self)
pub fn unfocus(&mut self)
Open without the keyboard: a menu opened on something carries the box beside it, and the person’s typing still narrows the menu’s rows until they send or Tab into it.
pub fn close(&mut self)
pub fn close(&mut self)
Put it away with its menu: it leaves as it stood, so what it showed
is kept until the next Self::open clears it.
pub fn set_viewport(&mut self, viewport: Option<Rect>)
pub fn place(&mut self, menu: Rect, viewport: Option<Rect>)
pub fn place(&mut self, menu: Rect, viewport: Option<Rect>)
Stand the box beside menu: on its trailing side with the same top,
or its leading side where the window leaves no room, or under it where
neither side holds it, inside the window.
pub fn handle_event(
&mut self,
event: &WindowEvent,
ctx: &mut EventCtx<'_>,
) -> bool
pub fn handle_event( &mut self, event: &WindowEvent, ctx: &mut EventCtx<'_>, ) -> bool
Take a key, a press or a text event while the box is open. Whether it took it.
pub fn drain_answer(&mut self) -> bool
pub fn drain_answer(&mut self) -> bool
Take what the one search answered for this box, once. Whether it answered.
pub fn press(&mut self, at: Point) -> bool
pub fn press(&mut self, at: Point) -> bool
A press at at on one of the box’s parts. Whether it was in the box.
pub fn focus_first(&mut self)
pub fn focus_first(&mut self)
Put the keyboard in the box’s first field (the menu’s Tab brought it here).
pub fn can_send(&self) -> bool
pub fn can_send(&self) -> bool
Whether the box has something to send: whom it goes to, and either the words or what they are about. A subject on its own is the message — a task sent to someone says what it is without a sentence beside it.
pub fn send(&mut self)
pub fn send(&mut self)
Send what the box holds: one request the session acts on as the person.
pub fn paint(
&mut self,
scene: &mut Scene,
transform: Affine,
text_renderer: &mut TextRenderer,
theme: &Theme,
)
pub fn paint( &mut self, scene: &mut Scene, transform: Affine, text_renderer: &mut TextRenderer, theme: &Theme, )
Draw the box: the floating panel its menu stands in, its chips and fields on it.
pub fn accessibility(&self) -> Option<AccessNode>
pub fn accessibility(&self) -> Option<AccessNode>
What assistive technology reads: the recipient field with its chips, what the search found, the subjects, the message and Send, in the order the keyboard visits them.
pub fn perform_semantic_action(&mut self, target: &str, action: &Action) -> bool
pub fn perform_semantic_action(&mut self, target: &str, action: &Action) -> bool
Assistive technology pressed or wrote in one of the box’s parts.
pub fn needs_redraw(&self) -> bool
pub fn needs_redraw(&self) -> bool
Whether the box needs another frame: the search answered, a chip was added, the caret moved.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SendToBox
impl !RefUnwindSafe for SendToBox
impl Send for SendToBox
impl !Sync for SendToBox
impl Unpin for SendToBox
impl UnsafeUnpin for SendToBox
impl !UnwindSafe for SendToBox
Blanket Implementations§
Source§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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more