PCL
WebView Event Handlers

Typedefs

using pcl::WebView::content_event_handler = void(Control::*)(WebView &sender, const String &content)
 
using pcl::WebView::progress_event_handler = void(Control::*)(WebView &sender, int loadPercent)
 
using pcl::WebView::result_event_handler = void(Control::*)(WebView &sender, const Variant &result)
 
using pcl::WebView::state_event_handler = void(Control::*)(WebView &sender, bool state)
 
using pcl::WebView::view_event_handler = void(Control::*)(WebView &sender)
 

Functions

void pcl::WebView::OnHTMLAvailable (content_event_handler handler, Control &receiver)
 
void pcl::WebView::OnLoadFinished (state_event_handler handler, Control &receiver)
 
void pcl::WebView::OnLoadProgress (progress_event_handler handler, Control &receiver)
 
void pcl::WebView::OnLoadStarted (view_event_handler handler, Control &receiver)
 
void pcl::WebView::OnPlainTextAvailable (content_event_handler handler, Control &receiver)
 
void pcl::WebView::OnScriptResultAvailable (result_event_handler handler, Control &receiver)
 
void pcl::WebView::OnSelectionUpdated (view_event_handler handler, Control &receiver)
 

Detailed Description

Typedef Documentation

◆ content_event_handler

using pcl::WebView::content_event_handler = void (Control::*)( WebView& sender, const String& content )

Defines the prototype of a content event handler.

A content event is generated after a call to RequestPlainText() or RequestHTML(), when the requested content is available to the caller.

Parameters
senderThe control that sends a content event.
contentThe requested content (HTML or plain text) encoded in UTF-16.

Definition at line 391 of file WebView.h.

◆ progress_event_handler

using pcl::WebView::progress_event_handler = void (Control::*)( WebView& sender, int loadPercent )

Defines the prototype of a progress event handler.

A progress event is generated while the WebView object is loading contents, to inform on the amount of data already loaded.

Parameters
senderThe control that sends a progress event.
loadPercentThe percentage of content loaded. Should be in the range [0,100].

Definition at line 362 of file WebView.h.

◆ result_event_handler

using pcl::WebView::result_event_handler = void (Control::*)( WebView& sender, const Variant& result )

Defines the prototype of a result event handler.

A result event is generated after a call to EvaluateScript(), when the script has finished execution.

Parameters
senderThe control that sends a result event.
resultThe result value of the executed script. The result value is the value of the last executed expression statement in the script that is not in a function definition.

Definition at line 408 of file WebView.h.

◆ state_event_handler

using pcl::WebView::state_event_handler = void (Control::*)( WebView& sender, bool state )

Defines the prototype of a state event handler.

A state event is generated when the value of a Boolean WebView property has changed.

Parameters
senderThe control that sends a state event.
stateThe current value of the Boolean property.

Definition at line 376 of file WebView.h.

◆ view_event_handler

using pcl::WebView::view_event_handler = void (Control::*)( WebView& sender )

Defines the prototype of a web view event handler.

A web view event is generated when a WebView instance changes its state or contents, or the value of one of its properties, either programmatically or because of user interaction.

Parameters
senderThe control that sends a web view event.

Definition at line 347 of file WebView.h.

Function Documentation

◆ OnHTMLAvailable()

void pcl::WebView::OnHTMLAvailable ( content_event_handler  handler,
Control receiver 
)

Sets the handler for HTML content available events generated by this WebView object. These events are generated asynchronously after a call to RequestHTML(), when the requested content is available to the caller.

Parameters
handlerThe event handler. Must be a member function of the receiver object's class.
receiverThe control that will receive HTML content available events from this WebView.

◆ OnLoadFinished()

void pcl::WebView::OnLoadFinished ( state_event_handler  handler,
Control receiver 
)

Sets the handler for load finished events generated by this WebView object. A load finished event is generated when the WebView finishes loading new content, after a call to SetContent().

Parameters
handlerThe event handler. Must be a member function of the receiver object's class. The handler will receive a Boolean value true if the loading process was completed successfully, false in the event of error.
receiverThe control that will receive load finished events from this WebView.

◆ OnLoadProgress()

void pcl::WebView::OnLoadProgress ( progress_event_handler  handler,
Control receiver 
)

Sets the handler for progress events generated by this WebView object. A progress event is generated while the WebView is loading new content, after a call to SetContent(), to inform on the amount of data already loaded.

Parameters
handlerThe event handler. Must be a member function of the receiver object's class.
receiverThe control that will receive progress events from this WebView.

◆ OnLoadStarted()

void pcl::WebView::OnLoadStarted ( view_event_handler  handler,
Control receiver 
)

Sets the handler for load started events generated by this WebView object. A load started event is generated when the WebView starts loading new content, after a call to SetContent().

Parameters
handlerThe event handler. Must be a member function of the receiver object's class.
receiverThe control that will receive load started events from this WebView.

◆ OnPlainTextAvailable()

void pcl::WebView::OnPlainTextAvailable ( content_event_handler  handler,
Control receiver 
)

Sets the handler for plain text content available events generated by this WebView object. These events are generated asynchronously after a call to RequestPlainText(), when the requested content is available to the caller.

Parameters
handlerThe event handler. Must be a member function of the receiver object's class.
receiverThe control that will receive plain text content available events from this WebView.

◆ OnScriptResultAvailable()

void pcl::WebView::OnScriptResultAvailable ( result_event_handler  handler,
Control receiver 
)

Sets the handler for script result available events generated by this WebView object. These events are generated asynchronously after a call to EvaluateScript(), when the script has finished execution and its result value is available to the caller.

Parameters
handlerThe event handler. Must be a member function of the receiver object's class.
receiverThe control that will receive script result available events from this WebView.

◆ OnSelectionUpdated()

void pcl::WebView::OnSelectionUpdated ( view_event_handler  handler,
Control receiver 
)

Sets the handler for selection updated events generated by this WebView object. A selection updated event is generated each time the text selection is changed in this WebView as a result of a direct user interaction.

Parameters
handlerThe event handler. Must be a member function of the receiver object's class.
receiverThe control that will receive selection updated events from this WebView.