All Downloads are FREE. Search and download functionalities are using the official Maven repository.

main.cesium.CreditDisplay.kt Maven / Gradle / Ivy

There is a newer version: 1.90.0-10
Show newest version
// Automatically generated - do not modify!

@file:Suppress(
    "EXTERNAL_CLASS_CONSTRUCTOR_PROPERTY_PARAMETER",
)

package cesium

/**
 * The credit display is responsible for displaying credits on screen.
 * ```
 * var creditDisplay = new CreditDisplay(creditContainer);
 * ```
 * @see Online Documentation
 *
 * @constructor
 * @property [container] The HTML element where credits will be displayed
 * @param [delimiter] The string to separate text credits
 *   Default value - `' • '`
 * @param [viewport] The HTML element that will contain the credits popup
 *   Default value - `document.body`
 * @see Online Documentation
 */
@JsName("\$cesium__CreditDisplay")
external class CreditDisplay(
    var container: org.w3c.dom.HTMLElement,
    delimiter: String? = definedExternally,
    viewport: org.w3c.dom.HTMLElement? = definedExternally,
) {
    /**
     * Adds a credit to the list of current credits to be displayed in the credit container
     * @param [credit] The credit to display
     * @see Online Documentation
     */
    fun addCredit(credit: Credit)

    /**
     * Adds credits that will persist until they are removed
     * @param [credit] The credit to added to defaults
     * @see Online Documentation
     */
    fun addDefaultCredit(credit: Credit)

    /**
     * Removes a default credit
     * @param [credit] The credit to be removed from defaults
     * @see Online Documentation
     */
    fun removeDefaultCredit(credit: Credit)

    /**
     * Updates the credit display before a new frame is rendered.
     * @see Online Documentation
     */
    fun update()

    /**
     * Resets the credit display to a beginning of frame state, clearing out current credits.
     * @see Online Documentation
     */
    fun beginFrame()

    /**
     * Sets the credit display to the end of frame state, displaying credits from the last frame in the credit container.
     * @see Online Documentation
     */
    fun endFrame()

    /**
     * Destroys the resources held by this object.  Destroying an object allows for deterministic
     * release of resources, instead of relying on the garbage collector to destroy this object.
     *
     * Once an object is destroyed, it should not be used; calling any function other than
     * `isDestroyed` will result in a [DeveloperError] exception.  Therefore,
     * assign the return value (`undefined`) to the object as done in the example.
     * @see Online Documentation
     */
    fun destroy()

    /**
     * Returns true if this object was destroyed; otherwise, false.
     * @return `true` if this object was destroyed; otherwise, `false`.
     * @see Online Documentation
     */
    fun isDestroyed(): Boolean

    companion object {
        /**
         * Gets or sets the Cesium logo credit.
         * @see Online Documentation
         */
        var cesiumCredit: Credit
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy