Wt  3.3.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Member Functions
Wt::WJavaScriptExposableObject Class Reference

A JavaScript exposable object. More...

#include <Wt/WJavaScriptExposableObject>

Inheritance diagram for Wt::WJavaScriptExposableObject:
Inheritance graph
[legend]

List of all members.

Public Member Functions

bool isJavaScriptBound () const
 Returns whether this object is JavaScript bound.
virtual std::string jsValue () const =0
 Returns a JavaScript representation of the value of this object.
std::string jsRef () const
 Returns a JavaScript reference to this object.

Detailed Description

A JavaScript exposable object.

A JavaScript bound object (as opposed to being mostly a simple value class) has an equivalent representation in JavaScript. Its value can usually only be modified through a WJavaScriptHandle. There are certain exceptions to this rule. Some methods, notably many WTransform methods, will correctly apply these modifications also on the JavaScript representation.

See also:
WJavaScriptHandle

Member Function Documentation

Returns whether this object is JavaScript bound.

An object is JavaScript bound if it is associated with a WJavaScriptHandle. It should not be modified directly on the server side. WJavaScriptHandle::setValue() should be used instead.

Returns a JavaScript reference to this object.

If this object is not JavaScript bound, it will return a JavaScript representation of the value of the object, according to jsValue().

Warning:
This reference is intended as read-only. Attempts to modify it may have unintended consequences. If you want a JavaScript reference that is modifiable, use the jsRef of the handle instead.
virtual std::string Wt::WJavaScriptExposableObject::jsValue ( ) const [pure virtual]

Returns a JavaScript representation of the value of this object.

Note:
The value returned will reflect the current server side value of the object. If this object is JavaScript bound, this value may not reflect the actual client side value. If you need access to the client side value, use jsRef() intead.

Implemented in Wt::WPainterPath, Wt::WTransform, Wt::WRectF, Wt::WPen, Wt::WBrush, and Wt::WPointF.

 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator

Generated on Tue Mar 22 2016 for the C++ Web Toolkit (Wt) by doxygen 1.7.6.1