Struct objc2_app_kit::NSFontManager

source ·
#[repr(C)]
pub struct NSFontManager { /* private fields */ }
Available on crate feature NSFontManager only.

Implementations§

source§

impl NSFontManager

source

pub unsafe fn setFontPanelFactory( factory_id: Option<&AnyClass>, mtm: MainThreadMarker )

source

pub unsafe fn setFontManagerFactory( factory_id: Option<&AnyClass>, mtm: MainThreadMarker )

source

pub unsafe fn sharedFontManager( mtm: MainThreadMarker ) -> Retained<NSFontManager>

source

pub unsafe fn isMultiple(&self) -> bool

source

pub unsafe fn selectedFont(&self) -> Option<Retained<NSFont>>

Available on crate feature NSFont only.
source

pub unsafe fn setSelectedFont_isMultiple(&self, font_obj: &NSFont, flag: bool)

Available on crate feature NSFont only.
source

pub unsafe fn setFontMenu(&self, new_menu: &NSMenu)

Available on crate feature NSMenu only.
source

pub unsafe fn fontMenu(&self, create: bool) -> Option<Retained<NSMenu>>

Available on crate feature NSMenu only.
source

pub unsafe fn fontPanel(&self, create: bool) -> Option<Retained<NSFontPanel>>

Available on crate features NSFontPanel and NSPanel and NSResponder and NSWindow only.
source

pub unsafe fn fontWithFamily_traits_weight_size( &self, family: &NSString, traits: NSFontTraitMask, weight: NSInteger, size: CGFloat ) -> Option<Retained<NSFont>>

Available on crate feature NSFont only.
source

pub unsafe fn traitsOfFont(&self, font_obj: &NSFont) -> NSFontTraitMask

Available on crate feature NSFont only.
source

pub unsafe fn weightOfFont(&self, font_obj: &NSFont) -> NSInteger

Available on crate feature NSFont only.
source

pub unsafe fn availableFonts(&self) -> Retained<NSArray<NSString>>

source

pub unsafe fn availableFontFamilies(&self) -> Retained<NSArray<NSString>>

source

pub unsafe fn availableMembersOfFontFamily( &self, fam: &NSString ) -> Option<Retained<NSArray<NSArray>>>

source

pub unsafe fn convertFont(&self, font_obj: &NSFont) -> Retained<NSFont>

Available on crate feature NSFont only.
source

pub unsafe fn convertFont_toSize( &self, font_obj: &NSFont, size: CGFloat ) -> Retained<NSFont>

Available on crate feature NSFont only.
source

pub unsafe fn convertFont_toFace( &self, font_obj: &NSFont, typeface: &NSString ) -> Option<Retained<NSFont>>

Available on crate feature NSFont only.
source

pub unsafe fn convertFont_toFamily( &self, font_obj: &NSFont, family: &NSString ) -> Retained<NSFont>

Available on crate feature NSFont only.
source

pub unsafe fn convertFont_toHaveTrait( &self, font_obj: &NSFont, trait: NSFontTraitMask ) -> Retained<NSFont>

Available on crate feature NSFont only.
source

pub unsafe fn convertFont_toNotHaveTrait( &self, font_obj: &NSFont, trait: NSFontTraitMask ) -> Retained<NSFont>

Available on crate feature NSFont only.
source

pub unsafe fn convertWeight_ofFont( &self, up_flag: bool, font_obj: &NSFont ) -> Retained<NSFont>

Available on crate feature NSFont only.
source

pub unsafe fn isEnabled(&self) -> bool

source

pub unsafe fn setEnabled(&self, enabled: bool)

source

pub unsafe fn action(&self) -> Sel

source

pub unsafe fn setAction(&self, action: Sel)

source

pub unsafe fn delegate(&self) -> Option<Retained<AnyObject>>

👎Deprecated: NSFontManager doesn’t have any delegate method. This property should not be used.
source

pub unsafe fn setDelegate(&self, delegate: Option<&AnyObject>)

👎Deprecated: NSFontManager doesn’t have any delegate method. This property should not be used.
source

pub unsafe fn sendAction(&self) -> bool

source

pub unsafe fn localizedNameForFamily_face( &self, family: &NSString, face_key: Option<&NSString> ) -> Retained<NSString>

source

pub unsafe fn setSelectedAttributes_isMultiple( &self, attributes: &NSDictionary<NSString, AnyObject>, flag: bool )

source

pub unsafe fn convertAttributes( &self, attributes: &NSDictionary<NSString, AnyObject> ) -> Retained<NSDictionary<NSString, AnyObject>>

source

pub unsafe fn availableFontNamesMatchingFontDescriptor( &self, descriptor: &NSFontDescriptor ) -> Option<Retained<NSArray>>

👎Deprecated: Use -[NSFontDescriptor matchingFontDescriptorsWithMandatoryKeys:] instead
Available on crate feature NSFontDescriptor only.
source

pub unsafe fn collectionNames(&self) -> Retained<NSArray>

👎Deprecated: Use +[NSFontCollection allFontCollectionNames] instead
source

pub unsafe fn fontDescriptorsInCollection( &self, collection_names: &NSString ) -> Option<Retained<NSArray>>

👎Deprecated: Use -[NSFontCollection matchingDescriptors] instead
source

pub unsafe fn addCollection_options( &self, collection_name: &NSString, collection_options: NSFontCollectionOptions ) -> bool

👎Deprecated: Use +[NSFontCollection showFontCollection:withName:visibility:name:] instead
source

pub unsafe fn removeCollection(&self, collection_name: &NSString) -> bool

👎Deprecated: Use +[NSFontCollection hideFontCollectionWithName:visibility:error:] instead
source

pub unsafe fn addFontDescriptors_toCollection( &self, descriptors: &NSArray, collection_name: &NSString )

👎Deprecated: Use -[NSMutableFontCollection addQueryForDescriptors:] instead
source

pub unsafe fn removeFontDescriptor_fromCollection( &self, descriptor: &NSFontDescriptor, collection: &NSString )

👎Deprecated: Use -[NSMutableFontCollection removeQueryForDescriptors:] instead
Available on crate feature NSFontDescriptor only.
source

pub unsafe fn currentFontAction(&self) -> NSFontAction

source

pub unsafe fn convertFontTraits( &self, traits: NSFontTraitMask ) -> NSFontTraitMask

source

pub unsafe fn target(&self) -> Option<Retained<AnyObject>>

source

pub unsafe fn setTarget(&self, target: Option<&AnyObject>)

source§

impl NSFontManager

Methods declared on superclass NSObject

source

pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>

source

pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>

source§

impl NSFontManager

NSFontManagerMenuActionMethods

source

pub unsafe fn fontNamed_hasTraits( &self, f_name: &NSString, some_traits: NSFontTraitMask ) -> bool

source

pub unsafe fn availableFontNamesWithTraits( &self, some_traits: NSFontTraitMask ) -> Option<Retained<NSArray<NSString>>>

source

pub unsafe fn addFontTrait(&self, sender: Option<&AnyObject>)

source

pub unsafe fn removeFontTrait(&self, sender: Option<&AnyObject>)

source

pub unsafe fn modifyFontViaPanel(&self, sender: Option<&AnyObject>)

source

pub unsafe fn modifyFont(&self, sender: Option<&AnyObject>)

source

pub unsafe fn orderFrontFontPanel(&self, sender: Option<&AnyObject>)

source

pub unsafe fn orderFrontStylesPanel(&self, sender: Option<&AnyObject>)

Methods from Deref<Target = NSObject>§

source

pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !

Handle messages the object doesn’t recognize.

See Apple’s documentation for details.

Methods from Deref<Target = AnyObject>§

source

pub fn class(&self) -> &'static AnyClass

Available on crate feature 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());
source

pub unsafe fn get_ivar<T>(&self, name: &str) -> &T
where T: Encode,

👎Deprecated: this is difficult to use correctly, use Ivar::load instead.
Available on crate feature 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.

source

pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut T
where T: Encode,

👎Deprecated: this is difficult to use correctly, use Ivar::load_mut instead.
Available on crate feature 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 AsMut<AnyObject> for NSFontManager

source§

fn as_mut(&mut self) -> &mut AnyObject

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl AsMut<NSFontManager> for NSFontManager

source§

fn as_mut(&mut self) -> &mut Self

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl AsMut<NSObject> for NSFontManager

source§

fn as_mut(&mut self) -> &mut NSObject

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl AsRef<AnyObject> for NSFontManager

source§

fn as_ref(&self) -> &AnyObject

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<NSFontManager> for NSFontManager

source§

fn as_ref(&self) -> &Self

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<NSObject> for NSFontManager

source§

fn as_ref(&self) -> &NSObject

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Borrow<AnyObject> for NSFontManager

source§

fn borrow(&self) -> &AnyObject

Immutably borrows from an owned value. Read more
source§

impl Borrow<NSObject> for NSFontManager

source§

fn borrow(&self) -> &NSObject

Immutably borrows from an owned value. Read more
source§

impl BorrowMut<AnyObject> for NSFontManager

source§

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

Mutably borrows from an owned value. Read more
source§

impl BorrowMut<NSObject> for NSFontManager

source§

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

Mutably borrows from an owned value. Read more
source§

impl ClassType for NSFontManager

§

type Super = NSObject

The superclass of this class. Read more
§

type Mutability = MainThreadOnly

Whether the type is mutable or immutable. Read more
source§

const NAME: &'static str = "NSFontManager"

The name of the Objective-C class that this type represents. Read more
source§

fn class() -> &'static AnyClass

Get a reference to the Objective-C class that this type represents. Read more
source§

fn as_super(&self) -> &Self::Super

Get an immutable reference to the superclass.
source§

fn as_super_mut(&mut self) -> &mut Self::Super

Get a mutable reference to the superclass.
source§

fn retain(&self) -> Retained<Self>
where Self: IsRetainable + Sized,

Increment the reference count of the receiver. Read more
source§

impl Debug for NSFontManager

source§

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

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

impl Deref for NSFontManager

§

type Target = NSObject

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl DerefMut for NSFontManager

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl Hash for NSFontManager

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl NSMenuItemValidation for NSFontManager

Available on crate feature NSMenu only.
source§

unsafe fn validateMenuItem(&self, menu_item: &NSMenuItem) -> bool
where Self: Sized + Message,

Available on crate feature NSMenuItem only.
source§

impl NSObjectProtocol for NSFontManager

source§

fn isEqual(&self, other: &AnyObject) -> bool
where Self: Sized + Message,

Check whether the object is equal to an arbitrary other object. Read more
source§

fn hash(&self) -> usize
where Self: Sized + Message,

An integer that can be used as a table address in a hash table structure. Read more
source§

fn isKindOfClass(&self, cls: &AnyClass) -> bool
where Self: Sized + Message,

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
where T: ClassType, Self: Sized + Message,

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
where Self: Sized + Message,

Check if the object is an instance of a specific class, without checking subclasses. Read more
source§

fn respondsToSelector(&self, aSelector: Sel) -> bool
where Self: Sized + Message,

Check whether the object implements or inherits a method with the given selector. Read more
source§

fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
where Self: Sized + Message,

Check whether the object conforms to a given protocol. Read more
source§

fn description(&self) -> Retained<NSObject>
where Self: Sized + Message,

A textual representation of the object. Read more
source§

fn debugDescription(&self) -> Retained<NSObject>
where Self: Sized + Message,

A textual representation of the object to use when debugging. Read more
source§

fn isProxy(&self) -> bool
where Self: Sized + Message,

Check whether the receiver is a subclass of the NSProxy root class instead of the usual NSObject. Read more
source§

fn retainCount(&self) -> usize
where Self: Sized + Message,

The reference count of the object. Read more
source§

impl PartialEq for NSFontManager

source§

fn eq(&self, other: &NSFontManager) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl RefEncode for NSFontManager

source§

const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF

The Objective-C type-encoding for a reference of this type. Read more
source§

impl Eq for NSFontManager

source§

impl Message for NSFontManager

source§

impl StructuralPartialEq for NSFontManager

Auto Trait Implementations§

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> CounterpartOrSelf for T
where T: ClassType + ?Sized, <T as ClassType>::Mutability: MutabilityCounterpartOrSelf<T>,

§

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

The mutable counterpart of the type, or Self if the type has no mutable counterpart. 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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.
source§

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

source§

impl<T> IsIdCloneable for T
where T: ClassType + ?Sized, <T as ClassType>::Mutability: MutabilityIsIdCloneable,

source§

impl<T> IsMainThreadOnly for T
where T: ClassType + ?Sized, <T as ClassType>::Mutability: MutabilityIsMainThreadOnly,

source§

impl<T> IsRetainable for T
where T: ClassType + ?Sized, <T as ClassType>::Mutability: MutabilityIsRetainable,