Nano Views

Nano provides a C++ wrapper around every standard HIToolbox view, as well as a set of custom views that can provide a richer user experience.

All of Nano's custom views are rendered with CoreGraphics, giving them automatic support for resolution independence.

NOpenGLView

NOpenGLView

NOpenGLView allows OpenGL content to be embedded within a window.

The OpenGL context will be adjusted to match the bounds of the HIView, automatically tracking changes to the HIView frame.

NOpenGLView views can be rendered on demand, or will render themselves automatically at a specified frame rate.

 

NPDFView

NPDFView

NPDFView allows PDF content to be embedded within a window.

Content can be loaded from a file or assigned directly, and can be paged through.

Since NPDFView inherits from NScrollableView, it can also be placed in an NHIScrollView allowing the content to be scrolled or zoomed.

 

NShadingView and NReflectionView

NShadingView

An NShadingView renders an NCGShading object into an HIView, automatically tracking changes to the HIView frame.

An NReflectionView renders a target view into itself, flipping and masking the target to obtain a smoothly-faded reflection.

A reflection effect can be achieved by overlapping these two views, allowing an arbitrary view (such as this NIconView) to float over a reflective surface.

 

NBezelView

NBezelView

An NBezelView provides a translucent "round rectangle" appearance.

This view would typically be placed within a window with a transparent content area, providing a backdrop to other views within the window.

NHIWindow::SetContentTransparent can be used to make the content area of an arbitrary window transparent.

 

NLevelIndicator

NLevelIndicator

An NLevelIndicator corresponds to Cocoa's NSLevelIndicator control, and provides both discrete and continuous appearances.

Since this view is typically used to display state, rather than obtain input, it ignores mouse events by default.

After clearing the kHIViewFeatureIgnoresClicks bit, the user can scrub the view with the mouse and change the value.

 

NRatingBar

NRatingBar

An NRatingBar corresponds to Cocoa's NSLevelIndicator control, and is also present in iTunes.

Since this view is typically used to obtain input, as well as display state, it tracks the mouse by default.

When scrubbed with the mouse, an NRatingBar will display a series of dots in the empty portion of the view so that the user can see the available range.

 

NStatusBar

NStatusBar

An NStatusBar provides a one-line status bar, which can be placed in the bottom of a window to communicate status or progress to the user.

NDialView

NDialView

An NDialView corresponds to Cocoa's round slider control.

Unlike the Cocoa view, NDialView can also track the thumb distance as well as the angle - allowing the manipulation of two-dimension properties such as a light vector.

NProgressPie

NProgressPie

An NProgressPie provides a compact progress indicator, currently used by Xcode when building.

This view can provide a space-efficient alternative to a progress bar control, displaying an obvious progress metric in a small area.

NBadgeView

NBadgeView

An NBadgeView provides a starburst indicator, currently used by Mail to indicate new messages.

This view can be inserted into an NDockTile, to provide a "badge" indicator in the Dock.

Buttons

Buttons

In addition to the standard button controls, Nano provides an additional set of buttons that implement Apple-internal or Cocoa-specific button types.

NMembraneButton is used in the Finder's Find window, or in the info panel in column view.

NFlatButton and NGlassButton correspond to Cocoa's "small square button" and "round textured button" respectively.

NImageButton uses an arbitrary set of images to define the button content, allowing a "skinnable" button to be created to match an existing theme.