[][src]Struct cat_engine::DynamicWindow

pub struct DynamicWindow<'a, O: PartialEq> { /* fields omitted */ }

Окно, которое использует "страницы" как типажи-объекты для обработки событий. A window that uses 'pages' as trait objects to handle the events.

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

"Страницы" можно переключать на ходу. Смена "страницы" до запуска цикла вызывает панику.

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

A 'page' may be switched while the event loop is running. Panics if a 'page' is changed before starting the cycle.

Implementations

impl<'a, O: PartialEq> DynamicWindow<'a, O>[src]

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

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

Creates the window.

pub fn set_page_raw(&mut self, page: PageRef<'a, O>)[src]

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

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

Sets the page.

It starts to operate with the next event.

pub fn set_page(&mut self, page: PageRef<'a, O>)[src]

Устанавливает новую страницу, сохраняя прошлую.

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

Sets a new page saving the last one.

It starts to operate with the next event.

pub fn change_page(&mut self, page: PageRef<'a, O>) -> Option<PageRef<'a, O>>[src]

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

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

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

Sets the page.

It starts to operate with the next event.

Returns the last page.

pub fn take_old_page(&mut self) -> Option<PageRef<'a, O>>[src]

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

Returns the last page.

pub fn run(self, page: PageRef<'a, O>) -> O[src]

Запускает обработчик событий с данной страницей.

Starts the event loop with the given page.

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

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

Возвращает Err, если обработчик уже остановлен.

Stops the event loop by sending the stopping event.

Returns Err if the loop is already stopped.

Trait Implementations

impl<'a, O: PartialEq> Window for DynamicWindow<'a, O>[src]

Auto Trait Implementations

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

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

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

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

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

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, 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.