Struct objc2_app_kit::NSToolbar
source · #[repr(C)]pub struct NSToolbar { /* private fields */ }
Available on crate feature
NSToolbar
only.Implementations§
source§impl NSToolbar
impl NSToolbar
pub unsafe fn initWithIdentifier( this: Allocated<Self>, identifier: &NSToolbarIdentifier ) -> Retained<Self>
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>
pub unsafe fn insertItemWithItemIdentifier_atIndex( &self, item_identifier: &NSToolbarItemIdentifier, index: NSInteger )
pub unsafe fn removeItemAtIndex(&self, index: NSInteger)
pub unsafe fn delegate( &self ) -> Option<Retained<ProtocolObject<dyn NSToolbarDelegate>>>
pub unsafe fn setDelegate( &self, delegate: Option<&ProtocolObject<dyn NSToolbarDelegate>> )
pub unsafe fn isVisible(&self) -> bool
pub unsafe fn setVisible(&self, visible: bool)
pub unsafe fn runCustomizationPalette(&self, sender: Option<&AnyObject>)
pub unsafe fn customizationPaletteIsRunning(&self) -> bool
pub unsafe fn displayMode(&self) -> NSToolbarDisplayMode
pub unsafe fn setDisplayMode(&self, display_mode: NSToolbarDisplayMode)
pub unsafe fn selectedItemIdentifier( &self ) -> Option<Retained<NSToolbarItemIdentifier>>
pub unsafe fn setSelectedItemIdentifier( &self, selected_item_identifier: Option<&NSToolbarItemIdentifier> )
pub unsafe fn sizeMode(&self) -> NSToolbarSizeMode
👎Deprecated: NSToolbarSizeMode is no longer recommended and will be ignored in the future
pub unsafe fn setSizeMode(&self, size_mode: NSToolbarSizeMode)
👎Deprecated: NSToolbarSizeMode is no longer recommended and will be ignored in the future
pub unsafe fn showsBaselineSeparator(&self) -> bool
pub unsafe fn setShowsBaselineSeparator(&self, shows_baseline_separator: bool)
pub unsafe fn allowsUserCustomization(&self) -> bool
pub unsafe fn setAllowsUserCustomization(&self, allows_user_customization: bool)
pub unsafe fn identifier(&self) -> Retained<NSToolbarIdentifier>
pub unsafe fn items(&self) -> Retained<NSArray<NSToolbarItem>>
Available on crate feature
NSToolbarItem
only.pub unsafe fn visibleItems(&self) -> Option<Retained<NSArray<NSToolbarItem>>>
Available on crate feature
NSToolbarItem
only.pub unsafe fn centeredItemIdentifiers( &self ) -> Retained<NSSet<NSToolbarItemIdentifier>>
pub unsafe fn setCenteredItemIdentifiers( &self, centered_item_identifiers: &NSSet<NSToolbarItemIdentifier> )
pub unsafe fn centeredItemIdentifier( &self ) -> Option<Retained<NSToolbarItemIdentifier>>
👎Deprecated: Use the centeredItemIdentifiers property instead
pub unsafe fn setCenteredItemIdentifier( &self, centered_item_identifier: Option<&NSToolbarItemIdentifier> )
👎Deprecated: Use the centeredItemIdentifiers property instead
pub unsafe fn autosavesConfiguration(&self) -> bool
pub unsafe fn setAutosavesConfiguration(&self, autosaves_configuration: bool)
pub unsafe fn setConfigurationFromDictionary( &self, config_dict: &NSDictionary<NSString, AnyObject> )
pub unsafe fn configurationDictionary( &self ) -> Retained<NSDictionary<NSString, AnyObject>>
pub unsafe fn validateVisibleItems(&self)
pub unsafe fn allowsExtensionItems(&self) -> bool
pub unsafe fn setAllowsExtensionItems(&self, allows_extension_items: bool)
source§impl NSToolbar
impl NSToolbar
Methods declared on superclass NSObject
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>
source§impl NSToolbar
impl NSToolbar
NSDeprecated
pub unsafe fn fullScreenAccessoryView(&self) -> Option<Retained<NSView>>
👎Deprecated: Use NSTitlebarAccessoryViewController with NSWindow instead
Available on crate features
NSResponder
and NSView
only.pub unsafe fn setFullScreenAccessoryView( &self, full_screen_accessory_view: Option<&NSView> )
👎Deprecated: Use NSTitlebarAccessoryViewController with NSWindow instead
Available on crate features
NSResponder
and NSView
only.pub unsafe fn fullScreenAccessoryViewMinHeight(&self) -> CGFloat
👎Deprecated: Use NSTitlebarAccessoryViewController and its fullScreenMinHeight property with NSWindow instead.
pub unsafe fn setFullScreenAccessoryViewMinHeight( &self, full_screen_accessory_view_min_height: CGFloat )
👎Deprecated: Use NSTitlebarAccessoryViewController and its fullScreenMinHeight property with NSWindow instead.
pub unsafe fn fullScreenAccessoryViewMaxHeight(&self) -> CGFloat
👎Deprecated: Use NSTitlebarAccessoryViewController with NSWindow instead. The max height of a titlebar accessory is implied by its view’s height.
pub unsafe fn setFullScreenAccessoryViewMaxHeight( &self, full_screen_accessory_view_max_height: CGFloat )
👎Deprecated: Use NSTitlebarAccessoryViewController with NSWindow instead. The max height of a titlebar accessory is implied by its view’s height.
Methods from Deref<Target = NSObject>§
sourcepub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
Handle messages the object doesn’t recognize.
See Apple’s documentation for details.
Methods from Deref<Target = AnyObject>§
sourcepub fn class(&self) -> &'static AnyClass
Available on crate feature NSAccessibilityConstants
only.
pub fn class(&self) -> &'static AnyClass
NSAccessibilityConstants
only.Dynamically find the class of this object.
§Example
Check that an instance of NSObject
has the precise class NSObject
.
use objc2::ClassType;
use objc2::runtime::NSObject;
let obj = NSObject::new();
assert_eq!(obj.class(), NSObject::class());
sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load
instead.Available on crate feature NSAccessibilityConstants
only.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Ivar::load
instead.NSAccessibilityConstants
only.Use Ivar::load
instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T
.
See Ivar::load_ptr
for details surrounding this.
sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load_mut
instead.Available on crate feature NSAccessibilityConstants
only.
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Ivar::load_mut
instead.NSAccessibilityConstants
only.Use Ivar::load_mut
instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T
.
See Ivar::load_ptr
for details surrounding this.
Trait Implementations§
source§impl BorrowMut<AnyObject> for NSToolbar
impl BorrowMut<AnyObject> for NSToolbar
source§fn borrow_mut(&mut self) -> &mut AnyObject
fn borrow_mut(&mut self) -> &mut AnyObject
Mutably borrows from an owned value. Read more
source§impl BorrowMut<NSObject> for NSToolbar
impl BorrowMut<NSObject> for NSToolbar
source§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
source§impl ClassType for NSToolbar
impl ClassType for NSToolbar
§type Mutability = MainThreadOnly
type Mutability = MainThreadOnly
Whether the type is mutable or immutable. Read more
source§const NAME: &'static str = "NSToolbar"
const NAME: &'static str = "NSToolbar"
The name of the Objective-C class that this type represents. Read more
source§fn class() -> &'static AnyClass
fn class() -> &'static AnyClass
Get a reference to the Objective-C class that this type represents. Read more
source§fn as_super_mut(&mut self) -> &mut Self::Super
fn as_super_mut(&mut self) -> &mut Self::Super
Get a mutable reference to the superclass.
source§impl NSObjectProtocol for NSToolbar
impl NSObjectProtocol for NSToolbar
source§fn isEqual(&self, other: &AnyObject) -> bool
fn isEqual(&self, other: &AnyObject) -> bool
Check whether the object is equal to an arbitrary other object. Read more
source§fn hash(&self) -> usize
fn hash(&self) -> usize
An integer that can be used as a table address in a hash table
structure. Read more
source§fn isKindOfClass(&self, cls: &AnyClass) -> bool
fn isKindOfClass(&self, cls: &AnyClass) -> bool
Check if the object is an instance of the class, or one of its
subclasses. Read more
source§fn is_kind_of<T>(&self) -> bool
fn is_kind_of<T>(&self) -> bool
Check if the object is an instance of the class type, or one of its
subclasses. Read more
source§fn isMemberOfClass(&self, cls: &AnyClass) -> bool
fn isMemberOfClass(&self, cls: &AnyClass) -> bool
Check if the object is an instance of a specific class, without
checking subclasses. Read more
source§fn respondsToSelector(&self, aSelector: Sel) -> bool
fn respondsToSelector(&self, aSelector: Sel) -> bool
Check whether the object implements or inherits a method with the
given selector. Read more
source§fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
Check whether the object conforms to a given protocol. Read more
source§fn debugDescription(&self) -> Retained<NSObject>
fn debugDescription(&self) -> Retained<NSObject>
A textual representation of the object to use when debugging. Read more
source§impl PartialEq for NSToolbar
impl PartialEq for NSToolbar
source§impl RefEncode for NSToolbar
impl RefEncode for NSToolbar
source§const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF
The Objective-C type-encoding for a reference of this type. Read more
impl Eq for NSToolbar
impl Message for NSToolbar
impl StructuralPartialEq for NSToolbar
Auto Trait Implementations§
impl !Freeze for NSToolbar
impl !RefUnwindSafe for NSToolbar
impl !Send for NSToolbar
impl !Sync for NSToolbar
impl !Unpin for NSToolbar
impl !UnwindSafe for NSToolbar
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
source§impl<T> CounterpartOrSelf for T
impl<T> CounterpartOrSelf for T
§type Immutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Immutable
type Immutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Immutable
The immutable counterpart of the type, or
Self
if the type has no
immutable counterpart. Read more§type Mutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Mutable
type Mutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Mutable
The mutable counterpart of the type, or
Self
if the type has no
mutable counterpart. Read more