Skip to content
Toga
0.5.3.dev143+gabcc6cdb6

API Reference

Core application components

Component Description
App The top-level representation of an application.
Window An operating system-managed container of widgets.
MainWindow A window that can use the full set of window-level user interface elements.
DocumentWindow A window that can be used as the main interface to a document-based app.

General widgets

Component Description
ActivityIndicator A small animated indicator showing activity on a task of indeterminate length, usually rendered as a "spinner" animation.
Button A button that can be pressed or clicked.
Canvas A drawing area for 2D vector graphics.
DateInput A widget to select a calendar date
DetailedList An ordered list of content where each item has an icon, a main heading, and a line of supplementary text.
Divider A separator used to visually distinguish two sections of content in a layout.
ImageView Image Viewer
Label A text label for annotating forms or interfaces.
MapView A zoomable map that can be annotated with location pins.
MultilineTextInput A scrollable panel that allows for the display and editing of multiple lines of text.
NumberInput A text input that is limited to numeric input.
PasswordInput A widget to allow the entry of a password. Any value typed by the user will be obscured, allowing the user to see the number of characters they have typed, but not the actual characters.
ProgressBar A horizontal bar to visualize task progress. The task being monitored can be of known or indeterminate length.
Selection A widget to select an single option from a list of alternatives.
Slider A widget for selecting a value within a range. The range is shown as a horizontal line, and the selected value is shown as a draggable marker.
Switch A clickable button with two stable states: True (on, checked); and False (off, unchecked). The button has a text label.
Table A widget for displaying columns of tabular data.
TextInput A widget for the display and editing of a single line of text.
TimeInput A widget to select a clock time
Tree A widget for displaying a hierarchical tree of tabular data.
WebView An embedded web browser.
Widget The abstract base class of all widgets. This class should not be be instantiated directly.

Layout widgets

Component Description
Box A generic container for other widgets. Used to construct layouts.
OptionContainer A container that can display multiple labeled tabs of content.
ScrollContainer A container that can display a layout larger that the area of the container, with overflow controlled by scroll bars.
SplitContainer A container that divides an area into two panels with a movable border.

Resources

Component Description
App Paths A mechanism for obtaining platform-appropriate file system locations for an application.
Command A representation of app functionality that the user can invoke from menus or toolbars.
Dialogs A short-lived window asking the user for input.
Document A representation of a file on disk that will be displayed in one or more windows
Font A representation of a Font
Icon An icon for buttons, menus, etc
Image An image
Source A base class for data source implementations.
Status Icons Icons that appear in the system tray for representing app status while the app isn't visible.
ListSource A data source describing an ordered list of data.
TreeSource A data source describing an ordered hierarchical tree of data.
ValueSource A data source describing a single value.
Validators A mechanism for validating that input meets a given set of criteria.

Hardware

Usage Description
Camera A sensor that can capture photos and/or video.
Location A sensor that can capture the geographical location of the device.
Screen A representation of a screen attached to a device.

Other

Component Description
Constants Symbolic constants used by various APIs.
Keys Symbolic representation of keys used for keyboard shortcuts.
Types Utility data structures used by Toga APIs.