MLightCAD
    Preparing search index...

    Type definition for all events that can be emitted through the global event bus.

    This type maps event names to their corresponding payload types, providing type safety for event emission and listening throughout the application.

    • File Operations: open-file, open-file-progress, failed-to-open-file, cache-font, font-file-selected
    • Palette Control: close-layer-manager
    • Font Management: fonts-not-loaded, failed-to-get-avaiable-fonts, font-not-found
    • Missing Resources: missed-data-changed
    • User Messages: message
    type AcEdEvents = {
        "cache-font": {};
        "close-layer-manager": {};
        "failed-to-get-avaiable-fonts": { url: string };
        "failed-to-open-file": { fileName: string };
        "font-file-selected": { file?: File };
        "font-not-found": { count: number; fontName: string };
        "fonts-not-found": { fonts: string[] };
        "fonts-not-loaded": { fonts: AcEdFontNotLoadedInfo[] };
        message: { message: string; type: AcEdMessageType };
        "missed-data-changed": {};
        "open-file": {};
        "open-file-progress": AcDbProgressdEventArgs;
    }
    Index

    Properties

    "cache-font": {}

    Emitted to request opening a font file dialog for IndexedDB caching

    "close-layer-manager": {}

    Emitted to request closing the layer properties manager

    "failed-to-get-avaiable-fonts": { url: string }

    Emitted when the available fonts list cannot be retrieved

    Type Declaration

    • url: string

      URL where the fonts list was attempted to be retrieved from

    "failed-to-open-file": { fileName: string }

    Emitted when a file fails to open

    Type Declaration

    • fileName: string

      Name/path of the file that failed to open

    "font-file-selected": { file?: File }

    Emitted when the user selects a font file in the cache-font dialog

    "font-not-found": { count: number; fontName: string }

    Emitted when a required font is not found

    Type Declaration

    • count: number

      Number of entities that require this font

    • fontName: string

      Name of the missing font

    "fonts-not-found": { fonts: string[] }

    Emitted when some fonts can not be found in font repository

    "fonts-not-loaded": { fonts: AcEdFontNotLoadedInfo[] }

    Emitted when some fonts fails to load

    message: { message: string; type: AcEdMessageType }

    Emitted to display a message to the user

    Type Declaration

    • message: string

      The message text to display

    • type: AcEdMessageType

      The severity/type of the message

    "missed-data-changed": {}

    Emitted after missing resource caches change and UI state should refresh

    "open-file": {}

    Emitted to request opening a file dialog

    "open-file-progress": AcDbProgressdEventArgs

    Emitted during file opening to report progress