Home Documentation
Documentation

Documentation

Info Class

constructors

1
Info(PApplet parent)

methods

1
void info()

prints out the library name, prettyversion and author

1
String version()

returns the version

1
PShape logo()

returns the logo

1
PImage icon()

returns the icon

Presets subclass

1
Info.Presets

contains static Strings which define the preset to load

AlignHelper Class

constructors

1
AlignHelper(PApplet parent)

methods

1
AlignHelper alignHorizontalbyFrame(float yposition, ArrayList widgets)

aligns the given widgets in a horizontal line

1
AlignHelper alignVerticalbyFrame(float yposition, ArrayList widgets)

aligns the given widgets in a vertical line

1
AlignHelper alignCirclebyRadius(float xposition, float yposition, float radius, ArrayList widgets)

aligns the given widgets in a circle with given radius

BeastyWorld Class

constructors

1
BeastyWorld(PApplet parent)

methods

1
BeastyWorld registerHandler(String handler)

registers a handler anytime. Options are “mouse”, “hotkeys” and “tabsnap”.
NOTE: tabsnap handler is not supported yet due to an issue in the development.

1
BeastyWorld unregisterHandler(String handler)

unregisters a handler anytime. Options are the same as in registerHandler()

1
BeastyWorld setWindowName(String name)

sets the application window name to a costum name

1
BeastyWorld setWindowIcon(String iconpath)

sets the application window icon to a costum icon

1
BeastyWorld setBackgroundColor(int color)

sets the backgroundcolor on the world level

1
BeastyWorld setFont(Strign fontpath)

sets the font to a costum font on the world level

1
BeastyWorld setTooltipFont(String path)

sets the tooltip font to a costum font on the world level

1
BeastyWorld disableBackground(boolean disable)

disables background overdrawing from Beastybuttons.
NOTE: This can be useful if the user wants to draw own elements on the screen besides the Beastybuttons widgets but it will cause a frame mess if the user does not overdraw the background by himself in the draw() function.

1
BeastyWorld addWidget(Widget widget)

adds a widget to the world container - this will force a sourcepath update

1
BeastyWorld removeWidget(Widget widget)

removes a widget from the world container - this will force a sourcepath update

1
BeastyWorld addSurface(BeastySurface surface)

adds a surface to the world container - this will force a sourcepath update

1
BeastyWorld removeSurface(BeastySurface surface)

removes a surface from the world container - this will force a sourcepath update

1
BeastyWorld enableonLayer(int layer)

enables active state on all widgets that are on the same layer on the world level

1
disableonLayer(int layer)

disables active state on all widgets that are on the same layer on the world level

1
Widget get_widget_by_id(String id)

returns the first widget that is found under the given id on the world level

1
Widget get_widget_by_path(String path)

returns the first widget that is found under the given sourcepath on the world level

1
BeastySurface get_surface_by_id(String id)

returns the first surface that is found under the given id - only use in Surfacemode

1
BeastySurface get_surface_by_path(String path)

returns the first surface that is found under the given sourcepath - only use in Surfacemode

1
String get_renderpage_id

returns the ID of the current renderpage - only use in Surfacemode

1
String getID()

returns the id of the world container

1
String getSourcepath()

returns the sourcepath of the world container

1
ArrayList<Widget> getWidgetList()

returns a list of all widgets added to the world container

1
BeastyWorld enableLogging(int loglevel, String logfilepath)

enables automatic logging for all widgets on events
NOTE: loglevel must be either 0 or 1 | logfilepath must be relative and end with “.txt”
If the path is not relative this can cause export and import problems with the layout

1
BeastyWorld disableLogging()

disables the logging and ends writing to logfile automatically

1
String getLogfilePath()

returns the absolute path of the logfile

1
void exportLayout(String exportpath)

exports the current layout to a .beasty file
NOTE: exportpath must be relative and end with .beasty
If the path is not relative this can cause export and import problems with the layout

1
void importLayout(String importpath, boolean dependencies)

imports a .beasty file with or without dependencies
NOTE: dependencies are specifically set properties by the layout. If they are required but not available the execution process will fail.
In this case you can import a file without dependencies which will initialize the layout with default settings.
Depencencies might be things as images, costum fonts or sketch functions on different levels depending on the project.

1
void surface_jump_transition(String targetsurfaceID)

changes the rendersurface to the new targetsurface with a jump cut - only use in Surfacemode

1
void setPrintouts(String[] printouts)

sets printouts associated with the layout which will be printed out to the console when importing this layout.
This is useful if the user wants to create a costum Preset or a complete layout for another user to import.
The printouts might define for example costum set IDs for specific widgets to get access to them in the sourcecode.

BeastySurface Class

constructors

1
BeastySurface(PApplet parent)

methods

1
BeastySurface setID(String id)

sets the id of the surface

1
BeastySurface copySettings(BeastySurface surface)

copys the settings of another surface - individual settings like id and sourcepath remain untouched

1
BeastySurface setFont(String fontpath)

sets the font to a costum font on the surface level

1
BeastySurface setTooltipFont(String fontpath)

sets the tooltip font to a costum font on the surface level

1
BeastySurface enableonLayer(int layer)

enables active state on all widgets that are on the same layer on the surface level

1
BeastySurface disableonLayer(int layer)

disables active state on all widgets that are on the same layer on the surface level

1
BeastySurface setSurfaceColor(int color)

sets the backgroundcolor on the surface level

1
BeastySurface setSurfaceImage(String imgpath, boolean stretch_image)

sets the backgroundimage on the surface level
NOTE: the backgroundimage will always be rendered over the backgroundcolor

1
BeastySurface offsetSurfaceImage(float x, float y)

offsets the backgroundimage on the surface level

1
BeastySurface addWidget(Widget widget)

adds a widget to the surface container - this will force a sourcepath update

1
BeastySurface removeWidget

removes a widget from the surface container - this will force a sourcepath update

1
String getID()

returns the id of the surface container

1
String getSourcepath()

returns the sourcepath of the surface container

1
float[] getPosition()

returns the position of the surface container

1
ArrayList<Widget> getWidgetList()

returns a list of all widgets added to the surface container

Button Class

constructors

1
Button(PApplet parent, String text, float textsize)
1
Button(PApplet parent, String text, float textsize, boolean round)
1
Button(PApplet parent, float xsize, float ysize, String text)
1
Button(PApplet parent, float xsize, float ysize, String text, boolean round)

methods

1
Button onLeftClick(String function)

binds a function in the sketch to the button on the left click

1
Button onMiddleClick(String function)

binds a function in the sketch to the button on the middle click

1
Button onRightClick(String function)

binds a function in the sketch to the button on the right click

Checkbox Class

constructors

1
Checkbox(PApplet parent, float size, boolean checked)
1
Checkbox(PApplet parent, float size, boolean round, boolean checked)

methods

1
Checkbox setChecktype(String type)

sets a checktype for the checkbox
Options are “check”, “cross”, “point” or “circle”

1
Checkbox onCheck(String function)

binds a function in the sketch to the checkbox on check

1
Checkbox onUncheck(String function)

binds a function in the sketch to the checkbox on uncheck

Label Class

constructors

1
Label(PApplet parent, String text, float textsize)
1
Label(PApplet parent, String text, float textsize, boolean round)
1
Label(PApplet parent, float xsize, float ysize, String text)
1
Label(PApplet parent, float xsize, float ysize, String text, boolean round)

Inputfield Class

constructors

1
Inputfield(PApplet parent, int longest_input, float textsize)
1
Inputfield(PApplet parent, int longest_input, float textsize, boolean round)
1
Inputfield(PApplet parent, int longest_input, float xsize, float ysize)
1
Inputfield(PApplet parent, float xsize, float ysize, String text, boolean round)

methods

1
Inputfield setInputColor()

sets the color rendered while the inputfield listens for input

1
Inputfield setGreyedText(int color)

sets the default text

1
Inputfield setGreyedTextColor(int color)

sets the color of the default text

1
Inputfield setInputLimit(int limit)

limits the possible input to a given length

1
Inputfield clearInput()

clears the input of the inputfield

1
String getText()

returns the input of the inputfield

1
int getInputColor()

returns the color rendered while the inputfield listens for input

1
boolean getSelection()

returns true while the inputfield listens for input and false while it does not

BB_Image Class

constructors

1
BB_Image(PApplet parent, String imgpath)

methods

1
BB_Image setImage(String imgpath)

set a new image - forces a widget size update

1
BB_Image setScaleFactor(float factorx, factory)

scale the image by this factor - default is 1

1
BB_Image cropImage(String edge, int pixel_amount)

crops the image by the given pixel amount - forces a widget size update
edge options are “left”, “right”, “top” or “bottom”

Widget Topclass

methods

1
Widget setSize(float xsize, float ysize, boolean update)

sets the size of a widget/optional: update all content to fit with the new size

1
Widget setTextsize(float textsize, boolean update)

sets the textsize of a widget/optional: update all content to fit with the new textsize

1
Widget setForegroundColor(int color)

sets the foreground color of the widget

1
Widget setBackgroundColor(int color)

sets the background color of the widget

1
Widget setOvercolor(int color)

sets the hover over/ tab selected color of the widget

1
Widget setClickcolor(int color)

sets the click down color of the widget

1
Widget setPosition(float x, float y)
1
Widget setPosition(String x, String y)
1
Widget setPosition(String x, float y)
1
Widget setPosition(float x, String y)

sets the position of a widget
NOTE: any call will also overwrite a possible tooltip position if a tooltip was created before
string options are “left”, “right”, “top” or “bottom”

1
Widget hide(boolean visible)

hides or unhides a widget
NOTE: this is not related to active states

1
Widget setActive(boolean active)

sets the active state of a widget
NOTE: this affects widget events, tooltip response and logging

1
Widget setLayer(int layer)

sets the renderlayer of the widget
NOTE: this must be between 0 and 5 since there are 6 renderlayers - bottom -> top - 0 is the default

1
Widget setFont(String fontpath)

sets the font to a costum font on the widget level

1
Widget setTooltipFont(String fontpath)

sets the font of a tooltip to a costum font on the widget level

1
Widget setID(String id)

sets the id of the widget

1
Widget copySettings(Widget widget)

copys the settings of another widget
NOTE: the widgets must be of the same type

1
float[] getSize()

returns the size of the widget

1
float getTextSize()

returns the textsize of the widget

1
int getForegroundColor()

returns the foreground color of the widget

1
int getBackgroundColor()

returns the background color of the widget

1
int getOvercolor()

returns the hover over or tab selected color of the widget

1
int getClickcolor()

returns the click down color of the widget

1
String getID()

returns the id of the widget

1
String getSourcepath()

returns the sourcepath of the widget

1
float[] getPosition()

returns the position of the widget

1
Widget createTooltip(String text, float textsize, int foregroundcolor, int backgroundcolor)
1
Widget createTooltip(String text, float textsize)
1
Widget createTooltip(String text, float xsize, float ysize, int foregroundcolor, int backgroundcolor)
1
Widget createTooltip(String text, float xsize, float ysize)

creates a tooltip for the widget

1
Widget configureTooltip(boolean round)
1
Widget configureTooltip(boolean round, float intervall)

configures the tooltip in shape and sets a disappear intervall when mouse not moved
NOTE: to use this method a tooltip had to be created before

1
Widget setTooltipPosition(float x, float y)
1
Widget setTooltipPosition(String position)

sets the tooltip position
NOTE: string can be set to “auto” which will have the widget trying to figure out a good position manually

1
Widget setTooltipSize(float xsize, float ysize)

sets the size of a tooltip
NOTE: unlike a normal widget a tooltip cannot update the rest of the content to fit

1
Widget setTooltipTextsize(float textsize)

sets the textsize of a tooltip
NOTE: unlike a normal widget a tooltip cannot update the rest of the content to fit

1
float[] getTooltipSize()

returns the size of the tooltip

1
float getTooltipTextsize()

returns the textsize of the tooltip

1
float[] getTooltipPosition()

returns the position of the tooltip

1
Widget setTooltiptextoffset(float x, float y)

offsets the text of the tooltip

1
Widget enableTooltip(boolean enable)

enables or disables a tooltip - enabled is default

1
Widget setTextoffset(float x, float y)

offsets the text of the widget

1
boolean over(float x, float y)

returns true when the given coordinates are over the widget and false when they are not

1
Widget setHotkey()

assigns a hotkey to a widget - only works when the hotkey handler is registered
NOTE: letters must be uppercase chars - Processings CONTROL, SHIFT or ALT are also allowed

1
Widget setOutlineWidth(float width)

sets the outline width of a widget
NOTE: does not apply for all widgets