objc2_ui_kit/generated/
UIButtonConfiguration.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiconfigurationtextattributestransformer?language=objc)
13#[cfg(feature = "block2")]
14pub type UIConfigurationTextAttributesTransformer = *mut block2::DynBlock<
15    dyn Fn(
16        NonNull<NSDictionary<NSAttributedStringKey, AnyObject>>,
17    ) -> NonNull<NSDictionary<NSAttributedStringKey, AnyObject>>,
18>;
19
20/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uibuttonconfigurationsize?language=objc)
21// NS_ENUM
22#[repr(transparent)]
23#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
24pub struct UIButtonConfigurationSize(pub NSInteger);
25impl UIButtonConfigurationSize {
26    #[doc(alias = "UIButtonConfigurationSizeMedium")]
27    pub const Medium: Self = Self(0);
28    #[doc(alias = "UIButtonConfigurationSizeSmall")]
29    pub const Small: Self = Self(1);
30    #[doc(alias = "UIButtonConfigurationSizeMini")]
31    pub const Mini: Self = Self(2);
32    #[doc(alias = "UIButtonConfigurationSizeLarge")]
33    pub const Large: Self = Self(3);
34}
35
36unsafe impl Encode for UIButtonConfigurationSize {
37    const ENCODING: Encoding = NSInteger::ENCODING;
38}
39
40unsafe impl RefEncode for UIButtonConfigurationSize {
41    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
42}
43
44/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uibuttonconfigurationtitlealignment?language=objc)
45// NS_ENUM
46#[repr(transparent)]
47#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
48pub struct UIButtonConfigurationTitleAlignment(pub NSInteger);
49impl UIButtonConfigurationTitleAlignment {
50    /// Align title
51    /// &
52    /// subtitle automatically
53    #[doc(alias = "UIButtonConfigurationTitleAlignmentAutomatic")]
54    pub const Automatic: Self = Self(0);
55    /// Align title
56    /// &
57    /// subtitle along their leading edges
58    #[doc(alias = "UIButtonConfigurationTitleAlignmentLeading")]
59    pub const Leading: Self = Self(1);
60    /// Align title
61    /// &
62    /// subtitle to be centered with respect to each other
63    #[doc(alias = "UIButtonConfigurationTitleAlignmentCenter")]
64    pub const Center: Self = Self(2);
65    /// Align title
66    /// &
67    /// subtitle along their trailing edges
68    #[doc(alias = "UIButtonConfigurationTitleAlignmentTrailing")]
69    pub const Trailing: Self = Self(3);
70}
71
72unsafe impl Encode for UIButtonConfigurationTitleAlignment {
73    const ENCODING: Encoding = NSInteger::ENCODING;
74}
75
76unsafe impl RefEncode for UIButtonConfigurationTitleAlignment {
77    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
78}
79
80/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uibuttonconfigurationcornerstyle?language=objc)
81// NS_ENUM
82#[repr(transparent)]
83#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
84pub struct UIButtonConfigurationCornerStyle(pub NSInteger);
85impl UIButtonConfigurationCornerStyle {
86    /// The corner radius provided by the background style will be used as is, without adjusting for dynamic type
87    #[doc(alias = "UIButtonConfigurationCornerStyleFixed")]
88    pub const Fixed: Self = Self(-1);
89    /// The corner radius provided by the background style is adjusted based on dynamic type
90    #[doc(alias = "UIButtonConfigurationCornerStyleDynamic")]
91    pub const Dynamic: Self = Self(0);
92    /// Ignore the corner radius provided by the background style and substitute a small system defined corner radius.
93    #[doc(alias = "UIButtonConfigurationCornerStyleSmall")]
94    pub const Small: Self = Self(1);
95    /// Ignore the corner radius provided by the background style and substitute a medium system defined corner radius.
96    #[doc(alias = "UIButtonConfigurationCornerStyleMedium")]
97    pub const Medium: Self = Self(2);
98    /// Ignore the corner radius provided by the background style and substitute a large system defined corner radius.
99    #[doc(alias = "UIButtonConfigurationCornerStyleLarge")]
100    pub const Large: Self = Self(3);
101    /// Ignore the corner radius provided by the background style and always set the corner radius to generate a capsule.
102    #[doc(alias = "UIButtonConfigurationCornerStyleCapsule")]
103    pub const Capsule: Self = Self(4);
104}
105
106unsafe impl Encode for UIButtonConfigurationCornerStyle {
107    const ENCODING: Encoding = NSInteger::ENCODING;
108}
109
110unsafe impl RefEncode for UIButtonConfigurationCornerStyle {
111    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
112}
113
114/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uibuttonconfigurationmacidiomstyle?language=objc)
115// NS_ENUM
116#[repr(transparent)]
117#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
118pub struct UIButtonConfigurationMacIdiomStyle(pub NSInteger);
119impl UIButtonConfigurationMacIdiomStyle {
120    /// Automatically select the style to use
121    #[doc(alias = "UIButtonConfigurationMacIdiomStyleAutomatic")]
122    pub const Automatic: Self = Self(0);
123    /// Always use a bordered style button
124    #[doc(alias = "UIButtonConfigurationMacIdiomStyleBordered")]
125    pub const Bordered: Self = Self(1);
126    /// Always use a borderless style button
127    #[doc(alias = "UIButtonConfigurationMacIdiomStyleBorderless")]
128    pub const Borderless: Self = Self(2);
129    /// Always use a tinted, borderless style button
130    #[doc(alias = "UIButtonConfigurationMacIdiomStyleBorderlessTinted")]
131    pub const BorderlessTinted: Self = Self(3);
132}
133
134unsafe impl Encode for UIButtonConfigurationMacIdiomStyle {
135    const ENCODING: Encoding = NSInteger::ENCODING;
136}
137
138unsafe impl RefEncode for UIButtonConfigurationMacIdiomStyle {
139    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
140}
141
142/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uibuttonconfigurationindicator?language=objc)
143// NS_ENUM
144#[repr(transparent)]
145#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
146pub struct UIButtonConfigurationIndicator(pub NSInteger);
147impl UIButtonConfigurationIndicator {
148    /// Automatically determine an indicator based on the button's properties.
149    #[doc(alias = "UIButtonConfigurationIndicatorAutomatic")]
150    pub const Automatic: Self = Self(0);
151    /// Don't show any indicator
152    #[doc(alias = "UIButtonConfigurationIndicatorNone")]
153    pub const None: Self = Self(1);
154    /// Show an indicator appropriate for a popup-style button
155    #[doc(alias = "UIButtonConfigurationIndicatorPopup")]
156    pub const Popup: Self = Self(2);
157}
158
159unsafe impl Encode for UIButtonConfigurationIndicator {
160    const ENCODING: Encoding = NSInteger::ENCODING;
161}
162
163unsafe impl RefEncode for UIButtonConfigurationIndicator {
164    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
165}
166
167extern_class!(
168    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uibuttonconfiguration?language=objc)
169    #[unsafe(super(NSObject))]
170    #[thread_kind = MainThreadOnly]
171    #[derive(Debug, PartialEq, Eq, Hash)]
172    pub struct UIButtonConfiguration;
173);
174
175extern_conformance!(
176    unsafe impl NSCoding for UIButtonConfiguration {}
177);
178
179extern_conformance!(
180    unsafe impl NSCopying for UIButtonConfiguration {}
181);
182
183unsafe impl CopyingHelper for UIButtonConfiguration {
184    type Result = Self;
185}
186
187extern_conformance!(
188    unsafe impl NSObjectProtocol for UIButtonConfiguration {}
189);
190
191extern_conformance!(
192    unsafe impl NSSecureCoding for UIButtonConfiguration {}
193);
194
195impl UIButtonConfiguration {
196    extern_methods!(
197        #[unsafe(method(plainButtonConfiguration))]
198        #[unsafe(method_family = none)]
199        pub fn plainButtonConfiguration(mtm: MainThreadMarker) -> Retained<Self>;
200
201        #[unsafe(method(tintedButtonConfiguration))]
202        #[unsafe(method_family = none)]
203        pub fn tintedButtonConfiguration(mtm: MainThreadMarker) -> Retained<Self>;
204
205        #[unsafe(method(grayButtonConfiguration))]
206        #[unsafe(method_family = none)]
207        pub fn grayButtonConfiguration(mtm: MainThreadMarker) -> Retained<Self>;
208
209        #[unsafe(method(filledButtonConfiguration))]
210        #[unsafe(method_family = none)]
211        pub fn filledButtonConfiguration(mtm: MainThreadMarker) -> Retained<Self>;
212
213        #[unsafe(method(borderlessButtonConfiguration))]
214        #[unsafe(method_family = none)]
215        pub fn borderlessButtonConfiguration(mtm: MainThreadMarker) -> Retained<Self>;
216
217        #[unsafe(method(borderedButtonConfiguration))]
218        #[unsafe(method_family = none)]
219        pub fn borderedButtonConfiguration(mtm: MainThreadMarker) -> Retained<Self>;
220
221        #[unsafe(method(borderedTintedButtonConfiguration))]
222        #[unsafe(method_family = none)]
223        pub fn borderedTintedButtonConfiguration(mtm: MainThreadMarker) -> Retained<Self>;
224
225        #[unsafe(method(borderedProminentButtonConfiguration))]
226        #[unsafe(method_family = none)]
227        pub fn borderedProminentButtonConfiguration(mtm: MainThreadMarker) -> Retained<Self>;
228
229        #[unsafe(method(glassButtonConfiguration))]
230        #[unsafe(method_family = none)]
231        pub fn glassButtonConfiguration(mtm: MainThreadMarker) -> Retained<Self>;
232
233        #[unsafe(method(prominentGlassButtonConfiguration))]
234        #[unsafe(method_family = none)]
235        pub fn prominentGlassButtonConfiguration(mtm: MainThreadMarker) -> Retained<Self>;
236
237        #[unsafe(method(tintedGlassButtonConfiguration))]
238        #[unsafe(method_family = none)]
239        pub fn tintedGlassButtonConfiguration(mtm: MainThreadMarker) -> Retained<Self>;
240
241        #[unsafe(method(clearGlassButtonConfiguration))]
242        #[unsafe(method_family = none)]
243        pub fn clearGlassButtonConfiguration(mtm: MainThreadMarker) -> Retained<Self>;
244
245        #[unsafe(method(prominentClearGlassButtonConfiguration))]
246        #[unsafe(method_family = none)]
247        pub fn prominentClearGlassButtonConfiguration(mtm: MainThreadMarker) -> Retained<Self>;
248
249        #[unsafe(method(new))]
250        #[unsafe(method_family = new)]
251        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
252
253        #[unsafe(method(init))]
254        #[unsafe(method_family = init)]
255        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
256
257        #[cfg(all(
258            feature = "UIButton",
259            feature = "UIControl",
260            feature = "UIResponder",
261            feature = "UIView"
262        ))]
263        /// Returns a copy of the configuration updated based on the given button, by applying the configuration's default values for that button's state to any properties that have not been customized.
264        #[unsafe(method(updatedConfigurationForButton:))]
265        #[unsafe(method_family = none)]
266        pub fn updatedConfigurationForButton(&self, button: &UIButton) -> Retained<Self>;
267
268        #[cfg(feature = "UIBackgroundConfiguration")]
269        /// A UIBackgroundConfiguration describing the button's background. UIKit provides a value by default with values appropriate for a UIButton.
270        #[unsafe(method(background))]
271        #[unsafe(method_family = none)]
272        pub fn background(&self) -> Retained<UIBackgroundConfiguration>;
273
274        #[cfg(feature = "UIBackgroundConfiguration")]
275        /// Setter for [`background`][Self::background].
276        #[unsafe(method(setBackground:))]
277        #[unsafe(method_family = none)]
278        pub fn setBackground(&self, background: &UIBackgroundConfiguration);
279
280        /// The corner style controls how background.cornerRadius is interpreted by the button. Defaults to `Dynamic`.
281        #[unsafe(method(cornerStyle))]
282        #[unsafe(method_family = none)]
283        pub fn cornerStyle(&self) -> UIButtonConfigurationCornerStyle;
284
285        /// Setter for [`cornerStyle`][Self::cornerStyle].
286        #[unsafe(method(setCornerStyle:))]
287        #[unsafe(method_family = none)]
288        pub fn setCornerStyle(&self, corner_style: UIButtonConfigurationCornerStyle);
289
290        /// Determines the metrics and ideal size of the button. Clients may resize the button arbitrarily regardless of this value.
291        #[unsafe(method(buttonSize))]
292        #[unsafe(method_family = none)]
293        pub fn buttonSize(&self) -> UIButtonConfigurationSize;
294
295        /// Setter for [`buttonSize`][Self::buttonSize].
296        #[unsafe(method(setButtonSize:))]
297        #[unsafe(method_family = none)]
298        pub fn setButtonSize(&self, button_size: UIButtonConfigurationSize);
299
300        #[unsafe(method(macIdiomStyle))]
301        #[unsafe(method_family = none)]
302        pub fn macIdiomStyle(&self) -> UIButtonConfigurationMacIdiomStyle;
303
304        /// Setter for [`macIdiomStyle`][Self::macIdiomStyle].
305        #[unsafe(method(setMacIdiomStyle:))]
306        #[unsafe(method_family = none)]
307        pub fn setMacIdiomStyle(&self, mac_idiom_style: UIButtonConfigurationMacIdiomStyle);
308
309        #[cfg(feature = "UIColor")]
310        /// The base color to use for foreground elements. This color may be modified before being passed to a transformer, and finally applied to specific elements. Setting nil will cede full control to the configuration to select a color appropriate to the style.
311        #[unsafe(method(baseForegroundColor))]
312        #[unsafe(method_family = none)]
313        pub fn baseForegroundColor(&self) -> Option<Retained<UIColor>>;
314
315        #[cfg(feature = "UIColor")]
316        /// Setter for [`baseForegroundColor`][Self::baseForegroundColor].
317        #[unsafe(method(setBaseForegroundColor:))]
318        #[unsafe(method_family = none)]
319        pub fn setBaseForegroundColor(&self, base_foreground_color: Option<&UIColor>);
320
321        #[cfg(feature = "UIColor")]
322        /// The base color to use for background elements. This color may be modified before being passed to a transformer, and finally applied to specific elements. Setting nil will cede full control to the configuration to select a color appropriate to the style.
323        #[unsafe(method(baseBackgroundColor))]
324        #[unsafe(method_family = none)]
325        pub fn baseBackgroundColor(&self) -> Option<Retained<UIColor>>;
326
327        #[cfg(feature = "UIColor")]
328        /// Setter for [`baseBackgroundColor`][Self::baseBackgroundColor].
329        #[unsafe(method(setBaseBackgroundColor:))]
330        #[unsafe(method_family = none)]
331        pub fn setBaseBackgroundColor(&self, base_background_color: Option<&UIColor>);
332
333        #[cfg(feature = "UIImage")]
334        #[unsafe(method(image))]
335        #[unsafe(method_family = none)]
336        pub fn image(&self) -> Option<Retained<UIImage>>;
337
338        #[cfg(feature = "UIImage")]
339        /// Setter for [`image`][Self::image].
340        #[unsafe(method(setImage:))]
341        #[unsafe(method_family = none)]
342        pub fn setImage(&self, image: Option<&UIImage>);
343
344        #[cfg(all(
345            feature = "UIColor",
346            feature = "UIConfigurationColorTransformer",
347            feature = "block2"
348        ))]
349        /// # Safety
350        ///
351        /// The returned block's argument must be a valid pointer.
352        #[unsafe(method(imageColorTransformer))]
353        #[unsafe(method_family = none)]
354        pub unsafe fn imageColorTransformer(&self) -> UIConfigurationColorTransformer;
355
356        #[cfg(all(
357            feature = "UIColor",
358            feature = "UIConfigurationColorTransformer",
359            feature = "block2"
360        ))]
361        /// Setter for [`imageColorTransformer`][Self::imageColorTransformer].
362        ///
363        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
364        ///
365        /// # Safety
366        ///
367        /// `image_color_transformer` must be a valid pointer or null.
368        #[unsafe(method(setImageColorTransformer:))]
369        #[unsafe(method_family = none)]
370        pub unsafe fn setImageColorTransformer(
371            &self,
372            image_color_transformer: UIConfigurationColorTransformer,
373        );
374
375        #[cfg(all(
376            feature = "UIImageConfiguration",
377            feature = "UIImageSymbolConfiguration"
378        ))]
379        #[unsafe(method(preferredSymbolConfigurationForImage))]
380        #[unsafe(method_family = none)]
381        pub fn preferredSymbolConfigurationForImage(
382            &self,
383        ) -> Option<Retained<UIImageSymbolConfiguration>>;
384
385        #[cfg(all(
386            feature = "UIImageConfiguration",
387            feature = "UIImageSymbolConfiguration"
388        ))]
389        /// Setter for [`preferredSymbolConfigurationForImage`][Self::preferredSymbolConfigurationForImage].
390        ///
391        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
392        #[unsafe(method(setPreferredSymbolConfigurationForImage:))]
393        #[unsafe(method_family = none)]
394        pub fn setPreferredSymbolConfigurationForImage(
395            &self,
396            preferred_symbol_configuration_for_image: Option<&UIImageSymbolConfiguration>,
397        );
398
399        #[cfg(feature = "UISymbolContentTransition")]
400        /// The symbol content transition to use when transitioning across symbol images.
401        /// Defaults to `nil`, meaning no symbol content transition should occur.
402        #[unsafe(method(symbolContentTransition))]
403        #[unsafe(method_family = none)]
404        pub fn symbolContentTransition(&self) -> Option<Retained<UISymbolContentTransition>>;
405
406        #[cfg(feature = "UISymbolContentTransition")]
407        /// Setter for [`symbolContentTransition`][Self::symbolContentTransition].
408        #[unsafe(method(setSymbolContentTransition:))]
409        #[unsafe(method_family = none)]
410        pub fn setSymbolContentTransition(
411            &self,
412            symbol_content_transition: Option<&UISymbolContentTransition>,
413        );
414
415        /// Shows an activity indicator in place of an image. Its placement is controlled by the imagePlacement property.
416        #[unsafe(method(showsActivityIndicator))]
417        #[unsafe(method_family = none)]
418        pub fn showsActivityIndicator(&self) -> bool;
419
420        /// Setter for [`showsActivityIndicator`][Self::showsActivityIndicator].
421        #[unsafe(method(setShowsActivityIndicator:))]
422        #[unsafe(method_family = none)]
423        pub fn setShowsActivityIndicator(&self, shows_activity_indicator: bool);
424
425        #[cfg(all(
426            feature = "UIColor",
427            feature = "UIConfigurationColorTransformer",
428            feature = "block2"
429        ))]
430        /// # Safety
431        ///
432        /// The returned block's argument must be a valid pointer.
433        #[unsafe(method(activityIndicatorColorTransformer))]
434        #[unsafe(method_family = none)]
435        pub unsafe fn activityIndicatorColorTransformer(&self) -> UIConfigurationColorTransformer;
436
437        #[cfg(all(
438            feature = "UIColor",
439            feature = "UIConfigurationColorTransformer",
440            feature = "block2"
441        ))]
442        /// Setter for [`activityIndicatorColorTransformer`][Self::activityIndicatorColorTransformer].
443        ///
444        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
445        ///
446        /// # Safety
447        ///
448        /// `activity_indicator_color_transformer` must be a valid pointer or null.
449        #[unsafe(method(setActivityIndicatorColorTransformer:))]
450        #[unsafe(method_family = none)]
451        pub unsafe fn setActivityIndicatorColorTransformer(
452            &self,
453            activity_indicator_color_transformer: UIConfigurationColorTransformer,
454        );
455
456        #[unsafe(method(title))]
457        #[unsafe(method_family = none)]
458        pub fn title(&self) -> Option<Retained<NSString>>;
459
460        /// Setter for [`title`][Self::title].
461        ///
462        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
463        #[unsafe(method(setTitle:))]
464        #[unsafe(method_family = none)]
465        pub fn setTitle(&self, title: Option<&NSString>);
466
467        #[unsafe(method(attributedTitle))]
468        #[unsafe(method_family = none)]
469        pub fn attributedTitle(&self) -> Option<Retained<NSAttributedString>>;
470
471        /// Setter for [`attributedTitle`][Self::attributedTitle].
472        ///
473        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
474        #[unsafe(method(setAttributedTitle:))]
475        #[unsafe(method_family = none)]
476        pub fn setAttributedTitle(&self, attributed_title: Option<&NSAttributedString>);
477
478        #[cfg(feature = "block2")]
479        /// # Safety
480        ///
481        /// The returned block's argument must be a valid pointer.
482        #[unsafe(method(titleTextAttributesTransformer))]
483        #[unsafe(method_family = none)]
484        pub unsafe fn titleTextAttributesTransformer(
485            &self,
486        ) -> UIConfigurationTextAttributesTransformer;
487
488        #[cfg(feature = "block2")]
489        /// Setter for [`titleTextAttributesTransformer`][Self::titleTextAttributesTransformer].
490        ///
491        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
492        ///
493        /// # Safety
494        ///
495        /// `title_text_attributes_transformer` must be a valid pointer or null.
496        #[unsafe(method(setTitleTextAttributesTransformer:))]
497        #[unsafe(method_family = none)]
498        pub unsafe fn setTitleTextAttributesTransformer(
499            &self,
500            title_text_attributes_transformer: UIConfigurationTextAttributesTransformer,
501        );
502
503        #[cfg(feature = "NSParagraphStyle")]
504        /// Default is WordWrapping. WordWrapping and CharWrapping both allow for multi-line text, other modes will restrict the title to a single line of text.
505        #[unsafe(method(titleLineBreakMode))]
506        #[unsafe(method_family = none)]
507        pub fn titleLineBreakMode(&self) -> NSLineBreakMode;
508
509        #[cfg(feature = "NSParagraphStyle")]
510        /// Setter for [`titleLineBreakMode`][Self::titleLineBreakMode].
511        #[unsafe(method(setTitleLineBreakMode:))]
512        #[unsafe(method_family = none)]
513        pub fn setTitleLineBreakMode(&self, title_line_break_mode: NSLineBreakMode);
514
515        #[unsafe(method(subtitle))]
516        #[unsafe(method_family = none)]
517        pub fn subtitle(&self) -> Option<Retained<NSString>>;
518
519        /// Setter for [`subtitle`][Self::subtitle].
520        ///
521        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
522        #[unsafe(method(setSubtitle:))]
523        #[unsafe(method_family = none)]
524        pub fn setSubtitle(&self, subtitle: Option<&NSString>);
525
526        #[unsafe(method(attributedSubtitle))]
527        #[unsafe(method_family = none)]
528        pub fn attributedSubtitle(&self) -> Option<Retained<NSAttributedString>>;
529
530        /// Setter for [`attributedSubtitle`][Self::attributedSubtitle].
531        ///
532        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
533        #[unsafe(method(setAttributedSubtitle:))]
534        #[unsafe(method_family = none)]
535        pub fn setAttributedSubtitle(&self, attributed_subtitle: Option<&NSAttributedString>);
536
537        #[cfg(feature = "block2")]
538        /// # Safety
539        ///
540        /// The returned block's argument must be a valid pointer.
541        #[unsafe(method(subtitleTextAttributesTransformer))]
542        #[unsafe(method_family = none)]
543        pub unsafe fn subtitleTextAttributesTransformer(
544            &self,
545        ) -> UIConfigurationTextAttributesTransformer;
546
547        #[cfg(feature = "block2")]
548        /// Setter for [`subtitleTextAttributesTransformer`][Self::subtitleTextAttributesTransformer].
549        ///
550        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
551        ///
552        /// # Safety
553        ///
554        /// `subtitle_text_attributes_transformer` must be a valid pointer or null.
555        #[unsafe(method(setSubtitleTextAttributesTransformer:))]
556        #[unsafe(method_family = none)]
557        pub unsafe fn setSubtitleTextAttributesTransformer(
558            &self,
559            subtitle_text_attributes_transformer: UIConfigurationTextAttributesTransformer,
560        );
561
562        #[cfg(feature = "NSParagraphStyle")]
563        /// Default is WordWrapping. WordWrapping and CharWrapping both allow for multi-line text, other modes will restrict the subtitle to a single line of text.
564        #[unsafe(method(subtitleLineBreakMode))]
565        #[unsafe(method_family = none)]
566        pub fn subtitleLineBreakMode(&self) -> NSLineBreakMode;
567
568        #[cfg(feature = "NSParagraphStyle")]
569        /// Setter for [`subtitleLineBreakMode`][Self::subtitleLineBreakMode].
570        #[unsafe(method(setSubtitleLineBreakMode:))]
571        #[unsafe(method_family = none)]
572        pub fn setSubtitleLineBreakMode(&self, subtitle_line_break_mode: NSLineBreakMode);
573
574        /// What kind of indicator should the button show. Default value is .automatic.
575        #[unsafe(method(indicator))]
576        #[unsafe(method_family = none)]
577        pub fn indicator(&self) -> UIButtonConfigurationIndicator;
578
579        /// Setter for [`indicator`][Self::indicator].
580        #[unsafe(method(setIndicator:))]
581        #[unsafe(method_family = none)]
582        pub fn setIndicator(&self, indicator: UIButtonConfigurationIndicator);
583
584        #[cfg(all(
585            feature = "UIColor",
586            feature = "UIConfigurationColorTransformer",
587            feature = "block2"
588        ))]
589        /// # Safety
590        ///
591        /// The returned block's argument must be a valid pointer.
592        #[unsafe(method(indicatorColorTransformer))]
593        #[unsafe(method_family = none)]
594        pub unsafe fn indicatorColorTransformer(&self) -> UIConfigurationColorTransformer;
595
596        #[cfg(all(
597            feature = "UIColor",
598            feature = "UIConfigurationColorTransformer",
599            feature = "block2"
600        ))]
601        /// Setter for [`indicatorColorTransformer`][Self::indicatorColorTransformer].
602        ///
603        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
604        ///
605        /// # Safety
606        ///
607        /// `indicator_color_transformer` must be a valid pointer or null.
608        #[unsafe(method(setIndicatorColorTransformer:))]
609        #[unsafe(method_family = none)]
610        pub unsafe fn setIndicatorColorTransformer(
611            &self,
612            indicator_color_transformer: UIConfigurationColorTransformer,
613        );
614
615        #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
616        /// Insets from the bounds of the button to create the content region. Defaults styles provide insets based on the button size.
617        #[unsafe(method(contentInsets))]
618        #[unsafe(method_family = none)]
619        pub fn contentInsets(&self) -> NSDirectionalEdgeInsets;
620
621        #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
622        /// Setter for [`contentInsets`][Self::contentInsets].
623        #[unsafe(method(setContentInsets:))]
624        #[unsafe(method_family = none)]
625        pub fn setContentInsets(&self, content_insets: NSDirectionalEdgeInsets);
626
627        /// Restore the default content insets.
628        #[unsafe(method(setDefaultContentInsets))]
629        #[unsafe(method_family = none)]
630        pub fn setDefaultContentInsets(&self);
631
632        #[cfg(feature = "UIGeometry")]
633        /// Defaults to Leading, only single edge values (top/leading/bottom/trailing) are supported.
634        #[unsafe(method(imagePlacement))]
635        #[unsafe(method_family = none)]
636        pub fn imagePlacement(&self) -> NSDirectionalRectEdge;
637
638        #[cfg(feature = "UIGeometry")]
639        /// Setter for [`imagePlacement`][Self::imagePlacement].
640        #[unsafe(method(setImagePlacement:))]
641        #[unsafe(method_family = none)]
642        pub fn setImagePlacement(&self, image_placement: NSDirectionalRectEdge);
643
644        #[cfg(feature = "objc2-core-foundation")]
645        /// When a button has both image and text content, this value is the padding between the image and the text.
646        #[unsafe(method(imagePadding))]
647        #[unsafe(method_family = none)]
648        pub fn imagePadding(&self) -> CGFloat;
649
650        #[cfg(feature = "objc2-core-foundation")]
651        /// Setter for [`imagePadding`][Self::imagePadding].
652        #[unsafe(method(setImagePadding:))]
653        #[unsafe(method_family = none)]
654        pub fn setImagePadding(&self, image_padding: CGFloat);
655
656        #[cfg(feature = "objc2-core-foundation")]
657        /// When a button has both a title
658        /// &
659        /// subtitle, this value is the padding between those titles.
660        #[unsafe(method(titlePadding))]
661        #[unsafe(method_family = none)]
662        pub fn titlePadding(&self) -> CGFloat;
663
664        #[cfg(feature = "objc2-core-foundation")]
665        /// Setter for [`titlePadding`][Self::titlePadding].
666        #[unsafe(method(setTitlePadding:))]
667        #[unsafe(method_family = none)]
668        pub fn setTitlePadding(&self, title_padding: CGFloat);
669
670        /// The alignment to use for relative layout between title
671        /// &
672        /// subtitle.
673        #[unsafe(method(titleAlignment))]
674        #[unsafe(method_family = none)]
675        pub fn titleAlignment(&self) -> UIButtonConfigurationTitleAlignment;
676
677        /// Setter for [`titleAlignment`][Self::titleAlignment].
678        #[unsafe(method(setTitleAlignment:))]
679        #[unsafe(method_family = none)]
680        pub fn setTitleAlignment(&self, title_alignment: UIButtonConfigurationTitleAlignment);
681
682        /// If the style should automatically update when the button is selected. Default varies by style. Disable to customize selection behavior.
683        #[unsafe(method(automaticallyUpdateForSelection))]
684        #[unsafe(method_family = none)]
685        pub fn automaticallyUpdateForSelection(&self) -> bool;
686
687        /// Setter for [`automaticallyUpdateForSelection`][Self::automaticallyUpdateForSelection].
688        #[unsafe(method(setAutomaticallyUpdateForSelection:))]
689        #[unsafe(method_family = none)]
690        pub fn setAutomaticallyUpdateForSelection(&self, automatically_update_for_selection: bool);
691    );
692}