Skip to main content

swiftui_native/views/
strings.rs

1//! Modifiers taking a string, a Text, or an optional.
2
3use super::*;
4use crate::resolve;
5//
6// A `LocalizedStringKey` is four words, a `Text` is four words, `Bool?` is a
7// payload and a tag in two registers, and `Color?` is a single word behind a
8// pointer — `Color` wraps a reference, so a null word is `nil` and no separate
9// tag is needed.
10
11modifiers! {
12    /// Apply `.searchCompletion(_:)`.
13    fn search_completion(value: &str) = modifier_str(search_completion_fn, search_completion_oret, value);
14    /// Apply `.textInputCompletion(_:)`.
15    fn text_input_completion(value: &str) = modifier_str(text_input_completion_fn, text_input_completion_oret, value);
16    /// Apply `.fileDialogConfirmationLabel(_:)`.
17    fn file_dialog_confirmation_label(value: &str) = modifier_lsk(file_dialog_confirmation_label_fn, file_dialog_confirmation_label_oret, value);
18    /// Apply `.fileDialogMessage(_:)`.
19    fn file_dialog_message(value: &str) = modifier_lsk(file_dialog_message_fn, file_dialog_message_oret, value);
20    /// Apply `.fileExporterFilenameLabel(_:)`.
21    fn file_exporter_filename_label(value: &str) = modifier_lsk(file_exporter_filename_label_fn, file_exporter_filename_label_oret, value);
22    /// Apply `.help(_:)`.
23    fn help(value: &str) = modifier_lsk(help_fn, help_oret, value);
24    /// Apply `.navigationSubtitle(_:)`.
25    fn navigation_subtitle(value: &str) = modifier_lsk(navigation_subtitle_fn, navigation_subtitle_oret, value);
26    /// Apply `.help(_:)`.
27    fn help_text(value: &str) = modifier_text(help_text_fn, help_text_oret, value);
28    /// Apply `.navigationSubtitle(_:)`.
29    fn navigation_subtitle_text(value: &str) = modifier_text(navigation_subtitle_text_fn, navigation_subtitle_text_oret, value);
30    /// Apply `.touchBarCustomizationLabel(_:)`.
31    fn touch_bar_customization_label(value: &str) = modifier_text(touch_bar_customization_label_fn, touch_bar_customization_label_oret, value);
32}