[−][src]Trait cat_engine::Window
Типаж, помогающий создать более сложное окно на базе WindowBase
.
A trait that helps to create a more complex window based on a WindowBase
.
Required methods
pub fn window_base(&self) -> &WindowBase
[src]
pub fn window_base_mut(&mut self) -> &mut WindowBase
[src]
pub fn raw(
window_builder: WindowBuilder,
context_builder: ContextBuilder<'_, NotCurrent>,
graphics_settings: GraphicsSettings,
event_loop: EventLoop<InnerWindowEvent>,
general_settings: GeneralSettings
) -> Result<Self, DisplayCreationError>
[src]
window_builder: WindowBuilder,
context_builder: ContextBuilder<'_, NotCurrent>,
graphics_settings: GraphicsSettings,
event_loop: EventLoop<InnerWindowEvent>,
general_settings: GeneralSettings
) -> Result<Self, DisplayCreationError>
Provided methods
pub fn new<F>(setting: F) -> Result<Self, DisplayCreationError> where
F: FnOnce(Vec<MonitorHandle>, &mut WindowSettings),
[src]
F: FnOnce(Vec<MonitorHandle>, &mut WindowSettings),
pub fn display(&self) -> &Display
[src]
pub fn graphics2d(&mut self) -> &mut Graphics2D
[src]
Возвращает графическую основу.
Returns the graphics base.
pub fn draw<F: FnOnce(&mut DrawParameters<'_>, &mut Graphics<'_, '_>)>(
&mut self,
f: F
) -> Result<(), SwapBuffersError>
[src]
&mut self,
f: F
) -> Result<(), SwapBuffersError>
Выполняет замыкание и рисует пользовательский курсор мыши, если установлен.
Executes the closure and draws user's mouse cursor if set.
pub fn screenshot(&self) -> Option<DynamicImage>
[src]
Возвращает скриншот.
Returns a screenshot.
pub fn save_screenshot<P: AsRef<Path>>(&self, path: P)
[src]
Сохраняет скриншот в формате png.
Saves a screenshot in png format.
Implementors
impl Window for DefaultWindow
[src]
pub fn window_base(&self) -> &WindowBase
[src]
pub fn window_base_mut(&mut self) -> &mut WindowBase
[src]
pub fn raw(
window_builder: WindowBuilder,
context_builder: ContextBuilder<'_, NotCurrent>,
graphics_settings: GraphicsSettings,
event_loop: EventLoop<InnerWindowEvent>,
general_settings: GeneralSettings
) -> Result<DefaultWindow, DisplayCreationError>
[src]
window_builder: WindowBuilder,
context_builder: ContextBuilder<'_, NotCurrent>,
graphics_settings: GraphicsSettings,
event_loop: EventLoop<InnerWindowEvent>,
general_settings: GeneralSettings
) -> Result<DefaultWindow, DisplayCreationError>
impl Window for PagedWindow
[src]
pub fn window_base(&self) -> &WindowBase
[src]
pub fn window_base_mut(&mut self) -> &mut WindowBase
[src]
pub 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>
impl<'a, O: PartialEq> Window for DynamicWindow<'a, O>
[src]
pub fn window_base_mut(&mut self) -> &mut WindowBase
[src]
pub fn window_base(&self) -> &WindowBase
[src]
pub fn raw(
window_builder: WindowBuilder,
context_builder: ContextBuilder<'_, NotCurrent>,
graphics_settings: GraphicsSettings,
event_loop: EventLoop<InnerWindowEvent>,
general_settings: GeneralSettings
) -> Result<DynamicWindow<'a, O>, DisplayCreationError>
[src]
window_builder: WindowBuilder,
context_builder: ContextBuilder<'_, NotCurrent>,
graphics_settings: GraphicsSettings,
event_loop: EventLoop<InnerWindowEvent>,
general_settings: GeneralSettings
) -> Result<DynamicWindow<'a, O>, DisplayCreationError>