[][src]Struct cat_engine::DynamicWindow

pub struct DynamicWindow<'a> { /* fields omitted */ }

Окно, использует 'страницы' как типажи-объекты. A window uses 'pages' as trait-objects.

Все события прописываются с помощь типажа WindowPage и обработываются сразу же после их появления.

Если страница не установлена, то все собития игнорируются.

All the events are implemented with WindowPage and handled immediately after emited.

If no page is set, all the events are ignored.

Implementations

impl<'a> DynamicWindow<'a>[src]

pub fn new<F>(setting: F) -> Result<DynamicWindow<'a>, DisplayCreationError> where
    F: FnOnce(Vec<MonitorHandle>, &mut WindowSettings), 
[src]

Создаёт окно.

Creates the window.

pub fn set_page(&mut self, page: &'a mut dyn WindowPage<'a, Window = Self>)[src]

Устанавливает страницу.

Управление переходит ей со следующего события.

Sets the page.

It starts to operate with the next event.

pub fn change_page(
    &mut self,
    page: &'a mut dyn WindowPage<'a, Window = Self>
) -> Option<&'a mut dyn WindowPage<'a, Window = DynamicWindow<'a>>>
[src]

Устанавливает страницу.

Управление переходит ей со следующего события.

Возвращает прошлую страницу.

Sets the page.

It starts to operate with the next event.

Returns the last page.

pub fn take_old_page(
    &mut self
) -> Option<&'a mut dyn WindowPage<'a, Window = DynamicWindow<'a>>>
[src]

Возвращает прошлую страницу.

Returns the last page.

pub fn run(self)[src]

Запускает текущую страницу.

Starts the current page.

pub fn stop_events(&self) -> Result<(), EventLoopClosed<InnerWindowEvent>>[src]

Останавливает обработку событий, отправляя событие для остановки, если она запущена.

Stops the event listener by sending the stopping event if it's running.

Trait Implementations

impl<'a> Window for DynamicWindow<'a>[src]

type UserEvent = InnerWindowEvent

Auto Trait Implementations

impl<'a> !RefUnwindSafe for DynamicWindow<'a>

impl<'a> !Send for DynamicWindow<'a>

impl<'a> !Sync for DynamicWindow<'a>

impl<'a> Unpin for DynamicWindow<'a>

impl<'a> !UnwindSafe for DynamicWindow<'a>

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> SetParameter for T

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.