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 unsafe fn plainButtonConfiguration(mtm: MainThreadMarker) -> Retained<Self>;
200
201        #[unsafe(method(tintedButtonConfiguration))]
202        #[unsafe(method_family = none)]
203        pub unsafe fn tintedButtonConfiguration(mtm: MainThreadMarker) -> Retained<Self>;
204
205        #[unsafe(method(grayButtonConfiguration))]
206        #[unsafe(method_family = none)]
207        pub unsafe fn grayButtonConfiguration(mtm: MainThreadMarker) -> Retained<Self>;
208
209        #[unsafe(method(filledButtonConfiguration))]
210        #[unsafe(method_family = none)]
211        pub unsafe fn filledButtonConfiguration(mtm: MainThreadMarker) -> Retained<Self>;
212
213        #[unsafe(method(borderlessButtonConfiguration))]
214        #[unsafe(method_family = none)]
215        pub unsafe fn borderlessButtonConfiguration(mtm: MainThreadMarker) -> Retained<Self>;
216
217        #[unsafe(method(borderedButtonConfiguration))]
218        #[unsafe(method_family = none)]
219        pub unsafe fn borderedButtonConfiguration(mtm: MainThreadMarker) -> Retained<Self>;
220
221        #[unsafe(method(borderedTintedButtonConfiguration))]
222        #[unsafe(method_family = none)]
223        pub unsafe fn borderedTintedButtonConfiguration(mtm: MainThreadMarker) -> Retained<Self>;
224
225        #[unsafe(method(borderedProminentButtonConfiguration))]
226        #[unsafe(method_family = none)]
227        pub unsafe fn borderedProminentButtonConfiguration(mtm: MainThreadMarker)
228            -> Retained<Self>;
229
230        #[unsafe(method(new))]
231        #[unsafe(method_family = new)]
232        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
233
234        #[unsafe(method(init))]
235        #[unsafe(method_family = init)]
236        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
237
238        #[cfg(all(
239            feature = "UIButton",
240            feature = "UIControl",
241            feature = "UIResponder",
242            feature = "UIView"
243        ))]
244        /// 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.
245        #[unsafe(method(updatedConfigurationForButton:))]
246        #[unsafe(method_family = none)]
247        pub unsafe fn updatedConfigurationForButton(&self, button: &UIButton) -> Retained<Self>;
248
249        #[cfg(feature = "UIBackgroundConfiguration")]
250        /// A UIBackgroundConfiguration describing the button's background. UIKit provides a value by default with values appropriate for a UIButton.
251        #[unsafe(method(background))]
252        #[unsafe(method_family = none)]
253        pub unsafe fn background(&self) -> Retained<UIBackgroundConfiguration>;
254
255        #[cfg(feature = "UIBackgroundConfiguration")]
256        /// Setter for [`background`][Self::background].
257        #[unsafe(method(setBackground:))]
258        #[unsafe(method_family = none)]
259        pub unsafe fn setBackground(&self, background: &UIBackgroundConfiguration);
260
261        /// The corner style controls how background.cornerRadius is interpreted by the button. Defaults to `Dynamic`.
262        #[unsafe(method(cornerStyle))]
263        #[unsafe(method_family = none)]
264        pub unsafe fn cornerStyle(&self) -> UIButtonConfigurationCornerStyle;
265
266        /// Setter for [`cornerStyle`][Self::cornerStyle].
267        #[unsafe(method(setCornerStyle:))]
268        #[unsafe(method_family = none)]
269        pub unsafe fn setCornerStyle(&self, corner_style: UIButtonConfigurationCornerStyle);
270
271        /// Determines the metrics and ideal size of the button. Clients may resize the button arbitrarily regardless of this value.
272        #[unsafe(method(buttonSize))]
273        #[unsafe(method_family = none)]
274        pub unsafe fn buttonSize(&self) -> UIButtonConfigurationSize;
275
276        /// Setter for [`buttonSize`][Self::buttonSize].
277        #[unsafe(method(setButtonSize:))]
278        #[unsafe(method_family = none)]
279        pub unsafe fn setButtonSize(&self, button_size: UIButtonConfigurationSize);
280
281        #[unsafe(method(macIdiomStyle))]
282        #[unsafe(method_family = none)]
283        pub unsafe fn macIdiomStyle(&self) -> UIButtonConfigurationMacIdiomStyle;
284
285        /// Setter for [`macIdiomStyle`][Self::macIdiomStyle].
286        #[unsafe(method(setMacIdiomStyle:))]
287        #[unsafe(method_family = none)]
288        pub unsafe fn setMacIdiomStyle(&self, mac_idiom_style: UIButtonConfigurationMacIdiomStyle);
289
290        #[cfg(feature = "UIColor")]
291        /// 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.
292        #[unsafe(method(baseForegroundColor))]
293        #[unsafe(method_family = none)]
294        pub unsafe fn baseForegroundColor(&self) -> Option<Retained<UIColor>>;
295
296        #[cfg(feature = "UIColor")]
297        /// Setter for [`baseForegroundColor`][Self::baseForegroundColor].
298        #[unsafe(method(setBaseForegroundColor:))]
299        #[unsafe(method_family = none)]
300        pub unsafe fn setBaseForegroundColor(&self, base_foreground_color: Option<&UIColor>);
301
302        #[cfg(feature = "UIColor")]
303        /// 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.
304        #[unsafe(method(baseBackgroundColor))]
305        #[unsafe(method_family = none)]
306        pub unsafe fn baseBackgroundColor(&self) -> Option<Retained<UIColor>>;
307
308        #[cfg(feature = "UIColor")]
309        /// Setter for [`baseBackgroundColor`][Self::baseBackgroundColor].
310        #[unsafe(method(setBaseBackgroundColor:))]
311        #[unsafe(method_family = none)]
312        pub unsafe fn setBaseBackgroundColor(&self, base_background_color: Option<&UIColor>);
313
314        #[cfg(feature = "UIImage")]
315        #[unsafe(method(image))]
316        #[unsafe(method_family = none)]
317        pub unsafe fn image(&self) -> Option<Retained<UIImage>>;
318
319        #[cfg(feature = "UIImage")]
320        /// Setter for [`image`][Self::image].
321        #[unsafe(method(setImage:))]
322        #[unsafe(method_family = none)]
323        pub unsafe fn setImage(&self, image: Option<&UIImage>);
324
325        #[cfg(all(
326            feature = "UIColor",
327            feature = "UIConfigurationColorTransformer",
328            feature = "block2"
329        ))]
330        #[unsafe(method(imageColorTransformer))]
331        #[unsafe(method_family = none)]
332        pub unsafe fn imageColorTransformer(&self) -> UIConfigurationColorTransformer;
333
334        #[cfg(all(
335            feature = "UIColor",
336            feature = "UIConfigurationColorTransformer",
337            feature = "block2"
338        ))]
339        /// Setter for [`imageColorTransformer`][Self::imageColorTransformer].
340        #[unsafe(method(setImageColorTransformer:))]
341        #[unsafe(method_family = none)]
342        pub unsafe fn setImageColorTransformer(
343            &self,
344            image_color_transformer: UIConfigurationColorTransformer,
345        );
346
347        #[cfg(all(
348            feature = "UIImageConfiguration",
349            feature = "UIImageSymbolConfiguration"
350        ))]
351        #[unsafe(method(preferredSymbolConfigurationForImage))]
352        #[unsafe(method_family = none)]
353        pub unsafe fn preferredSymbolConfigurationForImage(
354            &self,
355        ) -> Option<Retained<UIImageSymbolConfiguration>>;
356
357        #[cfg(all(
358            feature = "UIImageConfiguration",
359            feature = "UIImageSymbolConfiguration"
360        ))]
361        /// Setter for [`preferredSymbolConfigurationForImage`][Self::preferredSymbolConfigurationForImage].
362        #[unsafe(method(setPreferredSymbolConfigurationForImage:))]
363        #[unsafe(method_family = none)]
364        pub unsafe fn setPreferredSymbolConfigurationForImage(
365            &self,
366            preferred_symbol_configuration_for_image: Option<&UIImageSymbolConfiguration>,
367        );
368
369        /// Shows an activity indicator in place of an image. Its placement is controlled by the imagePlacement property.
370        #[unsafe(method(showsActivityIndicator))]
371        #[unsafe(method_family = none)]
372        pub unsafe fn showsActivityIndicator(&self) -> bool;
373
374        /// Setter for [`showsActivityIndicator`][Self::showsActivityIndicator].
375        #[unsafe(method(setShowsActivityIndicator:))]
376        #[unsafe(method_family = none)]
377        pub unsafe fn setShowsActivityIndicator(&self, shows_activity_indicator: bool);
378
379        #[cfg(all(
380            feature = "UIColor",
381            feature = "UIConfigurationColorTransformer",
382            feature = "block2"
383        ))]
384        #[unsafe(method(activityIndicatorColorTransformer))]
385        #[unsafe(method_family = none)]
386        pub unsafe fn activityIndicatorColorTransformer(&self) -> UIConfigurationColorTransformer;
387
388        #[cfg(all(
389            feature = "UIColor",
390            feature = "UIConfigurationColorTransformer",
391            feature = "block2"
392        ))]
393        /// Setter for [`activityIndicatorColorTransformer`][Self::activityIndicatorColorTransformer].
394        #[unsafe(method(setActivityIndicatorColorTransformer:))]
395        #[unsafe(method_family = none)]
396        pub unsafe fn setActivityIndicatorColorTransformer(
397            &self,
398            activity_indicator_color_transformer: UIConfigurationColorTransformer,
399        );
400
401        #[unsafe(method(title))]
402        #[unsafe(method_family = none)]
403        pub unsafe fn title(&self) -> Option<Retained<NSString>>;
404
405        /// Setter for [`title`][Self::title].
406        #[unsafe(method(setTitle:))]
407        #[unsafe(method_family = none)]
408        pub unsafe fn setTitle(&self, title: Option<&NSString>);
409
410        #[unsafe(method(attributedTitle))]
411        #[unsafe(method_family = none)]
412        pub unsafe fn attributedTitle(&self) -> Option<Retained<NSAttributedString>>;
413
414        /// Setter for [`attributedTitle`][Self::attributedTitle].
415        #[unsafe(method(setAttributedTitle:))]
416        #[unsafe(method_family = none)]
417        pub unsafe fn setAttributedTitle(&self, attributed_title: Option<&NSAttributedString>);
418
419        #[cfg(feature = "block2")]
420        #[unsafe(method(titleTextAttributesTransformer))]
421        #[unsafe(method_family = none)]
422        pub unsafe fn titleTextAttributesTransformer(
423            &self,
424        ) -> UIConfigurationTextAttributesTransformer;
425
426        #[cfg(feature = "block2")]
427        /// Setter for [`titleTextAttributesTransformer`][Self::titleTextAttributesTransformer].
428        #[unsafe(method(setTitleTextAttributesTransformer:))]
429        #[unsafe(method_family = none)]
430        pub unsafe fn setTitleTextAttributesTransformer(
431            &self,
432            title_text_attributes_transformer: UIConfigurationTextAttributesTransformer,
433        );
434
435        #[cfg(feature = "NSParagraphStyle")]
436        /// Default is WordWrapping. WordWrapping and CharWrapping both allow for multi-line text, other modes will restrict the title to a single line of text.
437        #[unsafe(method(titleLineBreakMode))]
438        #[unsafe(method_family = none)]
439        pub unsafe fn titleLineBreakMode(&self) -> NSLineBreakMode;
440
441        #[cfg(feature = "NSParagraphStyle")]
442        /// Setter for [`titleLineBreakMode`][Self::titleLineBreakMode].
443        #[unsafe(method(setTitleLineBreakMode:))]
444        #[unsafe(method_family = none)]
445        pub unsafe fn setTitleLineBreakMode(&self, title_line_break_mode: NSLineBreakMode);
446
447        #[unsafe(method(subtitle))]
448        #[unsafe(method_family = none)]
449        pub unsafe fn subtitle(&self) -> Option<Retained<NSString>>;
450
451        /// Setter for [`subtitle`][Self::subtitle].
452        #[unsafe(method(setSubtitle:))]
453        #[unsafe(method_family = none)]
454        pub unsafe fn setSubtitle(&self, subtitle: Option<&NSString>);
455
456        #[unsafe(method(attributedSubtitle))]
457        #[unsafe(method_family = none)]
458        pub unsafe fn attributedSubtitle(&self) -> Option<Retained<NSAttributedString>>;
459
460        /// Setter for [`attributedSubtitle`][Self::attributedSubtitle].
461        #[unsafe(method(setAttributedSubtitle:))]
462        #[unsafe(method_family = none)]
463        pub unsafe fn setAttributedSubtitle(
464            &self,
465            attributed_subtitle: Option<&NSAttributedString>,
466        );
467
468        #[cfg(feature = "block2")]
469        #[unsafe(method(subtitleTextAttributesTransformer))]
470        #[unsafe(method_family = none)]
471        pub unsafe fn subtitleTextAttributesTransformer(
472            &self,
473        ) -> UIConfigurationTextAttributesTransformer;
474
475        #[cfg(feature = "block2")]
476        /// Setter for [`subtitleTextAttributesTransformer`][Self::subtitleTextAttributesTransformer].
477        #[unsafe(method(setSubtitleTextAttributesTransformer:))]
478        #[unsafe(method_family = none)]
479        pub unsafe fn setSubtitleTextAttributesTransformer(
480            &self,
481            subtitle_text_attributes_transformer: UIConfigurationTextAttributesTransformer,
482        );
483
484        #[cfg(feature = "NSParagraphStyle")]
485        /// Default is WordWrapping. WordWrapping and CharWrapping both allow for multi-line text, other modes will restrict the subtitle to a single line of text.
486        #[unsafe(method(subtitleLineBreakMode))]
487        #[unsafe(method_family = none)]
488        pub unsafe fn subtitleLineBreakMode(&self) -> NSLineBreakMode;
489
490        #[cfg(feature = "NSParagraphStyle")]
491        /// Setter for [`subtitleLineBreakMode`][Self::subtitleLineBreakMode].
492        #[unsafe(method(setSubtitleLineBreakMode:))]
493        #[unsafe(method_family = none)]
494        pub unsafe fn setSubtitleLineBreakMode(&self, subtitle_line_break_mode: NSLineBreakMode);
495
496        /// What kind of indicator should the button show. Default value is .automatic.
497        #[unsafe(method(indicator))]
498        #[unsafe(method_family = none)]
499        pub unsafe fn indicator(&self) -> UIButtonConfigurationIndicator;
500
501        /// Setter for [`indicator`][Self::indicator].
502        #[unsafe(method(setIndicator:))]
503        #[unsafe(method_family = none)]
504        pub unsafe fn setIndicator(&self, indicator: UIButtonConfigurationIndicator);
505
506        #[cfg(all(
507            feature = "UIColor",
508            feature = "UIConfigurationColorTransformer",
509            feature = "block2"
510        ))]
511        #[unsafe(method(indicatorColorTransformer))]
512        #[unsafe(method_family = none)]
513        pub unsafe fn indicatorColorTransformer(&self) -> UIConfigurationColorTransformer;
514
515        #[cfg(all(
516            feature = "UIColor",
517            feature = "UIConfigurationColorTransformer",
518            feature = "block2"
519        ))]
520        /// Setter for [`indicatorColorTransformer`][Self::indicatorColorTransformer].
521        #[unsafe(method(setIndicatorColorTransformer:))]
522        #[unsafe(method_family = none)]
523        pub unsafe fn setIndicatorColorTransformer(
524            &self,
525            indicator_color_transformer: UIConfigurationColorTransformer,
526        );
527
528        #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
529        /// Insets from the bounds of the button to create the content region. Defaults styles provide insets based on the button size.
530        #[unsafe(method(contentInsets))]
531        #[unsafe(method_family = none)]
532        pub unsafe fn contentInsets(&self) -> NSDirectionalEdgeInsets;
533
534        #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
535        /// Setter for [`contentInsets`][Self::contentInsets].
536        #[unsafe(method(setContentInsets:))]
537        #[unsafe(method_family = none)]
538        pub unsafe fn setContentInsets(&self, content_insets: NSDirectionalEdgeInsets);
539
540        /// Restore the default content insets.
541        #[unsafe(method(setDefaultContentInsets))]
542        #[unsafe(method_family = none)]
543        pub unsafe fn setDefaultContentInsets(&self);
544
545        #[cfg(feature = "UIGeometry")]
546        /// Defaults to Leading, only single edge values (top/leading/bottom/trailing) are supported.
547        #[unsafe(method(imagePlacement))]
548        #[unsafe(method_family = none)]
549        pub unsafe fn imagePlacement(&self) -> NSDirectionalRectEdge;
550
551        #[cfg(feature = "UIGeometry")]
552        /// Setter for [`imagePlacement`][Self::imagePlacement].
553        #[unsafe(method(setImagePlacement:))]
554        #[unsafe(method_family = none)]
555        pub unsafe fn setImagePlacement(&self, image_placement: NSDirectionalRectEdge);
556
557        #[cfg(feature = "objc2-core-foundation")]
558        /// When a button has both image and text content, this value is the padding between the image and the text.
559        #[unsafe(method(imagePadding))]
560        #[unsafe(method_family = none)]
561        pub unsafe fn imagePadding(&self) -> CGFloat;
562
563        #[cfg(feature = "objc2-core-foundation")]
564        /// Setter for [`imagePadding`][Self::imagePadding].
565        #[unsafe(method(setImagePadding:))]
566        #[unsafe(method_family = none)]
567        pub unsafe fn setImagePadding(&self, image_padding: CGFloat);
568
569        #[cfg(feature = "objc2-core-foundation")]
570        /// When a button has both a title
571        /// &
572        /// subtitle, this value is the padding between those titles.
573        #[unsafe(method(titlePadding))]
574        #[unsafe(method_family = none)]
575        pub unsafe fn titlePadding(&self) -> CGFloat;
576
577        #[cfg(feature = "objc2-core-foundation")]
578        /// Setter for [`titlePadding`][Self::titlePadding].
579        #[unsafe(method(setTitlePadding:))]
580        #[unsafe(method_family = none)]
581        pub unsafe fn setTitlePadding(&self, title_padding: CGFloat);
582
583        /// The alignment to use for relative layout between title
584        /// &
585        /// subtitle.
586        #[unsafe(method(titleAlignment))]
587        #[unsafe(method_family = none)]
588        pub unsafe fn titleAlignment(&self) -> UIButtonConfigurationTitleAlignment;
589
590        /// Setter for [`titleAlignment`][Self::titleAlignment].
591        #[unsafe(method(setTitleAlignment:))]
592        #[unsafe(method_family = none)]
593        pub unsafe fn setTitleAlignment(
594            &self,
595            title_alignment: UIButtonConfigurationTitleAlignment,
596        );
597
598        /// If the style should automatically update when the button is selected. Default varies by style. Disable to customize selection behavior.
599        #[unsafe(method(automaticallyUpdateForSelection))]
600        #[unsafe(method_family = none)]
601        pub unsafe fn automaticallyUpdateForSelection(&self) -> bool;
602
603        /// Setter for [`automaticallyUpdateForSelection`][Self::automaticallyUpdateForSelection].
604        #[unsafe(method(setAutomaticallyUpdateForSelection:))]
605        #[unsafe(method_family = none)]
606        pub unsafe fn setAutomaticallyUpdateForSelection(
607            &self,
608            automatically_update_for_selection: bool,
609        );
610    );
611}