AppEasy Core SDK
1.5.0
Cross platform mobile and desktop app and game development SDK - The easy way to make apps
|
#include <CzUIWebView.h>
Public Member Functions | |
void | setURI (const char *uri) |
bool | setProperty (unsigned int property_name, const CzXomlProperty &data, bool delta) |
Sets the named property of the UIWebView. | |
bool | setProperty (unsigned int property_name, const CzString &data, bool delta) |
Sets the named property of the actor. | |
bool | getProperty (unsigned int property_name, CzXomlProperty &prop) |
Gets the named property of the actor. | |
void | setHtml (const char *html) |
void | sendJavascript (const char *js) |
bool | isModal () const |
const CzString & | getCurrentURI () const |
const CzString & | getJavascript () const |
void | setPageLoadedHandler (CzCallback handler, CzCallbackData data) |
void | setPageLoadingHandler (CzCallback handler, CzCallbackData data) |
void | setPageErrorHandler (CzCallback handler, CzCallbackData data) |
void | setJavascriptHandler (CzCallback handler, CzCallbackData data) |
CzUIWebView () | |
virtual | ~CzUIWebView () |
bool | InitView (bool modal, bool transparent, const char *java_script) |
bool | UpdateVisual () |
Updates the actors visual. | |
void | UpdatePosSize () |
int | LoadFromXoml (IzXomlResource *parent, bool load_children, CzXmlNode *node) |
Creates an instance of this class from XML. | |
bool | UpdateFromAnimation (CzAnimInstance *animation) |
Updates actor property from supplied animation. | |
void | NotifyPageLoaded (const char *url) |
void | NotifyPageLoading (const char *url) |
void | NotifyPageError (const char *url) |
void | NotifyJavascript (const char *data) |
void | NotifyOrientationChange (CzScene::eOrientation old_orientation, CzScene::eOrientation new_orientation) |
Handles the orientation change event. | |
Static Public Member Functions | |
static void | InitClass () |
Initialises the class. | |
static void | ReleaseClass () |
static bool | _setURI (IzXomlResource *target, const CzXomlProperty &prop, bool add) |
static CzXomlProperty | _getJavascript (IzXomlResource *target) |
static bool | _setJavaScript (IzXomlResource *target, const CzXomlProperty &prop, bool add) |
static bool | _setHtml (IzXomlResource *target, const CzXomlProperty &prop, bool add) |
static CzXomlProperty | _getModal (IzXomlResource *target) |
static CzXomlProperty | _getCurrentURI (IzXomlResource *target) |
static bool | _setOnPageLoaded (IzXomlResource *target, const CzXomlProperty &prop, bool add) |
static bool | _setOnPageLoading (IzXomlResource *target, const CzXomlProperty &prop, bool add) |
static bool | _setOnPageError (IzXomlResource *target, const CzXomlProperty &prop, bool add) |
static bool | _setOnJavascript (IzXomlResource *target, const CzXomlProperty &prop, bool add) |
Protected Member Functions | |
bool | UpdateBinding (unsigned int property_name, CzXomlVariable *var) |
Updates an actor property from the supplied XOML variable. | |
Protected Attributes | |
CzString | URI |
CzString | CurrentURI |
CzString | Javascript |
CzWebView | WebView |
bool | Modal |
CzString | TempFilename |
bool | PrevVisible |
CzVec2 | OldPosition |
CzVec2 | OldSize |
CzCallback | PageLoadedHandler |
CzCallbackData | PageLoadedHandlerData |
CzCallback | PageLoadingHandler |
CzCallbackData | PageLoadingHandlerData |
CzCallback | PageErrorHandler |
CzCallbackData | PageErrorHandlerData |
CzCallback | JavascriptHandler |
CzCallbackData | JavascriptHandlerData |
Static Protected Attributes | |
static CzXomlClassDef * | WebViewClassDef = NULL |
CzUIWebView::CzUIWebView | ( | ) | [inline] |
CzUIWebView::~CzUIWebView | ( | ) | [virtual] |
CzXomlProperty CzUIWebView::_getCurrentURI | ( | IzXomlResource * | target | ) | [static] |
CzXomlProperty CzUIWebView::_getJavascript | ( | IzXomlResource * | target | ) | [static] |
CzXomlProperty CzUIWebView::_getModal | ( | IzXomlResource * | target | ) | [static] |
bool CzUIWebView::_setHtml | ( | IzXomlResource * | target, |
const CzXomlProperty & | prop, | ||
bool | add | ||
) | [static] |
bool CzUIWebView::_setJavaScript | ( | IzXomlResource * | target, |
const CzXomlProperty & | prop, | ||
bool | add | ||
) | [static] |
bool CzUIWebView::_setOnJavascript | ( | IzXomlResource * | target, |
const CzXomlProperty & | prop, | ||
bool | add | ||
) | [static] |
bool CzUIWebView::_setOnPageError | ( | IzXomlResource * | target, |
const CzXomlProperty & | prop, | ||
bool | add | ||
) | [static] |
bool CzUIWebView::_setOnPageLoaded | ( | IzXomlResource * | target, |
const CzXomlProperty & | prop, | ||
bool | add | ||
) | [static] |
bool CzUIWebView::_setOnPageLoading | ( | IzXomlResource * | target, |
const CzXomlProperty & | prop, | ||
bool | add | ||
) | [static] |
bool CzUIWebView::_setURI | ( | IzXomlResource * | target, |
const CzXomlProperty & | prop, | ||
bool | add | ||
) | [static] |
const CzString& CzUIWebView::getCurrentURI | ( | ) | const [inline] |
const CzString& CzUIWebView::getJavascript | ( | ) | const [inline] |
bool CzUIWebView::getProperty | ( | unsigned int | property_name, |
CzXomlProperty & | prop | ||
) | [virtual] |
Gets the named property of the actor.
Returns the named property of the actor. The properties value is returned in a CzXomlProperty which is a structure that contains a union of all possible property types. Note that as CzUIWebView is derived from CzUIBase, all CzUIBase properties will also be checked against.
property_name | Name of the property. | |
[out] | prop | The property data that. |
Reimplemented from CzUIBase.
void CzUIWebView::InitClass | ( | ) | [static] |
Initialises the class.
Sets up the classes avaiiable properties. Used by the XOML system to find, set amd get class properties.
Reimplemented from CzUIBase.
bool CzUIWebView::InitView | ( | bool | modal, |
bool | transparent, | ||
const char * | java_script | ||
) |
bool CzUIWebView::isModal | ( | ) | const [inline] |
int CzUIWebView::LoadFromXoml | ( | IzXomlResource * | parent, |
bool | load_children, | ||
CzXmlNode * | node | ||
) | [virtual] |
Creates an instance of this class from XML.
LoadFromXoml is the main method used by all classes that can be instantiated from XOML mark-up. This method creates an instance of this class from the supplied XML node structure specified by node. if parent is not NULL then the created instance will utilise the supplied parent to determine where it should live within the app. For example, if the parent is a scene then the actor will be placed in that scene. if the parent is another actor then this actor will be placed into the scene of the supplied actor and linked as a child to the parent actor. If load_chlldren is true then any child nodes contained within the actor will also be loaded. Note that as CzUIBase is derived from CzActorImage, CzActorImage::LoadFromXoml() will also be called to load CzActor specific properties.
[in] | parent | If non-null, the parent. |
load_children | true to load child nodes. | |
[in] | node | If non-null, the XOML markup node that defines this object |
Reimplemented from CzUIBase.
void CzUIWebView::NotifyJavascript | ( | const char * | data | ) |
void CzUIWebView::NotifyOrientationChange | ( | CzScene::eOrientation | old_orientation, |
CzScene::eOrientation | new_orientation | ||
) | [virtual] |
Handles the orientation change event.
When a screen orientation or size change occurs all actors will receive this event emabling them to modify themselves to take advantage of the new screen orientation / size. the default implementation for CzActorImage updates margin and visual sizes if they are precentage based. It also calls CzActor::NotifyOrientationChange() to update the position.
old_orientation | The old orientation. |
new_orientation | The new orientation. |
Reimplemented from CzUIBase.
void CzUIWebView::NotifyPageError | ( | const char * | url | ) |
void CzUIWebView::NotifyPageLoaded | ( | const char * | url | ) |
void CzUIWebView::NotifyPageLoading | ( | const char * | url | ) |
void CzUIWebView::ReleaseClass | ( | ) | [static] |
Reimplemented from CzUIBase.
void CzUIWebView::sendJavascript | ( | const char * | js | ) |
void CzUIWebView::setHtml | ( | const char * | html | ) |
void CzUIWebView::setJavascriptHandler | ( | CzCallback | handler, |
CzCallbackData | data | ||
) | [inline] |
void CzUIWebView::setPageErrorHandler | ( | CzCallback | handler, |
CzCallbackData | data | ||
) | [inline] |
void CzUIWebView::setPageLoadedHandler | ( | CzCallback | handler, |
CzCallbackData | data | ||
) | [inline] |
void CzUIWebView::setPageLoadingHandler | ( | CzCallback | handler, |
CzCallbackData | data | ||
) | [inline] |
bool CzUIWebView::setProperty | ( | unsigned int | property_name, |
const CzXomlProperty & | data, | ||
bool | delta | ||
) | [virtual] |
Sets the named property of the UIWebView.
Sets the named property of this UIWebView. The properties value supplied will be converted. If delta is set to true then the existing value of the property will be added to instead of replaced.
property_name | Name of the property as a string hash (faster searching). | |
[in] | data | The property data. |
delta | true if property should be added to instead of replaced. |
Reimplemented from CzUIBase.
bool CzUIWebView::setProperty | ( | unsigned int | property_name, |
const CzString & | data, | ||
bool | delta | ||
) | [virtual] |
Sets the named property of the actor.
Sets the named property of this actor. The properties value (data) is supplied as a string and will be converted. If delta is set to true then the existing value of the property will be added to instead of replaced. Note that as CzUIWebView is derived from CzUIBase, all CzUIBase properties will also be checked against.
property_name | Name of the property as a string hash (faster searching). | |
[in] | data | The property data. |
delta | true to property should be added to instead of replaced. |
Reimplemented from CzUIBase.
void CzUIWebView::setURI | ( | const char * | uri | ) |
bool CzUIWebView::UpdateBinding | ( | unsigned int | property_name, |
CzXomlVariable * | var | ||
) | [protected, virtual] |
Updates an actor property from the supplied XOML variable.
Updates a single property from the value of the bound XOML variable. Note that as CzUIWebView is derived from CzUIBase, all CzUIBase properties will also be checked against.
property_name | Name of the property. | |
[in,out] | var | If non-null, the variable. |
Reimplemented from CzUIBase.
bool CzUIWebView::UpdateFromAnimation | ( | CzAnimInstance * | animation | ) | [virtual] |
Updates actor property from supplied animation.
Updates the actors property that is specified by the supplied animation. When a timeline animation targets the property of an actor this method will be called by the animation to move the animations frame data into its target property. Note that as CzUIWebView is derived from CzUIBase, all CzUIBase properties will also be checked against.
[in] | animation | If non-null, the animation. |
Reimplemented from CzUIBase.
void CzUIWebView::UpdatePosSize | ( | ) |
bool CzUIWebView::UpdateVisual | ( | ) | [virtual] |
Updates the actors visual.
Transfers visual data from the actor to the visual such as position, angle, scale, colour etc..
Reimplemented from CzActorImage.
CzString CzUIWebView::CurrentURI [protected] |
CzString CzUIWebView::Javascript [protected] |
CzCallback CzUIWebView::JavascriptHandler [protected] |
CzCallbackData CzUIWebView::JavascriptHandlerData [protected] |
bool CzUIWebView::Modal [protected] |
CzVec2 CzUIWebView::OldPosition [protected] |
CzVec2 CzUIWebView::OldSize [protected] |
CzCallback CzUIWebView::PageErrorHandler [protected] |
CzCallbackData CzUIWebView::PageErrorHandlerData [protected] |
CzCallback CzUIWebView::PageLoadedHandler [protected] |
CzCallbackData CzUIWebView::PageLoadedHandlerData [protected] |
CzCallback CzUIWebView::PageLoadingHandler [protected] |
CzCallbackData CzUIWebView::PageLoadingHandlerData [protected] |
bool CzUIWebView::PrevVisible [protected] |
CzString CzUIWebView::TempFilename [protected] |
CzString CzUIWebView::URI [protected] |
CzWebView CzUIWebView::WebView [protected] |
CzXomlClassDef * CzUIWebView::WebViewClassDef = NULL [static, protected] |