Objects

Objects are the building blocks of your GUI. Each object has a different set of uses, attributes, and functions.

Button

A button is a clickable object.

Example syntax:

make Button b.
make Button b with text "Hello".
make Button b with text "Hello", position 100 25.
set b action close.
Attribute Description Possible Values Default Value
text Words on button
  • A plaintext string
“Untitled Button”
position location of button on window
  • position keyword
  • integer pixels, separated by space
center
size size of button
  • size keyword
  • width and height pixel integers, separated by a space
medium
action Effect when button clicked
  • name of Python or Gooey function
none
hidden Determines if button visible (false) or invisible (true)
  • true
  • false
false

Window

A window is the frame on which you create your GUI. The window is always the first object you make.

Example syntax:

make Window w with size 500 500, color green.
set w title "My favorite GUI".

Attributes:

Attribute Description Possible Values Default Value
title The name as displayed in the top bar of the window.
  • A plaintext string
“Untitled Window”
size The width and height of the window
  • size keyword
  • width and height pixel integers, separated by a space
medium
color The color of the window background
  • color keyword
  • rgb value, separated by spaces (0 - 255)
  • #hexvalue
white
action The effect from interacting with a window.
  • name of Python of Gooey function
none
font The font for all text used in the window
  • String name of available font
Times New Roman
fontSize Size of text
  • Integer
12
textColor Color of text
  • color keyword
  • rgb value, separated by spaces
black

Checkboxes

Checkboxes are square boxes the user can click on to select any number of options. If you create a Checkboxes object without the options attribute, it will have three default checkboxes labeled “Option 1”, “Option 2”, and “Option 3”. Placing an asterisk before any of the attributes will mark that option to be selected by default.

Example syntax:

make Checkboxes c with options "hello" "yellow" "fellow".
set c position 20 20.
Attribute Description Possible Values Default Value
title text above checkbox set
  • A plaintext string
“Untitled Checkboxes”
options The Checkboxes labels.
  • strings in double quotes, separated by a space
  • string preceded by * to mark default selections
*”Option 1” “Option 2” “Option 3”
position location of checkbox set in window
  • integer pixels, separated by by space
center

RadioButtons

RadioButtons are circular buttons a user can click to select one option out of many. If you create a RadioButtons object without the options attribute, it will have three default buttons labeled “Option 1”, “Option 2”, and “Option 3”. Placing an asterisk before one of the attributes will make that option to be selected by default.

Example syntax:

make RadioButtons r with options "hello" "mello" "jello".
set r title "Choose one:".
Attribute Description Possible Values Default Value
title text above RadioButtons set
  • A plaintext string
“Untitled RadioButtons”
options The RadioButtons labels.
  • strings in double quotes, separated by a space
  • string preceded by * to mark default selected
*”Option 1” “Option 2” “Option 3”
position location of RadioButtons set in window
  • position keyword
  • integer pixels, separated by by space
center

Text

Text is a simple text region the user cannot interact with.

Example syntax:

make Text t with text "Welcome to Gooey! Please leave your shoes at the door."
set t color blue.
Attribute Description Possible Values Default Value
text unmutable words in a window
  • A plaintext string
“Text”
position location of text in window
  • position keyword
  • integer pixels, separated by by space
center
size size of text
  • size keyword
  • width and height integers, separated by space
medium
color color of text
  • color keyword
  • rgb value, separated by spaces (0 - 255)
  • #hexvalue
black
hidden Determines if text visible (false) or invisible (true)
  • true
  • false
false

TextBox

TextBox objects create a space where users can type. When you create a TextBox with a text attribute, the value entered will appear as default text within the text box.

When setting the size of the TextBox using integers for width and height, the integers will set the width and height by character count. For example, size 15 10 will create a TextBox 15 characters across, with ten lines of height.

Example syntax:

make TextBox tb with text "Write your answer here".
set tb size large.
Attribute Description Possible Values Default Value
text mutable words within the TextBox
  • A plaintext string
“Type Here”
position location of TextBox in window
  • position keyword
  • integer pixels, separated by by space
center
size size of TextBox
  • size keyword
  • width and height pixel integers, separated by space
medium
hidden Determines if TextBox visible (false) or invisible (true)
  • true
  • false
false

Image

Images are pictures you can add your your Gooey. The image must be in .gif format although the movement will not be maintained.

Example syntax:

make Image i with title "Apple", text "This is my most favorite apple", source "images/apple.gif".
Attribute Description Possible Values Default Value
hidden Determines if Image visible (false) or invisible (true)
  • true
  • false
false
source path or filename of Image
  • image file in .gif format
defaultIcon

FormattedText

FormattedText is an object that stores values for a text with different formatting options. It is first created by the user with attributes of their choice and then can be used in button text, checkboxes/radiobutton titles, and text objects.

Example syntax:

make FormattedText t with text "Hello World!", font "Arial", size 15, color blue, bold true, italic true, underline true.
make Button b with text t.
make Checkboxes c with title t, options "Yay" "Nay", position 50 50, size medium.
Attribute Description Possible Values Default Value
text text to be stored in object
  • A plaintext string
“Untitled Text”
font font of text
  • A plaintext string: “Times”, “Arial”/”Helvetica”, “Courier” “Comic Sans MS”, “MS Sans Serif” “MS Serif”, “Verdana”
“Times”
color color of text
  • color keyword
  • rgb value, separated by spaces (0 - 255)
  • #hexvalue
black
size size of text
  • integer (pt size)
12
bold Determines if the text is bold (true) or not (false)
  • true
  • false
false
italic Determines if the text is italicized (true) or not (false)
  • true
  • false
false
underline Determines if the text is underlined (true) or not (false)
  • true
  • false
false