[][src]Enum kas::TkAction

#[must_use]pub enum TkAction {
    None,
    Redraw,
    RegionMoved,
    Popup,
    SetSize,
    Resize,
    Reconfigure,
    Close,
    CloseAll,
}

Action required after processing

This type is returned by many widgets on modification to self and is tracked internally by event::Manager to determine which updates are needed to the UI.

All variants are progressive: e.g. Reconfigure implies all actions needed to handle Popup, RegionMoved and Redraw.

Two TkAction values may be combined by taking their maximum. Since this is a common operation, the + operator is defined to do this job, together with += on TkAction and event::Manager.

Users receiving a value of this type from a widget update method should generally call *mgr += action; during event handling. Prior to starting the event loop (toolkit.run()), these values can be ignored.

Variants

None

No action needed

Redraw

Whole window requires redrawing

Note that Manager::redraw can instead be used for more selective redrawing, if supported by the toolkit.

RegionMoved

Some widgets within a region moved

Used when a pop-up is closed or a region adjusted (e.g. scroll or switch tab) to update which widget is under the mouse cursor / touch events. Identifier is that of the parent widget/window encapsulating the region.

Popup

A pop-up opened/closed/needs resizing

SetSize

Reset size of all widgets without recalculating requirements

Resize

Resize all widgets

Reconfigure

Whole window requires reconfiguring

Configuring widgets assigns WidgetId identifiers and calls kas::WidgetConfig::configure.

Close

The window or pop-up should be closed

CloseAll

All windows should close (toolkit exit)

Trait Implementations

impl Add<TkAction> for TkAction[src]

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<TkAction> for TkAction[src]

impl<'a> AddAssign<TkAction> for Manager<'a>[src]

impl Clone for TkAction[src]

impl Copy for TkAction[src]

impl Debug for TkAction[src]

impl Eq for TkAction[src]

impl Ord for TkAction[src]

impl PartialEq<TkAction> for TkAction[src]

impl PartialOrd<TkAction> for TkAction[src]

impl StructuralEq for TkAction[src]

impl StructuralPartialEq for TkAction[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.