Skip to main content

egui_macview/
lib.rs

1//! # `egui-macview`
2//!
3//! Native-style macOS AppKit controls, layouts, and smooth spring animations for [`egui`].
4#![doc = include_str!("../README.md")]
5#![deny(missing_docs)]
6
7/// Crate release version string extracted from `Cargo.toml`.
8pub const VERSION: &str = env!("CARGO_PKG_VERSION");
9
10pub mod controls;
11pub mod feedback;
12pub mod layout;
13pub mod motion;
14pub mod navigation;
15pub mod state;
16pub mod surfaces;
17pub mod symbols;
18pub mod theme;
19pub mod tokens;
20
21pub use symbols::{
22    setup_macview_fonts, setup_symbols_font, MacSymbol, CUPERTINO_ICONS_FONT_BYTES,
23    CUPERTINO_ICONS_FONT_NAME, INTER_REGULAR_FONT_BYTES, INTER_REGULAR_FONT_NAME,
24    INTER_SEMIBOLD_FONT_BYTES, INTER_SEMIBOLD_FONT_NAME,
25};
26
27pub use theme::{
28    alpha_composite, contrast_ratio, ensure_wcag_contrast, plus_darker, plus_lighter,
29    relative_luminance, MacAppearance, MacBackgroundStyle, MacTheme, WindowControlsStyle,
30};
31
32pub use controls::{
33    calculate_pan_weights, format_remaining_timecode, format_timecode, MacBox, MacButton,
34    MacButtonCell, MacCheckbox, MacCircularSlider, MacCollectionView, MacCollectionViewFlowLayout,
35    MacColorWell, MacComboBox, MacControlSize, MacDate, MacDatePicker, MacDatePickerElementFlags,
36    MacDatePickerStyle, MacDisclosureButton, MacDisclosureGroup, MacDisclosureResponse,
37    MacFontWeight, MacHelpButton, MacInlineActionButton, MacInputCell, MacInsets, MacLabel,
38    MacLabelColor, MacLevelIndicator, MacLevelIndicatorStyle, MacLevelOrientation, MacOriginAnchor,
39    MacOriginMatrix, MacOutlineRow, MacOutlineRowResponse, MacOutlineTree, MacOutlineView,
40    MacPathComponent, MacPathControl, MacPathControlResponse, MacPlayerControlsStyle,
41    MacPlayerView, MacPopUpButton, MacProgressControlSize, MacProgressIndicator, MacProgressStyle,
42    MacRadioButton, MacRatingIndicator, MacRuleEditor, MacRuleRow, MacSearchField,
43    MacSegmentedControl, MacSlider, MacSortDirection, MacStepper, MacTabItem, MacTabStyle,
44    MacTabView, MacTableActionBar, MacTableActionResponse, MacTableColumn, MacTableView,
45    MacTableViewOutput, MacTableViewResponse, MacTagColorPicker, MacThumbnailCell, MacTimelineZone,
46    MacToggle, MacTokenField, MacTrimScrubber, MacTrimScrubberResponse, UNIT_STAR,
47};
48pub use feedback::{clamp_menu_rect, MacContextMenu, MacToast, MacToastManager, ToastLevel};
49pub use layout::{
50    is_window_active, subpixel_snap, subpixel_snap_pos, subpixel_snap_rect, MacFixedView, MacForm,
51    MacFormUi, MacFrame, MacRow, MacScrollView, MacScrollViewOutput, MacSplitOrientation,
52    MacSplitView, MacStackAlignment, MacStackOrientation, MacStackUi, MacStackView,
53    MacStackViewOutput,
54};
55pub use motion::CASpring;
56pub use navigation::{
57    CommandPaletteItem, MacCanvasFooter, MacCanvasFooterAction, MacCommandPalette,
58    MacKeyboardShortcut, MacMenuBar, MacMenuItemKind, MacToolbar, MacToolbarResponse, NSMenu,
59    NSMenuItem, CANVAS_FOOTER_HEIGHT, COMMAND_PALETTE_HEIGHT, COMMAND_PALETTE_WIDTH,
60};
61pub use state::{NSUndoManager, DEFAULT_UNDO_CAPACITY};
62pub use surfaces::{
63    MacCard, MacFloatingInfoBox, MacPanel, MacPopover, MacPopoverArrowEdge, MacPopoverSurface,
64};
65pub use tokens::{
66    sf_pro_tracking, CheckboxMetrics, CheckboxSizeMetrics, ColorWellMetrics, HelpButtonMetrics,
67    InlineActionButtonMetrics, LabelMetrics, LayoutMetrics, LevelIndicatorMetrics, MacColorTokens,
68    MacControlMetrics, MacDesignTokens, MacMotionTokens, MacTagLabelColors, MacTypographyTokens,
69    OriginMatrixMetrics, OutlineViewMetrics, PathControlMetrics, PopUpButtonMetrics,
70    ProgressIndicatorMetrics, ProgressSizeMetrics, ScrollViewMetrics, SearchFieldMetrics,
71    SliderMetrics, SplitViewMetrics, StackViewMetrics, StepperMetrics, TableActionBarMetrics,
72    TableViewMetrics, TagColorPickerMetrics, ThumbnailCellMetrics, ToggleMetrics, TokenFieldMetrics,
73    TrimScrubberMetrics,
74};