Struct objc2_app_kit::NSTypesetter

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

Implementations§

source§

impl NSTypesetter

source

pub unsafe fn usesFontLeading(&self) -> bool

source

pub unsafe fn setUsesFontLeading(&self, uses_font_leading: bool)

source

pub unsafe fn typesetterBehavior(&self) -> NSTypesetterBehavior

Available on crate feature NSLayoutManager only.
source

pub unsafe fn setTypesetterBehavior( &self, typesetter_behavior: NSTypesetterBehavior )

Available on crate feature NSLayoutManager only.
source

pub unsafe fn hyphenationFactor(&self) -> c_float

source

pub unsafe fn setHyphenationFactor(&self, hyphenation_factor: c_float)

source

pub unsafe fn lineFragmentPadding(&self) -> CGFloat

source

pub unsafe fn setLineFragmentPadding(&self, line_fragment_padding: CGFloat)

source

pub unsafe fn substituteFontForFont( &self, original_font: &NSFont ) -> Retained<NSFont>

Available on crate feature NSFont only.
source

pub unsafe fn textTabForGlyphLocation_writingDirection_maxLocation( &self, glyph_location: CGFloat, direction: NSWritingDirection, max_location: CGFloat ) -> Option<Retained<NSTextTab>>

Available on crate features NSParagraphStyle and NSText only.
source

pub unsafe fn bidiProcessingEnabled(&self) -> bool

source

pub unsafe fn setBidiProcessingEnabled(&self, bidi_processing_enabled: bool)

source

pub unsafe fn attributedString(&self) -> Option<Retained<NSAttributedString>>

source

pub unsafe fn setAttributedString( &self, attributed_string: Option<&NSAttributedString> )

source

pub unsafe fn setParagraphGlyphRange_separatorGlyphRange( &self, paragraph_range: NSRange, paragraph_separator_range: NSRange )

source

pub unsafe fn paragraphGlyphRange(&self) -> NSRange

source

pub unsafe fn paragraphSeparatorGlyphRange(&self) -> NSRange

source

pub unsafe fn paragraphCharacterRange(&self) -> NSRange

source

pub unsafe fn paragraphSeparatorCharacterRange(&self) -> NSRange

source

pub unsafe fn layoutParagraphAtPoint( &self, line_fragment_origin: NSPointPointer ) -> NSUInteger

source

pub unsafe fn beginParagraph(&self)

source

pub unsafe fn endParagraph(&self)

source

pub unsafe fn beginLineWithGlyphAtIndex(&self, glyph_index: NSUInteger)

source

pub unsafe fn endLineWithGlyphRange(&self, line_glyph_range: NSRange)

source

pub unsafe fn lineSpacingAfterGlyphAtIndex_withProposedLineFragmentRect( &self, glyph_index: NSUInteger, rect: NSRect ) -> CGFloat

source

pub unsafe fn paragraphSpacingBeforeGlyphAtIndex_withProposedLineFragmentRect( &self, glyph_index: NSUInteger, rect: NSRect ) -> CGFloat

source

pub unsafe fn paragraphSpacingAfterGlyphAtIndex_withProposedLineFragmentRect( &self, glyph_index: NSUInteger, rect: NSRect ) -> CGFloat

source

pub unsafe fn getLineFragmentRect_usedRect_forParagraphSeparatorGlyphRange_atProposedOrigin( &self, line_fragment_rect: NSRectPointer, line_fragment_used_rect: NSRectPointer, paragraph_separator_glyph_range: NSRange, line_origin: NSPoint )

source

pub unsafe fn attributesForExtraLineFragment( &self ) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>

source

pub unsafe fn layoutManager(&self) -> Option<Retained<NSLayoutManager>>

Available on crate feature NSLayoutManager only.
source

pub unsafe fn textContainers( &self ) -> Option<Retained<NSArray<NSTextContainer>>>

Available on crate feature NSTextContainer only.
source

pub unsafe fn currentTextContainer(&self) -> Option<Retained<NSTextContainer>>

Available on crate feature NSTextContainer only.
source

pub unsafe fn currentParagraphStyle(&self) -> Option<Retained<NSParagraphStyle>>

Available on crate feature NSParagraphStyle only.
source

pub unsafe fn setHardInvalidation_forGlyphRange( &self, flag: bool, glyph_range: NSRange )

source

pub unsafe fn layoutGlyphsInLayoutManager_startingAtGlyphIndex_maxNumberOfLineFragments_nextGlyphIndex( &self, layout_manager: &NSLayoutManager, start_glyph_index: NSUInteger, max_num_lines: NSUInteger, next_glyph: NonNull<NSUInteger> )

Available on crate feature NSLayoutManager only.
source

pub unsafe fn layoutCharactersInRange_forLayoutManager_maximumNumberOfLineFragments( &self, character_range: NSRange, layout_manager: &NSLayoutManager, max_num_lines: NSUInteger ) -> NSRange

Available on crate feature NSLayoutManager only.
source

pub unsafe fn printingAdjustmentInLayoutManager_forNominallySpacedGlyphRange_packedGlyphs_count( layout_mgr: &NSLayoutManager, nominally_spaced_glyphs_range: NSRange, packed_glyphs: NonNull<c_uchar>, packed_glyphs_count: NSUInteger ) -> NSSize

Available on crate feature NSLayoutManager only.
source

pub unsafe fn baselineOffsetInLayoutManager_glyphIndex( &self, layout_mgr: &NSLayoutManager, glyph_index: NSUInteger ) -> CGFloat

Available on crate feature NSLayoutManager only.
source

pub unsafe fn sharedSystemTypesetter() -> Retained<NSTypesetter>

source

pub unsafe fn sharedSystemTypesetterForBehavior( behavior: NSTypesetterBehavior ) -> Retained<AnyObject>

Available on crate feature NSLayoutManager only.
source

pub unsafe fn defaultTypesetterBehavior() -> NSTypesetterBehavior

Available on crate feature NSLayoutManager only.
source§

impl NSTypesetter

Methods declared on superclass NSObject

source

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

source

pub unsafe fn new() -> Retained<Self>

source§

impl NSTypesetter

NSLayoutPhaseInterface

source

pub unsafe fn willSetLineFragmentRect_forGlyphRange_usedRect_baselineOffset( &self, line_rect: NSRectPointer, glyph_range: NSRange, used_rect: NSRectPointer, baseline_offset: NonNull<CGFloat> )

source

pub unsafe fn shouldBreakLineByWordBeforeCharacterAtIndex( &self, char_index: NSUInteger ) -> bool

source

pub unsafe fn shouldBreakLineByHyphenatingBeforeCharacterAtIndex( &self, char_index: NSUInteger ) -> bool

source

pub unsafe fn hyphenationFactorForGlyphAtIndex( &self, glyph_index: NSUInteger ) -> c_float

source

pub unsafe fn hyphenCharacterForGlyphAtIndex( &self, glyph_index: NSUInteger ) -> u32

source

pub unsafe fn boundingBoxForControlGlyphAtIndex_forTextContainer_proposedLineFragment_glyphPosition_characterIndex( &self, glyph_index: NSUInteger, text_container: &NSTextContainer, proposed_rect: NSRect, glyph_position: NSPoint, char_index: NSUInteger ) -> NSRect

Available on crate feature NSTextContainer only.
source§

impl NSTypesetter

NSGlyphStorageInterface

source

pub unsafe fn characterRangeForGlyphRange_actualGlyphRange( &self, glyph_range: NSRange, actual_glyph_range: NSRangePointer ) -> NSRange

source

pub unsafe fn glyphRangeForCharacterRange_actualCharacterRange( &self, char_range: NSRange, actual_char_range: NSRangePointer ) -> NSRange

source

pub unsafe fn getLineFragmentRect_usedRect_remainingRect_forStartingGlyphAtIndex_proposedRect_lineSpacing_paragraphSpacingBefore_paragraphSpacingAfter( &self, line_fragment_rect: NSRectPointer, line_fragment_used_rect: NSRectPointer, remaining_rect: NSRectPointer, starting_glyph_index: NSUInteger, proposed_rect: NSRect, line_spacing: CGFloat, paragraph_spacing_before: CGFloat, paragraph_spacing_after: CGFloat )

source

pub unsafe fn setLineFragmentRect_forGlyphRange_usedRect_baselineOffset( &self, fragment_rect: NSRect, glyph_range: NSRange, used_rect: NSRect, baseline_offset: CGFloat )

source

pub unsafe fn setNotShownAttribute_forGlyphRange( &self, flag: bool, glyph_range: NSRange )

source

pub unsafe fn setDrawsOutsideLineFragment_forGlyphRange( &self, flag: bool, glyph_range: NSRange )

source

pub unsafe fn setLocation_withAdvancements_forStartOfGlyphRange( &self, location: NSPoint, advancements: *mut CGFloat, glyph_range: NSRange )

source

pub unsafe fn setAttachmentSize_forGlyphRange( &self, attachment_size: NSSize, glyph_range: NSRange )

source

pub unsafe fn setBidiLevels_forGlyphRange( &self, levels: *mut u8, glyph_range: NSRange )

source§

impl NSTypesetter

NSTypesetter_Deprecated

source

pub unsafe fn actionForControlCharacterAtIndex( &self, char_index: NSUInteger ) -> NSTypesetterControlCharacterAction

source

pub unsafe fn getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels( &self, glyphs_range: NSRange, glyph_buffer: *mut NSGlyph, char_index_buffer: *mut NSUInteger, inscribe_buffer: *mut NSGlyphInscription, elastic_buffer: *mut Bool, bidi_level_buffer: *mut c_uchar ) -> NSUInteger

👎Deprecated
Available on crate features NSFont and NSLayoutManager only.
source

pub unsafe fn substituteGlyphsInRange_withGlyphs( &self, glyph_range: NSRange, glyphs: *mut NSGlyph )

👎Deprecated
Available on crate feature NSFont only.
source

pub unsafe fn insertGlyph_atGlyphIndex_characterIndex( &self, glyph: NSGlyph, glyph_index: NSUInteger, character_index: NSUInteger )

👎Deprecated
Available on crate feature NSFont only.
source

pub unsafe fn deleteGlyphsInRange(&self, glyph_range: NSRange)

👎Deprecated

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 NSTypesetter

source§

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

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

impl AsMut<NSObject> for NSTypesetter

source§

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

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

impl AsMut<NSTypesetter> for NSATSTypesetter

Available on crate feature NSATSTypesetter only.
source§

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

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

impl AsMut<NSTypesetter> for NSTypesetter

source§

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

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

impl AsRef<AnyObject> for NSTypesetter

source§

fn as_ref(&self) -> &AnyObject

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

impl AsRef<NSObject> for NSTypesetter

source§

fn as_ref(&self) -> &NSObject

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

impl AsRef<NSTypesetter> for NSATSTypesetter

Available on crate feature NSATSTypesetter only.
source§

fn as_ref(&self) -> &NSTypesetter

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

impl AsRef<NSTypesetter> for NSTypesetter

source§

fn as_ref(&self) -> &Self

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

impl Borrow<AnyObject> for NSTypesetter

source§

fn borrow(&self) -> &AnyObject

Immutably borrows from an owned value. Read more
source§

impl Borrow<NSObject> for NSTypesetter

source§

fn borrow(&self) -> &NSObject

Immutably borrows from an owned value. Read more
source§

impl Borrow<NSTypesetter> for NSATSTypesetter

Available on crate feature NSATSTypesetter only.
source§

fn borrow(&self) -> &NSTypesetter

Immutably borrows from an owned value. Read more
source§

impl BorrowMut<AnyObject> for NSTypesetter

source§

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

Mutably borrows from an owned value. Read more
source§

impl BorrowMut<NSObject> for NSTypesetter

source§

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

Mutably borrows from an owned value. Read more
source§

impl BorrowMut<NSTypesetter> for NSATSTypesetter

Available on crate feature NSATSTypesetter only.
source§

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

Mutably borrows from an owned value. Read more
source§

impl ClassType for NSTypesetter

§

type Super = NSObject

The superclass of this class. Read more
§

type Mutability = InteriorMutable

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

const NAME: &'static str = "NSTypesetter"

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§

fn alloc() -> Allocated<Self>

Allocate a new instance of the class. Read more
source§

impl Debug for NSTypesetter

source§

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

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

impl Deref for NSTypesetter

§

type Target = NSObject

The resulting type after dereferencing.
source§

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

Dereferences the value.
source§

impl DerefMut for NSTypesetter

source§

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

Mutably dereferences the value.
source§

impl Hash for NSTypesetter

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 NSObjectProtocol for NSTypesetter

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 NSTypesetter

source§

fn eq(&self, other: &NSTypesetter) -> 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 NSTypesetter

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 NSTypesetter

source§

impl Message for NSTypesetter

source§

impl StructuralPartialEq for NSTypesetter

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

source§

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

source§

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