Program
Represents a program interface that combines input event handling, extension hosting, and clock functionalities. It provides common properties and methods for managing the lifecycle of a program, drawing operations, and asset management.
Inheritors
Properties
Represents the clipboard functionality for the application.
Event that is triggered when the program ends.
A mutable list of extensions associated with the host. Extensions allow adding custom behavior or extending the functionality of the framework at various lifecycle stages such as setup, before draw, and after draw.
An event triggered when assets need to be produced or generated.
An event triggered when there is a request for assets to be accessed or provided.
A map that can be used to store arbitrary data, including functions
Functions
The draw
method is responsible for rendering the current state of the program. This method is called automatically for each frame during the runtime of the program. It serves as the main function to perform all visual updates, including drawing shapes, updating visuals, and handling animations based on the current state.
Create an image ColorBuffer by drawing it
Adds an extension to the host and returns the extension instance. The extension allows customization or extension of the host's functionality at various lifecycle stages such as setup, before draw, and after draw.
Adds an extension to the host and applies a configuration block to it. This method allows customization or extension of the host's functionality by invoking a user-defined configuration on the provided extension.
Adds an extension to the program that executes a user-defined block of code at a specified extension stage. The execution stage can be SETUP
, BEFORE_DRAW
, or AFTER_DRAW
. This method prevents nesting of extend
calls.
Generates a timestamped name for the program, optionally including a file extension and path.