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

com.github.czyzby.lml.parser.LmlStyleSheet Maven / Gradle / Ivy

Go to download

Templates for LibGDX Scene2D UI with HTML-like syntax and FreeMarker-inspired macros.

There is a newer version: 1.9.1.9.6
Show newest version
package com.github.czyzby.lml.parser;

import com.badlogic.gdx.utils.ObjectMap;

/** Contains default values of attribute in tags.
 *
 * @author MJ */
public interface LmlStyleSheet {
    /** @param tag name of the tag. Case might be ignored.
     * @param attribute name of the attribute. Case might be ignored.
     * @return default value for the chosen attribute or null if not set. */
    String getStyle(String tag, String attribute);

    /** @param tag name of the tag. Case might be ignored.
     * @return map of tag's styles or null if none set. */
    ObjectMap getStyles(String tag);

    /** @param tag name of the tag. Case might be ignored.
     * @param attribute name of the attribute. Case might be ignored.
     * @param defaultValue will be the value of the chosen attribute in selected tags if it was not set already. */
    void addStyle(String tag, String attribute, String defaultValue);

    /** @param tag name of the tag. Case might be ignored.
     * @param styles map of default attribute values mapped by their attribute names. Will be added.
     * @see #addStyle(String, String, String) */
    void addStyles(String tag, ObjectMap styles);

    /** @param tag name of the tag. Case might be ignored.
     * @param attribute name of the attribute. Case might be ignored. If any default value is assigned to the attribute,
     *            it will be removed. */
    void removeStyle(String tag, String attribute);

    /** @param tag name of the tag. Case might be ignored. All styles assigned to the tag will be removed. */
    void removeStyles(String tag);

    /** All stored styles will be removed. */
    void clearStyles();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy