sesaparcours
    Preparing search index...

    Fake class which should be extended to avoid inheriting static properties

    Hierarchy (View Summary)

    Index

    Constructors

    • Class for a theme.

      Parameters

      • name: string

        Theme name.

      • Optionalopt_blockStyles: { [key: string]: BlockStyle }

        A map from style names (strings) to objects with style attributes for blocks.

      • Optionalopt_categoryStyles: { [key: string]: CategoryStyle }

        A map from style names (strings) to objects with style attributes for categories.

      • Optionalopt_componentStyles: ComponentStyle

        A map of Blockly component names to style value.

      Returns Blockly.Theme

    Properties

    blockStyles: { [key: string]: BlockStyle }

    The block styles map.

    categoryStyles: { [key: string]: CategoryStyle }

    The category styles map.

    componentStyles: ComponentStyle

    The UI components styles map.

    fontStyle: FontStyle

    The font style.

    name: string

    The theme name. This can be used to reference a specific theme in CSS.

    startHats: boolean

    Whether or not to add a 'hat' on top of all blocks with no previous or output connections.

    Methods

    • Gets the class name that identifies this theme.

      Returns string

      The CSS class name.

    • Gets the style for a given Blockly UI component. If the style value is a string, we attempt to find the value of any named references.

      Parameters

      • componentName: string

        The name of the component.

      Returns string

      The style value.

    • Overrides or adds a style to the blockStyles map.

      Parameters

      • blockStyleName: string

        The name of the block style.

      • blockStyle: BlockStyle

        The block style.

      Returns void

    • Overrides or adds a style to the categoryStyles map.

      Parameters

      • categoryStyleName: string

        The name of the category style.

      • categoryStyle: CategoryStyle

        The category style.

      Returns void

    • Configure a specific Blockly UI component with a style value.

      Parameters

      • componentName: string

        The name of the component.

      • styleValue: any

        The style value.

      Returns void

    • Configure a theme's font style.

      Parameters

      Returns void

    • Configure a theme's start hats.

      Parameters

      • startHats: boolean

        True if the theme enables start hats, false otherwise.

      Returns void