Skip to main content

Crate nifty_macos

Crate nifty_macos 

Source
Expand description

AppKit backend: every Nifty widget is a real NSView subclass from the system.

Modules§

areas 🔒
Areas that cover a stack without drawing anything, such as a context menu’s or a drop target’s: hidden views among a host’s subviews, found by where they are.
classes 🔒
Objective-C classes Nifty registers to receive AppKit callbacks.
context_menu 🔒
Context menus: a hidden view that marks the area a stack’s menu covers, and the lookup the views widgets sit in use to find the menu under a right-click. A right-click that no control takes passes up the responder chain to those views.
convert 🔒
dialog 🔒
File dialogs: NSOpenPanel and NSSavePanel, as a sheet on the key window, or a window of their own when none of the app’s windows is key.
drop 🔒
Drop targets: a hidden view that marks the area a stack’s drop target covers, and the dragging-destination work of the views widgets sit in, which take files and links once one of their stacks has a drop target.
icons 🔒
Nifty’s icons as SF Symbols, which come with macOS, so apps bundle no images.
menus 🔒
The app’s menu bar: the app menu and the Edit menu AppKit apps have, and the app’s own menus, the first before Edit and the rest after it, as File comes before Edit.
nav_item 🔒
A sidebar row the way Finder draws one: an accent-colored symbol and a title, with a quieter badge such as a count at the end, on a rounded highlight that shows the row is selected, pressed or under the pointer.
switch 🔒
A switch with its title, laid out as System Settings does: the title at the start of the row, and the switch at its end.
waker 🔒
Waking the main thread from others, through the main dispatch queue the run loop drains.
widgets 🔒
The native control behind each Nifty widget, and the objects that report its events.

Structs§

MacBackend
MacWaker
MacWidget
MacWindow

Functions§

add_to 🔒
host_view 🔒
The view widgets created in parent sit in.
inset_under_title_bar 🔒
How much of content the title bar covers: the part outside the window’s layout rect.