[][src]Enum kas::TkAction

#[must_use]pub enum TkAction {
    None,
    Redraw,
    RegionMoved,
    Popup,
    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

This action should be emitted when e.g. a scroll-region is moved or widget layout is adjusted to allow for the fact that coordinates (e.g. mouse position) have changed relative to widgets.

Popup

A pop-up opened/closed/needs resizing

Reconfigure

Whole window requires reconfiguring

Configuring widgets assigns WidgetId identifiers, updates event::Manager state and resizes all widgets.

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<Src, Scheme> ApproxFrom<Src, Scheme> for Src where
    Scheme: ApproxScheme
[src]

type Err = NoError

The error type produced by a failed conversion.

impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
    Dst: ApproxFrom<Src, Scheme>,
    Scheme: ApproxScheme
[src]

type Err = <Dst as ApproxFrom<Src, Scheme>>::Err

The error type produced by a failed conversion.

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

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

impl<T, Dst> ConvAsUtil<Dst> for T[src]

impl<T> ConvUtil for T[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<Src> TryFrom<Src> for Src[src]

type Err = NoError

The error type produced by a failed conversion.

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<Src, Dst> TryInto<Dst> for Src where
    Dst: TryFrom<Src>, 
[src]

type Err = <Dst as TryFrom<Src>>::Err

The error type produced by a failed conversion.

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.

impl<Src> ValueFrom<Src> for Src[src]

type Err = NoError

The error type produced by a failed conversion.

impl<Src, Dst> ValueInto<Dst> for Src where
    Dst: ValueFrom<Src>, 
[src]

type Err = <Dst as ValueFrom<Src>>::Err

The error type produced by a failed conversion.