[][src]Enum sciter::dom::event::BEHAVIOR_EVENTS

#[repr(C)]
pub enum BEHAVIOR_EVENTS {
    BUTTON_CLICK,
    BUTTON_PRESS,
    BUTTON_STATE_CHANGED,
    EDIT_VALUE_CHANGING,
    EDIT_VALUE_CHANGED,
    SELECT_SELECTION_CHANGED,
    SELECT_STATE_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,
    FIRST_APPLICATION_EVENT_CODE,
}

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> changed

SELECT_STATE_CHANGED

node in select expanded/collapsed, heTarget is the node

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 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.

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

impl Clone for BEHAVIOR_EVENTS[src]

impl Copy for BEHAVIOR_EVENTS[src]

impl Debug for BEHAVIOR_EVENTS[src]

impl PartialEq<BEHAVIOR_EVENTS> for BEHAVIOR_EVENTS[src]

impl PartialOrd<BEHAVIOR_EVENTS> for BEHAVIOR_EVENTS[src]

impl StructuralPartialEq for BEHAVIOR_EVENTS[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.