Utility to open a web view from within the application. This is in contrast to a CYIWebBrowserBridge which can be used to open a web page in another process.
This bridge is available on all mobile platforms.
A simple example of the usage of CYIWebViewBridge which delays the display of the web view until the content is loaded so as to avoid displaying an empty screen while the content loads.
#include <deprecated/YiWebViewBridge.h>
Public Types | |
| enum | RESOURCE_TYPE { WEB_VIEW_HTTP_URL, WEB_VIEW_FILE_URL, WEB_VIEW_HTML_DOC } |
| enum | WEBVIEW_EVENT { WEB_VIEW_LOAD_STARTED, WEB_VIEW_LOAD_FINISHED, WEB_VIEW_LOAD_ERROR, WEB_VIEW_DISMISSED } |
Public Member Functions | |
| CYIWebViewBridge () | |
| virtual | ~CYIWebViewBridge () |
| virtual bool | StartWebView ()=0 |
| virtual void | StopWebView ()=0 |
| virtual void | ShowWebView ()=0 |
| virtual void | HideWebView ()=0 |
| virtual void | ClearCachedData ()=0 |
| virtual void | SetResource (const CYIString &rResource, RESOURCE_TYPE eResourceType)=0 |
| virtual const CYIString & | GetResource () const =0 |
| virtual RESOURCE_TYPE | GetResourceType () const =0 |
| virtual void | SetTitle (const CYIString &rTitle)=0 |
| virtual const CYIString & | GetTitle () const =0 |
| virtual const CYIString & | GetLastRequestUrl () const =0 |
| virtual void | SetDisplayWebView (bool bDisplayWebView)=0 |
| virtual bool | ShouldDisplayWebView () const =0 |
| virtual void | SetDisplayNavigationBar (bool bDisplayNavigationBar)=0 |
| virtual bool | ShouldDisplayNavigationBar () const =0 |
| virtual void | SetNavigationBarBackButtonText (const CYIString &text)=0 |
| virtual const CYIString & | GetNavigationBarBackButtonText () const =0 |
| virtual void | Authenticate (const CYIString &rUserName, const CYIString &rPassword)=0 |
| virtual void | CancelAuthentication ()=0 |
Public Attributes | |
| CYISignal< const CYIString &, const CYIString & > | AuthenticationRequired |
| CYISignal< const CYIString & > | WebViewLoadStarted |
| CYISignal< const CYIString & > | WebViewLoadFinished |
| CYISignal< const CYIString & > | WebViewLoadError |
| CYISignal | WebViewDismissed |
|
inline |
|
inlinevirtual |
|
pure virtual |
Authenticates with a rUserName and a rPassword. Call after receiving a CYIWebViewBridge::AuthenticationRequired signal.
|
pure virtual |
Cancels the authentication and releases resources being used for the authentication. Call after receiving a CYIWebViewBridge::AuthenticationRequired signal to cancel the authentication.
|
pure virtual |
Clear any cached data and cookies associated with this web view
|
pure virtual |
Returns the last URL requested by this web view.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Hides the web view. The web view should already be started.
|
pure virtual |
Optionally display a navigation bar on top of the web view. Not supported on all platforms.
|
pure virtual |
Toggles the display of the web view. This allows a client to use a web view for communicating with a web API without actually displaying the web view, for instance if no user interaction is required. The default value is true.
|
pure virtual |
Set the text to display on the back button of the navigation bar. Not supported on all platforms. If left unchanged, the default text is "Back".
|
pure virtual |
Sets the rResource and the eResourceType.
|
pure virtual |
Sets the rTitle on the web view, if applicable.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Shows the web view. The web view should already be started.
|
pure virtual |
Starts the web view with the configured settings.
|
pure virtual |
Ends the web view.
| CYISignal<const CYIString & , const CYIString & > yi::deprecated::CYIWebViewBridge::AuthenticationRequired |
Fired when the resource being loaded requires authentication to view. Users should respond to this signal by calling either Authenticate() or CancelAuthentication().
| CYISignal yi::deprecated::CYIWebViewBridge::WebViewDismissed |
Fired when the web view has been dimissed
Fired when the web view has encountered an error while laoding the specified resource
Fired when the web view has finished loading the specified resource
Fired when the web view begins loading the specified resource