Classes

This page contains a list of classes used by the pyto_ui API.

Toga Compatibility

It’s possible to embed PytoUI views in a Toga app with the TogaWidget class.

TogaWidget

A Toga Widget created from a PytoUI view.

Views

A list of UI elements to be displayed on screen.

View

An object that manages the content for a rectangular area on the screen.

NavigationView

A container view that defines a stack-based scheme for navigating hierarchical content.

UIKitView

This class is used to create a PytoUI view from an UIKit view.

ImageView

A view displaying an image.

Label

A view displaying not editable and not selectable text.

TableViewCell

A cell contained in a TableView.

TableView

A view containing a list of cells.

TextView

An editable, multiline and scrollable view containing text.

WebView

A View that displays web content.

StackView

A view that arranges its children in a horizontal or vertical line.

VerticalStackView

A view that arranges its children in a vertical line.

HorizontalStackView

A view that arranges its children in a horizontal line.

Controls

Control

The base class for controls, which are visual elements that convey a specific action or intention in response to user interactions.

SegmentedControl

A horizontal control made of multiple segments, each segment functioning as a discrete button.

Slider

A control used to select a single value from a continuous range of values.

Switch

A control that offers a binary choice, such as On/Off.

Button

A control that executes your custom code in response to user interactions.

TextField

A field to type single line text.

Context Menu

Menu

A whole menu.

MenuElement

A menu element.

Other classes

Classes that don’t represent views.

Color

A Color object represents a color to be displayed on screen.

Font

A Font object represents a font (with name and size) to be used on labels, buttons, text views etc.

GestureRecognizer

A gesture-recognizer object—or, simply, a gesture recognizer—decouples the logic for recognizing a sequence of touches (or other input) and acting on that recognition.

TableViewSection

An object representing a section in a Table View.

ButtonItem

A special kind of button that can be placed on the view's navigation bar.

Alert

A class representing an alert.

Rect

A tuple that contains the location and dimensions of a rectangle.

Point

A tuple that contains a point in a two-dimensional coordinate system.

Size

A tuple that contains width and height values.