pub unsafe trait NSLayoutManagerDelegate: NSObjectProtocol {
// Provided methods
fn layoutManager_lineSpacingAfterGlyphAtIndex_withProposedLineFragmentRect(
&self,
layout_manager: &NSLayoutManager,
glyph_index: NSUInteger,
rect: NSRect,
) -> CGFloat
where Self: Sized + Message { ... }
fn layoutManager_paragraphSpacingBeforeGlyphAtIndex_withProposedLineFragmentRect(
&self,
layout_manager: &NSLayoutManager,
glyph_index: NSUInteger,
rect: NSRect,
) -> CGFloat
where Self: Sized + Message { ... }
fn layoutManager_paragraphSpacingAfterGlyphAtIndex_withProposedLineFragmentRect(
&self,
layout_manager: &NSLayoutManager,
glyph_index: NSUInteger,
rect: NSRect,
) -> CGFloat
where Self: Sized + Message { ... }
fn layoutManager_shouldUseAction_forControlCharacterAtIndex(
&self,
layout_manager: &NSLayoutManager,
action: NSControlCharacterAction,
char_index: NSUInteger,
) -> NSControlCharacterAction
where Self: Sized + Message { ... }
fn layoutManager_shouldBreakLineByWordBeforeCharacterAtIndex(
&self,
layout_manager: &NSLayoutManager,
char_index: NSUInteger,
) -> bool
where Self: Sized + Message { ... }
fn layoutManager_shouldBreakLineByHyphenatingBeforeCharacterAtIndex(
&self,
layout_manager: &NSLayoutManager,
char_index: NSUInteger,
) -> bool
where Self: Sized + Message { ... }
fn layoutManager_boundingBoxForControlGlyphAtIndex_forTextContainer_proposedLineFragment_glyphPosition_characterIndex(
&self,
layout_manager: &NSLayoutManager,
glyph_index: NSUInteger,
text_container: &NSTextContainer,
proposed_rect: NSRect,
glyph_position: NSPoint,
char_index: NSUInteger,
) -> NSRect
where Self: Sized + Message { ... }
unsafe fn layoutManager_shouldSetLineFragmentRect_lineFragmentUsedRect_baselineOffset_inTextContainer_forGlyphRange(
&self,
layout_manager: &NSLayoutManager,
line_fragment_rect: NonNull<NSRect>,
line_fragment_used_rect: NonNull<NSRect>,
baseline_offset: NonNull<CGFloat>,
text_container: &NSTextContainer,
glyph_range: NSRange,
) -> bool
where Self: Sized + Message { ... }
fn layoutManagerDidInvalidateLayout(&self, sender: &NSLayoutManager)
where Self: Sized + Message { ... }
fn layoutManager_didCompleteLayoutForTextContainer_atEnd(
&self,
layout_manager: &NSLayoutManager,
text_container: Option<&NSTextContainer>,
layout_finished_flag: bool,
)
where Self: Sized + Message { ... }
fn layoutManager_textContainer_didChangeGeometryFromSize(
&self,
layout_manager: &NSLayoutManager,
text_container: &NSTextContainer,
old_size: NSSize,
)
where Self: Sized + Message { ... }
unsafe fn layoutManager_shouldUseTemporaryAttributes_forDrawingToScreen_atCharacterIndex_effectiveRange(
&self,
layout_manager: &NSLayoutManager,
attrs: &NSDictionary<NSAttributedStringKey, AnyObject>,
to_screen: bool,
char_index: NSUInteger,
effective_char_range: NSRangePointer,
) -> Option<Retained<NSDictionary<NSAttributedStringKey, AnyObject>>>
where Self: Sized + Message { ... }
}Available on crate feature
NSLayoutManager only.Expand description
Provided Methods§
Sourcefn layoutManager_lineSpacingAfterGlyphAtIndex_withProposedLineFragmentRect(
&self,
layout_manager: &NSLayoutManager,
glyph_index: NSUInteger,
rect: NSRect,
) -> CGFloat
Available on crate feature objc2-core-foundation only.
fn layoutManager_lineSpacingAfterGlyphAtIndex_withProposedLineFragmentRect( &self, layout_manager: &NSLayoutManager, glyph_index: NSUInteger, rect: NSRect, ) -> CGFloat
objc2-core-foundation only.********************** Line layout ***********************
fn layoutManager_paragraphSpacingBeforeGlyphAtIndex_withProposedLineFragmentRect( &self, layout_manager: &NSLayoutManager, glyph_index: NSUInteger, rect: NSRect, ) -> CGFloat
Available on crate feature
objc2-core-foundation only.fn layoutManager_paragraphSpacingAfterGlyphAtIndex_withProposedLineFragmentRect( &self, layout_manager: &NSLayoutManager, glyph_index: NSUInteger, rect: NSRect, ) -> CGFloat
Available on crate feature
objc2-core-foundation only.fn layoutManager_shouldUseAction_forControlCharacterAtIndex( &self, layout_manager: &NSLayoutManager, action: NSControlCharacterAction, char_index: NSUInteger, ) -> NSControlCharacterAction
fn layoutManager_shouldBreakLineByWordBeforeCharacterAtIndex( &self, layout_manager: &NSLayoutManager, char_index: NSUInteger, ) -> bool
fn layoutManager_shouldBreakLineByHyphenatingBeforeCharacterAtIndex( &self, layout_manager: &NSLayoutManager, char_index: NSUInteger, ) -> bool
fn layoutManager_boundingBoxForControlGlyphAtIndex_forTextContainer_proposedLineFragment_glyphPosition_characterIndex( &self, layout_manager: &NSLayoutManager, glyph_index: NSUInteger, text_container: &NSTextContainer, proposed_rect: NSRect, glyph_position: NSPoint, char_index: NSUInteger, ) -> NSRect
Available on crate feature
NSTextContainer only.Sourceunsafe fn layoutManager_shouldSetLineFragmentRect_lineFragmentUsedRect_baselineOffset_inTextContainer_forGlyphRange(
&self,
layout_manager: &NSLayoutManager,
line_fragment_rect: NonNull<NSRect>,
line_fragment_used_rect: NonNull<NSRect>,
baseline_offset: NonNull<CGFloat>,
text_container: &NSTextContainer,
glyph_range: NSRange,
) -> bool
Available on crate features NSTextContainer and objc2-core-foundation only.
unsafe fn layoutManager_shouldSetLineFragmentRect_lineFragmentUsedRect_baselineOffset_inTextContainer_forGlyphRange( &self, layout_manager: &NSLayoutManager, line_fragment_rect: NonNull<NSRect>, line_fragment_used_rect: NonNull<NSRect>, baseline_offset: NonNull<CGFloat>, text_container: &NSTextContainer, glyph_range: NSRange, ) -> bool
NSTextContainer and objc2-core-foundation only.§Safety
line_fragment_rectmust be a valid pointer.line_fragment_used_rectmust be a valid pointer.baseline_offsetmust be a valid pointer.
Sourcefn layoutManagerDidInvalidateLayout(&self, sender: &NSLayoutManager)
fn layoutManagerDidInvalidateLayout(&self, sender: &NSLayoutManager)
********************** Layout processing ***********************
fn layoutManager_didCompleteLayoutForTextContainer_atEnd( &self, layout_manager: &NSLayoutManager, text_container: Option<&NSTextContainer>, layout_finished_flag: bool, )
Available on crate feature
NSTextContainer only.fn layoutManager_textContainer_didChangeGeometryFromSize( &self, layout_manager: &NSLayoutManager, text_container: &NSTextContainer, old_size: NSSize, )
Available on crate feature
NSTextContainer only.Sourceunsafe fn layoutManager_shouldUseTemporaryAttributes_forDrawingToScreen_atCharacterIndex_effectiveRange(
&self,
layout_manager: &NSLayoutManager,
attrs: &NSDictionary<NSAttributedStringKey, AnyObject>,
to_screen: bool,
char_index: NSUInteger,
effective_char_range: NSRangePointer,
) -> Option<Retained<NSDictionary<NSAttributedStringKey, AnyObject>>>
unsafe fn layoutManager_shouldUseTemporaryAttributes_forDrawingToScreen_atCharacterIndex_effectiveRange( &self, layout_manager: &NSLayoutManager, attrs: &NSDictionary<NSAttributedStringKey, AnyObject>, to_screen: bool, char_index: NSUInteger, effective_char_range: NSRangePointer, ) -> Option<Retained<NSDictionary<NSAttributedStringKey, AnyObject>>>
§Safety
attrsgeneric should be of the correct type.effective_char_rangemust be a valid pointer or null.
Trait Implementations§
impl<T> ImplementedBy<T> for dyn NSLayoutManagerDelegate
Source§impl ProtocolType for dyn NSLayoutManagerDelegate
impl ProtocolType for dyn NSLayoutManagerDelegate
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".