|
CFx SDK Documentation 2026 SP0
|
#include <FxUIWebView.h>
Additional Inherited Members | |
Public Types inherited from CFxUIBaseView | |
| enum | TextAlignment { AlignLeft = 0x0001 , AlignRight = 0x0002 , AlignHCenter = 0x0004 , AlignJustify = 0x0008 , AlignTop = 0x0020 , AlignBottom = 0x0040 , AlignVCenter = 0x0080 , AlignBaseline = 0x0100 , AlignCenter = AlignVCenter | AlignHCenter } |
| enum | FocusPolicyType { eNoFocus = 0 , eTabFocus = 0x1 , eClickFocus = 0x2 , eStrongFocus = eTabFocus | eClickFocus | 0x8 , eWheelFocus = eStrongFocus | 0x4 , eKeyboardOnSetfocus = 0x10 } |
| enum | UIWidthSizePolicy { eExpanding = -1 , eXS = 0 , eS , eM , eL , eXL } |
| enum | UIScrollBarPolicy { eScrollBarAsNeeded = 0 , eScrollBarAlwaysOff , eScrollBarAlwaysOn } |
Static Public Member Functions inherited from CFxUIBaseView | |
| static void | setTabOrder (CFxUIObject *first, CFxUIObject *second) |
Protected Member Functions inherited from CFxUIObject | |
| CFxUIObject * | sender () |
Protected Attributes inherited from CFxUIObject | |
| CFxUIObjectImpl * | m_pImpl |
| CFxUIObjectData * | m_pData |
Class CFxUIWebView
Definition at line 25 of file FxUIWebView.h.
|
explicit |
Constructor
| CFxUIWebView::~CFxUIWebView | ( | ) |
Destructor
| void CFxUIWebView::createWebChannel | ( | CFxUIObject * | object, |
| uint | worldId ) |
create a web channel with this webView.
| CFxUIObject | pointer type and uint for scriptId. |
| CFxUISignal< void(const CFxUIString)> & CFxUIWebView::messagePosted | ( | ) |
messagePosted() is emited when postMessage() is executed which has been defined in scriptSource of the runJavaScript() method.
\sMessage is the message that was sent with postMessage(...).
| void CFxUIWebView::registerWebChannel | ( | const CFxUIString & | IntfName, |
| CFxUIObject * | object ) |
register a web channel with this webView.
| CFxUIString | type name of Interface and CFxUIObject pointer type. |
| void CFxUIWebView::runJavaScript | ( | const CFxUIString & | scriptSource | ) |
Runs the JavaScript code contained in scriptSource
Use "postMessage()" inside the scriptSource string to trigger messagePosted() signal in CFxUIWebView with any message The following example posts the message "clicked" on the JavaScript click event, triggering the messagePosted() signal with the same message.
document.addEventListener("click", function( event ) { postMessage(clicked); }, false);
| void CFxUIWebView::setDefaultUserAgentString | ( | const CFxUIString & | userAgentString, |
| bool | bAppend = false ) |
set the default user string.
| CFxUIString | type userAgentString. |
| bool | type bAppend will append string in front of default string if true, otherwise override default user agent string. |
| void CFxUIWebView::setHtml | ( | const CFxUIString & | html | ) |
Sets the content of the webview to the specified html.
| html | Input |
| void CFxUIWebView::setUrl | ( | const CFxUIString & | url | ) |
Sets the content of the webview to the data available at the specified URL.
| html | Input |