[−][src]Struct cat_engine::PagedWindow
Окно, которое использует "страницы" и замыкания для обработки событий. A window that uses 'pages' and closures to handle the events.
Все события прописываются с помощь типажа WindowPage
и обработываются сразу же после их появления.
All the events are implemented with WindowPage
and handled immediately after emited.
Implementations
impl PagedWindow
[src]
pub fn new<F>(setting: F) -> Result<PagedWindow, DisplayCreationError> where
F: FnOnce(Vec<MonitorHandle>, &mut WindowSettings),
[src]
F: FnOnce(Vec<MonitorHandle>, &mut WindowSettings),
Создаёт окно.
Creates the window.
pub fn run<F: FnMut(&mut PagedWindow, WindowEvent)>(&mut self, handler: F)
[src]
Запускает обработку событий с помощью данного замыкания.
Starts event handling with the given closure.
pub fn run_page<O: PartialEq, P: WindowPage<'static, Window = PagedWindow, Output = O>>(
&mut self,
page: &mut P
) -> O
[src]
&mut self,
page: &mut P
) -> O
Запускает данную страницу.
Starts 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.
pub fn into_default_window(self) -> DefaultWindow
[src]
Переводит в DefaultWindow
.
Сохраняет состояние окна при feature = "auto_hide"
(свёрнутое или нет).
Converts into the DefaultWindow
.
Saves the 'auto_hide' feature state (the window is hidden or not).
pub fn into_dynamic_window<'a, O: PartialEq>(self) -> DynamicWindow<'a, O>
[src]
Переводит в DynamicWindow
.
Не учитывает состояние окна при feature = "auto_hide"
(свёрнутое или нет).
Converts into the DynamicWindow
.
Ignores the 'auto_hide' feature state (the window hidden or not).
Trait Implementations
impl Window for PagedWindow
[src]
fn window_base(&self) -> &WindowBase
[src]
fn window_base_mut(&mut self) -> &mut WindowBase
[src]
fn raw(
window_builder: WindowBuilder,
context_builder: ContextBuilder<'_, NotCurrent>,
graphics_settings: GraphicsSettings,
event_loop: EventLoop<InnerWindowEvent>,
general_settings: GeneralSettings
) -> Result<PagedWindow, DisplayCreationError>
[src]
window_builder: WindowBuilder,
context_builder: ContextBuilder<'_, NotCurrent>,
graphics_settings: GraphicsSettings,
event_loop: EventLoop<InnerWindowEvent>,
general_settings: GeneralSettings
) -> Result<PagedWindow, DisplayCreationError>
fn new<F>(setting: F) -> Result<Self, DisplayCreationError> where
F: FnOnce(Vec<MonitorHandle>, &mut WindowSettings),
[src]
F: FnOnce(Vec<MonitorHandle>, &mut WindowSettings),
fn display(&self) -> &Display
[src]
fn graphics2d(&mut self) -> &mut Graphics2D
[src]
fn draw<F: FnOnce(&mut DrawParameters<'_>, &mut Graphics<'_, '_>)>(
&mut self,
f: F
) -> Result<(), SwapBuffersError>
[src]
&mut self,
f: F
) -> Result<(), SwapBuffersError>
fn screenshot(&self) -> Option<DynamicImage>
[src]
fn save_screenshot<P: AsRef<Path>>(&self, path: P)
[src]
Auto Trait Implementations
impl !RefUnwindSafe for PagedWindow
impl !Send for PagedWindow
impl !Sync for PagedWindow
impl Unpin for PagedWindow
impl !UnwindSafe for PagedWindow
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,