[−][src]Struct newt::callbacks::HelpCallback
A callback called when F1
is pressed while a Form
is running.
Methods
impl<FN, T> HelpCallback<FN, T> where
FN: FnMut(&Form, Option<&T>),
[src]
FN: FnMut(&Form, Option<&T>),
pub fn new(
_scrollbar: Option<&VerticalScrollbar>,
form_flags: i32,
function: FN,
data: Option<T>
) -> (Form, Box<HelpCallback<FN, T>>)
[src]
_scrollbar: Option<&VerticalScrollbar>,
form_flags: i32,
function: FN,
data: Option<T>
) -> (Form, Box<HelpCallback<FN, T>>)
Initialize a new Form
and associate the function or closure
function
as a HelpCallback. The callback will be executed
when F1
is pressed while the Form
is running. The new Form
and HelpCallback
are returned as a tuple pair.
_scrollbar
- AVerticalScrollbar
to be attached to the created form unused.form_flags
- The flags the form is to be initialized with.function
- The function or closure to associate with theForm
.data
- The optional user data to pass to the function.
Auto Trait Implementations
impl<FN, T> Send for HelpCallback<FN, T> where
FN: Send,
T: Send,
FN: Send,
T: Send,
impl<FN, T> Sync for HelpCallback<FN, T> where
FN: Sync,
T: Sync,
FN: Sync,
T: Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,