[][src]Trait cat_engine::Window

pub trait Window: Sized {
    pub fn window_base(&self) -> &WindowBase;
pub fn window_base_mut(&mut self) -> &mut WindowBase;
pub fn raw(
        window_builder: WindowBuilder,
        context_builder: ContextBuilder<'_, NotCurrent>,
        graphics_settings: GraphicsSettings,
        event_loop: EventLoop<InnerWindowEvent>,
        general_settings: GeneralSettings
    ) -> Result<Self, DisplayCreationError>; pub fn new<F>(setting: F) -> Result<Self, DisplayCreationError>
    where
        F: FnOnce(Vec<MonitorHandle>, &mut WindowSettings)
, { ... }
pub fn display(&self) -> &Display { ... }
pub fn graphics2d(&mut self) -> &mut Graphics2D { ... }
pub fn draw<F: FnOnce(&mut DrawParameters<'_>, &mut Graphics<'_, '_>)>(
        &mut self,
        f: F
    ) -> Result<(), SwapBuffersError> { ... }
pub fn screenshot(&self) -> Option<DynamicImage> { ... }
pub fn save_screenshot<P: AsRef<Path>>(&self, path: P) { ... } }

Типаж, помогающий создать более сложное окно на базе 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]

Loading content...

Provided methods

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

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]

Выполняет замыкание и рисует пользовательский курсор мыши, если установлен.

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.

Loading content...

Implementors

impl Window for DefaultWindow[src]

impl Window for PagedWindow[src]

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

Loading content...