[][src]Struct cat_engine::DynamicWindow

pub struct DynamicWindow<'a> { /* 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.

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: PageRef<'a>)[src]

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

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

Sets the page.

It starts to operate with the next event.

pub fn change_page(&mut self, page: PageRef<'a>) -> Option<PageRef<'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<PageRef<'a>>[src]

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

Returns the last page.

pub fn run(self)[src]

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

Starts the current page.

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

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

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

Stops the event listener by sending the stopping event.

Returns Err if the listener has been already stopped.

Trait Implementations

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

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.