Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

Desk Phone API features described in this section are deprecated and supported only on the following models: D40, d45, d50, d60, d62, d65, d70

These object constructors are available to all apps without requiring any libraries. They create the individual elements that can be displayed on the screen. All of the UI constructors inherit from the Widget base class; it is not possible to construct a Widget object directly.

Name 

Description 

Widget (Base Class)

Methods and properties of the Widget object are used to control basic properties for any UI items. It is not possible to construct a Widget object directly, but all UI classes and onscreen items inherit their basic functionality from this Widget base class. 

Text

Widget used for drawing text on the screen.

Group

Widget that contains other widgets and acts as a container. For example, this widget is useful for showing and hiding many widgets at one time. Groups can have any number of widgets attached to them; e.g., Group widgets, Text widgets, and Input widgets.

There are certain Group widgets that are automatically instantiated for an app and must be used for displaying anything. The  window  property is always accessible to an app and is shown when the app is foregrounded. The property  digium.app.idleWindow  is instantiated based on the app's app.json manifest. 

Scroll

Derived from a group widget. Automatically adds a scrollbar when its widgets overflow the box.

Input

Creates a text entry widget that can be used to receive input via the phone's number pad. This widget manages the softkeys themselves; therefore, you are advised not to change them programmatically.

List

Scrolling table with row-wise navigation capabilities. Useful for menus, lists of calls, etc. The user can scroll through a list with the up and down direction keys after it is given focus. 

List text is black on white background, and the selected/highlighted item is inverted. The width of the selected item highlight is that of the List Object itself and not of the summation of column widths.

When referring to columns and rows, indexes always begin at 0.

Image

Widget that displays an image file on the screen using a location and filename.

...