Expand description
About the application, as a plugin (AboutPlugin): Help > About
application opens a dialog with the application’s name, icon,
version, one-line description, licences, authors and links, and a
“Copy version info” button for bug reports. The host describes the
application with an AppInfo.
Links open through egui’s Context::open_url (a new tab on the web,
the system’s browser on the desktop).
“Copy version info” copies plain text (AppInfo::version_info:
the application’s version, egui-pop’s and egui’s, the platform and
the renderer when the host gave it) through the clipboard.copy
step when crate::clipboard::ClipboardPlugin is connected (the
about.version endpoint), else straight to the system clipboard.
Commands: about (Help > About application; its title says
{ $application }), for agents about.read (the same as JSON, kept
out of the palette), and help.report (Help > Report a problem, the
palette, the inspect dialog’s Report button, the About dialog’s link):
a new issue opened in the browser, prefilled with the version info,
the platform, the page shown and the last inspect pick (report);
and help.suggest (Help > Suggest an idea, the palette): a new issue
for an idea, prefilled with the page shown, in the repository’s idea
form when the plugin names one (AboutPlugin::idea_form). Both are
declared only when the AppInfo says where issues
go (AppInfo::issues): a library cannot know where an
application’s bugs belong, and a command leading nowhere is noise.
With a journal recorder (AboutPlugin::journal, journal),
help.report first shows what the report attaches, in a dialog: the
last minutes of the journal, redacted, the versions, the bus’s points
and the application’s own context (AboutPlugin::context). Nothing
leaves the machine on its own: its button copies the text and opens
the issue, where the user pastes it (help.report.send). Agents read
the same with help.report.bundle.
use egui_pop_api::about::{ABOUT, AboutPlugin, AppInfo};
use egui_pop_api::App;
let info = AppInfo::new("Darkroom", "1.2.0")
.description("A photo editor.")
.licence("GPL-3.0-or-later")
.author("The Darkroom contributors")
.repository("https://example.org/darkroom");
let app = App::builder()
.plugin(AboutPlugin::new(info))
.build(&egui::Context::default())
.unwrap();
let about = app.handle().service(&ABOUT).unwrap();
assert_eq!(about.info().name, "Darkroom");
assert!(about.info().version_info().starts_with("Darkroom 1.2.0\n"));Modules§
- journal
- The journal a problem report attaches: a time window of what the
application did, redacted, and the bundle
help.reportshows before anything leaves the machine. - report
- Report a problem: the new-issue URL
help.reportopens, prefilled with what a maintainer asks first (the version info, the platform, the page shown, the last inspect pick). An idea (help.suggest,Report::idea_url) carries its title and the page alone.
Structs§
- About
- What the application says about itself.
- About
Plugin - Help > About application,
about.readfor agents, andhelp.reportandhelp.suggestwhen the info says where issues go. - AppInfo
- What the application says about itself: the host fills it.
Constants§
- ABOUT
- What the application says about itself, as a service.
- ABOUT_
PLUGIN - The plugin’s id.
- CMD_
ABOUT - Help > About application.
- CMD_
ABOUT_ READ - The same, as JSON, for agents.
- CMD_
REPORT - Help > Report a problem: a prefilled new issue, in the browser.
- CMD_
REPORT_ BUNDLE - The report’s attachment as JSON (the journal window, redacted), for agents.
- CMD_
REPORT_ SEND - The report dialog’s button: copies the report and opens the issue.
- CMD_
SUGGEST - Help > Suggest an idea: a new issue for an idea, in the browser.
- EGUI_
POP_ VERSION - egui-pop’s version: its application API’s.
- EGUI_
VERSION - The egui series egui-pop is built against (one egui-pop minor per egui minor); a test keeps it in step with the workspace.
- VERSION_
ENDPOINT - The clipboard endpoint “Copy version info” copies from.
Functions§
- changed_
settings - The settings that differ from their defaults, by id, for a report’s
context (
AboutPlugin::context): numbers, switches and choices as they are; a free text only as"<text>", since it may name a person, a place or a path. - copy_
version_ info - Copies the version info: through the clipboard’s
clipboard.copystep when its plugin is connected, else to the system clipboard. - idea_
url - The new-issue URL
help.suggestopens: the idea form, prefilled with the page shown (it needsAboutPluginwithAppInfo::issues). - open
- Opens the About dialog (it needs
AboutPluginand the dialogs plugin); returns the dialog’s id. - recording
- Whether the journal is recorded for reports.
- report_
bundle - What a report attaches (it needs
AboutPlugin::journal): the journal’s window, redacted, the versions, the page shown, the bus’s points and the application’s context. - report_
of - What a report says: the version info, the platform, the page shown (when the application says it), the last inspect pick.
- report_
url - The new-issue URL
help.reportopens (it needsAboutPluginwithAppInfo::issues). - show
- Draws what the application says about itself (it needs
AboutPlugin): the About dialog’s body, also usable in a page.copied: the version info was copied (the button says so). Returns whether the version info was copied this pass. - title
- The dialog’s title, in the interface’s language.
Type Aliases§
- Context
Fn - A part of the application’s context a report attaches (the shape of its library, its layout, its settings that differ from the defaults), as JSON; redacted like the journal.
- IconFn
- Draws the application’s icon in a square of the given side.
- PageFn
- Says which page or view is shown, for a report (
None: it cannot).