Constants

This page contains a list of constants used by the widgets API.

This page contains a list of constants used by the widgets API.

UI Elements Colors

widgets.COLOR_LABEL

The color for text labels containing primary content.

widgets.COLOR_SECONDARY_LABEL

The color for text labels containing secondary content.

widgets.COLOR_TERTIARY_LABEL

The color for text labels containing tertiary content.

widgets.COLOR_QUATERNARY_LABEL

The color for text labels containing quaternary content.

widgets.COLOR_SYSTEM_FILL

An overlay fill color for thin and small shapes.

widgets.COLOR_SECONDARY_SYSTEM_FILL

An overlay fill color for medium-size shapes.

widgets.COLOR_TERTIARY_SYSTEM_FILL

An overlay fill color for large shapes.

widgets.COLOR_QUATERNARY_SYSTEM_FILL

An overlay fill color for large areas containing complex content.

widgets.COLOR_PLACEHOLDER_TEXT

The color for placeholder text in controls or text views.

widgets.COLOR_SYSTEM_BACKGROUND

The color for the main background of your interface.

widgets.COLOR_SECONDARY_SYSTEM_BACKGROUND

The color for content layered on top of the main background.

widgets.COLOR_TERTIARY_SYSTEM_BACKGROUND

The color for content layered on top of secondary backgrounds.

widgets.COLOR_SYSTEM_GROUPED_BACKGROUND

The color for the main background of your grouped interface.

widgets.COLOR_SECONDARY_GROUPED_BACKGROUND

The color for content layered on top of the main background of your grouped interface.

widgets.COLOR_TERTIARY_GROUPED_BACKGROUND

The color for content layered on top of secondary backgrounds of your grouped interface.

widgets.COLOR_SEPARATOR

The color for thin borders or divider lines that allows some underlying content to be visible.

widgets.COLOR_OPAQUE_SEPARATOR

The color for borders or divider lines that hide any underlying content.

The color for links.

widgets.COLOR_DARK_TEXT

The nonadaptable system color for text on a light background.

widgets.COLOR_LIGHT_TEXT

The nonadaptable system color for text on a dark background.

Standard Colors

widgets.COLOR_SYSTEM_BLUE

A blue color that automatically adapts to the current trait environment.

widgets.COLOR_SYSTEM_GREEN

A green color that automatically adapts to the current trait environment.

widgets.COLOR_SYSTEM_INDIGO

An indigo color that automatically adapts to the current trait environment.

widgets.COLOR_SYSTEM_ORANGE

An orange color that automatically adapts to the current trait environment.

widgets.COLOR_SYSTEM_PINK

A pink color that automatically adapts to the current trait environment.

widgets.COLOR_SYSTEM_PURPLE

A purple color that automatically adapts to the current trait environment.

widgets.COLOR_SYSTEM_RED

A red color that automatically adapts to the current trait environment.

widgets.COLOR_SYSTEM_TEAL

A teal color that automatically adapts to the current trait environment.

widgets.COLOR_SYSTEM_YELLOW

A yellow color that automatically adapts to the current trait environment.

widgets.COLOR_SYSTEM_GRAY

The base gray color.

widgets.COLOR_SYSTEM_GRAY2

A second-level shade of grey.

widgets.COLOR_SYSTEM_GRAY3

A third-level shade of grey.

widgets.COLOR_SYSTEM_GRAY4

A fourth-level shade of grey.

widgets.COLOR_SYSTEM_GRAY5

A fifth-level shade of grey.

widgets.COLOR_SYSTEM_GRAY6

A sixth-level shade of grey.

Fixed Colors

widgets.COLOR_CLEAR

A color object with grayscale and alpha values that are both 0.0.

widgets.COLOR_BLACK

A color object in the sRGB color space with a grayscale value of 0.0 and an alpha value of 1.0.

widgets.COLOR_BLUE

A color object with RGB values of 0.0, 0.0, and 1.0 and an alpha value of 1.0.

widgets.COLOR_BROWN

A color object with RGB values of 0.6, 0.4, and 0.2 and an alpha value of 1.0.

widgets.COLOR_CYAN

A color object with RGB values of 0.0, 1.0, and 1.0 and an alpha value of 1.0.

widgets.COLOR_DARK_GRAY

A color object with a grayscale value of 1/3 and an alpha value of 1.0.

widgets.COLOR_GRAY

A color object with a grayscale value of 0.5 and an alpha value of 1.0.

widgets.COLOR_GREEN

A color object with RGB values of 0.0, 1.0, and 0.0 and an alpha value of 1.0.

widgets.COLOR_LIGHT_GRAY

A color object with a grayscale value of 2/3 and an alpha value of 1.0.

widgets.COLOR_MAGENTA

A color object with RGB values of 1.0, 0.0, and 1.0 and an alpha value of 1.0.

widgets.COLOR_ORANGE

A color object with RGB values of 1.0, 0.5, and 0.0 and an alpha value of 1.0.

widgets.COLOR_PURPLE

A color object with RGB values of 0.5, 0.0, and 0.5 and an alpha value of 1.0.

widgets.COLOR_RED

A color object with RGB values of 1.0, 0.0, and 0.0 and an alpha value of 1.0.

widgets.COLOR_WHITE

A color object with a grayscale value of 1.0 and an alpha value of 1.0.

widgets.COLOR_YELLOW

A color object with RGB values of 1.0, 1.0, and 0.0 and an alpha value of 1.0.

Font Text Style

widgets.FONT_TEXT_STYLE_BODY

The font used for body text.

widgets.FONT_TEXT_STYLE_CALLOUT

The font used for callouts.

widgets.FONT_TEXT_STYLE_CAPTION_1

The font used for standard captions.

widgets.FONT_TEXT_STYLE_CAPTION_2

The font used for alternate captions.

widgets.FONT_TEXT_STYLE_FOOTNOTE

The font used in footnotes.

widgets.FONT_TEXT_STYLE_HEADLINE

The font used for headings.

widgets.FONT_TEXT_STYLE_SUBHEADLINE

The font used for subheadings.

widgets.FONT_TEXT_STYLE_LARGE_TITLE

The font style for large titles.

widgets.FONT_TEXT_STYLE_TITLE_1

The font used for first level hierarchical headings.

widgets.FONT_TEXT_STYLE_TITLE_2

The font used for second level hierarchical headings.

widgets.FONT_TEXT_STYLE_TITLE_3

The font used for third level hierarchical headings.

Font Size

widgets.FONT_LABEL_SIZE

Returns the standard font size used for labels.

widgets.FONT_BUTTON_SIZE

Returns the standard font size used for buttons.

widgets.FONT_SMALL_SYSTEM_SIZE

Returns the size of the standard small system font.

widgets.FONT_SYSTEM_SIZE

Returns the size of the standard system font.

Padding

widgets.PADDING_NONE = 0

No padding around an UI element.

widgets.PADDING_HORIZONTAL = 3

Horizontal padding around an UI element.

widgets.PADDING_VERTICAL = 2

Vertical padding around an UI element.

widgets.PADDING_ALL = 1

Padding everywhere around an UI element.

Date Style

widgets.DATE_STYLE_DATE = 0

A style displaying a date.

widgets.DATE_STYLE_OFFSET = 1

A style displaying a date as offset from now.

widgets.DATE_STYLE_RELATIVE = 2

A style displaying a date as relative to now.

widgets.DATE_STYLE_TIME = 3

A style displaying only the time component for a date.

widgets.DATE_STYLE_TIMER = 4

A style displaying a date as timer counting from now.