ExitToShell()
Products
 
Sample Flat Button window
Library

Dial Control

Custom dial controls for Mac OS X software

Dial Control is a Carbon implentation of circular dial or slider controls found only in Mac OS X 10.3 and then only in Cocoa apps. Dial Control is an HIView-based control and is thus compatible with all Mach-O Carbon apps on Mac OS X 10.2 and newer.

Download Now Download | Discussion Forum Forums | Buy Now Shopping Cart

Dial Control

Dial Control is a dial-type Carbon HIView-based control to manipulate angular measurements. Similar controls are found in Mac OS X 10.3's new Font panel, which is Cocoa-based. The advantages of Dial Controls is that they are usable in Mach-O Carbon apps and that they work in Mac OS X 10.2 and newer while appearing similar to the Cocoa round slider.

Dial Control can use radians or degrees to set the position of the dial indicator with floating-point precision. Plus you can attach a Carbon Event handler to a Dial Control and receive "live" feedback as the control is manipulated (sample code included).

Advantages to using Dial Controls:

  • Dial Control is drawn entirely using Core Graphics thus it cleanly scales to fit its bounding rectangle
  • Dial Control supports floating-point radians and degrees-based measurements for superior precision
  • Dial Control can emulate jog wheel functionality with "live" feedback using Carbon Events
  • Dial Control is available to all Carbon apps on Mac OS X 10.2+ and is not for Cocoa developers only

Dial Control Sample window

Dial Controls can be any size with a minimum size of 18px recommended. For drawing the border the Dial Control requires an extra 2px padding per side. For example an 18px Dial Control should have a bounding rectangle that is 22px wide/tall. A 20px Dial Control should have a bounding rectangle that is 24px wide/tall.

Possible Uses for Dial Control

Dial Control can augment any Carbon app that accepts angular measurements for rotating or skewing graphics or text. Instead of presenting a text box that a user must enter numeric values into, you can provide a Dial Control and let the user specify a measurement with floating-point precision.

Example:

ColorDeveloper Application

You can also use the "live" feedback features, based on standard Carbon Events, of Dial Control to update previews and the text field interactively. Sample code is available below demonstrating possible uses of Dial Controls in a Carbon app.

Example:

Dial Control Example Application

Note: Because this control uses a floating-point value to indicate positioning the use of Get/SetControl32BitValue() is not supported. Instead two API functions are provided that not only allow you to get/set a floating-point value for the control, but also to specify the format of the number as radians or degrees.

The custom Get/Set value APIs are contained within the library file and are defined in the Dial Control header file.

Accessibility Options

Dial Control is compatible with basic User Interface scripting and Universal Access technologies in Mac OS X 10.3 and newer. Using Dial Control in your software will allow you to achieve or retain Section 508 compliance. Dial Control is classified as a slider control for UI scripting and supports incremental and explicit value changes.

Also as Dial Control is based on Core Graphics, and not pre-made images, the controls can be scaled to a wide range of sizes to provide a larger interface for hard of sight or mobility-impaired users.

Section 508, which is an amendment to the U.S. Rehabilitation Act of 1973, requires that information-based products and services must be accessible to people with disabilities.

 

Dial Control Download

Purchase InfoShop
License: ShareWare
Single User: $5

Dial Control Carbon - Most Current Version: 1.3.6 - 2004-09-03

  • Dial Controls now increment/decrement by one degree when changed via Universal Access/User Interface Scripting
  • The values reported from UI Scripting was fixed to always return a proper value in degrees and not a negative inaccurate value

Previously:

  • Controls now better support User Interface scripting and Universal Access features of Mac OS X 10.3 and newer
  • Added a parameter to the kEventControlDialValueFieldChanged Carbon Event indicating how the control was modified (increase or decrease value)
  • Controls are now compatible with User Interface scripting and Universal Access features of Mac OS X 10.3 and newer
  • Controls now behave as expected when explicitly disabled

Dial Control Example Application - Most Current Version: 1.0 - Unknown

None.

Previously:

None.

System Requirements:

  • Mac OS X 10.2 or newer - Compatible with Mac OS X 10.3 "Panther"
  • Metal-style windows or any window with the compositing flag set (regular Aqua looks best)
  • Mach-O native executable (not compatible with PEF)

Download Options:

Lang Version Product Description Size
US 1.3.6 Dial Control Carbon 227k
US 1.0 Dial Control Example Application 27k

ExitToShell.com and its contents are copyright © 2002-2005 by ExitToShell() Collective