pub struct CollectionBehavior(/* private fields */);
Expand description
Window collection behavior builder for NSPanel
Allows combining multiple collection behaviors using the builder pattern. Collection behaviors control how a window participates in Spaces, Exposé, and fullscreen mode.
§Example
use tauri_nspanel::{CollectionBehavior, PanelBuilder};
// Create a panel that appears on all spaces and ignores Cmd+Tab cycling
let behavior = CollectionBehavior::new()
.can_join_all_spaces()
.ignores_cycle();
// Use with PanelBuilder
PanelBuilder::new(&app, "my-panel")
.collection_behavior(behavior)
.build();
Implementations§
Source§impl CollectionBehavior
impl CollectionBehavior
Sourcepub fn can_join_all_spaces(self) -> Self
pub fn can_join_all_spaces(self) -> Self
Window can be shown on another space
Sourcepub fn move_to_active_space(self) -> Self
pub fn move_to_active_space(self) -> Self
Window appears in all spaces
Sourcepub fn stationary(self) -> Self
pub fn stationary(self) -> Self
Window does not participate in Spaces or Expose
Sourcepub fn participates_in_cycle(self) -> Self
pub fn participates_in_cycle(self) -> Self
Window participates in cycling
Sourcepub fn ignores_cycle(self) -> Self
pub fn ignores_cycle(self) -> Self
Window ignores cycling commands
Sourcepub fn full_screen_primary(self) -> Self
pub fn full_screen_primary(self) -> Self
Window can be shown in full screen
Sourcepub fn full_screen_auxiliary(self) -> Self
pub fn full_screen_auxiliary(self) -> Self
Window can be shown alongside full screen window
Sourcepub fn full_screen_none(self) -> Self
pub fn full_screen_none(self) -> Self
Window does not allow full screen
Sourcepub fn full_screen_allows_tiling(self) -> Self
pub fn full_screen_allows_tiling(self) -> Self
Window can be shown in full screen for this space only
Sourcepub fn full_screen_disallows_tiling(self) -> Self
pub fn full_screen_disallows_tiling(self) -> Self
Window does not allow full screen and hides on app deactivation
Sourcepub fn from_raw(flags: NSWindowCollectionBehavior) -> Self
pub fn from_raw(flags: NSWindowCollectionBehavior) -> Self
Create from raw NSWindowCollectionBehavior flags
Sourcepub fn value(&self) -> NSWindowCollectionBehavior
pub fn value(&self) -> NSWindowCollectionBehavior
Get the raw NSWindowCollectionBehavior flags
Trait Implementations§
Source§impl Clone for CollectionBehavior
impl Clone for CollectionBehavior
Source§fn clone(&self) -> CollectionBehavior
fn clone(&self) -> CollectionBehavior
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CollectionBehavior
impl Debug for CollectionBehavior
Source§impl Default for CollectionBehavior
impl Default for CollectionBehavior
Source§impl From<CollectionBehavior> for NSWindowCollectionBehavior
impl From<CollectionBehavior> for NSWindowCollectionBehavior
Source§fn from(behavior: CollectionBehavior) -> Self
fn from(behavior: CollectionBehavior) -> Self
Converts to this type from the input type.
Source§impl From<NSWindowCollectionBehavior> for CollectionBehavior
impl From<NSWindowCollectionBehavior> for CollectionBehavior
Source§fn from(value: NSWindowCollectionBehavior) -> Self
fn from(value: NSWindowCollectionBehavior) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CollectionBehavior
impl PartialEq for CollectionBehavior
impl Copy for CollectionBehavior
impl StructuralPartialEq for CollectionBehavior
Auto Trait Implementations§
impl Freeze for CollectionBehavior
impl RefUnwindSafe for CollectionBehavior
impl Send for CollectionBehavior
impl Sync for CollectionBehavior
impl Unpin for CollectionBehavior
impl UnwindSafe for CollectionBehavior
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more