logo
#[repr(C)]
pub enum BEHAVIOR_EVENTS {
Show 57 variants BUTTON_CLICK, BUTTON_PRESS, BUTTON_STATE_CHANGED, EDIT_VALUE_CHANGING, EDIT_VALUE_CHANGED, SELECT_SELECTION_CHANGED, SELECT_VALUE_CHANGED, POPUP_REQUEST, POPUP_READY, POPUP_DISMISSED, MENU_ITEM_ACTIVE, MENU_ITEM_CLICK, CONTEXT_MENU_REQUEST, VISIUAL_STATUS_CHANGED, DISABLED_STATUS_CHANGED, POPUP_DISMISSING, CONTENT_CHANGED, CLICK, CHANGE, MEDIA_CHANGED, INPUT_LANGUAGE_CHANGED, CONTENT_MODIFIED, READONLY_STATUS_CHANGED, ARIA_LIVE_AREA_CHANGED, HYPERLINK_CLICK, PASTE_TEXT, PASTE_HTML, ELEMENT_COLLAPSED, ELEMENT_EXPANDED, ACTIVATE_CHILD, UI_STATE_CHANGED, FORM_SUBMIT, FORM_RESET, DOCUMENT_COMPLETE, HISTORY_PUSH, HISTORY_DROP, HISTORY_PRIOR, HISTORY_NEXT, HISTORY_STATE_CHANGED, CLOSE_POPUP, TOOLTIP_REQUEST, ANIMATION, DOCUMENT_CREATED, DOCUMENT_CLOSE_REQUEST, DOCUMENT_CLOSE, DOCUMENT_READY, DOCUMENT_PARSED, VIDEO_INITIALIZED, VIDEO_STARTED, VIDEO_STOPPED, VIDEO_BIND_RQ, PAGINATION_STARTS, PAGINATION_PAGE, PAGINATION_ENDS, CUSTOM, MOUNT_COMPONENT, FIRST_APPLICATION_EVENT_CODE,
}
Expand description

Behavior event codes.

Variants

BUTTON_CLICK

click on button

BUTTON_PRESS

mouse down or key down in button

BUTTON_STATE_CHANGED

checkbox/radio/slider changed its state/value

EDIT_VALUE_CHANGING

before text change

EDIT_VALUE_CHANGED

after text change

SELECT_SELECTION_CHANGED

selection in <select> is changed

SELECT_VALUE_CHANGED

value of <select> is changed

POPUP_REQUEST

request to show popup just received, here DOM of popup element can be modifed.

POPUP_READY

popup element has been measured and ready to be shown on screen, here you can use functions like ScrollToView.

POPUP_DISMISSED

popup element is closed, here DOM of popup element can be modifed again - e.g. some items can be removed to free memory.

MENU_ITEM_ACTIVE

menu item activated by mouse hover or by keyboard,

MENU_ITEM_CLICK

menu item click, BEHAVIOR_EVENT_PARAMS structure layout BEHAVIOR_EVENT_PARAMS.cmd - MENU_ITEM_CLICK/MENU_ITEM_ACTIVE BEHAVIOR_EVENT_PARAMS.heTarget - owner(anchor) of the menu BEHAVIOR_EVENT_PARAMS.he - the menu item, presumably <li> element BEHAVIOR_EVENT_PARAMS.reason - BY_MOUSE_CLICK | BY_KEY_CLICK

CONTEXT_MENU_REQUEST

“right-click”, BEHAVIOR_EVENT_PARAMS::he is current popup menu HELEMENT being processed or NULL. application can provide its own HELEMENT here (if it is NULL) or modify current menu element.

VISIUAL_STATUS_CHANGED

broadcast notification, sent to all elements of some container being shown or hidden

DISABLED_STATUS_CHANGED

broadcast notification, sent to all elements of some container that got new value of :disabled state

POPUP_DISMISSING

popup is about to be closed

CONTENT_CHANGED

content has been changed, is posted to the element that gets content changed, reason is combination of CONTENT_CHANGE_BITS. target == NULL means the window got new document and this event is dispatched only to the window.

CLICK

generic click

CHANGE

generic change

MEDIA_CHANGED

media changed (screen resolution, number of displays, etc.)

INPUT_LANGUAGE_CHANGED

input language has changed, data is iso lang-country string

CONTENT_MODIFIED

editable content has changed

READONLY_STATUS_CHANGED

a broadcast notification being posted to all elements of some container that changes its :read-only state.

ARIA_LIVE_AREA_CHANGED

change in aria-live="polite|assertive"

hyperlink click

PASTE_TEXT

PASTE_HTML

ELEMENT_COLLAPSED

element was collapsed, so far only behavior:tabs is sending these two to the panels

ELEMENT_EXPANDED

element was expanded,

ACTIVATE_CHILD

activate (select) child, used, for example, by accesskeys behaviors to send activation request, e.g. tab on behavior:tabs.

UI_STATE_CHANGED

ui state changed, observers shall update their visual states. is sent, for example, by behavior:richtext when caret position/selection has changed.

FORM_SUBMIT

behavior:form detected submission event. BEHAVIOR_EVENT_PARAMS::data field contains data to be posted. BEHAVIOR_EVENT_PARAMS::data is of type T_MAP in this case key/value pairs of data that is about to be submitted. You can modify the data or discard submission by returning true from the handler.

FORM_RESET

behavior:form detected reset event (from button type=reset). BEHAVIOR_EVENT_PARAMS::data field contains data to be reset. BEHAVIOR_EVENT_PARAMS::data is of type T_MAP in this case key/value pairs of data that is about to be rest. You can modify the data or discard reset by returning true from the handler.

DOCUMENT_COMPLETE

document in behavior:frame or root document is complete.

HISTORY_PUSH

requests to behavior:history (commands)

HISTORY_DROP

HISTORY_PRIOR

HISTORY_NEXT

HISTORY_STATE_CHANGED

behavior:history notification - history stack has changed

CLOSE_POPUP

close popup request,

TOOLTIP_REQUEST

request tooltip, evt.source <- is the tooltip element.

ANIMATION

animation started (reason=1) or ended(reason=0) on the element.

DOCUMENT_CREATED

document created, script namespace initialized. target -> the document

DOCUMENT_CLOSE_REQUEST

document is about to be closed, to cancel closing do: evt.data = sciter::Value("cancel");

DOCUMENT_CLOSE

last notification before document removal from the DOM

DOCUMENT_READY

document has got DOM structure, styles and behaviors of DOM elements. Script loading run is complete at this moment.

DOCUMENT_PARSED

document just finished parsing - has got DOM structure. This event is generated before the DOCUMENT_READY. Since 4.0.3.

VIDEO_INITIALIZED

<video> “ready” notification

VIDEO_STARTED

<video> playback started notification

VIDEO_STOPPED

<video> playback stoped/paused notification

VIDEO_BIND_RQ

<video> request for frame source binding, If you want to provide your own video frames source for the given target <video> element do the following:

  1. Handle and consume this VIDEO_BIND_RQ request
  2. You will receive second VIDEO_BIND_RQ request/event for the same <video> element but this time with the reason field set to an instance of sciter::video_destination interface.
  3. add_ref() it and store it, for example, in a worker thread producing video frames.
  4. call sciter::video_destination::start_streaming(...) providing needed parameters call sciter::video_destination::render_frame(...) as soon as they are available call sciter::video_destination::stop_streaming() to stop the rendering (a.k.a. end of movie reached)

PAGINATION_STARTS

behavior:pager starts pagination

PAGINATION_PAGE

behavior:pager paginated page no, reason -> page no

PAGINATION_ENDS

behavior:pager end pagination, reason -> total pages

CUSTOM

event with custom name. Since 4.2.8.

MOUNT_COMPONENT

SSX, delayed mount_component

FIRST_APPLICATION_EVENT_CODE

all custom event codes shall be greater than this number. All codes below this will be used solely by application - Sciter will not intrepret it and will do just dispatching. To send event notifications with these codes use SciterSend/PostEvent API.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.