Skip to content

API reference

Key

Partly supported: functionality or testing is incomplete
Fully supported

Application components

Component macOS Linux (GTK) Linux (Qt) Windows iOS Android Web Terminal
App
The top-level application object.
Window
A system-managed container of widgets.
MainWindow
A window that can use all window-level UI elements.
DocumentWindow
A window bound to a Document instance.
Command
App functionality invoked from menus or toolbars.
Dialogs
Short-lived windows asking for user input.
Status icons
Icons representing status while the app isn't visible.
Platform
Details about the platform on which the app is running.

Widgets

Component macOS Linux (GTK) Linux (Qt) Windows iOS Android Web Terminal
ActivityIndicator
An activity indicator for a task of indeterminate length.
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 with an icon, heading, and text for each item.
Divider
A visual layout separator.
ImageView
Displays an Image.
Label
A text label.
MapView
A zoomable map that can be annotated with location pins.
MultilineTextInput
A scrollable panel for displaying and editing multiple lines of text.
NumberInput
A text input that is limited to numeric input.
PasswordInput
For entering a password; obscures entered text.
ProgressBar
A horizontal bar to visualize task progress.
Selection
Allows a single choice from a list.
Slider
A draggable marker for selecting within a range.
Switch
A labeled on/off button.
Table
Displays columns of tabular data.
TextInput
Allows editing of a single line of text.
TimeInput
For selecting a clock time.
Tree
A hierarchical tree of tabular data.
WebView
An embedded web browser.
Widget
The abstract base class of all widgets.

Container widgets

Component macOS Linux (GTK) Linux (Qt) Windows iOS Android Web Terminal
Box
A container for laying out other widgets.
ScrollContainer
A container that can display a layout larger than its own area.
SplitContainer
A container divided into two panels with a movable border.
OptionContainer
A container for displaying multiple labeled tabs of content.

Style

Component macOS Linux (GTK) Linux (Qt) Windows iOS Android Web Terminal
Pack
Toga's style and layout engine.

Data representation

Component macOS Linux (GTK) Linux (Qt) Windows iOS Android Web Terminal
Color
A representation of a color.
Constants
Symbolic constants used by various APIs.
Document
Represents a file on disk that will be displayed in one or more windows.
Paths
Provides platform-appropriate filesystem locations.
Source
Base abstraction of managed data.
ListSource
Abstractions of list-like managed data.
TreeSource
Abstractions of tree-like managed data.
ValueSource
Abstractions of managed atomic values.
Column
Abstractions of tabular columns.
Types
Utility data structures used by Toga APIs.
Validators
Mechanisms for validating that input meets a given set of criteria.
DrawingAction
Representation of a drawing action performed on a Canvas.

Resources

Component macOS Linux (GTK) Linux (Qt) Windows iOS Android Web Terminal
Font
A representation of a font.
Icon
A small image for providing context to a widget.
Image
Graphical content of arbitrary size.

Hardware

Component macOS Linux (GTK) Linux (Qt) Windows iOS Android Web Terminal
Camera
A sensor that can capture photos and/or video.
Keys
Symbolic representation of keys used for keyboard shortcuts.
Location
A sensor that can capture the geographical location of the device.
Screen
A representation of a screen attached to a device.