Enum sciter::dom::event::BEHAVIOR_EVENTS
[−]
[src]
#[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, HYPERLINK_CLICK, 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, REQUEST_TOOLTIP, 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, 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
HYPERLINK_CLICK
hyperlink click
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,
REQUEST_TOOLTIP
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:
- Handle and consume this
VIDEO_BIND_RQ
request - You will receive second
VIDEO_BIND_RQ
request/event for the same<video>
element but this time with thereason
field set to an instance ofsciter::video_destination
interface. add_ref()
it and store it for example in worker thread producing video frames.- call
sciter::video_destination::start_streaming(...)
providing needed parameters callsciter::video_destination::render_frame(...)
as soon as they are available callsciter::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
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 Copy for BEHAVIOR_EVENTS
[src]
impl Clone for BEHAVIOR_EVENTS
[src]
fn clone(&self) -> BEHAVIOR_EVENTS
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for BEHAVIOR_EVENTS
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialOrd for BEHAVIOR_EVENTS
[src]
fn partial_cmp(&self, __arg_0: &BEHAVIOR_EVENTS) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more