[−][src]Struct cat_engine::DynamicWindow
Окно, использует 'страницы' как типажи-объекты. 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]
F: FnOnce(Vec<MonitorHandle>, &mut WindowSettings),
Создаёт окно.
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]
&mut self,
page: &'a mut dyn WindowPage<'a, Window = Self>
) -> Option<&'a mut dyn WindowPage<'a, Window = DynamicWindow<'a>>>
Устанавливает страницу.
Управление переходит ей со следующего события.
Возвращает прошлую страницу.
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]
&mut self
) -> Option<&'a mut dyn WindowPage<'a, Window = DynamicWindow<'a>>>
Возвращает прошлую страницу.
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
fn window_base_mut(&mut self) -> &mut WindowBase<InnerWindowEvent>
[src]
fn window_base(&self) -> &WindowBase<InnerWindowEvent>
[src]
fn raw(
window_builder: WindowBuilder,
context_builder: ContextBuilder<NotCurrent>,
graphics_settings: GraphicsSettings,
event_loop: EventLoop<InnerWindowEvent>,
initial_colour: Option<Colour>,
mouse_cursor_icon_settings: MouseCursorIconSettings<PathBuf>
) -> Result<DynamicWindow<'a>, DisplayCreationError>
[src]
window_builder: WindowBuilder,
context_builder: ContextBuilder<NotCurrent>,
graphics_settings: GraphicsSettings,
event_loop: EventLoop<InnerWindowEvent>,
initial_colour: Option<Colour>,
mouse_cursor_icon_settings: MouseCursorIconSettings<PathBuf>
) -> Result<DynamicWindow<'a>, 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 graphics(&mut self) -> &mut Graphics2D
[src]
fn draw_raw<F: FnOnce(&mut DrawParameters, &mut Frame)>(
&self,
f: F
) -> Result<(), SwapBuffersError>
[src]
&self,
f: F
) -> Result<(), SwapBuffersError>
fn draw<F: FnOnce(&mut DrawParameters, &mut Graphics)>(
&self,
f: F
) -> Result<(), SwapBuffersError>
[src]
&self,
f: F
) -> Result<(), SwapBuffersError>
fn set_alpha(&mut self, alpha: f32)
[src]
fn set_smooth(&mut self, smooth: f32)
[src]
fn set_new_smooth(&mut self, smooth: f32)
[src]
fn draw_smooth<F: FnOnce(f32, &mut DrawParameters, &mut Graphics)>(
&mut self,
f: F
) -> Result<f32, SwapBuffersError>
[src]
&mut self,
f: F
) -> Result<f32, SwapBuffersError>
fn screenshot(&self) -> Option<DynamicImage>
[src]
fn save_screenshot<P: AsRef<Path>>(&self, path: P)
[src]
fn set_user_cursor_visible(&mut self, visible: bool)
[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]
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>,