@highlite/core
Version:
HighLite Client Core
52 lines (46 loc) • 1.77 kB
TypeScript
/*!
Copyright (C) 2025 HighLite
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { TooltipConfig } from '../../interfaces/highlite/plugin/TooltipConfig.interface';
export declare enum UIManagerScope {
ClientRelative = 0,
ClientInternal = 1,
ClientOverlay = 2
}
export declare class UIManager {
private static instance;
private itemTooltip;
constructor();
private preventDefault;
bindOnClickBlockHsMask(element: HTMLElement, callback: (e: Event) => void): void;
createElement(scope: UIManagerScope): HTMLElement;
private ensureItemTooltip;
/**
* Draw an item tooltip at the specified coordinates
* @param itemId - The item ID to display tooltip for
* @param x - X coordinate (in pixels)
* @param y - Y coordinate (in pixels)
* @returns Object with hide() method to close the tooltip
*/
drawItemTooltip(itemId: number, x: number, y: number, tooltipConfig?: TooltipConfig): {
hide: () => void;
};
/**
* Hide any currently visible item tooltip
*/
hideItemTooltip(): void;
/**
* Get the currently displayed item tooltip ID
*/
getCurrentItemTooltipId(): number | null;
}