Trait INSWindow

Source
pub trait INSWindow: INSResponder {
Show 198 methods // Provided methods fn tm_window_with_content_view_controller<V>( content_view_controller: V, ) -> Self where Self: Sized + FromId, V: INSViewController { ... } 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 { ... } 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 { ... } fn ip_delegate(&self) -> id { ... } fn ip_set_delegate(&self, delegate: NSWindow) { ... } fn ip_content_view_controller(&self) -> NSViewController { ... } fn ip_style_mask(&self) -> NSWindowStyleMask { ... } fn ip_set_style_mask(&mut self, style_mask: NSWindowStyleMask) { ... } fn im_toggle_full_screen(&self, sender: id) { ... } fn ip_works_when_modal(&self) -> bool { ... } fn ip_alpha_value(&self) -> CGFloat { ... } fn ip_set_alpha_value(&mut self, value: CGFloat) { ... } fn ip_background_color(&self) -> NSColor { ... } fn ip_set_background_color(&mut self, color: NSColor) { ... } fn ip_color_space(&self) -> NSColorSpace { ... } fn ip_set_color_space(&mut self, color_space: NSColorSpace) { ... } fn im_set_dynamic_depth_limit(&self, flag: bool) { ... } fn ip_can_hide(&self) -> bool { ... } fn ip_set_can_hide(&mut self, flag: bool) { ... } fn ip_is_on_active_space(&self) -> bool { ... } fn ip_hides_on_deactivate(&self) -> bool { ... } fn ip_set_hides_on_deactivate(&mut self, flag: bool) { ... } fn ip_collection_behavior(&self) -> NSWindowCollectionBehavior { ... } fn ip_is_opaque(&self) -> bool { ... } fn ip_set_opaque(&mut self, flag: bool) { ... } fn ip_has_shadow(&self) -> bool { ... } fn ip_set_has_shadow(&mut self, flag: bool) { ... } fn im_invalidate_shadow(&self) { ... } fn im_autorecalculates_content_border_thickness_for_edge( &self, edge: NSRectEdge, ) -> bool { ... } fn im_set_autorecalculates_content_border_thickness_for_edge( &self, flag: bool, edge: NSRectEdge, ) { ... } fn im_content_border_thickness_for_edge(&self, edge: NSRectEdge) -> CGFloat { ... } fn im_set_content_border_thickness_for_edge( &self, thickness: CGFloat, edge: NSRectEdge, ) { ... } fn ip_prevents_application_termination(&self) -> bool { ... } fn ip_appearance_source(&self) -> id { ... } fn ip_depth_limit(&self) -> NSWindowDepth { ... } fn ip_set_depth_limit(&mut self, depth: NSWindowDepth) { ... } fn ip_has_dynamic_depth_limit(&self) -> bool { ... } fn tp_default_depth_limit() -> NSWindowDepth { ... } fn ip_window_number(&self) -> Int { ... } fn tm_window_numbers_with_options( options: NSWindowNumberListOptions, ) -> NSArray<NSNumber> { ... } fn ip_device_description(&self) -> NSDictionary<NSDeviceDescriptionKey, id> { ... } fn ip_can_become_visible_without_login(&self) -> bool { ... } fn ip_sharing_type(&self) -> NSWindowSharingType { ... } fn ip_backing_type(&self) -> NSBackingStoreType { ... } fn tm_content_rect_for_frame_rect_style_mask( frame: NSRect, style: NSWindowStyleMask, ) -> NSRect { ... } fn tm_frame_rect_for_content_rect_style_mask( content: NSRect, style: NSWindowStyleMask, ) -> NSRect { ... } fn tm_min_frame_width_with_title_style_mask( title: &str, style: NSWindowStyleMask, ) -> CGFloat { ... } fn im_content_rect_for_frame_rect(&self, frame: NSRect) -> NSRect { ... } fn im_frame_rect_for_content_rectim_frame_rect_for_content_rect( &self, content: NSRect, ) -> NSRect { ... } fn ip_attached_sheet(&self) -> NSWindow { ... } fn ip_sheet(&mut self) -> bool { ... } fn im_begin_sheet_completion_handler<W>( &self, sheet: &NSWindow<W>, handler: RcBlock<(NSModalResponse,), ()>, ) where W: PNSWindowDelegate + 'static { ... } fn im_begin_critical_sheet_completion_handler( &self, sheet: NSWindow, handler: RcBlock<NSModalResponse, ()>, ) { ... } fn im_end_sheet<W>(&self, sheet: &NSWindow<W>) where W: PNSWindowDelegate + 'static { ... } fn im_end_sheet_with_return_code( &self, sheet: NSWindow, code: NSModalResponse, ) { ... } fn ip_sheet_parent(&self) -> NSWindow { ... } fn ip_sheets(&self) -> NSArray<NSWindow> { ... } fn ip_frame(&self) -> NSRect { ... } fn im_set_frame_origin(&self, point: NSPoint) { ... } fn im_set_frame_top_left_point(&self, point: NSPoint) { ... } fn im_constrain_frame_rect_to_screen( &self, frame: NSRect, screen: NSScreen, ) -> NSRect { ... } fn im_cascade_top_left_from_point(&self, point: NSPoint) { ... } fn im_set_frame_display(&self, frame: NSRect, flag: bool) { ... } fn im_set_frame_display_animate( &self, frame: NSRect, flag: bool, animate: bool, ) { ... } fn im_animation_resize_time(&self, frame: NSRect) -> NSTimeInterval { ... } fn ip_aspect_ratio(&self) -> NSSize { ... } fn ip_set_aspect_ratio(&self, ratio: NSSize) { ... } fn ip_min_size(&self) -> NSSize { ... } fn ip_set_min_size(&self, size: NSSize) { ... } fn ip_max_size(&self) -> NSSize { ... } fn ip_set_max_size(&self, size: NSSize) { ... } fn ip_zoomed(&self) -> bool { ... } fn im_perform_zoom(&self, sender: id) { ... } fn im_zoom(&self, sender: id) { ... } fn ip_resize_increments(&self) -> NSSize { ... } fn ip_set_resize_increments(&self, increments: NSSize) { ... } fn ip_preserves_content_during_live_resize(&self) -> bool { ... } fn ip_set_preserves_content_during_live_resize(&self, flag: bool) { ... } fn ip_in_live_resize(&self) -> bool { ... } fn ip_set_in_live_resize(&self, flag: bool) { ... } fn ip_content_aspect_ratio(&self) -> NSSize { ... } fn ip_set_content_aspect_ratio(&self, size: NSSize) { ... } fn ip_content_min_size(&self) -> NSSize { ... } fn ip_set_content_min_size(&self, content_min_size: NSSize) { ... } fn im_set_content_size(&self, size: NSSize) { ... } fn ip_content_max_size(&self) -> NSSize { ... } fn ip_set_content_max_size(&self, size: NSSize) { ... } fn ip_content_resize_increments(&self) -> NSSize { ... } fn ip_set_content_resize_increments( &self, content_resize_increments: NSSize, ) { ... } fn ip_content_layout_guide(&self) -> id { ... } fn ip_set_content_layout_guide(&self, content_layout_guide: id) { ... } fn ip_content_layout_rect(&self) -> NSRect { ... } fn ip_set_content_layout_rect(&self, content_layout_rect: NSRect) { ... } fn ip_full_screen_tile_size(&self) -> NSSize { ... } fn ip_set_full_screen_tile_size(&self, size: NSSize) { ... } fn ip_full_screen_tile_content_size(&self) -> NSSize { ... } fn ip_set_full_screen_tile_content_size(&self, size: NSSize) { ... } fn im_order_out(&self, sender: id) { ... } fn im_order_back(&self, sender: id) { ... } fn im_order_front(&self, sender: id) { ... } fn im_order_front_regardless(&self) { ... } fn im_order_window_relative_to( &self, place: NSWindowOrderingMode, other: Int, ) { ... } fn ip_window_level(&self) -> NSWindowLevel { ... } fn ip_set_window_level(&self, level: NSWindowLevel) { ... } fn ip_visible(&self) -> bool { ... } fn ip_occlusion_state(&self) -> NSWindowOcclusionState { ... } fn tm_remove_frame_using_name(name: &NSWindowFrameAutosaveName) { ... } fn im_set_frame_using_name(&self, name: NSWindowFrameAutosaveName) -> bool { ... } fn im_set_frame_using_name_force( &self, name: NSWindowFrameAutosaveName, force: bool, ) -> bool { ... } fn im_save_frame_using_name(&self, name: NSWindowFrameAutosaveName) { ... } fn im_set_frame_autosave_name( &self, name: NSWindowFrameAutosaveName, ) -> bool { ... } fn ip_frame_autosave_name(&self) -> NSWindowFrameAutosaveName { ... } fn ip_string_with_saved_frame(&self) -> NSWindowPersistableFrameDescriptor { ... } fn im_set_frame_from_string( &self, string: NSWindowPersistableFrameDescriptor, ) { ... } fn ip_key_window(&self) -> bool { ... } fn ip_can_become_key_window(&self) -> bool { ... } fn im_make_key_window(&self) { ... } fn im_make_key_and_order_front(&self, sender: id) { ... } fn im_become_key_window(&self) { ... } fn im_resign_key_window(&self) { ... } fn ip_main_window(&self) -> bool { ... } fn ip_can_become_main_window(&self) -> bool { ... } fn im_make_main_window(&self) { ... } fn im_become_main_window(&self) { ... } fn im_resign_main_window(&self) { ... } fn ip_toolbar(&self) -> NSToolbar { ... } fn ip_set_toolbar(&self, toolbar: NSToolbar) { ... } fn ip_toggle_toolbar_shown(&self, sender: id) { ... } fn ip_run_toolbar_customization_palette(&self, sender: id) { ... } fn ip_child_windows(&self) -> id { ... } fn add_child_window_ordered(&self, child: id, order: NSWindowOrderingMode) { ... } fn remove_child_window(&self, child: id) { ... } fn ip_parent_window(&self) -> id { ... } fn ip_excluded_from_windows_menu(&self) -> bool { ... } fn ip_set_excluded_from_windows_menu(&self, flag: bool) { ... } fn ip_are_cursor_rects_enabled(&self) -> bool { ... } fn im_enable_cursor_rects(&self) { ... } fn im_disable_cursor_rects(&self) { ... } fn im_discard_cursor_rects(&self, view: id) { ... } fn im_reset_cursor_rects(&self) { ... } fn tm_standard_window_button_for_style_mask( &self, b: NSWindowButton, style: NSWindowStyleMask, ) -> NSButton { ... } fn ip_standard_window_button(&self, b: NSWindowButton) -> NSButton { ... } fn ip_shows_toolbar_button(&self) -> bool { ... } fn ip_set_shows_toolbar_button(&self, flag: bool) { ... } fn ip_titlebar_appears_transparent(&self) -> bool { ... } fn ip_set_titlebar_appears_transparent(&self, flag: bool) { ... } fn ip_toolbar_style(&self) -> NSWindowToolbarStyle { ... } fn ip_set_toolbar_style(&self, style: NSWindowToolbarStyle) { ... } fn ip_titlebar_separator_style(&self) -> NSTitlebarSeparatorStyle { ... } fn ip_set_titlebar_separator_style(&self, style: NSTitlebarSeparatorStyle) { ... } fn ip_titlebar_layout_direction(&self) -> NSUserInterfaceLayoutDirection { ... } fn tp_allows_automatic_window_tabbing() -> bool { ... } fn tm_set_allows_automatic_window_tabbing( allows_automatic_window_tabbing: bool, ) { ... } fn ip_backing_scale_factor(&self) -> CGFloat { ... } fn im_backing_aligned_rect_options( &self, options: NSAlignmentOptions, ) -> NSRect { ... } fn im_convert_rect_from_backing(&self, rect: NSRect) -> NSRect { ... } fn im_convert_rect_from_screen(&self, rect: NSRect) -> NSRect { ... } fn im_convert_point_from_backing(&self, point: NSPoint) -> NSPoint { ... } fn im_convert_point_from_screen(&self, point: NSPoint) -> NSPoint { ... } fn im_convert_rect_to_backing(&self, rect: NSRect) -> NSRect { ... } fn im_convert_rect_to_screen(&self, rect: NSRect) -> NSRect { ... } fn im_convert_point_to_backing(&self, point: NSPoint) -> NSPoint { ... } fn im_convert_point_to_screen(&self, point: NSPoint) -> NSPoint { ... } fn ip_title(&self) -> NSString { ... } fn ip_set_title(&self, title: NSString) { ... } fn ip_subtitle(&self) -> NSString { ... } fn ip_set_subtitle(&self, subtitle: NSString) { ... } fn ip_title_visibility(&self) -> NSWindowTitleVisibility { ... } fn ip_set_title_visibility(&self, title_visibility: NSWindowTitleVisibility) { ... } fn im_set_title_with_represented_filename(&self, path: NSString) { ... } fn ip_represented_filename(&self) -> NSString { ... } fn ip_set_represented_filename(&self, represented_filename: NSString) { ... } fn ip_screen(&self) -> NSScreen { ... } fn ip_deepest_screen(&self) -> NSScreen { ... } fn ip_displays_when_screen_profile_changes(&self) -> bool { ... } fn ip_movable_by_window_background(&self) -> bool { ... } fn ip_set_movable_by_window_background( &self, movable_by_window_background: bool, ) { ... } fn ip_movable(&self) -> bool { ... } fn ip_set_movable(&self, movable: bool) { ... } fn im_center(&self) { ... } fn im_perform_close(&self, sender: id) { ... } fn im_close(&self) { ... } fn ip_released_when_closed(&self) -> bool { ... } fn ip_set_released_when_closed(&self, released_when_closed: bool) { ... } fn ip_miniaturized(&self) -> bool { ... } fn im_perform_miniaturize(&self, sender: id) { ... } fn im_miniaturize(&self, sender: id) { ... } fn im_deminiaturize(&self, sender: id) { ... } fn ip_miniwindow_image(&self) -> NSImage { ... } fn ip_miniwindow_title(&self) -> NSString { ... } fn ip_dock_tile(&self) -> NSDockTile { ... } fn im_print(&self, sender: id) { ... } fn im_data_with_esp_inside_rect(&self, rect: NSRect) -> NSData { ... } fn im_data_with_pdf_inside_rect(&self, rect: NSRect) -> NSData { ... } fn ip_restorable(&self) -> bool { ... } fn ip_set_restorable(&self, restorable: bool) { ... } fn im_disable_snapshot_restoration(&self) { ... } fn im_enable_snapshot_restoration(&self) { ... }
}
Expand description

A window that an app displays on the screen.

Provided Methods§

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.

§Arguments
  • delegate - The delegate object.
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.

§Arguments
  • style_mask - The flags that describe the window’s current style, such as if it’s resizable or in full-screen mode.
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.

§Arguments
  • value - The window’s alpha value.
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.

§Arguments
  • color - The color of the window’s background.
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.

§Arguments
  • color_space - The window’s color space.
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.

§Arguments
  • flag - A Boolean value that indicates whether the window can hide when its application becomes hidden.
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.

§Arguments
  • flag - A Boolean value that indicates whether the window is removed from the screen when its application becomes inactive.
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.

§Arguments
  • flag - A Boolean value that indicates whether the window is opaque.
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.

§Arguments
  • flag - A Boolean value that indicates whether the window has a shadow.
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.

§Arguments
  • flag - A Boolean value that indicates whether the window calculates the thickness of a given border automatically.
  • edge - The edge of the window for which to set the autorecalculates content border thickness value.
Source

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

Indicates the thickness of a given border of the window.

§Arguments
  • edge - The edge of the window for which to return the thickness.
Source

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

Specifies the thickness of a given border of the window.

§Arguments
  • thickness - The thickness of the border.
  • edge - The edge of the window for which to set the thickness.
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.

§Arguments
  • depth - The depth limit of the window.
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.

§Arguments
  • frame - The frame rectangle of the window.
  • style - The window style.
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.

§Arguments
  • content - The content rectangle of the window.
  • style - The window style.
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.

§Arguments
  • title - The title of the window.
  • style - The window style.
Source

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

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

§Arguments
  • frame - The frame rectangle of the window.
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.

§Arguments
  • sheet - The sheet to present.
  • handler - The handler to call when the sheet’s modal session ends.
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.

§Arguments
  • sheet - The sheet to present.
  • handler - The handler to call when the sheet’s modal session ends.
Source

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

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

§Arguments
  • sheet - The sheet to dismiss.
Source

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

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

§Arguments
  • sheet - The sheet to dismiss.
  • code - The return code of the sheet.
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.

§Arguments
  • point - The point at which to position the bottom-left corner of the window’s frame rectangle.
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.

§Arguments
  • point - The point at which to position the top-left corner of the window’s frame rectangle.
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.

§Arguments
  • frame - The frame rectangle to modify.
  • screen - The screen on which to position the top edge of the frame rectangle.
Source

fn im_cascade_top_left_from_point(&self, point: NSPoint)

Positions the window’s top-left to a given point.

§Arguments
  • point - The point at which to position the top-left corner of the window.
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.

§Arguments
  • frame - The frame rectangle to set.
  • flag - When true the window sends a displayIfNeeded message down its view hierarchy, thus redrawing all views.
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.

§Arguments
  • frame - The frame rectangle to set.
  • flag - When true the window sends a displayIfNeeded message down its view hierarchy, thus redrawing all views.
  • animate - true to perform the animation, whose duration is specified by animation_resize_time
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.

§Arguments
  • ratio - The aspect ratio to set.
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.

§Arguments
  • size - The minimum size to which the window’s frame (including its title bar) can be sized.
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.

§Arguments
  • size - The maximum size to which the window’s frame (including its title bar) can be sized.
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.

§Arguments
  • increments - The resizing increments to set.
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.

§Arguments
  • flag - true to optimize user-initiated resize operations by preserving the content of views that have not changed.
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.

§Arguments
  • flag - true if the window is being resized by the user.
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.

§Arguments
  • content_aspect_ratio - The window’s content aspect ratio.
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.

§Arguments
  • content_min_size - The minimum size of the window’s content view in the window’s base coordinate system.
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.

§Arguments
  • content_size - The size of the window’s content view in the window’s base coordinate system.
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.

§Arguments
  • content_max_size - The maximum size of the window’s content view in the window’s base coordinate system.
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.

§Arguments
  • content_resize_increments - The window’s content-view resizing increments.
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.

§Arguments
  • content_layout_guide - A value used by Auto Layout constraints to automatically bind to the value of contentLayoutRect.
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.

§Arguments
  • content_layout_rect - The area inside the window that is for non-obscured content, in window coordinates.
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.

§Arguments
  • full_screen_tile_size - 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_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.

§Arguments
  • full_screen_tile_content_size - A minimum size that is used to determine if a window can fit when it is in full screen in a tile.
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.

§Arguments
  • level - The window level of the window.
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.

§Arguments
  • name - The name of the frame data to remove.
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.

§Arguments
  • toolbar - The window’s toolbar.
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.

§Arguments
  • flag - A Boolean value that indicates whether the window is excluded from the application’s Windows menu.
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.

§Arguments
  • flag - A Boolean value that indicates whether the toolbar control button is displayed.
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.

§Arguments
  • flag - A Boolean value that indicates whether the title bar draws its background.
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.

§Arguments
  • style - The style that determines the appearance and location of the toolbar in relation to the title bar.
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.

§Arguments
  • style - The type of separator that the app displays between the title bar and content of a window.
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.

§Arguments
  • title - The string that appears in the title bar of the window or the path to the represented file.
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.

§Arguments
  • subtitle - A secondary line of text that appears in the title bar of the window.
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.

§Arguments
  • title_visibility - A value that indicates the visibility of the window’s title and title bar buttons.
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.

§Arguments
  • represented_filename - The path to the file of the window’s represented file.
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.

§Arguments
  • movable_by_window_background - A Boolean value that indicates whether the window is movable by clicking and dragging anywhere in its background.
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.

§Arguments
  • movable - A Boolean value that indicates whether the window can be dragged by clicking in its title bar or background.
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.

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

fn im_disable_snapshot_restoration(&self)

Disables snapshot restoration.

Source

fn im_enable_snapshot_restoration(&self)

Enables snapshot restoration.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§