Struct NSWindow

Source
pub struct NSWindow<T = ()> {
    pub ptr: ShareId<Object>,
    pub delegate: Option<Box<T>>,
}
Expand description

A Window represents your way of interacting with an NSWindow. It wraps the various moving pieces to enable you to focus on reacting to lifecycle methods and doing your thing.

Fields§

§ptr: ShareId<Object>

Represents an NS/UIWindow in the Objective-C runtime.

§delegate: Option<Box<T>>

A delegate for this window.

Implementations§

Source§

impl NSWindow

Source

pub fn new(config: WindowConfig) -> NSWindow

Constructs a new NSWindow

Source§

impl<T> NSWindow<T>
where T: PNSWindowDelegate + 'static,

Source

pub fn with(config: WindowConfig, delegate: T) -> Self

Constructs a new NSWindow with a config

Source§

impl<T> NSWindow<T>

Source

pub fn set_title<S>(&self, title: S)
where S: Into<NSString>,

Sets the string that appears in the title bar of the window or the path to the represented file.

Source

pub fn set_title_visibility(&mut self, visibility: NSWindowTitleVisibility)

Sets a value that indicates the visibility of the window’s title and title bar buttons.

Source

pub fn set_movable_by_background(&mut self, movable: bool)

Sets a Boolean value that indicates whether the window is movable by clicking and dragging anywhere in its background.

Source

pub fn set_titlebar_appears_transparent(&mut self, transparent: bool)

Sets a Boolean value that indicates whether the title bar draws its background.

Source

pub fn set_autosave_name<S>(&self, name: S) -> bool
where S: Into<NSString>,

Sets the name AppKit uses to automatically save the window’s frame rectangle data in the defaults system.

Source

pub fn set_content_size(&self, size: NSSize)

Sets the size of the window’s content view to a given size, which is expressed in the window’s base coordinate system.

Source

pub fn set_minimum_content_size(&self, size: NSSize)

Sets the minimum size of the window’s content view in the window’s base coordinate system.

Source

pub fn set_maximum_content_size(&self, size: NSSize)

Sets the minimum size to which the window’s frame (including its title bar) can be sized.

Source

pub fn set_minimum_size<F: Into<f64>>(&self, size: NSSize)

Sets the minimum size this window can shrink to.

Source

pub fn toggle_toolbar_shown(&self)

Toggles the visibility of the window’s toolbar.

Source

pub fn set_shows_toolbar_button(&self, shows: bool)

Sets a Boolean value that indicates whether the toolbar control button is displayed.

Source

pub fn close(&self)

Removes the window from the screen.

Source

pub fn toggle_full_screen(&self, sender: id)

Takes the window into or out of fullscreen mode,

Source

pub fn is_opaque(&self) -> bool

A Boolean value that indicates whether the window is opaque.

Source

pub fn miniaturized(&self) -> bool

A Boolean value that indicates whether the window is minimized.

Source

pub fn miniaturize(&self, sender: id)

Removes the window from the screen list and displays the minimized window in the Dock.

Source

pub fn deminiaturize(&self, sender: id)

De-minimizes the window.

Source

pub fn print(&self, sender: id)

Runs the Print panel, and if the user chooses an option other than canceling, prints the window (its frame view and all subviews).

Source

pub fn is_on_active_space(&self) -> bool

A Boolean value that indicates whether the window is on the currently active space.

Source

pub fn is_visible(&self) -> bool

A Boolean value that indicates whether the window is visible onscreen (even when it’s obscured by other windows).

Source

pub fn is_key_window(&self) -> bool

A Boolean value that indicates whether the window is the key window for the application.

Source

pub fn can_become_key_window(&self) -> bool

A Boolean value that indicates whether the window can become the key window.

Source

pub fn make_key_window(&self)

Makes the window the key window.

Source

pub fn make_key_and_order_front(&self, sender: id)

Moves the window to the front of the screen list, within its level, and makes it the key window; that is, it shows the window.

Source

pub fn main_window(&self) -> bool

A Boolean value that indicates whether the window is the application’s main window.

Source

pub fn can_become_main_window(&self) -> bool

A Boolean value that indicates whether the window can become the application’s main window.

Source

pub fn set_excluded_from_windows_menu(&self, excluded: bool)

Set whether this window should be excluded from the top-level “Windows” menu.

Source

pub fn set_titlebar_separator_style(&self, style: NSTitlebarSeparatorStyle)

Sets the type of separator that the app displays between the title bar and content of a window.

Source

pub fn backing_scale_factor(&self) -> f64

The backing scale factor.

Source

pub fn begin_sheet_completion_handler<F, W>( &self, window: &NSWindow<W>, completion: F, )
where F: IntoConcreteBlock<(NSModalResponse,), Ret = ()> + 'static, W: PNSWindowDelegate + 'static,

Starts a document-modal session and presents—or queues for presentation—a sheet.

Source

pub fn end_sheet<W>(&self, window: &NSWindow<W>)
where W: PNSWindowDelegate + 'static,

Ends a document-modal session and dismisses the specified sheet.

Trait Implementations§

Source§

impl<T> Clone for NSWindow<T>
where T: Clone,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug> Debug for NSWindow<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NSWindow

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<T> Drop for NSWindow<T>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<T> FromId for NSWindow<T>

Source§

unsafe fn from_id(id: id) -> Self

Returns Self representation of the object. Read more
Source§

impl<T> INSWindow for NSWindow<T>

Source§

fn tm_window_with_content_view_controller<V>(content_view_controller: V) -> Self
where Self: Sized + FromId, V: INSViewController,

Creates a titled window that contains the specified content view controller.
Source§

fn im_init_with_content_rect_style_mask_backing_defer( &self, content_rect: NSRect, style: UInt, backing_store_type: NSBackingStoreType, flag: bool, ) -> Self
where Self: Sized + FromId,

Initializes the window with the specified values.
Source§

fn im_init_with_content_rect_style_mask_backing_defer_screen( &self, content_rect: NSRect, style: UInt, backing_store_type: NSBackingStoreType, flag: bool, screen: NSScreen, ) -> Self
where Self: Sized + FromId,

Initializes an allocated window with the specified values.
Source§

fn ip_delegate(&self) -> id

The window’s delegate.
Source§

fn ip_set_delegate(&self, delegate: NSWindow)

Sets the window’s delegate. Read more
Source§

fn ip_content_view_controller(&self) -> NSViewController

The main content view controller for the window.
Source§

fn ip_style_mask(&self) -> NSWindowStyleMask

Flags that describe the window’s current style, such as if it’s resizable or in full-screen mode.
Source§

fn ip_set_style_mask(&mut self, style_mask: NSWindowStyleMask)

Sets the flags that describe the window’s current style, such as if it’s resizable or in full-screen mode. Read more
Source§

fn im_toggle_full_screen(&self, sender: id)

Takes the window into or out of fullscreen mode,
Source§

fn ip_works_when_modal(&self) -> bool

A Boolean value that indicates whether the window is able to receive keyboard and mouse events even when some other window is being run modally.
Source§

fn ip_alpha_value(&self) -> CGFloat

The window’s alpha value.
Source§

fn ip_set_alpha_value(&mut self, value: CGFloat)

Sets the window’s alpha value. Read more
Source§

fn ip_background_color(&self) -> NSColor

The color of the window’s background.
Source§

fn ip_set_background_color(&mut self, color: NSColor)

Sets the color of the window’s background. Read more
Source§

fn ip_color_space(&self) -> NSColorSpace

The window’s color space.
Source§

fn ip_set_color_space(&mut self, color_space: NSColorSpace)

Sets the window’s color space. Read more
Source§

fn im_set_dynamic_depth_limit(&self, flag: bool)

Sets a Boolean value that indicates whether the window’s depth limit can change to match the depth of the screen it’s on.
Source§

fn ip_can_hide(&self) -> bool

A Boolean value that indicates whether the window can hide when its application becomes hidden.
Source§

fn ip_set_can_hide(&mut self, flag: bool)

Sets a Boolean value that indicates whether the window can hide when its application becomes hidden. Read more
Source§

fn ip_is_on_active_space(&self) -> bool

A Boolean value that indicates whether the window is on the currently active space.
Source§

fn ip_hides_on_deactivate(&self) -> bool

A Boolean value that indicates whether the window is removed from the screen when its application becomes inactive.
Source§

fn ip_set_hides_on_deactivate(&mut self, flag: bool)

Sets a Boolean value that indicates whether the window is removed from the screen when its application becomes inactive. Read more
Source§

fn ip_collection_behavior(&self) -> NSWindowCollectionBehavior

A value that identifies the window’s behavior in window collections.
Source§

fn ip_is_opaque(&self) -> bool

A Boolean value that indicates whether the window is opaque.
Source§

fn ip_set_opaque(&mut self, flag: bool)

Sets a Boolean value that indicates whether the window is opaque. Read more
Source§

fn ip_has_shadow(&self) -> bool

A Boolean value that indicates whether the window has a shadow.
Source§

fn ip_set_has_shadow(&mut self, flag: bool)

Sets a Boolean value that indicates whether the window has a shadow. Read more
Source§

fn im_invalidate_shadow(&self)

Invalidates the window shadow so that it is recomputed based on the current window shape.
Source§

fn im_autorecalculates_content_border_thickness_for_edge( &self, edge: NSRectEdge, ) -> bool

Indicates whether the window calculates the thickness of a given border automatically.
Source§

fn im_set_autorecalculates_content_border_thickness_for_edge( &self, flag: bool, edge: NSRectEdge, )

Specifies whether the window calculates the thickness of a given border automatically. Read more
Source§

fn im_content_border_thickness_for_edge(&self, edge: NSRectEdge) -> CGFloat

Indicates the thickness of a given border of the window. Read more
Source§

fn im_set_content_border_thickness_for_edge( &self, thickness: CGFloat, edge: NSRectEdge, )

Specifies the thickness of a given border of the window. Read more
Source§

fn ip_prevents_application_termination(&self) -> bool

A Boolean value that indicates whether the window prevents application termination when modal.
Source§

fn ip_appearance_source(&self) -> id

An object that the window inherits its appearance from.
Source§

fn ip_depth_limit(&self) -> NSWindowDepth

The depth limit of the window.
Source§

fn ip_set_depth_limit(&mut self, depth: NSWindowDepth)

Sets the depth limit of the window. Read more
Source§

fn ip_has_dynamic_depth_limit(&self) -> bool

A Boolean value that indicates whether the window’s depth limit can change to match the depth of the screen it’s on.
Source§

fn tp_default_depth_limit() -> NSWindowDepth

Returns the default depth limit for instances of NSWindow.
Source§

fn ip_window_number(&self) -> Int

The window number of the window’s window device.
Source§

fn tm_window_numbers_with_options( options: NSWindowNumberListOptions, ) -> NSArray<NSNumber>

Returns the window numbers for all visible windows satisfying the specified options.
Source§

fn ip_device_description(&self) -> NSDictionary<NSDeviceDescriptionKey, id>

A dictionary containing information about the window’s resolution, such as color, depth, and so on.
Source§

fn ip_can_become_visible_without_login(&self) -> bool

A Boolean value that indicates whether the window can be displayed at the login window.
Source§

fn ip_sharing_type(&self) -> NSWindowSharingType

A Boolean value that indicates the level of access other processes have to the window’s content.
Source§

fn ip_backing_type(&self) -> NSBackingStoreType

The window’s backing store type.
Source§

fn tm_content_rect_for_frame_rect_style_mask( frame: NSRect, style: NSWindowStyleMask, ) -> NSRect

Returns the content rectangle used by a window with a given frame rectangle and window style. Read more
Source§

fn tm_frame_rect_for_content_rect_style_mask( content: NSRect, style: NSWindowStyleMask, ) -> NSRect

Returns the frame rectangle used by a window with a given content rectangle and window style. Read more
Source§

fn tm_min_frame_width_with_title_style_mask( title: &str, style: NSWindowStyleMask, ) -> CGFloat

Returns the minimum width a window’s frame rectangle must have for it to display a title, with a given window style. Read more
Source§

fn im_content_rect_for_frame_rect(&self, frame: NSRect) -> NSRect

Returns the window’s content rectangle with a given frame rectangle. Read more
Source§

fn im_frame_rect_for_content_rectim_frame_rect_for_content_rect( &self, content: NSRect, ) -> NSRect

Returns the window’s frame rectangle with a given content rectangle.
Source§

fn ip_attached_sheet(&self) -> NSWindow

The sheet attached to the window.
Source§

fn ip_sheet(&mut self) -> bool

The sheet attached to the window.
Source§

fn im_begin_sheet_completion_handler<W>( &self, sheet: &NSWindow<W>, handler: RcBlock<(NSModalResponse,), ()>, )
where W: PNSWindowDelegate + 'static,

Starts a document-modal session and presents—or queues for presentation—a sheet. Read more
Source§

fn im_begin_critical_sheet_completion_handler( &self, sheet: NSWindow, handler: RcBlock<NSModalResponse, ()>, )

Starts a document-modal session and presents the specified critical sheet. Read more
Source§

fn im_end_sheet<W>(&self, sheet: &NSWindow<W>)
where W: PNSWindowDelegate + 'static,

Ends a document-modal session and dismisses the specified sheet. Read more
Source§

fn im_end_sheet_with_return_code(&self, sheet: NSWindow, code: NSModalResponse)

Ends a document-modal session and dismisses the specified sheet. Read more
Source§

fn ip_sheet_parent(&self) -> NSWindow

The window to which the sheet is attached.
Source§

fn ip_sheets(&self) -> NSArray<NSWindow>

An array of the sheets currently attached to the window.
Source§

fn ip_frame(&self) -> NSRect

The window’s frame rectangle in screen coordinates, including the title bar.
Source§

fn im_set_frame_origin(&self, point: NSPoint)

Positions the bottom-left corner of the window’s frame rectangle at a given point in screen coordinates. Read more
Source§

fn im_set_frame_top_left_point(&self, point: NSPoint)

Positions the top-left corner of the window’s frame rectangle at a given point in screen coordinates. Read more
Source§

fn im_constrain_frame_rect_to_screen( &self, frame: NSRect, screen: NSScreen, ) -> NSRect

Modifies and returns a frame rectangle so that its top edge lies on a specific screen. Read more
Source§

fn im_cascade_top_left_from_point(&self, point: NSPoint)

Positions the window’s top-left to a given point. Read more
Source§

fn im_set_frame_display(&self, frame: NSRect, flag: bool)

Sets the origin and size of the window’s frame rectangle according to a given frame rectangle, thereby setting its position and size onscreen. Read more
Source§

fn im_set_frame_display_animate(&self, frame: NSRect, flag: bool, animate: bool)

Sets the origin and size of the window’s frame rectangle, with optional animation, according to a given frame rectangle, thereby setting its position and size onscreen. Read more
Source§

fn im_animation_resize_time(&self, frame: NSRect) -> NSTimeInterval

Specifies the duration of a smooth frame-size change.
Source§

fn ip_aspect_ratio(&self) -> NSSize

The window’s aspect ratio, which constrains the size of its frame rectangle to integral multiples of this ratio when the user resizes it.
Source§

fn ip_set_aspect_ratio(&self, ratio: NSSize)

Sets the window’s aspect ratio. Read more
Source§

fn ip_min_size(&self) -> NSSize

The minimum size to which the window’s frame (including its title bar) can be sized.
Source§

fn ip_set_min_size(&self, size: NSSize)

Sets the minimum size to which the window’s frame (including its title bar) can be sized. Read more
Source§

fn ip_max_size(&self) -> NSSize

The maximum size to which the window’s frame (including its title bar) can be sized.
Source§

fn ip_set_max_size(&self, size: NSSize)

Sets the maximum size to which the window’s frame (including its title bar) can be sized. Read more
Source§

fn ip_zoomed(&self) -> bool

A Boolean value that indicates whether the window is in a zoomed state.
Source§

fn im_perform_zoom(&self, sender: id)

This action method simulates the user clicking the zoom box by momentarily highlighting the button and then zooming the window.
Source§

fn im_zoom(&self, sender: id)

Toggles the size and location of the window between its standard state (which the application provides as the best size to display the window’s data) and its user state (a new size and location the user may have set by moving or resizing the window).
Source§

fn ip_resize_increments(&self) -> NSSize

The window’s resizing increments.
Source§

fn ip_set_resize_increments(&self, increments: NSSize)

Sets the window’s resizing increments. Read more
Source§

fn ip_preserves_content_during_live_resize(&self) -> bool

A Boolean value that indicates whether the window tries to optimize user-initiated resize operations by preserving the content of views that have not changed.
Source§

fn ip_set_preserves_content_during_live_resize(&self, flag: bool)

Sets whether the window tries to optimize user-initiated resize operations by preserving the content of views that have not changed. Read more
Source§

fn ip_in_live_resize(&self) -> bool

A Boolean value that indicates whether the window is being resized by the user.
Source§

fn ip_set_in_live_resize(&self, flag: bool)

Sets a Boolean value that indicates whether the window is being resized by the user. Read more
Source§

fn ip_content_aspect_ratio(&self) -> NSSize

The window’s content aspect ratio.
Source§

fn ip_set_content_aspect_ratio(&self, size: NSSize)

Sets the window’s content aspect ratio. Read more
Source§

fn ip_content_min_size(&self) -> NSSize

The minimum size of the window’s content view in the window’s base coordinate system.
Source§

fn ip_set_content_min_size(&self, content_min_size: NSSize)

Sets the minimum size of the window’s content view in the window’s base coordinate system. Read more
Source§

fn im_set_content_size(&self, size: NSSize)

Sets the size of the window’s content view to a given size, which is expressed in the window’s base coordinate system. Read more
Source§

fn ip_content_max_size(&self) -> NSSize

The maximum size of the window’s content view in the window’s base coordinate system.
Source§

fn ip_set_content_max_size(&self, size: NSSize)

Sets the maximum size of the window’s content view in the window’s base coordinate system. Read more
Source§

fn ip_content_resize_increments(&self) -> NSSize

The window’s content-view resizing increments.
Source§

fn ip_set_content_resize_increments(&self, content_resize_increments: NSSize)

Sets the window’s content-view resizing increments. Read more
Source§

fn ip_content_layout_guide(&self) -> id

A value used by Auto Layout constraints to automatically bind to the value of contentLayoutRect.
Source§

fn ip_set_content_layout_guide(&self, content_layout_guide: id)

Sets a value used by Auto Layout constraints to automatically bind to the value of contentLayoutRect. Read more
Source§

fn ip_content_layout_rect(&self) -> NSRect

The area inside the window that is for non-obscured content, in window coordinates.
Source§

fn ip_set_content_layout_rect(&self, content_layout_rect: NSRect)

Sets the area inside the window that is for non-obscured content, in window coordinates. Read more
Source§

fn ip_full_screen_tile_size(&self) -> NSSize

A maximum size that is used to determine if a window can fit when it is in full screen in a tile.
Source§

fn ip_set_full_screen_tile_size(&self, size: NSSize)

Sets a maximum size that is used to determine if a window can fit when it is in full screen in a tile. Read more
Source§

fn ip_full_screen_tile_content_size(&self) -> NSSize

A minimum size that is used to determine if a window can fit when it is in full screen in a tile.
Source§

fn ip_set_full_screen_tile_content_size(&self, size: NSSize)

Sets a minimum size that is used to determine if a window can fit when it is in full screen in a tile. Read more
Source§

fn im_order_out(&self, sender: id)

Removes the window from the screen list, which hides the window.
Source§

fn im_order_back(&self, sender: id)

Moves the window to the back of its level in the screen list, without changing either the key window or the main window.
Source§

fn im_order_front(&self, sender: id)

Moves the window to the front of its level in the screen list, without changing either the key window or the main window.
Source§

fn im_order_front_regardless(&self)

Moves the window to the front of its level, even if its application isn’t active, without changing either the key window or the main window.
Source§

fn im_order_window_relative_to(&self, place: NSWindowOrderingMode, other: Int)

Repositions the window’s window device in the window server’s screen list.
Source§

fn ip_window_level(&self) -> NSWindowLevel

The window level of the window.
Source§

fn ip_set_window_level(&self, level: NSWindowLevel)

Sets the window level of the window. Read more
Source§

fn ip_visible(&self) -> bool

A Boolean value that indicates whether the window is visible onscreen (even when it’s obscured by other windows).
Source§

fn ip_occlusion_state(&self) -> NSWindowOcclusionState

The occlusion state of the window.
Source§

fn tm_remove_frame_using_name(name: &NSWindowFrameAutosaveName)

Removes the frame data stored under a given name from the application’s user defaults. Read more
Source§

fn im_set_frame_using_name(&self, name: NSWindowFrameAutosaveName) -> bool

Sets the window’s frame rectangle by reading the rectangle data stored under a given name from the defaults system.
Source§

fn im_set_frame_using_name_force( &self, name: NSWindowFrameAutosaveName, force: bool, ) -> bool

Sets the window’s frame rectangle by reading the rectangle data stored under a given name from the defaults system. Can operate on non-resizable windows.
Source§

fn im_save_frame_using_name(&self, name: NSWindowFrameAutosaveName)

Saves the window’s frame rectangle in the user defaults system under a given name.
Source§

fn im_set_frame_autosave_name(&self, name: NSWindowFrameAutosaveName) -> bool

Sets the name AppKit uses to automatically save the window’s frame rectangle data in the defaults system.
Source§

fn ip_frame_autosave_name(&self) -> NSWindowFrameAutosaveName

The name used to automatically save the window’s frame rectangle data in the defaults system.
Source§

fn ip_string_with_saved_frame(&self) -> NSWindowPersistableFrameDescriptor

A string representation of the window’s frame rectangle.
Source§

fn im_set_frame_from_string(&self, string: NSWindowPersistableFrameDescriptor)

Sets the window’s frame rectangle from a given string representation.
Source§

fn ip_key_window(&self) -> bool

A Boolean value that indicates whether the window is the key window for the application.
Source§

fn ip_can_become_key_window(&self) -> bool

A Boolean value that indicates whether the window can become the key window.
Source§

fn im_make_key_window(&self)

Makes the window the key window.
Source§

fn im_make_key_and_order_front(&self, sender: id)

Moves the window to the front of the screen list, within its level, and makes it the key window; that is, it shows the window.
Source§

fn im_become_key_window(&self)

Informs the window that it has become the key window.
Source§

fn im_resign_key_window(&self)

Resigns the window’s key window status.
Source§

fn ip_main_window(&self) -> bool

A Boolean value that indicates whether the window is the application’s main window.
Source§

fn ip_can_become_main_window(&self) -> bool

A Boolean value that indicates whether the window can become the application’s main window.
Source§

fn im_make_main_window(&self)

Makes the window the main window.
Source§

fn im_become_main_window(&self)

Informs the window that it has become the main window.
Source§

fn im_resign_main_window(&self)

Resigns the window’s main window status.
Source§

fn ip_toolbar(&self) -> NSToolbar

The window’s toolbar.
Source§

fn ip_set_toolbar(&self, toolbar: NSToolbar)

Sets the window’s toolbar. Read more
Source§

fn ip_toggle_toolbar_shown(&self, sender: id)

Toggles the visibility of the window’s toolbar.
Source§

fn ip_run_toolbar_customization_palette(&self, sender: id)

Presents the toolbar customization user interface.
Source§

fn ip_child_windows(&self) -> id

An array of the window’s attached child windows.
Source§

fn add_child_window_ordered(&self, child: id, order: NSWindowOrderingMode)

Attaches a child window to the window.
Source§

fn remove_child_window(&self, child: id)

Detaches a given child window from the window.
Source§

fn ip_parent_window(&self) -> id

The parent window to which the window is attached as a child.
Source§

fn ip_excluded_from_windows_menu(&self) -> bool

A Boolean value that indicates whether the window is excluded from the application’s Windows menu.
Source§

fn ip_set_excluded_from_windows_menu(&self, flag: bool)

Sets a Boolean value that indicates whether the window is excluded from the application’s Windows menu. Read more
Source§

fn ip_are_cursor_rects_enabled(&self) -> bool

A Boolean value that indicates whether the window’s cursor rectangles are enabled.
Source§

fn im_enable_cursor_rects(&self)

Reenables cursor rectangle management within the window after a disableCursorRects message.
Source§

fn im_disable_cursor_rects(&self)

Disables all cursor rectangle management within the window.
Source§

fn im_discard_cursor_rects(&self, view: id)

Invalidates all cursor rectangles in the window.
Source§

fn im_reset_cursor_rects(&self)

Clears the window’s cursor rectangles and the cursor rectangles of the NSView objects in its view hierarchy.
Source§

fn tm_standard_window_button_for_style_mask( &self, b: NSWindowButton, style: NSWindowStyleMask, ) -> NSButton

Returns a new instance of a given standard window button, sized appropriately for a given window style.
Source§

fn ip_standard_window_button(&self, b: NSWindowButton) -> NSButton

Returns the window button of a given window button kind in the window’s view hierarchy.
Source§

fn ip_shows_toolbar_button(&self) -> bool

A Boolean value that indicates whether the toolbar control button is currently displayed.
Source§

fn ip_set_shows_toolbar_button(&self, flag: bool)

Sets a Boolean value that indicates whether the toolbar control button is displayed. Read more
Source§

fn ip_titlebar_appears_transparent(&self) -> bool

A Boolean value that indicates whether the title bar draws its background.
Source§

fn ip_set_titlebar_appears_transparent(&self, flag: bool)

Sets a Boolean value that indicates whether the title bar draws its background. Read more
Source§

fn ip_toolbar_style(&self) -> NSWindowToolbarStyle

The style that determines the appearance and location of the toolbar in relation to the title bar.
Source§

fn ip_set_toolbar_style(&self, style: NSWindowToolbarStyle)

Sets the style that determines the appearance and location of the toolbar in relation to the title bar. Read more
Source§

fn ip_titlebar_separator_style(&self) -> NSTitlebarSeparatorStyle

The type of separator that the app displays between the title bar and content of a window.
Source§

fn ip_set_titlebar_separator_style(&self, style: NSTitlebarSeparatorStyle)

Sets the type of separator that the app displays between the title bar and content of a window. Read more
Source§

fn ip_titlebar_layout_direction(&self) -> NSUserInterfaceLayoutDirection

The direction the window’s title bar lays text out, either left to right or right to left.
Source§

fn tp_allows_automatic_window_tabbing() -> bool

A Boolean value that indicates whether the app can automatically organize windows into tabs.
Source§

fn tm_set_allows_automatic_window_tabbing(allows_automatic_window_tabbing: bool)

Sets a Boolean value that indicates whether the app can automatically organize windows into tabs.
Source§

fn ip_backing_scale_factor(&self) -> CGFloat

The backing scale factor.
Source§

fn im_backing_aligned_rect_options(&self, options: NSAlignmentOptions) -> NSRect

Returns a backing store pixel-aligned rectangle in window coordinates.
Source§

fn im_convert_rect_from_backing(&self, rect: NSRect) -> NSRect

Converts a rectangle from its pixel-aligned backing store coordinate system to the window’s coordinate system.
Source§

fn im_convert_rect_from_screen(&self, rect: NSRect) -> NSRect

Converts a rectangle from the screen coordinate system to the window’s coordinate system.
Source§

fn im_convert_point_from_backing(&self, point: NSPoint) -> NSPoint

Converts a point from its pixel-aligned backing store coordinate system to the window’s coordinate system.
Source§

fn im_convert_point_from_screen(&self, point: NSPoint) -> NSPoint

Converts a point from the screen coordinate system to the window’s coordinate system.
Source§

fn im_convert_rect_to_backing(&self, rect: NSRect) -> NSRect

Converts a rectangle from the window’s coordinate system to its pixel-aligned backing store coordinate system.
Source§

fn im_convert_rect_to_screen(&self, rect: NSRect) -> NSRect

Converts a rectangle to the screen coordinate system from the window’s coordinate system.
Source§

fn im_convert_point_to_backing(&self, point: NSPoint) -> NSPoint

Converts a point from the window’s coordinate system to its pixel-aligned backing store coordinate system.
Source§

fn im_convert_point_to_screen(&self, point: NSPoint) -> NSPoint

Converts a point to the screen coordinate system from the window’s coordinate system.
Source§

fn ip_title(&self) -> NSString

The string that appears in the title bar of the window or the path to the represented file.
Source§

fn ip_set_title(&self, title: NSString)

Sets the string that appears in the title bar of the window or the path to the represented file. Read more
Source§

fn ip_subtitle(&self) -> NSString

A secondary line of text that appears in the title bar of the window.
Source§

fn ip_set_subtitle(&self, subtitle: NSString)

Sets a secondary line of text that appears in the title bar of the window. Read more
Source§

fn ip_title_visibility(&self) -> NSWindowTitleVisibility

A value that indicates the visibility of the window’s title and title bar buttons.
Source§

fn ip_set_title_visibility(&self, title_visibility: NSWindowTitleVisibility)

Sets a value that indicates the visibility of the window’s title and title bar buttons. Read more
Source§

fn im_set_title_with_represented_filename(&self, path: NSString)

Sets a given path as the window’s title, formatting it as a file-system path, and records this path as the window’s associated file.
Source§

fn ip_represented_filename(&self) -> NSString

The path to the file of the window’s represented file.
Source§

fn ip_set_represented_filename(&self, represented_filename: NSString)

Sets the path to the file of the window’s represented file. Read more
Source§

fn ip_screen(&self) -> NSScreen

The screen the window is on.
Source§

fn ip_deepest_screen(&self) -> NSScreen

The deepest screen the window is on (it may be split over several screens).
Source§

fn ip_displays_when_screen_profile_changes(&self) -> bool

A Boolean value that indicates whether the window context should be updated when the screen profile changes or when the window moves to a different screen.
Source§

fn ip_movable_by_window_background(&self) -> bool

A Boolean value that indicates whether the window is movable by clicking and dragging anywhere in its background.
Source§

fn ip_set_movable_by_window_background( &self, movable_by_window_background: bool, )

Sets a Boolean value that indicates whether the window is movable by clicking and dragging anywhere in its background. Read more
Source§

fn ip_movable(&self) -> bool

A Boolean value that indicates whether the window can be dragged by clicking in its title bar or background.
Source§

fn ip_set_movable(&self, movable: bool)

Sets a Boolean value that indicates whether the window can be dragged by clicking in its title bar or background. Read more
Source§

fn im_center(&self)

Sets the window’s location to the center of the screen.
Source§

fn im_perform_close(&self, sender: id)

Simulates the user clicking the close button by momentarily highlighting the button and then closing the window.
Source§

fn im_close(&self)

Removes the window from the screen.
Source§

fn ip_released_when_closed(&self) -> bool

A Boolean value that indicates whether the window is released when it receives the close message.
Source§

fn ip_set_released_when_closed(&self, released_when_closed: bool)

Sets a Boolean value that indicates whether the window is released when it receives the close message.
Source§

fn ip_miniaturized(&self) -> bool

A Boolean value that indicates whether the window is minimized.
Source§

fn im_perform_miniaturize(&self, sender: id)

Simulates the user clicking the minimize button by momentarily highlighting the button, then minimizing the window.
Source§

fn im_miniaturize(&self, sender: id)

Removes the window from the screen list and displays the minimized window in the Dock.
Source§

fn im_deminiaturize(&self, sender: id)

De-minimizes the window.
Source§

fn ip_miniwindow_image(&self) -> NSImage

The custom miniaturized window image of the window.
Source§

fn ip_miniwindow_title(&self) -> NSString

The title displayed in the window’s minimized window.
Source§

fn ip_dock_tile(&self) -> NSDockTile

The application’s Dock tile.
Source§

fn im_print(&self, sender: id)

Runs the Print panel, and if the user chooses an option other than canceling, prints the window (its frame view and all subviews).
Source§

fn im_data_with_esp_inside_rect(&self, rect: NSRect) -> NSData

Returns EPS data that draws the region of the window within a given rectangle.
Source§

fn im_data_with_pdf_inside_rect(&self, rect: NSRect) -> NSData

Returns PDF data that draws the region of the window within a given rectangle.
Source§

fn ip_restorable(&self) -> bool

A Boolean value indicating whether the window configuration is preserved between application launches.
Source§

fn ip_set_restorable(&self, restorable: bool)

Sets a Boolean value indicating whether the window configuration is preserved between application launches. Read more
Source§

fn im_disable_snapshot_restoration(&self)

Disables snapshot restoration.
Source§

fn im_enable_snapshot_restoration(&self)

Enables snapshot restoration.
Source§

impl<T> PNSObject for NSWindow<T>

Source§

fn m_class<'a>() -> &'a Class

Returns the class object for the receiver’s class.
Source§

fn m_self(&self) -> id

Returns the receiver.
Source§

fn m_new() -> Self
where Self: Sized + FromId,

Allocates a new instance of the receiving class, sends it an init message, and returns the initialized object.
Source§

fn m_alloc() -> Self
where Self: Sized + FromId,

Returns a new instance of the receiving class.
Source§

fn m_initialize()

Initializes the class before it receives its first message.
Source§

fn ip_superclass<'a>() -> Option<&'a Class>

Returns the class object for the receiver’s superclass.
Source§

fn m_is_equal(&self, object: &Self) -> bool

Returns a Boolean value that indicates whether the receiver and a given object are equal.
Source§

fn p_hash(&self) -> UInt

Returns an integer that can be used as a table address in a hash table structure.
Source§

fn m_is_kind_of_class(&self, class: Class) -> bool

Returns a Boolean value that indicates whether the receiver is an instance of given class or an instance of any class that inherits from that class.
Source§

fn m_is_member_of_class(&self, class: Class) -> bool

Returns a Boolean value that indicates whether the receiver is an instance of a given class.
Source§

fn m_responds_to_selector(&self, selector: Sel) -> bool

Returns a Boolean value that indicates whether the receiver implements or inherits a method that can respond to a specified message.
Source§

fn m_conforms_to_protocol(&self, protocol: Protocol) -> bool

Returns a Boolean value that indicates whether the receiver conforms to a given protocol.
Source§

fn p_description(&self) -> NSString

A textual representation of the receiver.
Source§

fn p_debug_description(&self) -> NSString

A textual representation of the receiver to use with a debugger.
Source§

fn m_perform_selector(&self, selector: Sel) -> id

Sends a specified message to the receiver and returns the result of the message.
Source§

fn m_perform_selector_with_object(&self, selector: Sel, with_object: id) -> id

Sends a message to the receiver with an object as the argument.
Source§

fn m_is_proxy(&self) -> bool

Returns a Boolean value that indicates whether the receiver does not descend from NSObject.
Source§

impl<T> ToId for NSWindow<T>

Source§

fn to_id(self) -> id

Returns id representation of the object.
Source§

impl<T> INSResponder for NSWindow<T>

Auto Trait Implementations§

§

impl<T> Freeze for NSWindow<T>

§

impl<T> RefUnwindSafe for NSWindow<T>
where T: RefUnwindSafe,

§

impl<T> Send for NSWindow<T>
where T: Send,

§

impl<T> Sync for NSWindow<T>
where T: Sync,

§

impl<T> Unpin for NSWindow<T>

§

impl<T> UnwindSafe for NSWindow<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.