[][src]Trait cat_engine::WindowPage

pub trait WindowPage<'a> {
    type Window: Window + 'a;
    type Output;
    pub fn on_window_close_requested(&mut self, window: &mut Self::Window);
pub fn on_update_requested(&mut self, window: &mut Self::Window);
pub fn on_redraw_requested(&mut self, window: &mut Self::Window);
pub fn on_mouse_pressed(
        &mut self,
        window: &mut Self::Window,
        button: MouseButton
    );
pub fn on_mouse_released(
        &mut self,
        window: &mut Self::Window,
        button: MouseButton
    );
pub fn on_mouse_scrolled(
        &mut self,
        window: &mut Self::Window,
        scroll: MouseScrollDelta
    );
pub fn on_mouse_moved(
        &mut self,
        window: &mut Self::Window,
        position: [f32; 2]
    );
pub fn on_keyboard_pressed(
        &mut self,
        window: &mut Self::Window,
        button: KeyboardButton
    );
pub fn on_keyboard_released(
        &mut self,
        window: &mut Self::Window,
        button: KeyboardButton
    );
pub fn on_character_recieved(
        &mut self,
        window: &mut Self::Window,
        character: char
    );
pub fn on_window_resized(
        &mut self,
        window: &mut Self::Window,
        new_size: [u32; 2]
    );
pub fn on_window_moved(
        &mut self,
        window: &mut Self::Window,
        position: [i32; 2]
    );
pub fn on_window_focused(
        &mut self,
        window: &mut Self::Window,
        focused: bool
    );
pub fn on_suspended(&mut self, window: &mut Self::Window);
pub fn on_resumed(&mut self, window: &mut Self::Window);
pub fn on_modifiers_changed(
        &mut self,
        window: &mut Self::Window,
        modifiers: ModifiersState
    );
pub fn on_file_dropped(&mut self, window: &mut Self::Window, path: PathBuf);
pub fn on_file_hovered(&mut self, window: &mut Self::Window, path: PathBuf);
pub fn on_file_hovered_canceled(&mut self, window: &mut Self::Window);
pub fn on_event_loop_closed(
        &mut self,
        window: &mut Self::Window
    ) -> Self::Output; }

Типаж для создания страниц окна. A trait for implementing window pages.

Associated Types

type Window: Window + 'a[src]

type Output[src]

The type of output when the 'page' (for the PagedWindow)/ window (for the DynamicWindow) is closed.

Loading content...

Required methods

pub fn on_window_close_requested(&mut self, window: &mut Self::Window)[src]

Called when the window has been requested to close.

pub fn on_update_requested(&mut self, window: &mut Self::Window)[src]

feature != "lazy"

pub fn on_redraw_requested(&mut self, window: &mut Self::Window)[src]

pub fn on_mouse_pressed(
    &mut self,
    window: &mut Self::Window,
    button: MouseButton
)
[src]

pub fn on_mouse_released(
    &mut self,
    window: &mut Self::Window,
    button: MouseButton
)
[src]

pub fn on_mouse_scrolled(
    &mut self,
    window: &mut Self::Window,
    scroll: MouseScrollDelta
)
[src]

pub fn on_mouse_moved(&mut self, window: &mut Self::Window, position: [f32; 2])[src]

pub fn on_keyboard_pressed(
    &mut self,
    window: &mut Self::Window,
    button: KeyboardButton
)
[src]

pub fn on_keyboard_released(
    &mut self,
    window: &mut Self::Window,
    button: KeyboardButton
)
[src]

pub fn on_character_recieved(
    &mut self,
    window: &mut Self::Window,
    character: char
)
[src]

pub fn on_window_resized(
    &mut self,
    window: &mut Self::Window,
    new_size: [u32; 2]
)
[src]

pub fn on_window_moved(&mut self, window: &mut Self::Window, position: [i32; 2])[src]

pub fn on_window_focused(&mut self, window: &mut Self::Window, focused: bool)[src]

Called when the window loses or gains focus.

pub fn on_suspended(&mut self, window: &mut Self::Window)[src]

pub fn on_resumed(&mut self, window: &mut Self::Window)[src]

pub fn on_modifiers_changed(
    &mut self,
    window: &mut Self::Window,
    modifiers: ModifiersState
)
[src]

pub fn on_file_dropped(&mut self, window: &mut Self::Window, path: PathBuf)[src]

feature = "file_drop"

pub fn on_file_hovered(&mut self, window: &mut Self::Window, path: PathBuf)[src]

feature = "file_drop"

pub fn on_file_hovered_canceled(&mut self, window: &mut Self::Window)[src]

feature = "file_drop"

pub fn on_event_loop_closed(
    &mut self,
    window: &mut Self::Window
) -> Self::Output
[src]

Called when the event loop has been stopped.

The 'page' (for the PagedWindow)/ window (for the DynamicWindow) is closed after this function is called.

Loading content...

Implementors

Loading content...