#[repr(C)]pub struct KuiMenuAction {
pub size: u32,
pub kind: u32,
pub text: KuiStr,
pub html: KuiStr,
pub x: f32,
pub y: f32,
}Expand description
What choosing a context-menu row left for the host
(kui_take_menu_action): the clipboard, which is the host’s in this
library. KUI_MENU_ACTION_SET_CLIPBOARD carries the text to put there;
KUI_MENU_ACTION_PASTE carries nothing and asks for what is there,
which the host delivers back with kui_input_paste (or
kui_input_commit); KUI_MENU_ACTION_SET_CLIPBOARD_SECRET carries a
secret to put there marked concealed and transient.
Fields§
§size: u32[out] reservation; see KUI_MENU_ACTION_INIT.
kind: u32A KUI_MENU_ACTION_* kind.
text: KuiStrBorrowed until the next kui_take_menu_action on this context.
html: KuiStrThe same selection with the formatting the core knows about, for a
host offering a second clipboard flavour.
Empty when there is none to carry — and never a replacement for
text: a clipboard whose only flavour is HTML pastes markup into
every plain-text field on the machine.
x: f32KUI_MENU_ACTION_LOOK_UP only: where to anchor the panel — the
baseline origin of the selection’s first line, logical viewport
px. Zero for every other kind.
y: f32Trait Implementations§
Source§impl Clone for KuiMenuAction
impl Clone for KuiMenuAction
impl Copy for KuiMenuAction
Auto Trait Implementations§
impl !Send for KuiMenuAction
impl !Sync for KuiMenuAction
impl Freeze for KuiMenuAction
impl RefUnwindSafe for KuiMenuAction
impl Unpin for KuiMenuAction
impl UnsafeUnpin for KuiMenuAction
impl UnwindSafe for KuiMenuAction
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.