Class: H_ui_button

H_ui_button

UI class for custom buttons.
Handles icon, label, tooltip, and click/keyboard events.
Possible settings for H_ui_button:
- dom_element: HTMLElement or string id (optional, will create a new button if not provided)
- icon: string (CSS class for icon, e.g. 'feather-edit')
- label: string (button text)
- css: string (additional CSS classes)
- tooltip: string (sets the title attribute)
- onclick: function (click handler)
- select_active: boolean (only active if selection is present)
- action: any (custom action value)
- returnclick: boolean (handle Enter key as click)
Used as h.libs.ui_button.

new H_ui_button()

ui.js, line 1559

Methods

on_click(event)

ui.js, line 1644
Handles click events on the button.
Name Type Description
event Event The mouse event.

return_click(event)

ui.js, line 1657
Handles Enter key events for the button.
Name Type Description
event Event The keyboard event.

set_parent(parent_node)

ui.js, line 1631
Sets the parent node for the button.
Name Type Description
parent_node HTMLElement Parent node.