egui_elements/components/mod.rs
1//! Higher-level composites built on the themed widgets.
2//!
3//! Every item here is feature-gated:
4//!
5//! | Type | Feature | Notes |
6//! |------|---------|-------|
7//! | [`SecureInputField`] | `secure-types` | Masked field with Lucide show/hide; optional QR fill on Linux/Windows |
8//! | [`InputField`] | `secure-types` | Non-secret sibling; owns a `String` buffer, QR button (no masking) |
9//! | [`CredentialsForm`] | `secure-types` | Username / password / confirm + optional virtual keyboard |
10//! | [`VirtualKeyboard`] | `secure-types` | On-screen keyboard writing into a `SecureString` |
11//! | [`QrImage`] | `qr-image` | Encode text as a PNG QR `egui::Image` |
12//! | [`QRScanner`] | `qr-scanner` | Overlay that captures the monitor and decodes a QR (Linux and Windows) |
13//!
14//! `secure-types` and `qr-scanner` also enable `lucide`. `qr-scanner` also
15//! pulls in `secure-types` (decoded payload is a `SecureString`). Enabling
16//! `qr-scanner` on an unsupported target compiles the crate but does not
17//! export [`QRScanner`].
18
19#[cfg(feature = "secure-types")]
20mod input_field;
21
22#[cfg(all(
23 feature = "qr-scanner",
24 any(target_os = "linux", target_os = "windows")
25))]
26mod qr_scanner;
27
28#[cfg(feature = "secure-types")]
29mod virtual_keyboard;
30
31#[cfg(feature = "qr-image")]
32mod qr_image;
33
34#[cfg(feature = "secure-types")]
35mod credentials_form;
36
37#[cfg(feature = "secure-types")]
38pub use secure_types;
39
40#[cfg(feature = "secure-types")]
41pub use input_field::{InputField, SecureInputField};
42
43#[cfg(all(
44 feature = "qr-scanner",
45 any(target_os = "linux", target_os = "windows")
46))]
47pub use qr_scanner::QRScanner;
48
49#[cfg(feature = "secure-types")]
50pub use virtual_keyboard::VirtualKeyboard;
51
52#[cfg(feature = "qr-image")]
53pub use qr_image::{QrEcc, QrEncoding, QrImage};
54
55#[cfg(feature = "secure-types")]
56pub use credentials_form::CredentialsForm;