ProntoGUI Reference Guide

Overview of Primitives

Primitive Type Description
Card Displays a card of information.
Check Displays a checkbox.
Choice Displays choice and provide means of selecting from a list of choices.
Command Displays a button or equivalent
ExportFile Exports a file from the server.
Frame Holds arbitrary primitives for display and interaction.
Group Logically groups arbitrary primitives for display and interaction.
Icon A graphical icon from Material design.
ImportFile Imports a file into the server.
List Displays a list of items.
Node A node that appears in a Tree primitive.
Nothing Shows nothing and acts as a filler where a primitive is normally shown.
NumericField Field for editing numberic values.
Table Presents a 2D array of primitives in a table consisting of rows and columns.
Text Displays a piece of text.
TextField Field for entering text.
Timer Performs updates on a regular interval.
Tree A tree of primitives.
Tristate A true, false, or indeterminate choice.

Common Embodiment Properties

Property Name Description
borderAll Border width for all sides, expressed in logical pixels
borderBottom Border width for the bottom side, expressed in logical pixels
borderColor Border color for all sides
borderLeft Border width for the left side, expressed in logical pixels
borderRight Border width for the right side, expressed in logical pixels
borderTop Border width for the top side, expressed in logical pixels
bottom Bottom position expressed in logical pixels
height Height expressed in logical pixels
horizontalAlignment Horizontal alignment
left Left position expressed in logical pixels
marginAll Margin width for all sides, expressed in logical pixels
marginBottom Margin width for the bottom side, expressed in logical pixels
marginLeft Margin width for the left side, expressed in logical pixels
marginRight Margin width for the right side, expressed in logical pixels
marginTop Margin width for the top side, expressed in logical pixels
paddingAll Padding for all sides, expressed in logical pixels
paddingBottom Padding on the bottom side, expressed in logical pixels
paddingLeft Padding on the left side, expressed in logical pixels
paddingRight Padding on the right side, expressed in logical pixels
paddingTop Padding on the top side, expressed in logical pixels
right Position of the right side, expressed in logical pixels
top Position of the top side, expressed in logical pixels
verticallAlignment Vertical alignment
width Width expressed in logical pixels

Card

Displays a card of information. A card can show summarized information with a title and optional image and buttons.

Fields

// A JSON string specifying the embodiment to use for this primitive.  This can be assigned explicitly or by an update from the App.

Embodiment string

// The primitive to show on the left side of the card.

LeadingItem Primitive

// The primitive to show on the main or title portion of the card.

MainItem Primitive

// The primitive to show on the lower or subtitle portion of the card.

SubItem Primitive

// The primitive to show on the right or trailing portion of the card.

TrailingItem Primitive

Embodiments

default

A regular checkbox.

Properties

Common Properties


Check

Displays a checkbox.

Fields

// A JSON string specifying the embodiment to use for this primitive.  This can be assigned explicitly or by an update from the App.

Embodiment string

// True if the item appears checked.

Checked bool

// The text to show in the item.

Label string

Embodiments

default

A regular checkbox.

Properties

Common Properties


Choice

Displays choice and provide means of selecting from a list of choices.

Fields

// A JSON string specifying the embodiment to use for this primitive.  This can be assigned explicitly or by an update from the App.

Embodiment string

// The current choice that is selected, or empty string if nothing chosen.

Choice string

// The choice values.

Choices []string

// The labels to show corresponding to each item in Choices.

ChoiceLabels []string

Embodiments

default

Edit styled field with pull down list.

Properties

Common Properties

button

Button styled dropdown choice.

Properties

Common Properties


Command

Displays a button or equivalent

Fields

// A JSON string specifying the embodiment to use for this primitive.  This can be assigned explicitly or by an update from the App.

Embodiment string

// True when the user has clicked the command.

CommandIssued bool

// The text to show in the item.

Label string

// 0 = normal, 1 = item disabled, 2 = ite hidden.

Status int

Embodiments

default

An elevated button.

Properties

Common Properties

outlined-button

A button with an outline.

Properties

Common Properties


ExportFile

Exports a file from the server.

Fields

// The blob of data representing the binary contents of the file.

Data []byte

// True when the file has been exported (stored to a file) by the app.  This field is updated by the app.

Exported bool

// The file name including its extension separated by a period.

Name string

Embodiments

default

Default

Properties

Common Properties


Frame

Holds arbitrary primitives for display and interaction.

Fields

// A JSON string specifying the embodiment to use for this primitive.  This can be assigned explicitly or by an update from the App.

Embodiment string

// The collection of primitives that comprise the GUI frame.

FrameItems []Primitive

// The primitive (Icon) to show.

Icon Primitive

// 

Showing bool

// The title to show for the frame.

Title string

Embodiments

default

Shows primitives in allocated space.

Properties

Common Properties

Property Name Description
flowDirection The direction of content flow within the primitive
layoutMethod How child primitives are arranged
full-view

Shows primitives in allocated space.

Properties

Common Properties

Property Name Description
flowDirection The direction of content flow within the primitive
layoutMethod How child primitives are arranged
dialog-view

Shows primitives in a dialog view.

Properties

Common Properties

Property Name Description
flowDirection The direction of content flow within the primitive
layoutMethod How child primitives are arranged
snackbar

Shows primitives in a snackbar.

Properties

Common Properties

Property Name Description
snackbarBehavior Snackbar behavior
snackbarDuration Time duration, expressed in seconds, to show the snack bar
snackbarShowCloseIcon Whether the icon for closing the snackbar should appear

Group

Logically groups arbitrary primitives for display and interaction.

Fields

// A collection of primitives to show together.

GroupItems []Primitive

// 0 = normal, 1 = item disabled, 2 = ite hidden.

Status int

Embodiments

default

Default

Properties

Common Properties


Icon

A graphical icon from Material design.

Fields

// The ID of the material icon to show.

IconID string

Embodiments

default

Default

Properties

Common Properties

Property Name Description
color Color of embodiment (typically the foreground)
size Size expressed in logical pixels

ImportFile

Imports a file into the server.

Fields

// The blob of data representing the binary contents of the file.

Data []byte

// True when the file has been imported from the app.

Imported bool

// The file name including its extension separated by a period.

Name string

// The allowed file extensions for the file.

ValidExtensions []string

Embodiments

default

Default

Properties

Common Properties


List

Displays a list of items.

Fields

// The primitives to show in the list.

ListItems []Primitive

// A model primitive that models what each item in the list will look like.

ModelItem Primitive

// The index of the currently selected item in the list, or -1 if none selected.

SelectedIndex int

Embodiments

card

A list of card items.

Properties

Common Properties

Property Name Description
horizontal List is arranged horizontally instead of the default vertical fashion.
itemHeight Height of items expressed in logical pixels
itemWidth Width of items expressed in logical pixels
normal

A list of text items.

Properties

Common Properties

Property Name Description
horizontal List is arranged horizontally instead of the default vertical fashion.
itemHeight Height of items expressed in logical pixels
itemWidth Width of items expressed in logical pixels
property

A list of property items.

Properties

Common Properties

Property Name Description
horizontal List is arranged horizontally instead of the default vertical fashion.
itemHeight Height of items expressed in logical pixels
itemWidth Width of items expressed in logical pixels
tabbed

A list of frames organized with tabs.

Properties

Common Properties

Property Name Description
animationPeriod Animation period in milliseconds
tabHeight Height of tabs expressed in logical pixels

Node

A node that appears in a Tree primitive.

Fields

// The primitive held at this node

NodeItem Primitive

// Ths sub or child nodes under this node.

SubNodes []Primitive

Embodiments

default

Default

Properties

Common Properties


Nothing

Shows nothing and acts as a filler where a primitive is normally shown.

Fields


Embodiments

default

Default

Properties

Common Properties


NumericField

Field for editing numberic values.

Fields

// The number entered or the number to edit.

NumericEntry string

Embodiments

default

Default

Properties

Common Properties

Property Name Description
displayDecimalPlaces The fixed decimal places to display (1-15), or optional decimal places to display (-1 to -15), or no display of fractional portion (0).
displayNegativeFormat The format for displaying negative numbers
displayThousandths Whether to display the thousandths separators.
maxValue Maximum allowed value for the field.
minValue Minimum allowed value for the field.
popupChoices Choices to display in popup list
color

Field for entering and selecting color values.

Properties

Common Properties

font-size

Field for specifying a font size.

Properties

Common Properties


Table

Presents a 2D array of primitives in a table consisting of rows and columns.

Fields

// The text headings to show above each column.

Headings []string

// A row of model primitives that model what each cell in each column will look like.

ModelRow []Primitive

// The rows of primitives to show in the table.

Rows [][]Primitive

// 0 = normal, 1 = item disabled, 2 = ite hidden.

Status int

Embodiments

default

Default

Properties

Common Properties


Text

Displays a piece of text.

Fields

// The text to show.

Content string

Embodiments

default

Default

Properties

Common Properties

Property Name Description
backgroundColor Background color
color Color of embodiment (typically the foreground)
fontFamily Font family
fontSize Font size
fontStyle Font style
fontWeight Font weight

TextField

Field for entering text.

Fields

// The entered text or the initial text to edit.

TextEntry string

Embodiments

default

Default

Properties

Common Properties


Timer

Performs updates on a regular interval.

Fields

// The amount of time in milliseconds between each timer tick.

PeriodMs int

// True when the timer is fired in the app.

TimerFired bool

Embodiments

default

Default

Properties

Common Properties


Tree

A tree of primitives.

Fields

// A model primitive that models what each item in the list will look like.

ModelItem Primitive

// The root node of the tree.

Root Primitive

// The sequence of sub node traversals to reach the selected node.

SelectedPath []int

Embodiments

default

Default

Properties

Common Properties


Tristate

A true, false, or indeterminate choice.

Fields

// The text to show in the item.

Label string

// The state of the option (0 = Negative, 1 = Affirmative, and -1 = Indeterminate).

State int

Embodiments

default

Default

Properties

Common Properties