[−][src]Struct kas::control::TextButton
A push-button with a text label
Methods
impl<R, H: Fn() -> R> TextButton<H>
[src]
impl<R, H: Fn() -> R> TextButton<H>
pub fn new<S: Into<String>>(text: S, handler: H) -> Self | [src] |
Construct a button with a given text
label.
The handler
is called when the button is pressed, and its result is
returned from the event handler.
Trait Implementations
impl<H: 'static> Layout for TextButton<H>
[src]
impl<H: 'static> Layout for TextButton<H>
fn child_layout(&self) -> ChildLayout | [src] |
fn grid_pos(&self, _index: usize) -> Option<GridPos> | [src] |
fn sync_size(&mut self, tk: &dyn TkWidget) | [src] |
impl<H: 'static> Core for TextButton<H>
[src]
impl<H: 'static> Core for TextButton<H>
fn number(&self) -> u32 | [src] |
fn set_number(&mut self, number: u32) | [src] |
fn tkd(&self) -> TkData | [src] |
fn set_tkd(&mut self, tkd: TkData) | [src] |
fn rect(&self) -> &Rect | [src] |
fn rect_mut(&mut self) -> &mut Rect | [src] |
impl<H: 'static> Widget for TextButton<H>
[src]
impl<H: 'static> Widget for TextButton<H>
fn class(&self) -> Class | [src] |
fn len(&self) -> usize | [src] |
fn get(&self, _index: usize) -> Option<&dyn Widget> | [src] |
fn get_mut(&mut self, _index: usize) -> Option<&mut dyn Widget> | [src] |
impl<H> HasText for TextButton<H>
[src]
impl<H> HasText for TextButton<H>
impl<R: From<NoResponse>, H: Fn() -> R> Handler for TextButton<H>
[src]
impl<R: From<NoResponse>, H: Fn() -> R> Handler for TextButton<H>
type Response = R
Type of message returned by this handler. Read more
fn handle_action( | [src] |
impl<H: Clone + 'static> Clone for TextButton<H>
[src]
impl<H: Clone + 'static> Clone for TextButton<H>
fn clone(&self) -> TextButton<H> | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source
. Read more
impl<H: Default + 'static> Default for TextButton<H>
[src]
impl<H: Default + 'static> Default for TextButton<H>
fn default() -> TextButton<H> | [src] |
impl<H> Debug for TextButton<H>
[src]
impl<H> Debug for TextButton<H>
Auto Trait Implementations
impl<H> Send for TextButton<H> where
H: Send,
impl<H> Send for TextButton<H> where
H: Send,
impl<H> Sync for TextButton<H> where
H: Sync,
impl<H> Sync for TextButton<H> where
H: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)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> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)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 for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |