Struct objc2_quartz_core::CATextLayer
source · #[repr(C)]pub struct CATextLayer { /* private fields */ }Available on crate features
CALayer and CATextLayer only.Implementations§
source§impl CATextLayer
impl CATextLayer
pub unsafe fn string(&self) -> Option<Retained<AnyObject>>
pub unsafe fn setString(&self, string: Option<&AnyObject>)
pub unsafe fn fontSize(&self) -> CGFloat
pub unsafe fn setFontSize(&self, font_size: CGFloat)
pub unsafe fn isWrapped(&self) -> bool
pub unsafe fn setWrapped(&self, wrapped: bool)
pub unsafe fn truncationMode(&self) -> Retained<CATextLayerTruncationMode>
pub unsafe fn setTruncationMode( &self, truncation_mode: &CATextLayerTruncationMode )
pub unsafe fn alignmentMode(&self) -> Retained<CATextLayerAlignmentMode>
pub unsafe fn setAlignmentMode(&self, alignment_mode: &CATextLayerAlignmentMode)
pub unsafe fn allowsFontSubpixelQuantization(&self) -> bool
pub unsafe fn setAllowsFontSubpixelQuantization( &self, allows_font_subpixel_quantization: bool )
source§impl CATextLayer
impl CATextLayer
Methods declared on superclass CALayer
Methods from Deref<Target = CALayer>§
pub unsafe fn constraints(&self) -> Option<Retained<NSArray<CAConstraint>>>
Available on crate feature
CAConstraintLayoutManager only.pub unsafe fn setConstraints(&self, constraints: Option<&NSArray<CAConstraint>>)
Available on crate feature
CAConstraintLayoutManager only.pub unsafe fn addConstraint(&self, c: &CAConstraint)
Available on crate feature
CAConstraintLayoutManager only.pub unsafe fn presentationLayer(&self) -> Option<Retained<Self>>
pub unsafe fn modelLayer(&self) -> Retained<Self>
pub unsafe fn shouldArchiveValueForKey(&self, key: &NSString) -> bool
pub fn bounds(&self) -> CGRect
pub fn setBounds(&self, bounds: CGRect)
pub fn position(&self) -> CGPoint
pub fn setPosition(&self, position: CGPoint)
pub fn zPosition(&self) -> CGFloat
pub fn setZPosition(&self, z_position: CGFloat)
pub fn anchorPoint(&self) -> CGPoint
pub fn setAnchorPoint(&self, anchor_point: CGPoint)
pub fn anchorPointZ(&self) -> CGFloat
pub fn setAnchorPointZ(&self, anchor_point_z: CGFloat)
pub fn transform(&self) -> CATransform3D
Available on crate feature
CATransform3D only.pub fn setTransform(&self, transform: CATransform3D)
Available on crate feature
CATransform3D only.pub fn frame(&self) -> CGRect
pub fn setFrame(&self, frame: CGRect)
pub fn isHidden(&self) -> bool
pub fn setHidden(&self, hidden: bool)
pub fn isDoubleSided(&self) -> bool
pub fn setDoubleSided(&self, double_sided: bool)
pub fn isGeometryFlipped(&self) -> bool
pub fn setGeometryFlipped(&self, geometry_flipped: bool)
pub fn contentsAreFlipped(&self) -> bool
pub fn superlayer(&self) -> Option<Retained<CALayer>>
pub fn removeFromSuperlayer(&self)
pub unsafe fn sublayers(&self) -> Option<Retained<NSArray<CALayer>>>
pub unsafe fn setSublayers(&self, sublayers: Option<&NSArray<CALayer>>)
pub fn addSublayer(&self, layer: &CALayer)
pub fn insertSublayer_atIndex(&self, layer: &CALayer, idx: c_uint)
pub fn insertSublayer_below(&self, layer: &CALayer, sibling: Option<&CALayer>)
pub fn insertSublayer_above(&self, layer: &CALayer, sibling: Option<&CALayer>)
pub unsafe fn replaceSublayer_with( &self, old_layer: &CALayer, new_layer: &CALayer )
pub fn sublayerTransform(&self) -> CATransform3D
Available on crate feature
CATransform3D only.pub fn setSublayerTransform(&self, sublayer_transform: CATransform3D)
Available on crate feature
CATransform3D only.pub fn mask(&self) -> Option<Retained<CALayer>>
pub unsafe fn setMask(&self, mask: Option<&CALayer>)
pub fn masksToBounds(&self) -> bool
pub fn setMasksToBounds(&self, masks_to_bounds: bool)
pub fn convertPoint_fromLayer(&self, p: CGPoint, l: Option<&CALayer>) -> CGPoint
pub fn convertPoint_toLayer(&self, p: CGPoint, l: Option<&CALayer>) -> CGPoint
pub fn convertRect_fromLayer(&self, r: CGRect, l: Option<&CALayer>) -> CGRect
pub fn convertRect_toLayer(&self, r: CGRect, l: Option<&CALayer>) -> CGRect
pub fn convertTime_fromLayer( &self, t: c_double, l: Option<&CALayer> ) -> c_double
pub fn convertTime_toLayer(&self, t: c_double, l: Option<&CALayer>) -> c_double
pub fn hitTest(&self, p: CGPoint) -> Option<Retained<CALayer>>
pub fn containsPoint(&self, p: CGPoint) -> bool
pub unsafe fn contents(&self) -> Option<Retained<AnyObject>>
pub unsafe fn setContents(&self, contents: Option<&AnyObject>)
pub fn contentsRect(&self) -> CGRect
pub fn setContentsRect(&self, contents_rect: CGRect)
pub fn contentsGravity(&self) -> Retained<CALayerContentsGravity>
pub fn setContentsGravity(&self, contents_gravity: &CALayerContentsGravity)
pub fn contentsScale(&self) -> CGFloat
pub fn setContentsScale(&self, contents_scale: CGFloat)
pub fn contentsCenter(&self) -> CGRect
pub fn setContentsCenter(&self, contents_center: CGRect)
pub fn contentsFormat(&self) -> Retained<CALayerContentsFormat>
pub fn setContentsFormat(&self, contents_format: &CALayerContentsFormat)
pub unsafe fn wantsExtendedDynamicRangeContent(&self) -> bool
pub unsafe fn setWantsExtendedDynamicRangeContent( &self, wants_extended_dynamic_range_content: bool )
pub fn minificationFilter(&self) -> Retained<CALayerContentsFilter>
pub fn setMinificationFilter(&self, minification_filter: &CALayerContentsFilter)
pub fn magnificationFilter(&self) -> Retained<CALayerContentsFilter>
pub fn setMagnificationFilter( &self, magnification_filter: &CALayerContentsFilter )
pub fn minificationFilterBias(&self) -> c_float
pub fn setMinificationFilterBias(&self, minification_filter_bias: c_float)
pub fn isOpaque(&self) -> bool
pub fn setOpaque(&self, opaque: bool)
pub fn display(&self)
pub fn setNeedsDisplay(&self)
pub fn setNeedsDisplayInRect(&self, r: CGRect)
pub fn needsDisplay(&self) -> bool
pub fn displayIfNeeded(&self)
pub fn needsDisplayOnBoundsChange(&self) -> bool
pub fn setNeedsDisplayOnBoundsChange( &self, needs_display_on_bounds_change: bool )
pub fn drawsAsynchronously(&self) -> bool
pub fn setDrawsAsynchronously(&self, draws_asynchronously: bool)
pub fn edgeAntialiasingMask(&self) -> CAEdgeAntialiasingMask
pub fn setEdgeAntialiasingMask( &self, edge_antialiasing_mask: CAEdgeAntialiasingMask )
pub fn allowsEdgeAntialiasing(&self) -> bool
pub fn setAllowsEdgeAntialiasing(&self, allows_edge_antialiasing: bool)
pub fn cornerRadius(&self) -> CGFloat
pub fn setCornerRadius(&self, corner_radius: CGFloat)
pub fn maskedCorners(&self) -> CACornerMask
pub fn setMaskedCorners(&self, masked_corners: CACornerMask)
pub fn cornerCurve(&self) -> Retained<CALayerCornerCurve>
pub fn setCornerCurve(&self, corner_curve: &CALayerCornerCurve)
pub fn borderWidth(&self) -> CGFloat
pub fn setBorderWidth(&self, border_width: CGFloat)
pub fn opacity(&self) -> c_float
pub fn setOpacity(&self, opacity: c_float)
pub fn allowsGroupOpacity(&self) -> bool
pub fn setAllowsGroupOpacity(&self, allows_group_opacity: bool)
pub unsafe fn compositingFilter(&self) -> Option<Retained<AnyObject>>
pub unsafe fn setCompositingFilter( &self, compositing_filter: Option<&AnyObject> )
pub unsafe fn filters(&self) -> Option<Retained<NSArray>>
pub unsafe fn setFilters(&self, filters: Option<&NSArray>)
pub unsafe fn backgroundFilters(&self) -> Option<Retained<NSArray>>
pub unsafe fn setBackgroundFilters(&self, background_filters: Option<&NSArray>)
pub fn shouldRasterize(&self) -> bool
pub fn setShouldRasterize(&self, should_rasterize: bool)
pub fn rasterizationScale(&self) -> CGFloat
pub fn setRasterizationScale(&self, rasterization_scale: CGFloat)
pub fn shadowOpacity(&self) -> c_float
pub fn setShadowOpacity(&self, shadow_opacity: c_float)
pub fn shadowOffset(&self) -> CGSize
pub fn setShadowOffset(&self, shadow_offset: CGSize)
pub fn shadowRadius(&self) -> CGFloat
pub fn setShadowRadius(&self, shadow_radius: CGFloat)
pub fn autoresizingMask(&self) -> CAAutoresizingMask
pub fn setAutoresizingMask(&self, autoresizing_mask: CAAutoresizingMask)
pub fn layoutManager( &self ) -> Option<Retained<ProtocolObject<dyn CALayoutManager>>>
pub fn setLayoutManager( &self, layout_manager: Option<&ProtocolObject<dyn CALayoutManager>> )
pub fn preferredFrameSize(&self) -> CGSize
pub fn setNeedsLayout(&self)
pub fn needsLayout(&self) -> bool
pub fn layoutIfNeeded(&self)
pub fn layoutSublayers(&self)
pub fn resizeSublayersWithOldSize(&self, size: CGSize)
pub fn resizeWithOldSuperlayerSize(&self, size: CGSize)
pub fn actionForKey( &self, event: &NSString ) -> Option<Retained<ProtocolObject<dyn CAAction>>>
pub fn actions( &self ) -> Option<Retained<NSDictionary<NSString, ProtocolObject<dyn CAAction>>>>
pub fn setActions( &self, actions: Option<&NSDictionary<NSString, ProtocolObject<dyn CAAction>>> )
pub fn addAnimation_forKey(&self, anim: &CAAnimation, key: Option<&NSString>)
Available on crate feature
CAAnimation only.pub fn removeAllAnimations(&self)
pub fn removeAnimationForKey(&self, key: &NSString)
pub fn animationKeys(&self) -> Option<Retained<NSArray<NSString>>>
pub unsafe fn animationForKey( &self, key: &NSString ) -> Option<Retained<CAAnimation>>
Available on crate feature
CAAnimation only.pub fn name(&self) -> Option<Retained<NSString>>
pub fn setName(&self, name: Option<&NSString>)
pub fn delegate(&self) -> Option<Retained<ProtocolObject<dyn CALayerDelegate>>>
pub fn setDelegate( &self, delegate: Option<&ProtocolObject<dyn CALayerDelegate>> )
pub unsafe fn style(&self) -> Option<Retained<NSDictionary>>
pub unsafe fn setStyle(&self, style: Option<&NSDictionary>)
pub unsafe fn scrollPoint(&self, p: CGPoint)
Available on crate feature
CAScrollLayer only.pub unsafe fn scrollRectToVisible(&self, r: CGRect)
Available on crate feature
CAScrollLayer only.pub unsafe fn visibleRect(&self) -> CGRect
Available on crate feature
CAScrollLayer only.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
pub fn class(&self) -> &'static AnyClass
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.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Ivar::load instead.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.
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Ivar::load_mut instead.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 CATextLayer
impl AsMut<AnyObject> for CATextLayer
source§impl AsMut<CALayer> for CATextLayer
impl AsMut<CALayer> for CATextLayer
source§impl AsMut<CATextLayer> for CATextLayer
impl AsMut<CATextLayer> for CATextLayer
source§impl AsMut<NSObject> for CATextLayer
impl AsMut<NSObject> for CATextLayer
source§impl AsRef<AnyObject> for CATextLayer
impl AsRef<AnyObject> for CATextLayer
source§impl AsRef<CALayer> for CATextLayer
impl AsRef<CALayer> for CATextLayer
source§impl AsRef<CATextLayer> for CATextLayer
impl AsRef<CATextLayer> for CATextLayer
source§impl AsRef<NSObject> for CATextLayer
impl AsRef<NSObject> for CATextLayer
source§impl Borrow<AnyObject> for CATextLayer
impl Borrow<AnyObject> for CATextLayer
source§impl Borrow<CALayer> for CATextLayer
impl Borrow<CALayer> for CATextLayer
source§impl Borrow<NSObject> for CATextLayer
impl Borrow<NSObject> for CATextLayer
source§impl BorrowMut<AnyObject> for CATextLayer
impl BorrowMut<AnyObject> for CATextLayer
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<CALayer> for CATextLayer
impl BorrowMut<CALayer> for CATextLayer
source§fn borrow_mut(&mut self) -> &mut CALayer
fn borrow_mut(&mut self) -> &mut CALayer
Mutably borrows from an owned value. Read more
source§impl BorrowMut<NSObject> for CATextLayer
impl BorrowMut<NSObject> for CATextLayer
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 CAMediaTiming for CATextLayer
Available on crate feature CAMediaTiming only.
impl CAMediaTiming for CATextLayer
Available on crate feature
CAMediaTiming only.unsafe fn beginTime(&self) -> c_double
unsafe fn setBeginTime(&self, begin_time: c_double)
unsafe fn duration(&self) -> c_double
unsafe fn setDuration(&self, duration: c_double)
unsafe fn speed(&self) -> c_float
unsafe fn setSpeed(&self, speed: c_float)
unsafe fn timeOffset(&self) -> c_double
unsafe fn setTimeOffset(&self, time_offset: c_double)
unsafe fn repeatCount(&self) -> c_float
unsafe fn setRepeatCount(&self, repeat_count: c_float)
unsafe fn repeatDuration(&self) -> c_double
unsafe fn setRepeatDuration(&self, repeat_duration: c_double)
unsafe fn autoreverses(&self) -> bool
unsafe fn setAutoreverses(&self, autoreverses: bool)
unsafe fn fillMode(&self) -> Retained<CAMediaTimingFillMode>
unsafe fn setFillMode(&self, fill_mode: &CAMediaTimingFillMode)
source§impl ClassType for CATextLayer
impl ClassType for CATextLayer
§type Mutability = InteriorMutable
type Mutability = InteriorMutable
Whether the type is mutable or immutable. Read more
source§const NAME: &'static str = "CATextLayer"
const NAME: &'static str = "CATextLayer"
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 Debug for CATextLayer
impl Debug for CATextLayer
source§impl Deref for CATextLayer
impl Deref for CATextLayer
source§impl DerefMut for CATextLayer
impl DerefMut for CATextLayer
source§impl Hash for CATextLayer
impl Hash for CATextLayer
source§impl NSObjectProtocol for CATextLayer
impl NSObjectProtocol for CATextLayer
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 NSSecureCoding for CATextLayer
impl NSSecureCoding for CATextLayer
source§impl PartialEq for CATextLayer
impl PartialEq for CATextLayer
source§fn eq(&self, other: &CATextLayer) -> bool
fn eq(&self, other: &CATextLayer) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl RefEncode for CATextLayer
impl RefEncode for CATextLayer
source§const ENCODING_REF: Encoding = <CALayer as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <CALayer as ::objc2::RefEncode>::ENCODING_REF
The Objective-C type-encoding for a reference of this type. Read more
impl Eq for CATextLayer
impl Message for CATextLayer
impl NSCoding for CATextLayer
impl StructuralPartialEq for CATextLayer
Auto Trait Implementations§
impl !Freeze for CATextLayer
impl !RefUnwindSafe for CATextLayer
impl !Send for CATextLayer
impl !Sync for CATextLayer
impl !Unpin for CATextLayer
impl !UnwindSafe for CATextLayer
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