portico/Sources/Portico/Generated/AboutDialog.swift

2958 lines
167 KiB
Swift

// Generated by PorticoGen. DO NOT EDIT. See Sources/PorticoGen to make changes.
import Adw
import Gtk
import Gio
import Gdk
// PorticoGen: generateStruct | source: Adw.AboutDialog
/// A dialog showing information about the application.
///
/// <picture>
/// <source srcset="about-dialog-dark.png" media="(prefers-color-scheme: dark)">
/// <img src="about-dialog.png" alt="about-dialog">
/// </picture>
///
/// an about dialog is typically opened when the user activates the `About `
/// item in the application's primary menu. All parts of the dialog are optional.
///
/// ## Main page
///
/// `AdwAboutDialog` prominently displays the application's icon, name, developer
/// name and version. They can be set with the [property`AboutDialog`:application-icon],
/// [property`AboutDialog`:application-name],
/// [property`AboutDialog`:developer-name] and [property`AboutDialog`:version]
/// respectively.
///
/// ## What's New
///
/// `AdwAboutDialog` provides a way for applications to display their release
/// notes, set with the [property`AboutDialog`:release-notes] property.
///
/// Release notes are formatted the same way as
/// [AppStream descriptions](https://freedesktop.org/software/appstream/docs/chap-Metadata.html`tag`-description).
///
/// The supported formatting options are:
///
/// * Paragraph (`<p>`)
/// * Ordered list (`<ol>`), with list items (`<li>`)
/// * Unordered list (`<ul>`), with list items (`<li>`)
///
/// Within paragraphs and list items, emphasis (`<em>`) and inline code
/// (`<code>`) text styles are supported. The emphasis is rendered in italic,
/// while inline code is shown in a monospaced font.
///
/// Any text outside paragraphs or list items is ignored.
///
/// Nested lists are not supported.
///
/// Only one version can be shown at a time. By default, the displayed version
/// number matches [property`AboutDialog`:version]. Use
/// [property`AboutDialog`:release-notes-version] to override it.
///
/// ## Details
///
/// The Details page displays the application comments and links.
///
/// The comments can be set with the [property`AboutDialog`:comments] property.
/// Unlike [property`Gtk`.AboutDialog:comments], this string can be long and
/// detailed. It can also contain links and Pango markup.
///
/// To set the application website, use [property`AboutDialog`:website].
/// To add extra links below the website, use [method`AboutDialog`.add_link].
///
/// If the Details page doesn't have any other content besides website, the
/// website will be displayed on the main page instead.
///
/// ## Troubleshooting
///
/// `AdwAboutDialog` displays the following two links on the main page:
///
/// * Support Questions, set with the [property`AboutDialog`:support-url] property,
/// * Report an Issue, set with the [property`AboutDialog`:issue-url] property.
///
/// Additionally, applications can provide debugging information. It will be
/// shown separately on the Troubleshooting page. Use the
/// [property`AboutDialog`:debug-info] property to specify it.
///
/// It's intended to be attached to issue reports when reporting issues against
/// the application. As such, it cannot contain markup or links.
///
/// `AdwAboutDialog` provides a quick way to save debug information to a file.
/// When saving, [property`AboutDialog`:debug-info-filename] would be used as
/// the suggested filename.
///
/// ## Credits and Acknowledgements
///
/// The Credits page has the following default sections:
///
/// * Developers, set with the [property`AboutDialog`:developers] property,
/// * Designers, set with the [property`AboutDialog`:designers] property,
/// * Artists, set with the [property`AboutDialog`:artists] property,
/// * Documenters, set with the [property`AboutDialog`:documenters] property,
/// * Translators, set with the [property`AboutDialog`:translator-credits] property.
///
/// When setting translator credits, use the strings `"translator-credits"` or
/// `"translator_credits"` and mark them as translatable.
///
/// The default sections that don't contain any names won't be displayed.
///
/// The Credits page can also contain an arbitrary number of extra sections below
/// the default ones. Use [method`AboutDialog`.add_credit_section] to add them.
///
/// The Acknowledgements page can be used to acknowledge additional people and
/// organizations for their non-development contributions. Use
/// [method`AboutDialog`.add_acknowledgement_section] to add sections to it. For
/// example, it can be used to list backers in a crowdfunded project or to give
/// special thanks.
///
/// Each of the people or organizations can have an email address or a website
/// specified. To add a email address, use a string like
/// `Edgar Allan Poe <edgar`poe`.com>`. To specify a website with a title, use a
/// string like `The GNOME Project https://www.gnome.org`:
///
/// <picture>
/// <source srcset="about-dialog-credits-dark.png" media="(prefers-color-scheme: dark)">
/// <img src="about-dialog-credits.png" alt="about-dialog-credits">
/// </picture>
///
/// ## Legal
///
/// The Legal page displays the copyright and licensing information for the
/// application and other modules.
///
/// The copyright string is set with the [property`AboutDialog`:copyright]
/// property and should be a short string of one or two lines, for example:
/// `© 2022 Example`.
///
/// Licensing information can be quickly set from a list of known licenses with
/// the [property`AboutDialog`:license-type] property. If the application's
/// license is not in the list, [property`AboutDialog`:license] can be used
/// instead.
///
/// To add information about other modules, such as application dependencies or
/// data, use [method`AboutDialog`.add_legal_section].
///
/// ## Other applications
///
/// `AdwAboutDialog` can show links to your other apps at the end of the main
/// page. To add them, use [method`AboutDialog`.add_other_app].
///
/// ## Constructing
///
/// To make constructing an `AdwAboutDialog` as convenient as possible, you can
/// use the function [func`show_about_dialog`] which constructs and shows a
/// dialog.
///
/// ```c
/// static void
/// show_about (GtkApplication *app)
/// {
/// const char *developers[] = {
/// "Angela Avery",
/// NULL
/// };
///
/// const char *designers[] = {
/// "GNOME Design Team",
/// NULL
/// };
///
/// adw_show_about_dialog (GTK_WIDGET (gtk_application_get_active_window (app)),
/// "application-name", _("Example"),
/// "application-icon", "org.example.App",
/// "version", "1.2.3",
/// "copyright", "© 2022 Angela Avery",
/// "issue-url", "https://gitlab.gnome.org/example/example/-/issues/",
/// "license-type", GTK_LICENSE_GPL_3_0,
/// "developers", developers,
/// "designers", designers,
/// "translator-credits", _("translator-credits"),
/// NULL);
/// }
/// ```
///
/// ## CSS nodes
///
/// `AdwAboutDialog` has a main CSS node with the name `dialog` and the
/// style class `.about`.
///
/// A Portico view that mounts a `Adw.AboutDialog`.
@MainActor public struct AboutDialog: View {
private let make: (MountContext) -> Adw.AboutDialog
private var configure: [(Adw.AboutDialog, MountContext) -> Void] = []
public var body: Never { fatalError() }
// PorticoGen: generateInits(static) | source: Adw.AboutDialog.init()
/// Creates a new `AdwAboutDialog`.
///
/// Applied once at mount; use the `Binding` or closure overload for values that change.
/// Each closure is evaluated once; children are added in order and slot closures mount their first view.
/// An empty closure adds no children and leaves slots unset.
/// Optional value parameters are applied only when non-`nil`; a `nil` argument leaves the widget's own default in place and cannot clear a nullable property - use the matching modifier for that.
///
/// - Parameter applicationIcon: The name of the application icon.
/// - Parameter applicationName: The name of the application.
/// - Parameter comments: The comments about the application.
/// - Parameter copyright: The copyright information.
/// - Parameter debugInfo: The debug information.
/// - Parameter debugInfoFilename: The debug information filename.
/// - Parameter developerName: The developer name.
/// - Parameter issueUrl: The URL for the application's issue tracker.
/// - Parameter license: The license text.
/// - Parameter licenseType: The license type.
/// - Parameter releaseNotes: The release notes of the application.
/// - Parameter supportUrl: The URL of the application's support page.
/// - Parameter translatorCredits: The translator credits string.
/// - Parameter version: The version of the application.
/// - Parameter website: The URL of the application's website.
/// - Parameter canClose: Whether the dialog can be closed.
/// - Parameter contentHeight: The height of the dialog's contents.
/// - Parameter contentWidth: The width of the dialog's contents.
/// - Parameter followsContentSize: Whether to size content automatically.
/// - Parameter presentationMode: The dialog's presentation mode.
/// - Parameter title: The title of the dialog.
/// - Parameter child: A `ViewBuilder` closure whose first view is mounted into the `child` slot.
/// - Parameter defaultWidget: A `ViewBuilder` closure whose first view is mounted into the `defaultWidget` slot.
/// - Parameter focusWidget: A `ViewBuilder` closure whose first view is mounted into the `focusWidget` slot.
/// - Parameter onActivateLink: Invoked when the widget emits the `activate-link` signal. The closure receives the signal's arguments in order. Its return value is forwarded to GTK as the signal's result.
/// - Parameter onCloseAttempt: Invoked when the widget emits the `close-attempt` signal.
/// - Parameter onClosed: Invoked when the widget emits the `closed` signal.
public init(applicationIcon: String? = nil, applicationName: String? = nil, comments: String? = nil, copyright: String? = nil, debugInfo: String? = nil, debugInfoFilename: String? = nil, developerName: String? = nil, issueUrl: String? = nil, license: String? = nil, licenseType: Adw.License? = nil, releaseNotes: String? = nil, supportUrl: String? = nil, translatorCredits: String? = nil, version: String? = nil, website: String? = nil, canClose: Bool? = nil, contentHeight: Int32? = nil, contentWidth: Int32? = nil, followsContentSize: Bool? = nil, presentationMode: Adw.DialogPresentationMode? = nil, title: String? = nil, @ViewBuilder child: @escaping () -> [AnyView] = { [] }, @ViewBuilder defaultWidget: @escaping () -> [AnyView] = { [] }, @ViewBuilder focusWidget: @escaping () -> [AnyView] = { [] }, onActivateLink: ((String) -> Bool)? = nil, onCloseAttempt: (() -> Void)? = nil, onClosed: (() -> Void)? = nil) {
make = { _ in Adw.AboutDialog() }
configure.append { w, ctx in
if let applicationIcon { w.setApplicationIcon(applicationIcon: applicationIcon) }
if let applicationName { w.setApplicationName(applicationName: applicationName) }
if let comments { w.setComments(comments: comments) }
if let copyright { w.setCopyright(copyright: copyright) }
if let debugInfo { w.setDebugInfo(debugInfo: debugInfo) }
if let debugInfoFilename { w.setDebugInfoFilename(filename: debugInfoFilename) }
if let developerName { w.setDeveloperName(developerName: developerName) }
if let issueUrl { w.setIssueUrl(issueUrl: issueUrl) }
if let license { w.setLicense(license: license) }
if let licenseType { w.setLicenseType(licenseType: licenseType) }
if let releaseNotes { w.setReleaseNotes(releaseNotes: releaseNotes) }
if let supportUrl { w.setSupportUrl(supportUrl: supportUrl) }
if let translatorCredits { w.setTranslatorCredits(translatorCredits: translatorCredits) }
if let version { w.setVersion(version: version) }
if let website { w.setWebsite(website: website) }
if let canClose { w.setCanClose(canClose: canClose) }
if let contentHeight { w.setContentHeight(contentHeight: contentHeight) }
if let contentWidth { w.setContentWidth(contentWidth: contentWidth) }
if let followsContentSize { w.setFollowsContentSize(followsContentSize: followsContentSize) }
if let presentationMode { w.setPresentationMode(presentationMode: presentationMode) }
if let title { w.setTitle(title: title) }
if let v = Portico.mountSlotChild(child, ctx, onUpdate: { v in w.setChild(child: v) }) { w.setChild(child: v) }
if let v = Portico.mountSlotChild(defaultWidget, ctx, onUpdate: { v in w.setDefaultWidget(defaultWidget: v) }) { w.setDefaultWidget(defaultWidget: v) }
if let v = Portico.mountSlotChild(focusWidget, ctx, onUpdate: { v in w.setFocus(focus: v) }) { w.setFocus(focus: v) }
if let onActivateLink { ctx.registry.add(w.connectActivateLink { _, a0 in onActivateLink(a0) }) }
if let onCloseAttempt { ctx.registry.add(w.connectCloseAttempt { _ in onCloseAttempt() }) }
if let onClosed { ctx.registry.add(w.connectClosed { _ in onClosed() }) }
}
}
// PorticoGen: generateInits(static) | source: Adw.AboutDialog.init(resourcePath:releaseNotesVersion:)
/// Creates a new `AdwAboutDialog` using AppStream metadata.
///
/// This automatically sets the following properties with the following AppStream
/// values:
///
/// * [property`AboutDialog`:application-icon] is set from the `<id>`
/// * [property`AboutDialog`:application-name] is set from the `<name>`
/// * [property`AboutDialog`:developer-name] is set from the `<name>` within
/// `<developer>`
/// * [property`AboutDialog`:version] is set from the version of the latest release
/// * [property`AboutDialog`:website] is set from the `<url type="homepage">`
/// * [property`AboutDialog`:support-url] is set from the `<url type="help">`
/// * [property`AboutDialog`:issue-url] is set from the `<url type="bugtracker">`
/// * [property`AboutDialog`:license-type] is set from the `<project_license>`.
/// If the license type retrieved from AppStream is not listed in
/// [enum`Gtk`.License], it will be set to [enum`Gtk`.License.custom].
///
/// If `release_notes_version` is not `NULL`,
/// [property`AboutDialog`:release-notes-version] is set to match it, while
/// [property`AboutDialog`:release-notes] is set from the AppStream release
/// description for that version.
///
/// Applied once at mount; use the `Binding` or closure overload for values that change.
/// Each closure is evaluated once; children are added in order and slot closures mount their first view.
/// An empty closure adds no children and leaves slots unset.
/// Optional value parameters are applied only when non-`nil`; a `nil` argument leaves the widget's own default in place and cannot clear a nullable property - use the matching modifier for that.
///
/// - Parameter resourcePath: The `resourcePath` value forwarded to `Adw.AboutDialog`.
/// - Parameter releaseNotesVersion: The version described by the application's release notes.
/// - Parameter applicationIcon: The name of the application icon.
/// - Parameter applicationName: The name of the application.
/// - Parameter comments: The comments about the application.
/// - Parameter copyright: The copyright information.
/// - Parameter debugInfo: The debug information.
/// - Parameter debugInfoFilename: The debug information filename.
/// - Parameter developerName: The developer name.
/// - Parameter issueUrl: The URL for the application's issue tracker.
/// - Parameter license: The license text.
/// - Parameter licenseType: The license type.
/// - Parameter releaseNotes: The release notes of the application.
/// - Parameter supportUrl: The URL of the application's support page.
/// - Parameter translatorCredits: The translator credits string.
/// - Parameter version: The version of the application.
/// - Parameter website: The URL of the application's website.
/// - Parameter canClose: Whether the dialog can be closed.
/// - Parameter contentHeight: The height of the dialog's contents.
/// - Parameter contentWidth: The width of the dialog's contents.
/// - Parameter followsContentSize: Whether to size content automatically.
/// - Parameter presentationMode: The dialog's presentation mode.
/// - Parameter title: The title of the dialog.
/// - Parameter child: A `ViewBuilder` closure whose first view is mounted into the `child` slot.
/// - Parameter defaultWidget: A `ViewBuilder` closure whose first view is mounted into the `defaultWidget` slot.
/// - Parameter focusWidget: A `ViewBuilder` closure whose first view is mounted into the `focusWidget` slot.
/// - Parameter onActivateLink: Invoked when the widget emits the `activate-link` signal. The closure receives the signal's arguments in order. Its return value is forwarded to GTK as the signal's result.
/// - Parameter onCloseAttempt: Invoked when the widget emits the `close-attempt` signal.
/// - Parameter onClosed: Invoked when the widget emits the `closed` signal.
public init(resourcePath: String, releaseNotesVersion: String?, applicationIcon: String? = nil, applicationName: String? = nil, comments: String? = nil, copyright: String? = nil, debugInfo: String? = nil, debugInfoFilename: String? = nil, developerName: String? = nil, issueUrl: String? = nil, license: String? = nil, licenseType: Adw.License? = nil, releaseNotes: String? = nil, supportUrl: String? = nil, translatorCredits: String? = nil, version: String? = nil, website: String? = nil, canClose: Bool? = nil, contentHeight: Int32? = nil, contentWidth: Int32? = nil, followsContentSize: Bool? = nil, presentationMode: Adw.DialogPresentationMode? = nil, title: String? = nil, @ViewBuilder child: @escaping () -> [AnyView] = { [] }, @ViewBuilder defaultWidget: @escaping () -> [AnyView] = { [] }, @ViewBuilder focusWidget: @escaping () -> [AnyView] = { [] }, onActivateLink: ((String) -> Bool)? = nil, onCloseAttempt: (() -> Void)? = nil, onClosed: (() -> Void)? = nil) {
make = { _ in Adw.AboutDialog(resourcePath: resourcePath, releaseNotesVersion: releaseNotesVersion) }
configure.append { w, ctx in
if let applicationIcon { w.setApplicationIcon(applicationIcon: applicationIcon) }
if let applicationName { w.setApplicationName(applicationName: applicationName) }
if let comments { w.setComments(comments: comments) }
if let copyright { w.setCopyright(copyright: copyright) }
if let debugInfo { w.setDebugInfo(debugInfo: debugInfo) }
if let debugInfoFilename { w.setDebugInfoFilename(filename: debugInfoFilename) }
if let developerName { w.setDeveloperName(developerName: developerName) }
if let issueUrl { w.setIssueUrl(issueUrl: issueUrl) }
if let license { w.setLicense(license: license) }
if let licenseType { w.setLicenseType(licenseType: licenseType) }
if let releaseNotes { w.setReleaseNotes(releaseNotes: releaseNotes) }
if let supportUrl { w.setSupportUrl(supportUrl: supportUrl) }
if let translatorCredits { w.setTranslatorCredits(translatorCredits: translatorCredits) }
if let version { w.setVersion(version: version) }
if let website { w.setWebsite(website: website) }
if let canClose { w.setCanClose(canClose: canClose) }
if let contentHeight { w.setContentHeight(contentHeight: contentHeight) }
if let contentWidth { w.setContentWidth(contentWidth: contentWidth) }
if let followsContentSize { w.setFollowsContentSize(followsContentSize: followsContentSize) }
if let presentationMode { w.setPresentationMode(presentationMode: presentationMode) }
if let title { w.setTitle(title: title) }
if let v = Portico.mountSlotChild(child, ctx, onUpdate: { v in w.setChild(child: v) }) { w.setChild(child: v) }
if let v = Portico.mountSlotChild(defaultWidget, ctx, onUpdate: { v in w.setDefaultWidget(defaultWidget: v) }) { w.setDefaultWidget(defaultWidget: v) }
if let v = Portico.mountSlotChild(focusWidget, ctx, onUpdate: { v in w.setFocus(focus: v) }) { w.setFocus(focus: v) }
if let onActivateLink { ctx.registry.add(w.connectActivateLink { _, a0 in onActivateLink(a0) }) }
if let onCloseAttempt { ctx.registry.add(w.connectCloseAttempt { _ in onCloseAttempt() }) }
if let onClosed { ctx.registry.add(w.connectClosed { _ in onClosed() }) }
}
}
}
extension AboutDialog: WidgetView {
public typealias Target = Adw.AboutDialog
@_spi(Portico) public func appending(
_ step: @escaping (Adw.AboutDialog, MountContext) -> Void
) -> Self {
var c = self
c.configure.append(step)
return c
}
}
@_spi(Portico) extension AboutDialog: Mountable {
@_spi(Portico) public func mount(_ ctx: MountContext) -> Gtk.Widget {
let w = make(ctx)
for step in configure { step(w, ctx) }
return w
}
}
// PorticoGen: generateModifierExtension | source: Adw.AboutDialog
/// Modifiers for `Adw.AboutDialog`, available on every Portico view whose
/// backing widget is `Adw.AboutDialog` or one of its subclasses.
extension WidgetView where Target: Adw.AboutDialog {
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutDialog.setApplicationIcon(applicationIcon:)
/// Sets the name of the application icon for `self`.
///
/// The icon is displayed at the top of the main page.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter applicationIcon: The name of the application icon.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func applicationIcon<S: StringProtocol>(_ applicationIcon: S) -> Self {
appending { w, _ in
w.setApplicationIcon(applicationIcon: String(applicationIcon))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutDialog.setApplicationIcon(applicationIcon:), GObject.Object.connectNotify(detail:_:), Adw.AboutDialog.getApplicationIcon()
/// Sets the name of the application icon for `self`.
///
/// The icon is displayed at the top of the main page.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func applicationIcon(_ applicationIcon: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, applicationIcon, registry: ctx.registry, notifyDetail: "application-icon",
read: { [w] in w.getApplicationIcon() },
write: { [w] v in w.setApplicationIcon(applicationIcon: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutDialog.setApplicationIcon(applicationIcon:)
/// Sets the name of the application icon for `self`.
///
/// The icon is displayed at the top of the main page.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutDialog.setApplicationIcon(applicationIcon:)`.
///
/// - Parameter applicationIcon: The name of the application icon.
/// - Returns: A copy of this view with the modifier applied.
public func applicationIcon(_ applicationIcon: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setApplicationIcon(applicationIcon: applicationIcon()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutDialog.setApplicationIcon(applicationIcon:)
/// Sets the name of the application icon for `self`.
///
/// The icon is displayed at the top of the main page.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutDialog.setApplicationIcon(applicationIcon:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter applicationIcon: The name of the application icon.
/// - Returns: A copy of this view with the modifier applied.
public func applicationIcon(_ applicationIcon: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(applicationIcon, registry: ctx.registry) { [w] v in w.setApplicationIcon(applicationIcon: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutDialog.setApplicationName(applicationName:)
/// Sets the application name for `self`.
///
/// The name is displayed at the top of the main page.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter applicationName: The name of the application.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func applicationName<S: StringProtocol>(_ applicationName: S) -> Self {
appending { w, _ in
w.setApplicationName(applicationName: String(applicationName))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutDialog.setApplicationName(applicationName:), GObject.Object.connectNotify(detail:_:), Adw.AboutDialog.getApplicationName()
/// Sets the application name for `self`.
///
/// The name is displayed at the top of the main page.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func applicationName(_ applicationName: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, applicationName, registry: ctx.registry, notifyDetail: "application-name",
read: { [w] in w.getApplicationName() },
write: { [w] v in w.setApplicationName(applicationName: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutDialog.setApplicationName(applicationName:)
/// Sets the application name for `self`.
///
/// The name is displayed at the top of the main page.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutDialog.setApplicationName(applicationName:)`.
///
/// - Parameter applicationName: The name of the application.
/// - Returns: A copy of this view with the modifier applied.
public func applicationName(_ applicationName: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setApplicationName(applicationName: applicationName()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutDialog.setApplicationName(applicationName:)
/// Sets the application name for `self`.
///
/// The name is displayed at the top of the main page.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutDialog.setApplicationName(applicationName:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter applicationName: The name of the application.
/// - Returns: A copy of this view with the modifier applied.
public func applicationName(_ applicationName: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(applicationName, registry: ctx.registry) { [w] v in w.setApplicationName(applicationName: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutDialog.setComments(comments:)
/// Sets the comments about the application.
///
/// Comments will be shown on the Details page, above links.
///
/// Unlike [property`Gtk`.AboutDialog:comments], this string can be long and
/// detailed. It can also contain links and Pango markup.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter comments: The comments about the application.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func comments<S: StringProtocol>(_ comments: S) -> Self {
appending { w, _ in
w.setComments(comments: String(comments))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutDialog.setComments(comments:), GObject.Object.connectNotify(detail:_:), Adw.AboutDialog.getComments()
/// Sets the comments about the application.
///
/// Comments will be shown on the Details page, above links.
///
/// Unlike [property`Gtk`.AboutDialog:comments], this string can be long and
/// detailed. It can also contain links and Pango markup.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func comments(_ comments: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, comments, registry: ctx.registry, notifyDetail: "comments",
read: { [w] in w.getComments() },
write: { [w] v in w.setComments(comments: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutDialog.setComments(comments:)
/// Sets the comments about the application.
///
/// Comments will be shown on the Details page, above links.
///
/// Unlike [property`Gtk`.AboutDialog:comments], this string can be long and
/// detailed. It can also contain links and Pango markup.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutDialog.setComments(comments:)`.
///
/// - Parameter comments: The comments about the application.
/// - Returns: A copy of this view with the modifier applied.
public func comments(_ comments: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setComments(comments: comments()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutDialog.setComments(comments:)
/// Sets the comments about the application.
///
/// Comments will be shown on the Details page, above links.
///
/// Unlike [property`Gtk`.AboutDialog:comments], this string can be long and
/// detailed. It can also contain links and Pango markup.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutDialog.setComments(comments:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter comments: The comments about the application.
/// - Returns: A copy of this view with the modifier applied.
public func comments(_ comments: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(comments, registry: ctx.registry) { [w] v in w.setComments(comments: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutDialog.setCopyright(copyright:)
/// Sets the copyright information for `self`.
///
/// This should be a short string of one or two lines, for example:
/// `© 2022 Example`.
///
/// The copyright information will be displayed on the Legal page, before the
/// application license.
///
/// [method`AboutDialog`.add_legal_section] can be used to add copyright
/// information for the application dependencies or other components.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter copyright: The copyright information.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func copyright<S: StringProtocol>(_ copyright: S) -> Self {
appending { w, _ in
w.setCopyright(copyright: String(copyright))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutDialog.setCopyright(copyright:), GObject.Object.connectNotify(detail:_:), Adw.AboutDialog.getCopyright()
/// Sets the copyright information for `self`.
///
/// This should be a short string of one or two lines, for example:
/// `© 2022 Example`.
///
/// The copyright information will be displayed on the Legal page, before the
/// application license.
///
/// [method`AboutDialog`.add_legal_section] can be used to add copyright
/// information for the application dependencies or other components.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func copyright(_ copyright: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, copyright, registry: ctx.registry, notifyDetail: "copyright",
read: { [w] in w.getCopyright() },
write: { [w] v in w.setCopyright(copyright: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutDialog.setCopyright(copyright:)
/// Sets the copyright information for `self`.
///
/// This should be a short string of one or two lines, for example:
/// `© 2022 Example`.
///
/// The copyright information will be displayed on the Legal page, before the
/// application license.
///
/// [method`AboutDialog`.add_legal_section] can be used to add copyright
/// information for the application dependencies or other components.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutDialog.setCopyright(copyright:)`.
///
/// - Parameter copyright: The copyright information.
/// - Returns: A copy of this view with the modifier applied.
public func copyright(_ copyright: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setCopyright(copyright: copyright()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutDialog.setCopyright(copyright:)
/// Sets the copyright information for `self`.
///
/// This should be a short string of one or two lines, for example:
/// `© 2022 Example`.
///
/// The copyright information will be displayed on the Legal page, before the
/// application license.
///
/// [method`AboutDialog`.add_legal_section] can be used to add copyright
/// information for the application dependencies or other components.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutDialog.setCopyright(copyright:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter copyright: The copyright information.
/// - Returns: A copy of this view with the modifier applied.
public func copyright(_ copyright: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(copyright, registry: ctx.registry) { [w] v in w.setCopyright(copyright: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutDialog.setDebugInfo(debugInfo:)
/// Sets the debug information for `self`.
///
/// Debug information will be shown on the Troubleshooting page. It's intended
/// to be attached to issue reports when reporting issues against the
/// application.
///
/// `AdwAboutDialog` provides a quick way to save debug information to a file.
/// When saving, [property`AboutDialog`:debug-info-filename] would be used as
/// the suggested filename.
///
/// Debug information cannot contain markup or links.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter debugInfo: The debug information.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func debugInfo<S: StringProtocol>(_ debugInfo: S) -> Self {
appending { w, _ in
w.setDebugInfo(debugInfo: String(debugInfo))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutDialog.setDebugInfo(debugInfo:), GObject.Object.connectNotify(detail:_:), Adw.AboutDialog.getDebugInfo()
/// Sets the debug information for `self`.
///
/// Debug information will be shown on the Troubleshooting page. It's intended
/// to be attached to issue reports when reporting issues against the
/// application.
///
/// `AdwAboutDialog` provides a quick way to save debug information to a file.
/// When saving, [property`AboutDialog`:debug-info-filename] would be used as
/// the suggested filename.
///
/// Debug information cannot contain markup or links.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func debugInfo(_ debugInfo: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, debugInfo, registry: ctx.registry, notifyDetail: "debug-info",
read: { [w] in w.getDebugInfo() },
write: { [w] v in w.setDebugInfo(debugInfo: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutDialog.setDebugInfo(debugInfo:)
/// Sets the debug information for `self`.
///
/// Debug information will be shown on the Troubleshooting page. It's intended
/// to be attached to issue reports when reporting issues against the
/// application.
///
/// `AdwAboutDialog` provides a quick way to save debug information to a file.
/// When saving, [property`AboutDialog`:debug-info-filename] would be used as
/// the suggested filename.
///
/// Debug information cannot contain markup or links.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutDialog.setDebugInfo(debugInfo:)`.
///
/// - Parameter debugInfo: The debug information.
/// - Returns: A copy of this view with the modifier applied.
public func debugInfo(_ debugInfo: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setDebugInfo(debugInfo: debugInfo()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutDialog.setDebugInfo(debugInfo:)
/// Sets the debug information for `self`.
///
/// Debug information will be shown on the Troubleshooting page. It's intended
/// to be attached to issue reports when reporting issues against the
/// application.
///
/// `AdwAboutDialog` provides a quick way to save debug information to a file.
/// When saving, [property`AboutDialog`:debug-info-filename] would be used as
/// the suggested filename.
///
/// Debug information cannot contain markup or links.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutDialog.setDebugInfo(debugInfo:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter debugInfo: The debug information.
/// - Returns: A copy of this view with the modifier applied.
public func debugInfo(_ debugInfo: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(debugInfo, registry: ctx.registry) { [w] v in w.setDebugInfo(debugInfo: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutDialog.setDebugInfoFilename(filename:)
/// Sets the debug information filename for `self`.
///
/// It will be used as the suggested filename when saving debug information to a
/// file.
///
/// See [property`AboutDialog`:debug-info].
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter debugInfoFilename: The debug information filename.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func debugInfoFilename<S: StringProtocol>(_ debugInfoFilename: S) -> Self {
appending { w, _ in
w.setDebugInfoFilename(filename: String(debugInfoFilename))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutDialog.setDebugInfoFilename(filename:), GObject.Object.connectNotify(detail:_:), Adw.AboutDialog.getDebugInfoFilename()
/// Sets the debug information filename for `self`.
///
/// It will be used as the suggested filename when saving debug information to a
/// file.
///
/// See [property`AboutDialog`:debug-info].
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func debugInfoFilename(_ debugInfoFilename: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, debugInfoFilename, registry: ctx.registry, notifyDetail: "debug-info-filename",
read: { [w] in w.getDebugInfoFilename() },
write: { [w] v in w.setDebugInfoFilename(filename: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutDialog.setDebugInfoFilename(filename:)
/// Sets the debug information filename for `self`.
///
/// It will be used as the suggested filename when saving debug information to a
/// file.
///
/// See [property`AboutDialog`:debug-info].
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutDialog.setDebugInfoFilename(filename:)`.
///
/// - Parameter debugInfoFilename: The debug information filename.
/// - Returns: A copy of this view with the modifier applied.
public func debugInfoFilename(_ debugInfoFilename: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setDebugInfoFilename(filename: debugInfoFilename()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutDialog.setDebugInfoFilename(filename:)
/// Sets the debug information filename for `self`.
///
/// It will be used as the suggested filename when saving debug information to a
/// file.
///
/// See [property`AboutDialog`:debug-info].
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutDialog.setDebugInfoFilename(filename:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter debugInfoFilename: The debug information filename.
/// - Returns: A copy of this view with the modifier applied.
public func debugInfoFilename(_ debugInfoFilename: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(debugInfoFilename, registry: ctx.registry) { [w] v in w.setDebugInfoFilename(filename: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutDialog.setDeveloperName(developerName:)
/// Sets the developer name for `self`.
///
/// The developer name is displayed on the main page, under the application name.
///
/// If the application is developed by multiple people, the developer name can be
/// set to values like "AppName team", "AppName developers" or
/// "The AppName project", and the individual contributors can be listed on the
/// Credits page, with [property`AboutDialog`:developers] and related properties.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter developerName: The developer name.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func developerName<S: StringProtocol>(_ developerName: S) -> Self {
appending { w, _ in
w.setDeveloperName(developerName: String(developerName))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutDialog.setDeveloperName(developerName:), GObject.Object.connectNotify(detail:_:), Adw.AboutDialog.getDeveloperName()
/// Sets the developer name for `self`.
///
/// The developer name is displayed on the main page, under the application name.
///
/// If the application is developed by multiple people, the developer name can be
/// set to values like "AppName team", "AppName developers" or
/// "The AppName project", and the individual contributors can be listed on the
/// Credits page, with [property`AboutDialog`:developers] and related properties.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func developerName(_ developerName: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, developerName, registry: ctx.registry, notifyDetail: "developer-name",
read: { [w] in w.getDeveloperName() },
write: { [w] v in w.setDeveloperName(developerName: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutDialog.setDeveloperName(developerName:)
/// Sets the developer name for `self`.
///
/// The developer name is displayed on the main page, under the application name.
///
/// If the application is developed by multiple people, the developer name can be
/// set to values like "AppName team", "AppName developers" or
/// "The AppName project", and the individual contributors can be listed on the
/// Credits page, with [property`AboutDialog`:developers] and related properties.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutDialog.setDeveloperName(developerName:)`.
///
/// - Parameter developerName: The developer name.
/// - Returns: A copy of this view with the modifier applied.
public func developerName(_ developerName: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setDeveloperName(developerName: developerName()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutDialog.setDeveloperName(developerName:)
/// Sets the developer name for `self`.
///
/// The developer name is displayed on the main page, under the application name.
///
/// If the application is developed by multiple people, the developer name can be
/// set to values like "AppName team", "AppName developers" or
/// "The AppName project", and the individual contributors can be listed on the
/// Credits page, with [property`AboutDialog`:developers] and related properties.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutDialog.setDeveloperName(developerName:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter developerName: The developer name.
/// - Returns: A copy of this view with the modifier applied.
public func developerName(_ developerName: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(developerName, registry: ctx.registry) { [w] v in w.setDeveloperName(developerName: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutDialog.setIssueUrl(issueUrl:)
/// Sets the issue tracker URL for `self`.
///
/// The issue tracker link is displayed on the main page.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter issueUrl: The URL for the application's issue tracker.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func issueUrl<S: StringProtocol>(_ issueUrl: S) -> Self {
appending { w, _ in
w.setIssueUrl(issueUrl: String(issueUrl))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutDialog.setIssueUrl(issueUrl:), GObject.Object.connectNotify(detail:_:), Adw.AboutDialog.getIssueUrl()
/// Sets the issue tracker URL for `self`.
///
/// The issue tracker link is displayed on the main page.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func issueUrl(_ issueUrl: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, issueUrl, registry: ctx.registry, notifyDetail: "issue-url",
read: { [w] in w.getIssueUrl() },
write: { [w] v in w.setIssueUrl(issueUrl: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutDialog.setIssueUrl(issueUrl:)
/// Sets the issue tracker URL for `self`.
///
/// The issue tracker link is displayed on the main page.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutDialog.setIssueUrl(issueUrl:)`.
///
/// - Parameter issueUrl: The URL for the application's issue tracker.
/// - Returns: A copy of this view with the modifier applied.
public func issueUrl(_ issueUrl: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setIssueUrl(issueUrl: issueUrl()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutDialog.setIssueUrl(issueUrl:)
/// Sets the issue tracker URL for `self`.
///
/// The issue tracker link is displayed on the main page.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutDialog.setIssueUrl(issueUrl:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter issueUrl: The URL for the application's issue tracker.
/// - Returns: A copy of this view with the modifier applied.
public func issueUrl(_ issueUrl: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(issueUrl, registry: ctx.registry) { [w] v in w.setIssueUrl(issueUrl: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutDialog.setLicense(license:)
/// Sets the license for `self`.
///
/// This can be used to set a custom text for the license if it can't be set via
/// [property`AboutDialog`:license-type].
///
/// When set, [property`AboutDialog`:license-type] will be set to
/// [enum`Gtk`.License.custom].
///
/// The license text will be displayed on the Legal page, below the copyright
/// information.
///
/// License text can contain Pango markup and links.
///
/// [method`AboutDialog`.add_legal_section] can be used to add license information
/// for the application dependencies or other components.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter license: The license text.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func license<S: StringProtocol>(_ license: S) -> Self {
appending { w, _ in
w.setLicense(license: String(license))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutDialog.setLicense(license:), GObject.Object.connectNotify(detail:_:), Adw.AboutDialog.getLicense()
/// Sets the license for `self`.
///
/// This can be used to set a custom text for the license if it can't be set via
/// [property`AboutDialog`:license-type].
///
/// When set, [property`AboutDialog`:license-type] will be set to
/// [enum`Gtk`.License.custom].
///
/// The license text will be displayed on the Legal page, below the copyright
/// information.
///
/// License text can contain Pango markup and links.
///
/// [method`AboutDialog`.add_legal_section] can be used to add license information
/// for the application dependencies or other components.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func license(_ license: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, license, registry: ctx.registry, notifyDetail: "license",
read: { [w] in w.getLicense() },
write: { [w] v in w.setLicense(license: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutDialog.setLicense(license:)
/// Sets the license for `self`.
///
/// This can be used to set a custom text for the license if it can't be set via
/// [property`AboutDialog`:license-type].
///
/// When set, [property`AboutDialog`:license-type] will be set to
/// [enum`Gtk`.License.custom].
///
/// The license text will be displayed on the Legal page, below the copyright
/// information.
///
/// License text can contain Pango markup and links.
///
/// [method`AboutDialog`.add_legal_section] can be used to add license information
/// for the application dependencies or other components.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutDialog.setLicense(license:)`.
///
/// - Parameter license: The license text.
/// - Returns: A copy of this view with the modifier applied.
public func license(_ license: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setLicense(license: license()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutDialog.setLicense(license:)
/// Sets the license for `self`.
///
/// This can be used to set a custom text for the license if it can't be set via
/// [property`AboutDialog`:license-type].
///
/// When set, [property`AboutDialog`:license-type] will be set to
/// [enum`Gtk`.License.custom].
///
/// The license text will be displayed on the Legal page, below the copyright
/// information.
///
/// License text can contain Pango markup and links.
///
/// [method`AboutDialog`.add_legal_section] can be used to add license information
/// for the application dependencies or other components.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutDialog.setLicense(license:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter license: The license text.
/// - Returns: A copy of this view with the modifier applied.
public func license(_ license: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(license, registry: ctx.registry) { [w] v in w.setLicense(license: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutDialog.setLicenseType(licenseType:)
/// Sets the license for `self` from a list of known licenses.
///
/// If the application's license is not in the list,
/// [property`AboutDialog`:license] can be used instead. The license type will be
/// automatically set to [enum`Gtk`.License.custom] in that case.
///
/// If `license_type` is [enum`Gtk`.License.unknown], no information will be
/// displayed.
///
/// If `license_type` is different from [enum`Gtk`.License.custom].
/// [property`AboutDialog`:license] will be cleared out.
///
/// The license description will be displayed on the Legal page, below the
/// copyright information.
///
/// [method`AboutDialog`.add_legal_section] can be used to add license information
/// for the application dependencies or other components.
///
/// Applied once at mount; use the `Binding` or closure overload for a value that changes.
///
/// - Parameter licenseType: The license type.
/// - Returns: A copy of this view with the modifier applied.
public func licenseType(_ licenseType: Adw.License) -> Self {
appending { w, _ in
w.setLicenseType(licenseType: licenseType)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutDialog.setLicenseType(licenseType:), GObject.Object.connectNotify(detail:_:), Adw.AboutDialog.getLicenseType()
/// Sets the license for `self` from a list of known licenses.
///
/// If the application's license is not in the list,
/// [property`AboutDialog`:license] can be used instead. The license type will be
/// automatically set to [enum`Gtk`.License.custom] in that case.
///
/// If `license_type` is [enum`Gtk`.License.unknown], no information will be
/// displayed.
///
/// If `license_type` is different from [enum`Gtk`.License.custom].
/// [property`AboutDialog`:license] will be cleared out.
///
/// The license description will be displayed on the Legal page, below the
/// copyright information.
///
/// [method`AboutDialog`.add_legal_section] can be used to add license information
/// for the application dependencies or other components.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `Adw.License` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func licenseType(_ licenseType: Portico.Binding<Adw.License>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, licenseType, registry: ctx.registry, notifyDetail: "license-type",
read: { [w] in w.getLicenseType() },
write: { [w] v in w.setLicenseType(licenseType: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutDialog.setLicenseType(licenseType:)
/// Sets the license for `self` from a list of known licenses.
///
/// If the application's license is not in the list,
/// [property`AboutDialog`:license] can be used instead. The license type will be
/// automatically set to [enum`Gtk`.License.custom] in that case.
///
/// If `license_type` is [enum`Gtk`.License.unknown], no information will be
/// displayed.
///
/// If `license_type` is different from [enum`Gtk`.License.custom].
/// [property`AboutDialog`:license] will be cleared out.
///
/// The license description will be displayed on the Legal page, below the
/// copyright information.
///
/// [method`AboutDialog`.add_legal_section] can be used to add license information
/// for the application dependencies or other components.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutDialog.setLicenseType(licenseType:)`.
///
/// - Parameter licenseType: The license type.
/// - Returns: A copy of this view with the modifier applied.
public func licenseType(_ licenseType: @escaping () -> Adw.License) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setLicenseType(licenseType: licenseType()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutDialog.setReleaseNotes(releaseNotes:)
/// Sets the release notes for `self`.
///
/// Release notes are displayed on the the What's New page.
///
/// Release notes are formatted the same way as
/// [AppStream descriptions](https://freedesktop.org/software/appstream/docs/chap-Metadata.html`tag`-description).
///
/// The supported formatting options are:
///
/// * Paragraph (`<p>`)
/// * Ordered list (`<ol>`), with list items (`<li>`)
/// * Unordered list (`<ul>`), with list items (`<li>`)
///
/// Within paragraphs and list items, emphasis (`<em>`) and inline code
/// (`<code>`) text styles are supported. The emphasis is rendered in italic,
/// while inline code is shown in a monospaced font.
///
/// Any text outside paragraphs or list items is ignored.
///
/// Nested lists are not supported.
///
/// `AdwAboutDialog` displays the version above the release notes. If set, the
/// [property`AboutDialog`:release-notes-version] of the property will be used
/// as the version; otherwise, [property`AboutDialog`:version] is used.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter releaseNotes: The release notes of the application.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func releaseNotes<S: StringProtocol>(_ releaseNotes: S) -> Self {
appending { w, _ in
w.setReleaseNotes(releaseNotes: String(releaseNotes))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutDialog.setReleaseNotes(releaseNotes:), GObject.Object.connectNotify(detail:_:), Adw.AboutDialog.getReleaseNotes()
/// Sets the release notes for `self`.
///
/// Release notes are displayed on the the What's New page.
///
/// Release notes are formatted the same way as
/// [AppStream descriptions](https://freedesktop.org/software/appstream/docs/chap-Metadata.html`tag`-description).
///
/// The supported formatting options are:
///
/// * Paragraph (`<p>`)
/// * Ordered list (`<ol>`), with list items (`<li>`)
/// * Unordered list (`<ul>`), with list items (`<li>`)
///
/// Within paragraphs and list items, emphasis (`<em>`) and inline code
/// (`<code>`) text styles are supported. The emphasis is rendered in italic,
/// while inline code is shown in a monospaced font.
///
/// Any text outside paragraphs or list items is ignored.
///
/// Nested lists are not supported.
///
/// `AdwAboutDialog` displays the version above the release notes. If set, the
/// [property`AboutDialog`:release-notes-version] of the property will be used
/// as the version; otherwise, [property`AboutDialog`:version] is used.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func releaseNotes(_ releaseNotes: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, releaseNotes, registry: ctx.registry, notifyDetail: "release-notes",
read: { [w] in w.getReleaseNotes() },
write: { [w] v in w.setReleaseNotes(releaseNotes: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutDialog.setReleaseNotes(releaseNotes:)
/// Sets the release notes for `self`.
///
/// Release notes are displayed on the the What's New page.
///
/// Release notes are formatted the same way as
/// [AppStream descriptions](https://freedesktop.org/software/appstream/docs/chap-Metadata.html`tag`-description).
///
/// The supported formatting options are:
///
/// * Paragraph (`<p>`)
/// * Ordered list (`<ol>`), with list items (`<li>`)
/// * Unordered list (`<ul>`), with list items (`<li>`)
///
/// Within paragraphs and list items, emphasis (`<em>`) and inline code
/// (`<code>`) text styles are supported. The emphasis is rendered in italic,
/// while inline code is shown in a monospaced font.
///
/// Any text outside paragraphs or list items is ignored.
///
/// Nested lists are not supported.
///
/// `AdwAboutDialog` displays the version above the release notes. If set, the
/// [property`AboutDialog`:release-notes-version] of the property will be used
/// as the version; otherwise, [property`AboutDialog`:version] is used.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutDialog.setReleaseNotes(releaseNotes:)`.
///
/// - Parameter releaseNotes: The release notes of the application.
/// - Returns: A copy of this view with the modifier applied.
public func releaseNotes(_ releaseNotes: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setReleaseNotes(releaseNotes: releaseNotes()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutDialog.setReleaseNotes(releaseNotes:)
/// Sets the release notes for `self`.
///
/// Release notes are displayed on the the What's New page.
///
/// Release notes are formatted the same way as
/// [AppStream descriptions](https://freedesktop.org/software/appstream/docs/chap-Metadata.html`tag`-description).
///
/// The supported formatting options are:
///
/// * Paragraph (`<p>`)
/// * Ordered list (`<ol>`), with list items (`<li>`)
/// * Unordered list (`<ul>`), with list items (`<li>`)
///
/// Within paragraphs and list items, emphasis (`<em>`) and inline code
/// (`<code>`) text styles are supported. The emphasis is rendered in italic,
/// while inline code is shown in a monospaced font.
///
/// Any text outside paragraphs or list items is ignored.
///
/// Nested lists are not supported.
///
/// `AdwAboutDialog` displays the version above the release notes. If set, the
/// [property`AboutDialog`:release-notes-version] of the property will be used
/// as the version; otherwise, [property`AboutDialog`:version] is used.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutDialog.setReleaseNotes(releaseNotes:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter releaseNotes: The release notes of the application.
/// - Returns: A copy of this view with the modifier applied.
public func releaseNotes(_ releaseNotes: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(releaseNotes, registry: ctx.registry) { [w] v in w.setReleaseNotes(releaseNotes: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutDialog.setReleaseNotesVersion(version:)
/// Sets the version described by the application's release notes.
///
/// The release notes version is displayed on the What's New page, above the
/// release notes.
///
/// If not set, [property`AboutDialog`:version] will be used instead.
///
/// For example, an application with the current version 2.0.2 might want to
/// keep the release notes from 2.0.0, and set the release notes version
/// accordingly.
///
/// See [property`AboutDialog`:release-notes].
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter releaseNotesVersion: The version described by the application's release notes.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func releaseNotesVersion<S: StringProtocol>(_ releaseNotesVersion: S) -> Self {
appending { w, _ in
w.setReleaseNotesVersion(version: String(releaseNotesVersion))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutDialog.setReleaseNotesVersion(version:), GObject.Object.connectNotify(detail:_:), Adw.AboutDialog.getReleaseNotesVersion()
/// Sets the version described by the application's release notes.
///
/// The release notes version is displayed on the What's New page, above the
/// release notes.
///
/// If not set, [property`AboutDialog`:version] will be used instead.
///
/// For example, an application with the current version 2.0.2 might want to
/// keep the release notes from 2.0.0, and set the release notes version
/// accordingly.
///
/// See [property`AboutDialog`:release-notes].
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func releaseNotesVersion(_ releaseNotesVersion: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, releaseNotesVersion, registry: ctx.registry, notifyDetail: "release-notes-version",
read: { [w] in w.getReleaseNotesVersion() },
write: { [w] v in w.setReleaseNotesVersion(version: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutDialog.setReleaseNotesVersion(version:)
/// Sets the version described by the application's release notes.
///
/// The release notes version is displayed on the What's New page, above the
/// release notes.
///
/// If not set, [property`AboutDialog`:version] will be used instead.
///
/// For example, an application with the current version 2.0.2 might want to
/// keep the release notes from 2.0.0, and set the release notes version
/// accordingly.
///
/// See [property`AboutDialog`:release-notes].
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutDialog.setReleaseNotesVersion(version:)`.
///
/// - Parameter releaseNotesVersion: The version described by the application's release notes.
/// - Returns: A copy of this view with the modifier applied.
public func releaseNotesVersion(_ releaseNotesVersion: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setReleaseNotesVersion(version: releaseNotesVersion()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutDialog.setReleaseNotesVersion(version:)
/// Sets the version described by the application's release notes.
///
/// The release notes version is displayed on the What's New page, above the
/// release notes.
///
/// If not set, [property`AboutDialog`:version] will be used instead.
///
/// For example, an application with the current version 2.0.2 might want to
/// keep the release notes from 2.0.0, and set the release notes version
/// accordingly.
///
/// See [property`AboutDialog`:release-notes].
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutDialog.setReleaseNotesVersion(version:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter releaseNotesVersion: The version described by the application's release notes.
/// - Returns: A copy of this view with the modifier applied.
public func releaseNotesVersion(_ releaseNotesVersion: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(releaseNotesVersion, registry: ctx.registry) { [w] v in w.setReleaseNotesVersion(version: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutDialog.setSupportUrl(supportUrl:)
/// Sets the URL of the support page for `self`.
///
/// The support page link is displayed on the main page.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter supportUrl: The URL of the application's support page.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func supportUrl<S: StringProtocol>(_ supportUrl: S) -> Self {
appending { w, _ in
w.setSupportUrl(supportUrl: String(supportUrl))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutDialog.setSupportUrl(supportUrl:), GObject.Object.connectNotify(detail:_:), Adw.AboutDialog.getSupportUrl()
/// Sets the URL of the support page for `self`.
///
/// The support page link is displayed on the main page.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func supportUrl(_ supportUrl: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, supportUrl, registry: ctx.registry, notifyDetail: "support-url",
read: { [w] in w.getSupportUrl() },
write: { [w] v in w.setSupportUrl(supportUrl: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutDialog.setSupportUrl(supportUrl:)
/// Sets the URL of the support page for `self`.
///
/// The support page link is displayed on the main page.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutDialog.setSupportUrl(supportUrl:)`.
///
/// - Parameter supportUrl: The URL of the application's support page.
/// - Returns: A copy of this view with the modifier applied.
public func supportUrl(_ supportUrl: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setSupportUrl(supportUrl: supportUrl()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutDialog.setSupportUrl(supportUrl:)
/// Sets the URL of the support page for `self`.
///
/// The support page link is displayed on the main page.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutDialog.setSupportUrl(supportUrl:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter supportUrl: The URL of the application's support page.
/// - Returns: A copy of this view with the modifier applied.
public func supportUrl(_ supportUrl: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(supportUrl, registry: ctx.registry) { [w] v in w.setSupportUrl(supportUrl: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutDialog.setTranslatorCredits(translatorCredits:)
/// Sets the translator credits string.
///
/// It will be displayed on the Credits page.
///
/// This string should be `"translator-credits"` or `"translator_credits"` and
/// should be marked as translatable.
///
/// The string may contain email addresses and URLs, see the introduction for
/// more details. When there is more than one translator, they must be
/// separated by a newline in the same string.
///
/// See also:
///
/// * [property`AboutDialog`:developers]
/// * [property`AboutDialog`:designers]
/// * [property`AboutDialog`:artists]
/// * [property`AboutDialog`:documenters]
/// * [method`AboutDialog`.add_credit_section]
/// * [method`AboutDialog`.add_acknowledgement_section]
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter translatorCredits: The translator credits string.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func translatorCredits<S: StringProtocol>(_ translatorCredits: S) -> Self {
appending { w, _ in
w.setTranslatorCredits(translatorCredits: String(translatorCredits))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutDialog.setTranslatorCredits(translatorCredits:), GObject.Object.connectNotify(detail:_:), Adw.AboutDialog.getTranslatorCredits()
/// Sets the translator credits string.
///
/// It will be displayed on the Credits page.
///
/// This string should be `"translator-credits"` or `"translator_credits"` and
/// should be marked as translatable.
///
/// The string may contain email addresses and URLs, see the introduction for
/// more details. When there is more than one translator, they must be
/// separated by a newline in the same string.
///
/// See also:
///
/// * [property`AboutDialog`:developers]
/// * [property`AboutDialog`:designers]
/// * [property`AboutDialog`:artists]
/// * [property`AboutDialog`:documenters]
/// * [method`AboutDialog`.add_credit_section]
/// * [method`AboutDialog`.add_acknowledgement_section]
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func translatorCredits(_ translatorCredits: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, translatorCredits, registry: ctx.registry, notifyDetail: "translator-credits",
read: { [w] in w.getTranslatorCredits() },
write: { [w] v in w.setTranslatorCredits(translatorCredits: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutDialog.setTranslatorCredits(translatorCredits:)
/// Sets the translator credits string.
///
/// It will be displayed on the Credits page.
///
/// This string should be `"translator-credits"` or `"translator_credits"` and
/// should be marked as translatable.
///
/// The string may contain email addresses and URLs, see the introduction for
/// more details. When there is more than one translator, they must be
/// separated by a newline in the same string.
///
/// See also:
///
/// * [property`AboutDialog`:developers]
/// * [property`AboutDialog`:designers]
/// * [property`AboutDialog`:artists]
/// * [property`AboutDialog`:documenters]
/// * [method`AboutDialog`.add_credit_section]
/// * [method`AboutDialog`.add_acknowledgement_section]
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutDialog.setTranslatorCredits(translatorCredits:)`.
///
/// - Parameter translatorCredits: The translator credits string.
/// - Returns: A copy of this view with the modifier applied.
public func translatorCredits(_ translatorCredits: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setTranslatorCredits(translatorCredits: translatorCredits()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutDialog.setTranslatorCredits(translatorCredits:)
/// Sets the translator credits string.
///
/// It will be displayed on the Credits page.
///
/// This string should be `"translator-credits"` or `"translator_credits"` and
/// should be marked as translatable.
///
/// The string may contain email addresses and URLs, see the introduction for
/// more details. When there is more than one translator, they must be
/// separated by a newline in the same string.
///
/// See also:
///
/// * [property`AboutDialog`:developers]
/// * [property`AboutDialog`:designers]
/// * [property`AboutDialog`:artists]
/// * [property`AboutDialog`:documenters]
/// * [method`AboutDialog`.add_credit_section]
/// * [method`AboutDialog`.add_acknowledgement_section]
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutDialog.setTranslatorCredits(translatorCredits:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter translatorCredits: The translator credits string.
/// - Returns: A copy of this view with the modifier applied.
public func translatorCredits(_ translatorCredits: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(translatorCredits, registry: ctx.registry) { [w] v in w.setTranslatorCredits(translatorCredits: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutDialog.setVersion(version:)
/// Sets the version for `self`.
///
/// The version is displayed on the main page.
///
/// If [property`AboutDialog`:release-notes-version] is not set, the version will
/// also be displayed above the release notes on the What's New page.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter version: The version of the application.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func version<S: StringProtocol>(_ version: S) -> Self {
appending { w, _ in
w.setVersion(version: String(version))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutDialog.setVersion(version:), GObject.Object.connectNotify(detail:_:), Adw.AboutDialog.getVersion()
/// Sets the version for `self`.
///
/// The version is displayed on the main page.
///
/// If [property`AboutDialog`:release-notes-version] is not set, the version will
/// also be displayed above the release notes on the What's New page.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func version(_ version: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, version, registry: ctx.registry, notifyDetail: "version",
read: { [w] in w.getVersion() },
write: { [w] v in w.setVersion(version: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutDialog.setVersion(version:)
/// Sets the version for `self`.
///
/// The version is displayed on the main page.
///
/// If [property`AboutDialog`:release-notes-version] is not set, the version will
/// also be displayed above the release notes on the What's New page.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutDialog.setVersion(version:)`.
///
/// - Parameter version: The version of the application.
/// - Returns: A copy of this view with the modifier applied.
public func version(_ version: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setVersion(version: version()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutDialog.setVersion(version:)
/// Sets the version for `self`.
///
/// The version is displayed on the main page.
///
/// If [property`AboutDialog`:release-notes-version] is not set, the version will
/// also be displayed above the release notes on the What's New page.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutDialog.setVersion(version:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter version: The version of the application.
/// - Returns: A copy of this view with the modifier applied.
public func version(_ version: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(version, registry: ctx.registry) { [w] v in w.setVersion(version: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutDialog.setWebsite(website:)
/// Sets the application website URL for `self`.
///
/// Website is displayed on the Details page, below comments, or on the main page
/// if the Details page doesn't have any other content.
///
/// Applications can add other links below, see [method`AboutDialog`.add_link].
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter website: The URL of the application's website.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func website<S: StringProtocol>(_ website: S) -> Self {
appending { w, _ in
w.setWebsite(website: String(website))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutDialog.setWebsite(website:), GObject.Object.connectNotify(detail:_:), Adw.AboutDialog.getWebsite()
/// Sets the application website URL for `self`.
///
/// Website is displayed on the Details page, below comments, or on the main page
/// if the Details page doesn't have any other content.
///
/// Applications can add other links below, see [method`AboutDialog`.add_link].
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func website(_ website: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, website, registry: ctx.registry, notifyDetail: "website",
read: { [w] in w.getWebsite() },
write: { [w] v in w.setWebsite(website: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutDialog.setWebsite(website:)
/// Sets the application website URL for `self`.
///
/// Website is displayed on the Details page, below comments, or on the main page
/// if the Details page doesn't have any other content.
///
/// Applications can add other links below, see [method`AboutDialog`.add_link].
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutDialog.setWebsite(website:)`.
///
/// - Parameter website: The URL of the application's website.
/// - Returns: A copy of this view with the modifier applied.
public func website(_ website: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setWebsite(website: website()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutDialog.setWebsite(website:)
/// Sets the application website URL for `self`.
///
/// Website is displayed on the Details page, below comments, or on the main page
/// if the Details page doesn't have any other content.
///
/// Applications can add other links below, see [method`AboutDialog`.add_link].
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutDialog.setWebsite(website:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter website: The URL of the application's website.
/// - Returns: A copy of this view with the modifier applied.
public func website(_ website: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(website, registry: ctx.registry) { [w] v in w.setWebsite(website: v) }
}
}
// PorticoGen: generateModifierExtension -> generateSignalModifier | source: Adw.AboutDialog.connectActivateLink(_:)
/// Emitted when a URL is activated.
///
/// Applications may connect to it to override the default behavior, which is
/// to call [func`Gtk`.show_uri].
///
/// - Parameter handler: Invoked when the widget emits the `activate-link` signal. The closure receives the signal's arguments in order. Its return value is forwarded to GTK as the signal's result.
/// - Returns: A copy of this view with the modifier applied.
public func onActivateLink(_ handler: @escaping (String) -> Bool) -> Self {
appending { w, ctx in
ctx.registry.add(w.connectActivateLink { _, a0 in handler(a0) })
}
}
}
// PorticoGen: generateModifierExtension | source: Gtk.AboutDialog
/// Modifiers for `Gtk.AboutDialog`, available on every Portico view whose
/// backing widget is `Gtk.AboutDialog` or one of its subclasses.
extension WidgetView where Target: Gtk.AboutDialog {
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Gtk.AboutDialog.setComments(comments:)
/// Sets the comments string to display in the about dialog.
///
/// This should be a short string of one or two lines.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter comments: Comments about the program.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func comments<S: StringProtocol>(_ comments: S?) -> Self {
appending { w, _ in
w.setComments(comments: comments.map { String($0) })
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Gtk.AboutDialog.setComments(comments:), GObject.Object.connectNotify(detail:_:), Gtk.AboutDialog.getComments()
/// Sets the comments string to display in the about dialog.
///
/// This should be a short string of one or two lines.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String?` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func comments(_ comments: Portico.Binding<String?>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, comments, registry: ctx.registry, notifyDetail: "comments",
read: { [w] in w.getComments() },
write: { [w] v in w.setComments(comments: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(lifted,twoWay) | source: Gtk.AboutDialog.setComments(comments:), GObject.Object.connectNotify(detail:_:), Gtk.AboutDialog.getComments()
/// Sets the comments string to display in the about dialog.
///
/// This should be a short string of one or two lines.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// `Binding` is invariant, so a `Binding<String>` is not accepted by the nullable overload; this one takes it and promotes each value. Pass a `Binding<String?>` to be able to clear the property.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
/// A `nil` widget value is never written back into the binding.
///
/// - Returns: A copy of this view with the modifier applied.
public func comments(_ comments: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, comments, registry: ctx.registry, notifyDetail: "comments",
read: { [w] in w.getComments() },
write: { [w] v in w.setComments(comments: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Gtk.AboutDialog.setComments(comments:)
/// Sets the comments string to display in the about dialog.
///
/// This should be a short string of one or two lines.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Gtk.AboutDialog.setComments(comments:)`.
///
/// - Parameter comments: Comments about the program.
/// - Returns: A copy of this view with the modifier applied.
public func comments(_ comments: @escaping () -> String?) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setComments(comments: comments()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Gtk.AboutDialog.setComments(comments:)
/// Sets the comments string to display in the about dialog.
///
/// This should be a short string of one or two lines.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Gtk.AboutDialog.setComments(comments:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter comments: Comments about the program.
/// - Returns: A copy of this view with the modifier applied.
public func comments(_ comments: Portico.InterpolatedText?) -> Self {
appending { w, ctx in
Portico.bindOptionalInterpolation(comments, registry: ctx.registry) { [w] v in w.setComments(comments: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Gtk.AboutDialog.setCopyright(copyright:)
/// Sets the copyright string to display in the about dialog.
///
/// This should be a short string of one or two lines.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter copyright: Copyright information for the program.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func copyright<S: StringProtocol>(_ copyright: S?) -> Self {
appending { w, _ in
w.setCopyright(copyright: copyright.map { String($0) })
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Gtk.AboutDialog.setCopyright(copyright:), GObject.Object.connectNotify(detail:_:), Gtk.AboutDialog.getCopyright()
/// Sets the copyright string to display in the about dialog.
///
/// This should be a short string of one or two lines.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String?` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func copyright(_ copyright: Portico.Binding<String?>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, copyright, registry: ctx.registry, notifyDetail: "copyright",
read: { [w] in w.getCopyright() },
write: { [w] v in w.setCopyright(copyright: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(lifted,twoWay) | source: Gtk.AboutDialog.setCopyright(copyright:), GObject.Object.connectNotify(detail:_:), Gtk.AboutDialog.getCopyright()
/// Sets the copyright string to display in the about dialog.
///
/// This should be a short string of one or two lines.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// `Binding` is invariant, so a `Binding<String>` is not accepted by the nullable overload; this one takes it and promotes each value. Pass a `Binding<String?>` to be able to clear the property.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
/// A `nil` widget value is never written back into the binding.
///
/// - Returns: A copy of this view with the modifier applied.
public func copyright(_ copyright: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, copyright, registry: ctx.registry, notifyDetail: "copyright",
read: { [w] in w.getCopyright() },
write: { [w] v in w.setCopyright(copyright: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Gtk.AboutDialog.setCopyright(copyright:)
/// Sets the copyright string to display in the about dialog.
///
/// This should be a short string of one or two lines.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Gtk.AboutDialog.setCopyright(copyright:)`.
///
/// - Parameter copyright: Copyright information for the program.
/// - Returns: A copy of this view with the modifier applied.
public func copyright(_ copyright: @escaping () -> String?) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setCopyright(copyright: copyright()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Gtk.AboutDialog.setCopyright(copyright:)
/// Sets the copyright string to display in the about dialog.
///
/// This should be a short string of one or two lines.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Gtk.AboutDialog.setCopyright(copyright:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter copyright: Copyright information for the program.
/// - Returns: A copy of this view with the modifier applied.
public func copyright(_ copyright: Portico.InterpolatedText?) -> Self {
appending { w, ctx in
Portico.bindOptionalInterpolation(copyright, registry: ctx.registry) { [w] v in w.setCopyright(copyright: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Gtk.AboutDialog.setLicense(license:)
/// Sets the license information to be displayed in the
/// about dialog.
///
/// If `license` is `NULL`, the license page is hidden.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter license: The license of the program, as free-form text.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func license<S: StringProtocol>(_ license: S?) -> Self {
appending { w, _ in
w.setLicense(license: license.map { String($0) })
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Gtk.AboutDialog.setLicense(license:), GObject.Object.connectNotify(detail:_:), Gtk.AboutDialog.getLicense()
/// Sets the license information to be displayed in the
/// about dialog.
///
/// If `license` is `NULL`, the license page is hidden.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String?` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func license(_ license: Portico.Binding<String?>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, license, registry: ctx.registry, notifyDetail: "license",
read: { [w] in w.getLicense() },
write: { [w] v in w.setLicense(license: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(lifted,twoWay) | source: Gtk.AboutDialog.setLicense(license:), GObject.Object.connectNotify(detail:_:), Gtk.AboutDialog.getLicense()
/// Sets the license information to be displayed in the
/// about dialog.
///
/// If `license` is `NULL`, the license page is hidden.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// `Binding` is invariant, so a `Binding<String>` is not accepted by the nullable overload; this one takes it and promotes each value. Pass a `Binding<String?>` to be able to clear the property.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
/// A `nil` widget value is never written back into the binding.
///
/// - Returns: A copy of this view with the modifier applied.
public func license(_ license: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, license, registry: ctx.registry, notifyDetail: "license",
read: { [w] in w.getLicense() },
write: { [w] v in w.setLicense(license: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Gtk.AboutDialog.setLicense(license:)
/// Sets the license information to be displayed in the
/// about dialog.
///
/// If `license` is `NULL`, the license page is hidden.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Gtk.AboutDialog.setLicense(license:)`.
///
/// - Parameter license: The license of the program, as free-form text.
/// - Returns: A copy of this view with the modifier applied.
public func license(_ license: @escaping () -> String?) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setLicense(license: license()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Gtk.AboutDialog.setLicense(license:)
/// Sets the license information to be displayed in the
/// about dialog.
///
/// If `license` is `NULL`, the license page is hidden.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Gtk.AboutDialog.setLicense(license:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter license: The license of the program, as free-form text.
/// - Returns: A copy of this view with the modifier applied.
public func license(_ license: Portico.InterpolatedText?) -> Self {
appending { w, ctx in
Portico.bindOptionalInterpolation(license, registry: ctx.registry) { [w] v in w.setLicense(license: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Gtk.AboutDialog.setLicenseType(licenseType:)
/// Sets the license of the application showing the about dialog
/// from a list of known licenses.
///
/// This function overrides the license set using
/// [method`Gtk`.AboutDialog.set_license].
///
/// Applied once at mount; use the `Binding` or closure overload for a value that changes.
///
/// - Parameter licenseType: The license of the program.
/// - Returns: A copy of this view with the modifier applied.
public func licenseType(_ licenseType: Gtk.License) -> Self {
appending { w, _ in
w.setLicenseType(licenseType: licenseType)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Gtk.AboutDialog.setLicenseType(licenseType:), GObject.Object.connectNotify(detail:_:), Gtk.AboutDialog.getLicenseType()
/// Sets the license of the application showing the about dialog
/// from a list of known licenses.
///
/// This function overrides the license set using
/// [method`Gtk`.AboutDialog.set_license].
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `Gtk.License` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func licenseType(_ licenseType: Portico.Binding<Gtk.License>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, licenseType, registry: ctx.registry, notifyDetail: "license-type",
read: { [w] in w.getLicenseType() },
write: { [w] v in w.setLicenseType(licenseType: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Gtk.AboutDialog.setLicenseType(licenseType:)
/// Sets the license of the application showing the about dialog
/// from a list of known licenses.
///
/// This function overrides the license set using
/// [method`Gtk`.AboutDialog.set_license].
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Gtk.AboutDialog.setLicenseType(licenseType:)`.
///
/// - Parameter licenseType: The license of the program.
/// - Returns: A copy of this view with the modifier applied.
public func licenseType(_ licenseType: @escaping () -> Gtk.License) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setLicenseType(licenseType: licenseType()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Gtk.AboutDialog.setLogo(logo:)
/// Sets the logo in the about dialog.
///
/// Applied once at mount; use the `Binding` or closure overload for a value that changes.
///
/// - Parameter logo: A logo for the about box.
/// - Returns: A copy of this view with the modifier applied.
public func logo(_ logo: Gtk.Paintable?) -> Self {
appending { w, _ in
w.setLogo(logo: logo)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Gtk.AboutDialog.setLogo(logo:), GObject.Object.connectNotify(detail:_:), Gtk.AboutDialog.getLogo()
/// Sets the logo in the about dialog.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `Gtk.Paintable?` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func logo(_ logo: Portico.Binding<Gtk.Paintable?>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, logo, registry: ctx.registry, notifyDetail: "logo",
read: { [w] in w.getLogo() },
write: { [w] v in w.setLogo(logo: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(lifted,twoWay) | source: Gtk.AboutDialog.setLogo(logo:), GObject.Object.connectNotify(detail:_:), Gtk.AboutDialog.getLogo()
/// Sets the logo in the about dialog.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// `Binding` is invariant, so a `Binding<Gtk.Paintable>` is not accepted by the nullable overload; this one takes it and promotes each value. Pass a `Binding<Gtk.Paintable?>` to be able to clear the property.
/// When `Gtk.Paintable` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
/// A `nil` widget value is never written back into the binding.
///
/// - Returns: A copy of this view with the modifier applied.
public func logo(_ logo: Portico.Binding<Gtk.Paintable>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, logo, registry: ctx.registry, notifyDetail: "logo",
read: { [w] in w.getLogo() },
write: { [w] v in w.setLogo(logo: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Gtk.AboutDialog.setLogo(logo:)
/// Sets the logo in the about dialog.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Gtk.AboutDialog.setLogo(logo:)`.
///
/// - Parameter logo: A logo for the about box.
/// - Returns: A copy of this view with the modifier applied.
public func logo(_ logo: @escaping () -> Gtk.Paintable?) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setLogo(logo: logo()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Gtk.AboutDialog.setLogoIconName(iconName:)
/// Sets the icon name to be displayed as logo in the about dialog.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter logoIconName: A named icon to use as the logo for the about box.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func logoIconName<S: StringProtocol>(_ logoIconName: S?) -> Self {
appending { w, _ in
w.setLogoIconName(iconName: logoIconName.map { String($0) })
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Gtk.AboutDialog.setLogoIconName(iconName:), GObject.Object.connectNotify(detail:_:), Gtk.AboutDialog.getLogoIconName()
/// Sets the icon name to be displayed as logo in the about dialog.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String?` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func logoIconName(_ logoIconName: Portico.Binding<String?>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, logoIconName, registry: ctx.registry, notifyDetail: "logo-icon-name",
read: { [w] in w.getLogoIconName() },
write: { [w] v in w.setLogoIconName(iconName: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(lifted,twoWay) | source: Gtk.AboutDialog.setLogoIconName(iconName:), GObject.Object.connectNotify(detail:_:), Gtk.AboutDialog.getLogoIconName()
/// Sets the icon name to be displayed as logo in the about dialog.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// `Binding` is invariant, so a `Binding<String>` is not accepted by the nullable overload; this one takes it and promotes each value. Pass a `Binding<String?>` to be able to clear the property.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
/// A `nil` widget value is never written back into the binding.
///
/// - Returns: A copy of this view with the modifier applied.
public func logoIconName(_ logoIconName: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, logoIconName, registry: ctx.registry, notifyDetail: "logo-icon-name",
read: { [w] in w.getLogoIconName() },
write: { [w] v in w.setLogoIconName(iconName: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Gtk.AboutDialog.setLogoIconName(iconName:)
/// Sets the icon name to be displayed as logo in the about dialog.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Gtk.AboutDialog.setLogoIconName(iconName:)`.
///
/// - Parameter logoIconName: A named icon to use as the logo for the about box.
/// - Returns: A copy of this view with the modifier applied.
public func logoIconName(_ logoIconName: @escaping () -> String?) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setLogoIconName(iconName: logoIconName()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Gtk.AboutDialog.setLogoIconName(iconName:)
/// Sets the icon name to be displayed as logo in the about dialog.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Gtk.AboutDialog.setLogoIconName(iconName:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter logoIconName: A named icon to use as the logo for the about box.
/// - Returns: A copy of this view with the modifier applied.
public func logoIconName(_ logoIconName: Portico.InterpolatedText?) -> Self {
appending { w, ctx in
Portico.bindOptionalInterpolation(logoIconName, registry: ctx.registry) { [w] v in w.setLogoIconName(iconName: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Gtk.AboutDialog.setProgramName(name:)
/// Sets the name to display in the about dialog.
///
/// If `name` is not set, the string returned
/// by `g_get_application_name()` is used.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter programName: The name of the program.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func programName<S: StringProtocol>(_ programName: S?) -> Self {
appending { w, _ in
w.setProgramName(name: programName.map { String($0) })
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Gtk.AboutDialog.setProgramName(name:), GObject.Object.connectNotify(detail:_:), Gtk.AboutDialog.getProgramName()
/// Sets the name to display in the about dialog.
///
/// If `name` is not set, the string returned
/// by `g_get_application_name()` is used.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String?` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func programName(_ programName: Portico.Binding<String?>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, programName, registry: ctx.registry, notifyDetail: "program-name",
read: { [w] in w.getProgramName() },
write: { [w] v in w.setProgramName(name: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(lifted,twoWay) | source: Gtk.AboutDialog.setProgramName(name:), GObject.Object.connectNotify(detail:_:), Gtk.AboutDialog.getProgramName()
/// Sets the name to display in the about dialog.
///
/// If `name` is not set, the string returned
/// by `g_get_application_name()` is used.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// `Binding` is invariant, so a `Binding<String>` is not accepted by the nullable overload; this one takes it and promotes each value. Pass a `Binding<String?>` to be able to clear the property.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
/// A `nil` widget value is never written back into the binding.
///
/// - Returns: A copy of this view with the modifier applied.
public func programName(_ programName: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, programName, registry: ctx.registry, notifyDetail: "program-name",
read: { [w] in w.getProgramName() },
write: { [w] v in w.setProgramName(name: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Gtk.AboutDialog.setProgramName(name:)
/// Sets the name to display in the about dialog.
///
/// If `name` is not set, the string returned
/// by `g_get_application_name()` is used.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Gtk.AboutDialog.setProgramName(name:)`.
///
/// - Parameter programName: The name of the program.
/// - Returns: A copy of this view with the modifier applied.
public func programName(_ programName: @escaping () -> String?) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setProgramName(name: programName()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Gtk.AboutDialog.setProgramName(name:)
/// Sets the name to display in the about dialog.
///
/// If `name` is not set, the string returned
/// by `g_get_application_name()` is used.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Gtk.AboutDialog.setProgramName(name:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter programName: The name of the program.
/// - Returns: A copy of this view with the modifier applied.
public func programName(_ programName: Portico.InterpolatedText?) -> Self {
appending { w, ctx in
Portico.bindOptionalInterpolation(programName, registry: ctx.registry) { [w] v in w.setProgramName(name: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Gtk.AboutDialog.setSystemInformation(systemInformation:)
/// Sets the system information to be displayed in the about
/// dialog.
///
/// If `system_information` is `NULL`, the system information
/// page is hidden.
///
/// See [property`Gtk`.AboutDialog:system-information].
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter systemInformation: Information about the system on which the program is running.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func systemInformation<S: StringProtocol>(_ systemInformation: S?) -> Self {
appending { w, _ in
w.setSystemInformation(systemInformation: systemInformation.map { String($0) })
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Gtk.AboutDialog.setSystemInformation(systemInformation:), GObject.Object.connectNotify(detail:_:), Gtk.AboutDialog.getSystemInformation()
/// Sets the system information to be displayed in the about
/// dialog.
///
/// If `system_information` is `NULL`, the system information
/// page is hidden.
///
/// See [property`Gtk`.AboutDialog:system-information].
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String?` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func systemInformation(_ systemInformation: Portico.Binding<String?>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, systemInformation, registry: ctx.registry, notifyDetail: "system-information",
read: { [w] in w.getSystemInformation() },
write: { [w] v in w.setSystemInformation(systemInformation: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(lifted,twoWay) | source: Gtk.AboutDialog.setSystemInformation(systemInformation:), GObject.Object.connectNotify(detail:_:), Gtk.AboutDialog.getSystemInformation()
/// Sets the system information to be displayed in the about
/// dialog.
///
/// If `system_information` is `NULL`, the system information
/// page is hidden.
///
/// See [property`Gtk`.AboutDialog:system-information].
///
/// Applied at mount and re-applied on every change the binding publishes.
/// `Binding` is invariant, so a `Binding<String>` is not accepted by the nullable overload; this one takes it and promotes each value. Pass a `Binding<String?>` to be able to clear the property.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
/// A `nil` widget value is never written back into the binding.
///
/// - Returns: A copy of this view with the modifier applied.
public func systemInformation(_ systemInformation: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, systemInformation, registry: ctx.registry, notifyDetail: "system-information",
read: { [w] in w.getSystemInformation() },
write: { [w] v in w.setSystemInformation(systemInformation: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Gtk.AboutDialog.setSystemInformation(systemInformation:)
/// Sets the system information to be displayed in the about
/// dialog.
///
/// If `system_information` is `NULL`, the system information
/// page is hidden.
///
/// See [property`Gtk`.AboutDialog:system-information].
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Gtk.AboutDialog.setSystemInformation(systemInformation:)`.
///
/// - Parameter systemInformation: Information about the system on which the program is running.
/// - Returns: A copy of this view with the modifier applied.
public func systemInformation(_ systemInformation: @escaping () -> String?) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setSystemInformation(systemInformation: systemInformation()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Gtk.AboutDialog.setSystemInformation(systemInformation:)
/// Sets the system information to be displayed in the about
/// dialog.
///
/// If `system_information` is `NULL`, the system information
/// page is hidden.
///
/// See [property`Gtk`.AboutDialog:system-information].
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Gtk.AboutDialog.setSystemInformation(systemInformation:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter systemInformation: Information about the system on which the program is running.
/// - Returns: A copy of this view with the modifier applied.
public func systemInformation(_ systemInformation: Portico.InterpolatedText?) -> Self {
appending { w, ctx in
Portico.bindOptionalInterpolation(systemInformation, registry: ctx.registry) { [w] v in w.setSystemInformation(systemInformation: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Gtk.AboutDialog.setTranslatorCredits(translatorCredits:)
/// Sets the translator credits string which is displayed in
/// the credits page.
///
/// The intended use for this string is to display the translator
/// of the language which is currently used in the user interface.
/// Using `gettext()`, a simple way to achieve that is to mark the
/// string for translation:
///
/// ```c
/// GtkWidget *about = gtk_about_dialog_new ();
/// gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (about),
/// _("translator-credits"));
/// ```
///
/// It is a good idea to use the customary `msgid` translator-credits
/// for this purpose, since translators will already know the purpose of
/// that `msgid`, and since `GtkAboutDialog` will detect if translator-credits
/// is untranslated and omit translator credits.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter translatorCredits: Credits to the translators.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func translatorCredits<S: StringProtocol>(_ translatorCredits: S?) -> Self {
appending { w, _ in
w.setTranslatorCredits(translatorCredits: translatorCredits.map { String($0) })
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Gtk.AboutDialog.setTranslatorCredits(translatorCredits:), GObject.Object.connectNotify(detail:_:), Gtk.AboutDialog.getTranslatorCredits()
/// Sets the translator credits string which is displayed in
/// the credits page.
///
/// The intended use for this string is to display the translator
/// of the language which is currently used in the user interface.
/// Using `gettext()`, a simple way to achieve that is to mark the
/// string for translation:
///
/// ```c
/// GtkWidget *about = gtk_about_dialog_new ();
/// gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (about),
/// _("translator-credits"));
/// ```
///
/// It is a good idea to use the customary `msgid` translator-credits
/// for this purpose, since translators will already know the purpose of
/// that `msgid`, and since `GtkAboutDialog` will detect if translator-credits
/// is untranslated and omit translator credits.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String?` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func translatorCredits(_ translatorCredits: Portico.Binding<String?>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, translatorCredits, registry: ctx.registry, notifyDetail: "translator-credits",
read: { [w] in w.getTranslatorCredits() },
write: { [w] v in w.setTranslatorCredits(translatorCredits: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(lifted,twoWay) | source: Gtk.AboutDialog.setTranslatorCredits(translatorCredits:), GObject.Object.connectNotify(detail:_:), Gtk.AboutDialog.getTranslatorCredits()
/// Sets the translator credits string which is displayed in
/// the credits page.
///
/// The intended use for this string is to display the translator
/// of the language which is currently used in the user interface.
/// Using `gettext()`, a simple way to achieve that is to mark the
/// string for translation:
///
/// ```c
/// GtkWidget *about = gtk_about_dialog_new ();
/// gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (about),
/// _("translator-credits"));
/// ```
///
/// It is a good idea to use the customary `msgid` translator-credits
/// for this purpose, since translators will already know the purpose of
/// that `msgid`, and since `GtkAboutDialog` will detect if translator-credits
/// is untranslated and omit translator credits.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// `Binding` is invariant, so a `Binding<String>` is not accepted by the nullable overload; this one takes it and promotes each value. Pass a `Binding<String?>` to be able to clear the property.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
/// A `nil` widget value is never written back into the binding.
///
/// - Returns: A copy of this view with the modifier applied.
public func translatorCredits(_ translatorCredits: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, translatorCredits, registry: ctx.registry, notifyDetail: "translator-credits",
read: { [w] in w.getTranslatorCredits() },
write: { [w] v in w.setTranslatorCredits(translatorCredits: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Gtk.AboutDialog.setTranslatorCredits(translatorCredits:)
/// Sets the translator credits string which is displayed in
/// the credits page.
///
/// The intended use for this string is to display the translator
/// of the language which is currently used in the user interface.
/// Using `gettext()`, a simple way to achieve that is to mark the
/// string for translation:
///
/// ```c
/// GtkWidget *about = gtk_about_dialog_new ();
/// gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (about),
/// _("translator-credits"));
/// ```
///
/// It is a good idea to use the customary `msgid` translator-credits
/// for this purpose, since translators will already know the purpose of
/// that `msgid`, and since `GtkAboutDialog` will detect if translator-credits
/// is untranslated and omit translator credits.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Gtk.AboutDialog.setTranslatorCredits(translatorCredits:)`.
///
/// - Parameter translatorCredits: Credits to the translators.
/// - Returns: A copy of this view with the modifier applied.
public func translatorCredits(_ translatorCredits: @escaping () -> String?) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setTranslatorCredits(translatorCredits: translatorCredits()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Gtk.AboutDialog.setTranslatorCredits(translatorCredits:)
/// Sets the translator credits string which is displayed in
/// the credits page.
///
/// The intended use for this string is to display the translator
/// of the language which is currently used in the user interface.
/// Using `gettext()`, a simple way to achieve that is to mark the
/// string for translation:
///
/// ```c
/// GtkWidget *about = gtk_about_dialog_new ();
/// gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (about),
/// _("translator-credits"));
/// ```
///
/// It is a good idea to use the customary `msgid` translator-credits
/// for this purpose, since translators will already know the purpose of
/// that `msgid`, and since `GtkAboutDialog` will detect if translator-credits
/// is untranslated and omit translator credits.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Gtk.AboutDialog.setTranslatorCredits(translatorCredits:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter translatorCredits: Credits to the translators.
/// - Returns: A copy of this view with the modifier applied.
public func translatorCredits(_ translatorCredits: Portico.InterpolatedText?) -> Self {
appending { w, ctx in
Portico.bindOptionalInterpolation(translatorCredits, registry: ctx.registry) { [w] v in w.setTranslatorCredits(translatorCredits: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Gtk.AboutDialog.setVersion(version:)
/// Sets the version string to display in the about dialog.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter version: The version of the program.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func version<S: StringProtocol>(_ version: S?) -> Self {
appending { w, _ in
w.setVersion(version: version.map { String($0) })
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Gtk.AboutDialog.setVersion(version:), GObject.Object.connectNotify(detail:_:), Gtk.AboutDialog.getVersion()
/// Sets the version string to display in the about dialog.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String?` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func version(_ version: Portico.Binding<String?>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, version, registry: ctx.registry, notifyDetail: "version",
read: { [w] in w.getVersion() },
write: { [w] v in w.setVersion(version: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(lifted,twoWay) | source: Gtk.AboutDialog.setVersion(version:), GObject.Object.connectNotify(detail:_:), Gtk.AboutDialog.getVersion()
/// Sets the version string to display in the about dialog.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// `Binding` is invariant, so a `Binding<String>` is not accepted by the nullable overload; this one takes it and promotes each value. Pass a `Binding<String?>` to be able to clear the property.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
/// A `nil` widget value is never written back into the binding.
///
/// - Returns: A copy of this view with the modifier applied.
public func version(_ version: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, version, registry: ctx.registry, notifyDetail: "version",
read: { [w] in w.getVersion() },
write: { [w] v in w.setVersion(version: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Gtk.AboutDialog.setVersion(version:)
/// Sets the version string to display in the about dialog.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Gtk.AboutDialog.setVersion(version:)`.
///
/// - Parameter version: The version of the program.
/// - Returns: A copy of this view with the modifier applied.
public func version(_ version: @escaping () -> String?) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setVersion(version: version()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Gtk.AboutDialog.setVersion(version:)
/// Sets the version string to display in the about dialog.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Gtk.AboutDialog.setVersion(version:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter version: The version of the program.
/// - Returns: A copy of this view with the modifier applied.
public func version(_ version: Portico.InterpolatedText?) -> Self {
appending { w, ctx in
Portico.bindOptionalInterpolation(version, registry: ctx.registry) { [w] v in w.setVersion(version: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Gtk.AboutDialog.setWebsite(website:)
/// Sets the URL to use for the website link.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter website: The URL for the link to the website of the program.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func website<S: StringProtocol>(_ website: S?) -> Self {
appending { w, _ in
w.setWebsite(website: website.map { String($0) })
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Gtk.AboutDialog.setWebsite(website:), GObject.Object.connectNotify(detail:_:), Gtk.AboutDialog.getWebsite()
/// Sets the URL to use for the website link.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String?` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func website(_ website: Portico.Binding<String?>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, website, registry: ctx.registry, notifyDetail: "website",
read: { [w] in w.getWebsite() },
write: { [w] v in w.setWebsite(website: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(lifted,twoWay) | source: Gtk.AboutDialog.setWebsite(website:), GObject.Object.connectNotify(detail:_:), Gtk.AboutDialog.getWebsite()
/// Sets the URL to use for the website link.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// `Binding` is invariant, so a `Binding<String>` is not accepted by the nullable overload; this one takes it and promotes each value. Pass a `Binding<String?>` to be able to clear the property.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
/// A `nil` widget value is never written back into the binding.
///
/// - Returns: A copy of this view with the modifier applied.
public func website(_ website: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, website, registry: ctx.registry, notifyDetail: "website",
read: { [w] in w.getWebsite() },
write: { [w] v in w.setWebsite(website: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Gtk.AboutDialog.setWebsite(website:)
/// Sets the URL to use for the website link.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Gtk.AboutDialog.setWebsite(website:)`.
///
/// - Parameter website: The URL for the link to the website of the program.
/// - Returns: A copy of this view with the modifier applied.
public func website(_ website: @escaping () -> String?) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setWebsite(website: website()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Gtk.AboutDialog.setWebsite(website:)
/// Sets the URL to use for the website link.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Gtk.AboutDialog.setWebsite(website:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter website: The URL for the link to the website of the program.
/// - Returns: A copy of this view with the modifier applied.
public func website(_ website: Portico.InterpolatedText?) -> Self {
appending { w, ctx in
Portico.bindOptionalInterpolation(website, registry: ctx.registry) { [w] v in w.setWebsite(website: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Gtk.AboutDialog.setWebsiteLabel(websiteLabel:)
/// Sets the label to be used for the website link.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter websiteLabel: The label for the link to the website of the program.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func websiteLabel<S: StringProtocol>(_ websiteLabel: S) -> Self {
appending { w, _ in
w.setWebsiteLabel(websiteLabel: String(websiteLabel))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Gtk.AboutDialog.setWebsiteLabel(websiteLabel:), GObject.Object.connectNotify(detail:_:), Gtk.AboutDialog.getWebsiteLabel()
/// Sets the label to be used for the website link.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func websiteLabel(_ websiteLabel: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, websiteLabel, registry: ctx.registry, notifyDetail: "website-label",
read: { [w] in w.getWebsiteLabel() },
write: { [w] v in w.setWebsiteLabel(websiteLabel: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Gtk.AboutDialog.setWebsiteLabel(websiteLabel:)
/// Sets the label to be used for the website link.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Gtk.AboutDialog.setWebsiteLabel(websiteLabel:)`.
///
/// - Parameter websiteLabel: The label for the link to the website of the program.
/// - Returns: A copy of this view with the modifier applied.
public func websiteLabel(_ websiteLabel: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setWebsiteLabel(websiteLabel: websiteLabel()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Gtk.AboutDialog.setWebsiteLabel(websiteLabel:)
/// Sets the label to be used for the website link.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Gtk.AboutDialog.setWebsiteLabel(websiteLabel:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter websiteLabel: The label for the link to the website of the program.
/// - Returns: A copy of this view with the modifier applied.
public func websiteLabel(_ websiteLabel: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(websiteLabel, registry: ctx.registry) { [w] v in w.setWebsiteLabel(websiteLabel: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Gtk.AboutDialog.setWrapLicense(wrapLicense:)
/// Sets whether the license text in the about dialog should be
/// automatically wrapped.
///
/// Applied once at mount; use the `Binding` or closure overload for a value that changes.
///
/// - Parameter wrapLicense: Whether to wrap the text in the license dialog.
/// - Returns: A copy of this view with the modifier applied.
public func wrapLicense(_ wrapLicense: Bool) -> Self {
appending { w, _ in
w.setWrapLicense(wrapLicense: wrapLicense)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Gtk.AboutDialog.setWrapLicense(wrapLicense:), GObject.Object.connectNotify(detail:_:), Gtk.AboutDialog.getWrapLicense()
/// Sets whether the license text in the about dialog should be
/// automatically wrapped.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `Bool` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func wrapLicense(_ wrapLicense: Portico.Binding<Bool>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, wrapLicense, registry: ctx.registry, notifyDetail: "wrap-license",
read: { [w] in w.getWrapLicense() },
write: { [w] v in w.setWrapLicense(wrapLicense: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Gtk.AboutDialog.setWrapLicense(wrapLicense:)
/// Sets whether the license text in the about dialog should be
/// automatically wrapped.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Gtk.AboutDialog.setWrapLicense(wrapLicense:)`.
///
/// - Parameter wrapLicense: Whether to wrap the text in the license dialog.
/// - Returns: A copy of this view with the modifier applied.
public func wrapLicense(_ wrapLicense: @escaping () -> Bool) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setWrapLicense(wrapLicense: wrapLicense()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generateSignalModifier | source: Gtk.AboutDialog.connectActivateLink(_:)
/// Emitted every time a URL is activated.
///
/// Applications may connect to it to override the default behaviour,
/// which is to call [method`Gtk`.FileLauncher.launch].
///
/// - Parameter handler: Invoked when the widget emits the `activate-link` signal. The closure receives the signal's arguments in order. Its return value is forwarded to GTK as the signal's result.
/// - Returns: A copy of this view with the modifier applied.
public func onActivateLink(_ handler: @escaping (String) -> Bool) -> Self {
appending { w, ctx in
ctx.registry.add(w.connectActivateLink { _, a0 in handler(a0) })
}
}
}