Enyo API Reference

By Package By Kind, A-Z

kernel

g11n-base

dom

base-layout

base-scroller

base-list

base-repeaters

base-controls

base-containers

base-services

base-media

palm-platform

palm-system

palm-controls

palm-containers

palm-services

palm-services-bridge

palm-list

palm-tellurium

g11n-address

g11n-name

g11n-phone

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

R

S

T

V

W


kernel/log.js

enyo.setLogLevel

enyo.setLogLevel: function(inLevel)

Sets the log level for this window if the input is a real number.

The log level is used as a watermark to control the amount of logging.

Setting the log level lower will prevent logging functions with a higher level from being executed.

enyo.log

enyo.log: function()

Sends a log message to the console, if the current log level allows for it.

Objects are converted to JSON automatically.

Multiple arguments are coerced to String and joined with spaces.

enyo.warn

enyo.warn: function()

Same as log, except uses the console's warn method (if it exists).

enyo.error

enyo.error: function()

Same as log, except uses the console's error method (if it exists).


kernel/lang.js

enyo.setObject

enyo.setObject: function(name, value, context)

Sets object name to value. name can use dot notation and intermediate objects are created as necessary.

// set foo.bar.baz to 3. If foo or foo.bar do not exist, they are created.
enyo.setObject("foo.bar.baz", 3); 

Optionally, name can be relative to object context.

// create foo.zot and set foo.zot.zap to null.
enyo.setObject("zot.zap", null, foo);

enyo.getObject

enyo.getObject: function(name, create, context)

Gets object name. name can use dot notation. Intermediate objects are created if create argument is truthy.

// get the value of foo.bar, or undefined if foo doesn't exist.
    var value = enyo.getObject("foo.bar");

// get the value of foo.bar. If foo.bar doesn't exist, 
// it's assigned an empty object, which is returned.
var value = enyo.getObject("foo.bar", true);

Optionally, name can be relative to object context.

// get the value of foo.zot.zap, or undefined if foo.zot doesn't exist
var value = enyo.getObject("zot.zap", false, foo); 

enyo.cap

enyo.cap: function(inString)

Returns inString with the first letter capitalized.

enyo.uncap

enyo.uncap: function(inString)

Returns inString with the first letter un-capitalized.

enyo.isString

enyo.isString: function(it)

Returns true if it is a string.

enyo.isFunction

enyo.isFunction: function(it)

Returns true if it is a function.

enyo.isArray

enyo.isArray: function(it)

Returns true if it is an array.

enyo.indexOf

enyo.indexOf: function(inElement, inArray)

Returns the index of the element in inArray that is equivalent (==) to inElement, or -1 if no element is found.

enyo.remove

enyo.remove: function(inElement, inArray)

Removes the first element in inArray that is equivalent (==) to inElement.

enyo.forEach

enyo.forEach: function(inArray, inFunc, inContext)

Invokes inFunc on each element of inArray. Returns an array (map) of the return values from each invocation of inFunc. If inContext is specified, inFunc is called with inContext as this.

Aliased as enyo.map.

enyo.cloneArray

enyo.cloneArray: function(inArrayLike, inOffset, inStartWith)

Clones an existing Array, or converts an array-like object into an Array.

If inOffset is non-zero, the cloning is started from that index in the source Array. The clone may be appended to an existing Array by passing the existing Array as inStartWith.

Array-like objects have length properties, and support square-bracket notation ([]). Often array-like objects do not support Array methods, such as push or concat, and must be converted to Arrays before use. The special arguments variable is an example of an array-like object.

enyo.clone

enyo.clone: function(obj)

Shallow-clones an object or an array.

enyo.mixin

enyo.mixin: function(target, source)

Copies custom properties from the source object to the target object. If target is falsey, an object is created. If source is falsey, the target or empty object is returned.

enyo.bind

enyo.bind: function(scope, method)

Returns a function closure that will call (and return the value of) function method, with scope as this.

Method can be a function or the string name of a function-valued property on scope.

Arguments to the closure are passed into the bound function.

// a function that binds this to this.foo
var fn = enyo.bind(this, "foo");
// the value of this.foo(3)
var value = fn(3);

Optionally, any number of arguments can be prefixed to the bound function.

// a function that binds this to this.bar, with arguments ("hello", 42)
var fn = enyo.bind(this, "bar", "hello", 42);
// the value of this.bar("hello", 42, "goodbye");
var value = fn("goodbye");

Functions can be bound to any scope.

// binds function 'bar' to scope 'foo'
var fn = enyo.bind(foo, bar);
// the value of bar.call(foo);
var value = fn();


kernel/Oop.js

enyo.kind

enyo.kind: function(inProps)

Creates a JavaScript constructor function with a prototype defined by inProps.

enyo.kind makes it easy to build a constructor-with-prototype (like a class) that has advanced features like prototype-chaining (inheritance).

A plug-in system is included for extending the abilities of the kind generator, and constructors are allowed to perform custom operations when subclassed.

Special Property Names

Generally the properties defined in inProps are copied directly to the generated prototype, but certain property names trigger special processing.

Examples of special properties are:

  • name: the name property defines the name of the created constructor in the global namespace (intermediate objects are created automatically). name is not copied directly to the prototype, but is instead stored as kindName.

    // Creates a function MyNamespace.MyKind with a prototype.
    // MyNamespace.MyKind.prototype.kindName is set to "MyNamespace.MyKind".
    // MyNamespace.MyKind.prototype.plainProperty is set to "foo".
    enyo.kind({
        name: "MyNamespace.MyKind"
        plainProperty: "foo"
    });
    // Make an instance of the new kind
    var myk = new MyNamespace.MyKind();
    
  • kind: the name of or reference to a kind to derive from, like a super-class. The new constructor's prototype is chained to the prototype specified by kind, and the base property in the new prototype is set to reference the kind constructor.

    // Create a function MyKind with a prototype, derived from enyo.Object.
    // MyKind.prototype.kindName is set to "MyKind".
    // MyKind.prototype.base is set to enyo.Object.
    enyo.kind({
        name: "MyKind",
        kind: enyo.Object
    });
    
  • constructor: a function to call when a new instance is created. Actually stored on the prototype as _constructor.

    // Create a function MyKind with a prototype, derived from enyo.Object.
    // _constructor_ is called when an instance is created. 
    enyo.kind({
        name: "MyKind",
        kind: enyo.Object,
        constructor: function() {
            this.instanceArray = [];
            // call the constructor inherited from Object
            this.inherited(arguments);
        }
    });
    
  • statics: properties from any statics object are copied onto the constructor directly, instead of the prototype.

    // Create a kind with a static method.
    enyo.kind({
        name: "MyKind",
        statics: {
            info: function() {
                return "MyKind is a kind with statics.";
            }
        }
    });
    // invoke the static info() method of MyKind
    console.log(MyKind.info());
    

Certain kinds in the framework define their own special properties. For example, see the published property supported by enyo.Object.

inherited

The inherited feature allows you to easily call the super-kind method for any method that has been overridden.

enyo.kind({
    name: "MyKind",
    doWork: function() {
        this.work++;
    }
});

enyo.kind({
    name: "MyDerivedKind",
    kind: "MyKind",
    doWork: function() {
        if (this.shouldDoWork) {
            this.inherited(arguments);
        }
    }
});

The first argument to inherited is required to be the literal arguments, which is a special JavaScript variable that contains information about the executing function.


kernel/Object.js

enyo.Object

enyo.Object implements the property publishing system for Components. Published properties are declared by providing a published property within a call to enyo.kind. Getter and setter methods are automatically generated for properties declared in this manner.

enyo.kind({
    name: "MyObject",
    kind: enyo.Object,

    // declare 'published' properties
    published: {
        myValue: 3
    },

    // these methods will be automatically generated:
    //  getMyValue: function() ...
    //  setMyValue: function(inValue) ...

    // optional method that is fired whenever setMyValue is called
    myValueChanged: function(inOldValue) {
        this.delta = this.myValue - inOldValue;
    }
});

In the above example, myValue becomes a regular property on the MyObject prototype (with a default value of 3), and the getter and setter methods are generated as noted in the comments.

myobj = new MyObject();
var x = myobj.getMyValue(); // x gets 3

You may choose to declare a changed method to observe set calls on a property. The myValueChanged method in the example above is called whenever setMyValue is called.

myobj.setMyValue(7); // myValue becomes 7; myValueChanged side-effect sets delta to 4

Changed methods are called whenever setters are invoked, whether the actual value has changed or not.

Published properties are stored as regular properties on the object prototype, so it's possible to query or set their values directly (changed methods are not called if you set a property directly).

var x = myobj.myValue;

enyo.Object also provides some utility functions for all of its subkinds.

Methods

  • error: function()

    Same as log, except uses the console's error method (if it exists).

  • log: function()

    Sends a log message to the console, prepended with the name of the kind and method from which log was invoked. Multiple arguments are coerced to String and joined with spaces.

    enyo.kind({
        name: "MyObject",
        kind: enyo.Object,
        hello: function() {
            this.log("says", "hi");
            // shows in the console: MyObject.hello: says hi
        }
    });
    

  • warn: function()

    Same as log, except uses the console's warn method (if it exists).


kernel/Component.js

enyo.Component

enyo.Component is the fundamental building block for Enyo applications. Components are designed to fit together, so complex behaviors can be composed from smaller bits of functionality.

Configurations

Component constructors take a single argument, a JavaScript object that defines various properties to initialize on the Component. Sometimes we call this argument a Component configuration.

// create a new component, initialize its name property to 'me'.
var c = new enyo.Component({
    name: "me"
});

When a Component is instantiated, configurations in its components property are instantiated, too. For example,

// create a new component, which has one of its own components
var c = new enyo.Component({
    name: "me",
    components: [
        {kind: "Component", name: "other"}
    ]
});

In this case, when me is created, other is created, too, and we say that me owns other. In other words, the owner property of other equals me. Notice that you can specify the kind of other explicitly in its configuration block, to tell me what constructor to use to create other.

Note that kind values can be references to actual kinds or string-names of kinds. Kind names that do not resolve directly to kinds are looked up in default namespaces. In this case, kind: "Component" resolves to enyo.Component.

Owner

Ownership allows components to be organized into trees. For example,

  • Component A
    • Component B (owner: A)
    • Component C (owner: A)
      • Component E (owner: C)
    • Component D (owner A)

Note that, when designing code, a Component should only be concerned with the Components it owns (one level down). The coder never needs to concern herself with the complex tree structure that will exist at runtime. For example, Component A will never reference Component E directly; it will only access the interface supplied by Component C.

The ownership status of a Component is controlled by the owner property. In other words, to change ownership of a Component, use the setOwner method.

Every Component has a name. A Component's name must be unique among all Components in its owner. In other words, a Component can't own two components with the same name. A Component can access its owned components by name using the $ hash.

For example, if a Component owns components named 'componentB' and 'componentC', it can refer to them with code like this:

someMethod: function() {
    this.$.componentB.doWork();
    this.$.componentC.doWork();
}

Sometimes we refer to the set of objects in the $ hash as the scope of a Component.

Note that all Components visible in the components property will be owned by the top level component. For example,

// create a new component, which owns several components
var c = new enyo.Component({
    name: "me",
    components: [
        {name: "other", components: [
            {name: "third"},
            {name: "fourth"}
        ]}
    ]
});

Although Components third and fourth are nested inside the configuration for other, they are still owned by me. This concept is important; it means that whatever Components you can see listed are in scope.

The me component might have a complex configuration, but at a glance I can see that it has access to other, third, and fourth to get its work done. Those objects will available in the $ hash.

Events

A Component can send a message to its owner using the event mechanism. A Component exposes events as string properties whose names begin with 'on'. To listen to messages, a Component can assign the name of one of its methods to the event property of an owned Component.

For example, the WebService component has an onSuccess property. The owner of a WebService can set onSuccess to the name of a method to be called when the WebService operation completes successfully.

// create a new component, which has a Component of its own, and listens to an event
var c = new enyo.Component({
    name: "MyComponent",
    components: [
        {kind: "WebService", onSuccess: "webSuccess"}
    ],
    webSuccess: function(inSender) {
        this.log(inSender.name, "was successful");
    }
});

We call webSuccess the delegate for the success event of the WebService. Because the event properties take names of methods, we call the event property values named delegates.

Note that the webSuccess method takes an argument called inSender which refers to the object that generated the event. Different events may supply additional arguments, but they all supply inSender as the first argument.

Component events are not exactly the same as the DOM events you may be used to. In particular, Component events do not bubble. However, Enyo does make many DOM events available as Component events. Components do not in general represent DOM nodes, but Controls do; see the Control documentation for more information.

Create and Destroy

When a Component is instantiated, and after all constructors are executed, the create method is invoked. During Component.create, all owned Components are created.

Subclasses of Component often override create to do initialization tasks. If you override Component, make sure to call the inherited create method, and remember that owned components (and the $ hash) are only ready after the inherited method has returned.

enyo.kind({
    name: "MyComponent",
    kind: enyo.Component,
    create: function() {
        // I can do tasks before my components are created
        this.inherited(arguments);
        // ... or I can do tasks after, my $ hash is ready now
    }
});

To delete a Component, use the destroy method. Calling destroy on a component will remove it from all framework bookkeeping, and in particular will set owner to NULL. Generally this is enough to allow the object to be garbage collected, unless you have maintained a reference to it yourself.

allDone: function() {
    // remove workComponent, and do any cleanup
    this.$.workComponent.destroy();
    // now this.$.workComponent is undefined
}

You may override the destroy method to include custom clean-up code. Again, you must make sure to call the inherited method before returning.

Creating Components Dynamically

The createComponent and createComponents methods are included to create Components dynamically. Refer to the inline documentation on those methods for more information.

Extends

enyo.Object

Published Properties

  • owner: null
  • name: ""

Methods

  • create: function(inProps)
  • createComponent: function(inInfo, inMoreInfo)

    Creates and returns a Component as defined by the combination of inInfo and inMoreInfo. The created Component passes through initialization machinery provided by the creating Component, which may supply special handling. Unless the owner is explicitly specified, the new Component will be owned by this. Properties in inInfo override properties in inMoreInfo.

    // create a new component named _dynamic_ owned by _this_ 
    // (will be available as this.$.dynamic).
    this.createComponent({name: "dynamic"});
    
    // create a new component named _another_ owned by _other_ 
    // (will be available as other.$.another).
    this.createComponent({name: "another"}, {owner: other});
    

  • createComponents: function(inInfos, inCommonInfo)

    Creates Components as defined by the array of configurations inInfo. Each configuration in inInfo is combined with inCommonInfo as described in createComponent. createComponents has no return value.

    // ask foo to create components _bar_ and _zot_, but set the owner of 
    // both components to _this_.
    this.$.foo.createComponents([
        {name: "bar"},
        {name: "zot"}
    ], {owner: this});
    

  • destroy: function()

    Removes this Component from its owner (sets owner to null) and does any cleanup. The Component is flagged with a destroyed: true property. Usually the Component will be suitable for garbage collection after being destroyed, unless user code keeps a reference to it.

  • destroyComponents: function()

    Destroys all owned components.

  • getComponents: function()

    Returns an Array of owned components. In other words, converts the $ hash into an array and returns the array.

Inheritance

Methods inherited from enyo.Object

error, log, warn

g11n/base/javascript/g11n.js

enyo.g11n

enyo.g11n.currentLocale

enyo.g11n.currentLocale: function(currentLocale)

Returns an enyo.g11n.Locale instance containing the current device locale for the user interface.

enyo.g11n.formatLocale

enyo.g11n.formatLocale: function(formatLocale)

Returns an enyo.g11n.Locale instance containing the current device locale used while formatting the following items:

  • dates and times
  • numbers, percentage, and currency
  • names
  • addresses

enyo.g11n.phoneLocale

enyo.g11n.phoneLocale: function(phoneLocale)

Returns an enyo.g11n.Locale instance containing the current device phone locale. The phone locale acts like a "home" locale for parsing and formatting phone numbers that do not have an explicit country code in them. The phone number of this device should be issued by a carrier in this locale.

enyo.g11n.setLocale

enyo.g11n.setLocale: function(setLocale)

Sets the framework's idea of the various current locales.

The params object may contain one or more of the following properties:

  • uiLocale - locale specifier for the UI locale
  • formatLocale - locale specifier for the format locale
  • phoneLocale - locale specifier for the phone locale

Each property should be set to a string that is the specifier for that locale.


g11n/base/javascript/fmts.js

enyo.g11n.Fmts

enyo.g11n.Fmts

enyo.g11n.Fmts: function(Fmts)

Creates an instance of a formats information object.

  • params: currently, the only parameter that is used is "locale". Leave this argument undefined to cause this instance to use the current device formats locale.

Returns an instance of a formats information object. This instance has various pieces of information about the given locale.

enyo.g11n.Fmts.prototype

enyo.g11n.Fmts.prototype.isAmPm

enyo.g11n.Fmts.prototype.isAmPm: function()

Indicates whether or not the user is currently using a 12-hour or 24-hour clock on this device.

Returns true if 12-hour, and false for 24-hour.

enyo.g11n.Fmts.prototype.isAmPmDefault

enyo.g11n.Fmts.prototype.isAmPmDefault: function()

Return true if this locale uses a 12-hour clock to format times, or false for a 24-hour clock.

enyo.g11n.Fmts.prototype.getFirstDayOfWeek

enyo.g11n.Fmts.prototype.getFirstDayOfWeek: function()

Returns the day of the week that represents the first day of the week in the current locale. The numbers represent the days of the week as follows:

  • 0 - Sunday
  • 1 - Monday
  • 2 - Tuesday
  • etc.

enyo.g11n.Fmts.prototype.getDateFieldOrder

enyo.g11n.Fmts.prototype.getDateFieldOrder: function()

Returns the order of the fields in a formatted date for the current locale. This function returns an array of strings arranged in the correct order. The strings are as follows:

  • month
  • day
  • year

enyo.g11n.Fmts.prototype.getTimeFieldOrder

enyo.g11n.Fmts.prototype.getTimeFieldOrder: function()

Returns the order of the fields in a formatted time for the current locale. This function returns an array of strings arranged in the correct order. The strings are as follows:

  • minute
  • hour
  • ampm

The last string represents where the AM or PM marker should go for 12-hour clocks.

enyo.g11n.Fmts.prototype.getMonthFields

enyo.g11n.Fmts.prototype.getMonthFields: function()

Returns the medium-sized abbreviation for the month names in this locale. In most locales, these are the 3-letter abbreviations of the month names.

enyo.g11n.Fmts.prototype.getAmCaption

enyo.g11n.Fmts.prototype.getAmCaption: function()

Returns the string for AM in the current locale, or the default "AM" if it cannot be found.

enyo.g11n.Fmts.prototype.getPmCaption

enyo.g11n.Fmts.prototype.getPmCaption: function()

Returns the string for PM in the current locale, or the default "PM" if it cannot be found.

enyo.g11n.Fmts.prototype.getMeasurementSystem

enyo.g11n.Fmts.prototype.getMeasurementSystem: function()

Returns the measurement system for the current locale. The possible values are "uscustomary", "imperial", and "metric". The default is "metric" if not otherwise specified in the formats config file.

enyo.g11n.Fmts.prototype.getDefaultPaperSize

enyo.g11n.Fmts.prototype.getDefaultPaperSize: function()

Returns the default paper size for printers in the current locale. The possible values are "letter" (ie. 8½" x 11") or "A4" (210mm × 297mm). The default is "A4" if not otherwise specified in the formats config file.

enyo.g11n.Fmts.prototype.getDefaultPhotoSize

enyo.g11n.Fmts.prototype.getDefaultPhotoSize: function()

Returns the default photo size for printers in the current locale. The possible values are "10X15CM" (ie. 10 by 15 cm), "4x6" (4 x 6 inches), or "L" (roughly 9 × 13 cm). The default is "10X15CM" if not otherwise specified in the formats config file.

enyo.g11n.Fmts.prototype.getDefaultTimeZone

enyo.g11n.Fmts.prototype.getDefaultTimeZone: function()

Returns the zone ID of the default time zone for the locale. For many locales, there are multiple time zones. This function returns the one that either is the most important or contains the largest population. If the current formats object is for an unknown locale, the default time zone is GMT (Europe/London).


g11n/base/javascript/locale.js

enyo.g11n.Locale

enyo.g11n.Locale

enyo.g11n.Locale: function(Locale)

Creates a new locale instance.

The specifier parameter (spec) has the following format:

[language]_[region][_variant]

That is, the language, region, and variant are optional parts separated by underscores. The language is given by the 2-letter ISO 639 language code, and the region is given by the 2-letter ISO 3166 country code, lower-cased. The variant can be any string that contains any ASCII letter characters and no spaces or underscores.

In webOS, the region is expressed as a lower-case code for historical reasons. While we continue to use lower-case codes for backwards compatibility, the Locale constructor also accepts upper-case ISO-compliant codes in the locale specifier argument.

enyo.g11n.Locale.prototype

enyo.g11n.Locale.prototype.getLocale

enyo.g11n.Locale.prototype.getLocale: function()

Returns the entire locale spec for the current locale.

enyo.g11n.Locale.prototype.getLanguage

enyo.g11n.Locale.prototype.getLanguage: function()

Returns the language of this locale.

enyo.g11n.Locale.prototype.getRegion

enyo.g11n.Locale.prototype.getRegion: function()

Returns the region of this locale.

enyo.g11n.Locale.prototype.getVariant

enyo.g11n.Locale.prototype.getVariant: function()

Returns the variant of this locale, if any.

enyo.g11n.Locale.prototype.toString

enyo.g11n.Locale.prototype.toString: function()

Returns the locale spec.

enyo.g11n.Locale.prototype.toISOString

enyo.g11n.Locale.prototype.toISOString: function()

Returns the locale, specifying the region and variant upper-cased to conform to ISO standards. The spec returned from this function can then be used with other libraries of international routines such as ICU.

enyo.g11n.Locale.prototype.isMatch

enyo.g11n.Locale.prototype.isMatch: function(otherLocale)

Returns whether or not the current locale is compatible with the other locale. To be compatible means that one locale can be substituted for the other for translations and localized files.

enyo.g11n.Locale.prototype.equals

enyo.g11n.Locale.prototype.equals: function(otherLocale)

Returns true if this locale exactly matches the other locale. Locales that are equal necessarily match (i.e., they are compatible), but locales that are compatible are not necessarily equal.

enyo.g11n.Locale.prototype.useDefaultLang

enyo.g11n.Locale.prototype.useDefaultLang: function()

If the current locale includes a region but no language, this function causes the locale to fill itself out with the default language for that region. For each region, one language is picked as the default. If the region does not have a default, the language of the current UI locale is used, and if that cannot be found, English is used.


g11n/base/javascript/loadfile.js

g11n/base/javascript/template.js

enyo.g11n.Template

enyo.g11n.Template

enyo.g11n.Template: function(template, pattern)

Returns a Template object that substitutes the strings into a specified string template.

The template parameter is a string to substitute into. The pattern parameter is an optional parameter that overrides the normal #{foo} substitution format.


g11n/base/javascript/resources.js

$L

$L: function(inText)

Global translation function, for convenience. This is only useful to apps that want to translate strings to the current UI language. If you want to translate to a different language, or if you want to translate strings for a library or package, you need to create a Resources object instead, and call its $L method.

If the string does not have a translation in the current language, the argument is returned as-is.

enyo.g11n.Resources

enyo.g11n.Resources

enyo.g11n.Resources: function(params)

Creates a new bundle of resource strings. The params object may contain the following:

  • root - The path to the root of the current component. For libraries and packages, this should be the absolute path to the directory containing the resources directory that contains the translations for the component.
  • locale - A Locale instance, or a locale spec string, specifying the locale of the resources to load. If this parameter is left out, the resources for the current UI locale are loaded.

enyo.g11n.Resources.prototype

enyo.g11n.Resources.prototype.getResource

enyo.g11n.Resources.prototype.getResource: function(path)

Gets a localized file.

  • path (String): the path relative to a locale directory to the file to load

This will search the resources directory looking for the localized version of the file. The sequence of places where it looks for the file is as follows:

  1. The variant directory, if there is one. (e.g., "resources/fr/fr/sfr/path")
  2. The region directory, if there is one (e.g., "resources/fr/fr/path")
  3. The language directory if there is one (e.g., "resources/fr/path")
  4. The English directory (e.g., "resources/en/path")
  5. The unlocalized files under the root. (e.g., "path")

If the file cannot be found, this function returns undefined.

enyo.g11n.Resources.prototype.$L

enyo.g11n.Resources.prototype.$L: function(stringToLocalize)

Retrieves a translated string. If the string to localize is not found in the resources, the original argument is returned unmodified. This means that is always safe to call $L because this method will always return something useful.


g11n/base/javascript/character.js

enyo.g11n.Char

enyo.g11n.Char.isIdeo

enyo.g11n.Char.isIdeo: function(isIdeo)

Returns true if the first character in the string is an Asian ideographic character.

enyo.g11n.Char.isPunct

enyo.g11n.Char.isPunct: function(isPunct)

Returns true if the first character in the string is a punctuation character.

enyo.g11n.Char.isSpace

enyo.g11n.Char.isSpace: function(isSpace)

Returns true if the first character in the string is a whitespace character.

enyo.g11n.Char.toUpper

enyo.g11n.Char.toUpper: function(toUpper)

Upper-cases every character in a string.

  • str (String): string to be upper-cased
  • locale (String): The string is upper-cased using the rules of the given locale. If this parameter is not specified, the function will use the current locale.

Upper-case every character in a string according to the rules of the given locale. If the locale is not given, the current locale is used.

Returns a string containing the same content as the original parameter, but with all characters upper-cased

enyo.g11n.Char.isLetter

enyo.g11n.Char.isLetter: function(isLetter)

Returns true if the first character in the string is a letter character.

enyo.g11n.Char.getIndexChars

enyo.g11n.Char.getIndexChars: function(getIndexChars)

  • locale (String): The locale for which the alphabetic index chars are being sought. This is a required parameter.

Returns an array of strings containing all of the alphabetic characters that are used as index characters for the current locale. The characters are returned in the order they should appear in the index. An index character is a character under which multiple items in a list may be categorized. In most languages, accented versions of a character are considered a variant of the base character, so list items are grouped together under the same base character. In other locales, accented characters are considered to be separate from the unaccented base character, and list items starting with the accented character should be grouped under a separate header. The symbol "#" is appended to the end of the list as the placeholder character representing all strings that do not start with any of the alphabetic index chars.

Returns an array of strings containing all the index characters in order

enyo.g11n.Char.getBaseString

enyo.g11n.Char.getBaseString: function(getBaseString)

Converts every character in a string to its corresponding base character according to the rules of the given locale.

  • str (String): String to be de-accented
  • locale (String/Object): If specified, the string is de-accented using the rules of the given locale. If the locale is not specified, this function uses the current UI locale.

The base character is defined to be a version of the same character in the list of alphabetic index chars as returned by getIndexChars that usually does not have any accents or diacriticals unless the language considers the character with the accent to be a character distinct from the unaccented version.

Returns a string containing the same content as the original parameter, but with all characters replaced by their base characters.


g11n/base/javascript/timezone.js

enyo.g11n.TzFmt

enyo.g11n.TzFmt

enyo.g11n.TzFmt: function(params)

Creates a new timezone format instance.

The params argument is a string that is a timezone id specifier. The specifier has the following format:

Zone name (see man tzfile), daylight savings supported, offset from UTC.

enyo.g11n.TzFmt.prototype

Methods

  • getCurrentTimeZone: function()

    Returns the current timezone of the device. The timezone is updated whenever it is changed by the user (if set manually), or by the network (if set automatically).

    Returns the name of the timezone.

  • setTZ: function()

    This set of functions caches the current timezone name (e.g., "PST"). The default value of subscribe is false, since the timezone most likely will not change frequently.

    This is for use by DateFmt() in the globalization framework, which needs the current timezone for the 'zzz' specifier.

  • toString: function()

    Returns the timezone as a string.


g11n/base/javascript/datetime.js

enyo.g11n.DateFmt

enyo.g11n.DateFmt

enyo.g11n.DateFmt: function(params)

Creates a new date formatter object.

  • params (String/Object): parameters that control the output format

If params is passed as a string, then the string should specify the custom date format to use. If params is specified as an object, the object may contain the following properties:

  • locale: Locale to use to format the date. If not specified, the locale used will be the current locale of the device.
  • date: Format a date using the locale's standard format, and specify the length of the format to use. Valid values are "short", "medium", "long", and "full", or specify a custom date format string directly. Default is "long" if this property is not specified.
  • time: Format a time using the locale's standard format, and specify the length of the format to use. Valid values are "short", "medium", "long", and "full", or specify a custom time format string directly. Default is "long" if this property is not specified.
  • format: format as a date and time string together, specifying the length of the format. Valid values are "short", "medium", "long", and "full", or specify a custom date/time format string directly.
  • dateComponents: Format a date with only certain components in it using the locale's standard format for those components. Valid values are "DM", "MY", and "DMY", which mean "date and month", "month and year", and "date, month, and year", respectively. This can be combined with the date or format properties to specify the length of those components. Default value if this property is not specified is "DMY".
  • timeComponents: Format a time with certain additional components in it using the locale's standard format for those components. Valid values are "A", "Z", and "AZ", which mean "am/pm", "time zone", and "am/pm and time zone", respectively. The additional components will appear before or after the time, as required by the locale. This can be combined with the time or format properties to specify the length of those components. If this property is not specified, the default is no additional components.
  • twelveHourFormat: If passed as true, a 12-hour clock is used when formatting times.
  • weekday: If passed as true, returns the date formatted with the day of the week included in the date format. If passed as "short", "medium", "long", or "full", then includes the day of the week of the given length. If this property is not specified, no day of the week is included in the format for the short, medium, or long styles. The full style always has the day of the week.
  • TZ: Uses the given timezone. If not specified, the current device timezone is used. If false, uses a 24-hour clock.

The codes to use when specifying custom date or time formats are the following:

  • yy: two-digit year
  • yyyy: four-digit year
  • MMMM: name of a the month spelled out in long format (eg. "July" or "August")
  • MMM: name of the month in abbreviated form (eg. "Jul" or "Aug")
  • MM: zero-padded 2-digit month
  • M: 1- or 2-digit month, not padded
  • dd: zero-padded 2-digit day of the month
  • d: 1- or 2-digit day of the month, not padded
  • zzz: time zone name
  • a: am/pm notation for 12-hour formats
  • KK: zero-padded hour of the day in the 12-hour clock, in the range 00 to 11
  • K: hour of the day in the 12-hour clock, not padded, in the range 0 to 11
  • hh: zero-padded hour of the day in the 12-hour clock, in the range 01 to 12
  • h: hour of the day in the 12-hour clock, not padded, in the range 1 to 12
  • HH: zero-padded hour of the day in the 24-hour clock, in the range 00 to 23
  • H: hour of the day in the 24-hour clock, not padded, in the range 0 to 23
  • kk: zero-padded hour of the day in the 24-hour clock, in the range 01 to 24
  • k: hour of the day in the 24-hour clock, not padded, in the range 1 to 24
  • EEEE: day of the week, spelled out fully (e.g., "Wednesday")
  • EEE: day of the week, in 3-letter abbreviations (e.g., "Wed")
  • EE: day of the week, in 2-letter abbreviations (e.g., "We")
  • E: day of the week, in 1-letter abbreviations (e.g., "W")
  • mm: zero-padded minute of the hour
  • ss: zero-padded second of the minute

Please note that the current formatter only supports formatting dates in the Gregorian calendar.

Returns a date formatter object that formats dates according to the given parameters.

enyo.g11n.DateFmt.prototype

enyo.g11n.DateFmt.prototype.toString

enyo.g11n.DateFmt.prototype.toString: function()

Returns the format string that this formatter instance uses to format dates.

enyo.g11n.DateFmt.prototype.isAmPm

enyo.g11n.DateFmt.prototype.isAmPm: function()

Returns true if the current formatter uses a 12-hour clock to format times.

enyo.g11n.DateFmt.prototype.isAmPmDefault

enyo.g11n.DateFmt.prototype.isAmPmDefault: function()

Returns true if the locale of this formatter uses a 12-hour clock to format times.

enyo.g11n.DateFmt.prototype.getFirstDayOfWeek

enyo.g11n.DateFmt.prototype.getFirstDayOfWeek: function()

Returns the day of the week that represents the first day of the week in the current locale. The numbers represent the days of the week as follows:

  • 0 - Sunday
  • 1 - Monday
  • 2 - Tuesday
etc.

enyo.g11n.DateFmt.prototype.format

enyo.g11n.DateFmt.prototype.format: function(date)

format(date): Formats a date according to the format set up in the constructor of this formatter instance.

  • date (Object): a standard javascript date instance to format as a string

Returns a string with the date formatted according to the format set up for this formatter instance.

enyo.g11n.DateFmt.prototype.formatRelativeDate

enyo.g11n.DateFmt.prototype.formatRelativeDate: function(date, options)

Formats a date as relative to another date.

  • date (Object): the date/time object to format
  • options (Object): formatting options

This method formats a date as being relative to another date. If the two dates are close in time, the time distance between them is given rather than a formatted date. If the two dates are not close, then the date is formatted as per the format set up for this formatter instance.

The options object can have the following properties:

  • referenceDate: The reference date for which the date to be formatted is relative
  • verbosity: If true, then format dates between a week old and a year old as relative as well. Otherwise these are formatted regularly according to the format for the current formatter instance.

The relative dates/times are as follows:

  • today
  • yesterday
  • tomorrow
  • for dates within the last week, the day name
  • for dates within the last month, the number of weeks ago when verbosity=true, or the formatted date otherwise
  • for dates within the last year, the number of months ago when verbosity=true, or the formatted date otherwise
  • for all other dates, the date formatted as per the format of the current formatter instance

When strings are returned as relative, the text in them is already localized to the current locale.

Returns a string with the relative date.

enyo.g11n.DateFmt.prototype.formatRange

enyo.g11n.DateFmt.prototype.formatRange: function(dateStart, dateEnd)

Formats a pair of dates as a date range.

  • dateStart (Object): the date at the start of the range
  • dateEnd (Object): the date at the end of the range

This method formats a pair of dates as a date/time range from start to end using the settings of the formatter object to guide the formatting.

The format of the output string is determined as follows:

  • If the dates are on the same calendar day, the format is a time range of the form (starttimetoendtime, month+date).
  • If the dates are on different calendar days, but are in the same calendar month, the format is a date range of the form (month datetodate, year).
  • If the dates are on different calendar days and different calendar months, but the same calendar year, the format is to a date range of (month+date to month+date, year).
  • If the dates are in different consecutive calendar years, the format is a date range of the form (month+date+year to month+date+year)
  • If the dates are more than two years apart, the format is a date range of the form (year to year).

The order of the month, date, and year components in the above formats and the text of the separators are locale-dependent. For example, if the start date is September 2, 2011, and the end date is September 5, 2011, the ranges would be:

  • US English: "Sept 2-5, 2011"
  • British English: "2-5 Sept, 2011"
  • German: "2.-5. Sept, 2011"

The length of the month abbreviations is determined by the date length with which the current formatter object was constructed. If the end date precedes the start date, the dates will be switched so that the earlier date becomes the start date. The text in the returned string will be localized to the locale of the formatter instance.

Returns a string with the date/time range.


g11n/base/javascript/numberfmt.js

enyo.g11n.NumberFmt

enyo.g11n.NumberFmt

enyo.g11n.NumberFmt: function(options)

Creates a formatter object that formats numbers according to the given options. Once the formatter object is created, it is intended to be immutable so that you can create multiple formatters for different purposes, and they will not conflict with each other.

The options object may include any of the following properties:

  • locale - The locale of the formatter. If this is not specified, the current formats locale is used by default.
  • style - One of "number", "percent", or "currency". If this is not specified, the default is "number". This formats numbers according to the locale's conventions for formatting floating point numbers, percentages, and monetary amounts, respectively.
  • currency - The ISO 4217 3-letter code for the currency to format. The currency property affects the currency sign used to identify the currency in the output string. It can interact with the locale in that the currency sign may be placed before or after the amount and with or without space, depending on the locale. For example, both Germany and Ireland use the same currency (the Euro), but in Ireland amounts are written "€5.34" whereas in Germany, the same amount would be written as "5,34 €". If a locale spec is given as the the currency property and the legal currency for the named locale can be determined, then that currency will be used. If the currency property is not specified, then the legal currency for the locale is used as the default. This property only has an effect if the style property is given as "currency".
  • currencyStyle - This property may have one of the following values: "iso" or "common". The "iso" style causes the currency to be formatted using the ISO 4217 code as the currency sign. The "common" style causes the currency to be formatted using the common currency sign for the locale. For example, the "iso" style in the German locale would be "5,34 EUR" whereas the "common" style would be "5,34 €". In Ireland, the "iso" style would be "EUR 5.34", and the "common" style would be "€5.34". For some locales, the symbol for the common style is not available in the webOS fonts, so the string is always formatted as style "iso", even when "common" is requested. If this property is not specified, the default is "common".
  • fractionDigits - How many digits to show after the decimal. If this is not specified, all digits are shown in the "number" and "percent" styles. With the "currency" style, the default number of fractional digits shown is the number that is commonly used for the currency being formatted, which is usually 0, 2, or 3. When a number being formatted has more digits than the fractionDigits property allows, the number is rounded to fit within that number of fractional digits.

enyo.g11n.NumberFmt.prototype

enyo.g11n.NumberFmt.prototype.format

enyo.g11n.NumberFmt.prototype.format: function(number)

Converts a number into a string, using the proper locale-based format for numbers. If the parameter is passed in as a string containing a number, it will be parsed into a number first before being formatted back into a string. If the parameter is not a number or a string containing a valid number, the value "undefined" is returned.

Returns the input number formatted as a string using the current locale formatting and the current option settings for the formatter.


g11n/base/javascript/duration.js

enyo.g11n.DurationFmt

enyo.g11n.DurationFmt

enyo.g11n.DurationFmt: function(params)

Creates a new duration (time interval) formatter object.

  • params (String/Object): parameters that control the output format

params may contain the following properties:

  • locale: Locale to use to format the date. If not specified, the current format locale of the device is used.
  • style: Style of duration to use. Valid styles are "short", "medium", "long", and 'full'. If not specified, the default is "short".

The styles form progressively longer strings. Examples of each style for US English:

  • short: 2y 6m 2w 5d 14:21:56
  • medium: 2 yr 6 mo 2 wk 5 dy 14:21:56
  • long: 2 yrs 6 mos 2 wks 5 days 14 hrs 21 min 56 sec
  • full: 2 years, 6 months, 2 weeks, 5 days, 14 hours, 21 minutes and 56 seconds

The format, the language of the words in the text, and the separator characters are correct for the given locale.

Returns a duration formatter object that can format time intervals according to the given parameters.

enyo.g11n.DurationFmt.prototype

enyo.g11n.DurationFmt.prototype.format

enyo.g11n.DurationFmt.prototype.format: function(duration)

Formats a duration (time interval) according to the format set up in the constructor of this formatter instance.

  • duration (Object): a JavaScript object containing fields to format as a string.

The duration object may contain any or all of these properties:

  • years
  • months
  • weeks
  • days
  • hours
  • minutes
  • seconds

Each property should have an integer value, or else be left out completely.

If any property is left out of the duration object or has the value of 0, it will not be included in the formatted string output. The only exceptions are 0 minutes or 0 seconds in the short and medium formats. In those cases, double zeros are included to make the time correct.

Example: 14 hours even would be formatted in US English as

  • short: 14:00:00
  • medium: 14:00:00
  • long: 14 hr
  • full: 14 hours

If any of the properties contain a number that is too big for the field, this formatter will NOT recalculate. It is up to the caller to make sure the elements are in the desired range. This formatter also will not truncate any propeties to approximate a time interval. If an approximate time interval is desired, it is up to the caller to leave off fields in the duration parameter.

This also means it is possible to format a duration with a relatively large number in any property without its being "wrapped" down to the normal range for that property when formatted as a time of day or as a normal day of the year.

Example: A process that took 174 hours and 23 seconds to complete would be formatted as

  • short: 174:00:23
  • medium: 174:00:23
  • long: 174 hr 23 sec
  • full: 174 hours and 23 seconds

The 174 hours is NOT brought down to the the normal daily range for hours of 0-24.

Returns a string with the date formatted according to the style and locale set up for this formatter instance. If the duration parameter is empty or undefined, an empty string is returned.


dom/dom.js

enyo.byId

enyo.byId: function(id, doc)

Shortcut to call getElementById() if id is a string, otherwise returns id. doc is optional, refers to document if not provided.

enyo.stopEvent

enyo.stopEvent: function(inEvent)

enyo.getCookie

enyo.getCookie: function(inName)

Gets a named value from the document cookie.

enyo.setCookie

enyo.setCookie: function(inName, inValue, inProps)

Sets a named value into the document cookie, with properties.

Properties in the optional inProps argument are attached to the cookie. inProps may have an expires property, which can be a number of days, a Date object, or a UTC time string.

To remove a cookie, use an inProps value of { "Max-Age": 0 }.

If developing in the Google Chrome browser with a local file as your application, start Chrome with the --enable-file-cookies switch to allow cookies to be set.

enyo.dom

Methods

  • _findTarget: function(inNode, inX, inY)
  • calcBorderExtents: function(inNode)
  • calcMarginExtents: function(inNode)
  • calcNodeOffset: function(inNode, inParentNode)
  • findTarget: function(inControl, inX, inY)
  • getClipboard: function(inCallback)
  • getComputedStyle: function(inNode)
  • getComputedStyleValue: function(inNode, inProperty, inComputedStyle)
  • setClipboard: function(inText)

    Copies a string to the system clipboard.


dom/util.js

enyo.macroize

enyo.macroize: function(inText, inMap, inPattern)

Populates a string template with data values.

Returns a copy of inText, with macros defined by inPattern replaced by named values in inMap.

inPattern may be omitted, in which case the default macro pattern is used. The default pattern matches macros of the form

{$name}

Example:

// returns "My name is Barney."
enyo.macroize("My name is {$name}.", {name: "Barney"});

Dot notation is supported, like so:

var info = {
    product_0: {
        name: "Gizmo"
        weight: 3
    }
}
// returns "Each Gizmo weighs 3 pounds."
enyo.macroize("Each {$product_0.name} weighs {$product_0.weight} pounds.", info);

enyo.objectToQuery

enyo.objectToQuery: function(map)

Takes a name/value mapping object and returns a string representing a URL-encoded version of that object.

Example:

{
    username: "foo",
    password: "bar"
}

"username=foo&password=bar"

enyo.irand

enyo.irand: function(inRange)

Generates a random integer greater than or equal to zero, but less than inRange.

enyo.call

enyo.call: function(inObject, inMethod, inArguments)

Calls named method inMethod (String) on inObject with optional arguments inArguments (Array), if the object and method exist.

enyo.call(window.Worker, "doWork", [3, "foo"]);

enyo.asyncMethod

enyo.asyncMethod: function(inScope, inMethod)

Calls method inMethod on inScope asynchronously. Uses window.setTimeout with minimum delay, usually around 10ms.

Additional arguments are passed directly to inMethod.

enyo.nextTick

enyo.nextTick: function(inScope, inMethod)

Calls method inMethod on inScope asynchronously. Uses window.postMessage() if possible, to get shortest possible delay.

Additional arguments are passed directly to inMethod.

enyo.job

enyo.job: function(inJobName, inJob, inWait)

Invokes function inJob after inWait milliseconds have elapsed since the last time inJobName was referenced.

Jobs can be used to throttle behaviors. If some event can occur once or multiple times, but we want a response to occur only once every so many seconds, we can use a job.

onscroll: function() {
    // updateThumb will be called but only when 1s has elapsed since the 
    // last onscroll
    enyo.job("updateThumb", enyo.bind(this, "updateThumb"), 1000);
}

enyo.job.stop

enyo.job.stop: function(inJobName)

Cancels the named job, if it has not already fired.

enyo.time

enyo.time: function(inName)

Starts a timer with the given name.

enyo.timeEnd

enyo.timeEnd: function(inName)

Ends a timer with the given name and returns the number of milliseconds elapsed.

enyo.string

Methods

  • applyFilterHighlight: function(inText, inSearchText, inClassName)

    Returns string where _inSearchText_ is case-insensitively matched and wrapped in a <span> tag with CSS class _inClassName_.

  • escapeHtml: function(inText)

    Returns string with ampersand, less-than, and greater-than characters replaced with HTML entities, e.g., '<code>"This & That"</code>' becomes '&lt;code&gt;"This &amp; That"&lt;/code&gt;'

  • escapeHtmlAttribute: function(inText)

    Returns string with ampersand and double quote characters replaced with HTML entities, e.g., 'hello from "Me & She"' becomes 'hello from &quot;Me &amp; She&quot;'.

  • stripQuotes: function(inString)

    Returns string with leading and trailing quote characters removed, e.g., "foo" becomes foo.

  • trim: function(inString)

    Returns string with whitespace at start and end removed.


dom/json.js

enyo.json

Methods

  • parse: function(inJson)

    Returns a JavaScript object for a given JSON string, using native stringify routine if it's available. inJson is the JSON string to be converted to a JavaScript object.

  • stringify: function(inValue, inReplacer, inSpace)

    Returns a JSON string for a given object, using native stringify routine if it's available. inValue is the Object to be converted to JSON. inReplacer is the optional value inclusion array or replacement function. inSpace is the optional number or string to use for pretty-printing whitespace.


dom/xhr.js

enyo.xhrGet

enyo.xhrGet: function(inArgs)

Performs an XMLHttpRequest GET with features described as inArgs. Supported properties for inArgs are:

  • url: The URL to request (required)
  • load: Function, called when request is completed, with arguments (responseText, xhrObject)
  • username: The optional user name to use for authentication purposes
  • password: The optional password to use for authentication purposes
  • headers: Request headers, an object with header names as keys

enyo.xhrPost

enyo.xhrPost: function(inArgs)

Performs an XMLHttpRequest POST with features described as inArgs. Supported properties for inArgs are:

  • url: The URL to request (required)
  • load: Function, called when request is completed, with arguments (responseText, xhrObject)
  • body: Specific contents for the request body for POST method, a string
  • username: The optional user name to use for authentication purposes
  • password: The optional password to use for authentication purposes
  • headers: Request headers, an object with header names as keys. You should provide at least a "Content-Type" field here to identify the format of your POST data, e.g.,

    { "Content-Type":"application/x-form-urlencoded". }
    


dom/Animation.js

enyo.Animator

Extends

enyo.Component

Published Properties

  • duration: 350
  • tick: 10
  • repeat: 0
  • easingFunc: enyo.easing.cubicOut
  • alwaysAnimate: false

Published Events

  • onBegin: ""
  • onAnimate: ""
  • onStop: ""
  • onEnd: ""

Methods

  • destroy: function()
  • isAnimating: function()
  • play: function(inStart, inEnd)
  • setNode: function(inNode)
  • stop: function()

Inheritance

Published properties inherited from enyo.Component

owner, name

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

dom/Dispatcher.js

enyo.dispatcher

Methods

  • dispatch: function(e)
  • findDefaultTarget: function(e)
  • findDispatchTarget: function(inNode)

enyo.dispatch

enyo.dispatch: function(inEvent)

enyo.bubble

enyo.bubble: function(e)
dom/ApplicationEvents.js

enyo.ApplicationEvents

Events that have no explicit target flow to instances of this component.

Create an ApplicationEvents wherever you want to handle these global events. Note that a global event will flow to all instances of ApplicationEvents, so application code will need to handle conflicts.

Example:

...
components: [
    {kind: "ApplicationEvents", onWindowRotated: "windowRotated"}
...
],
...
windowRotated: function(inSender) {
    // do work when orientation changes
}

Extends

enyo.Component

Published Events

  • onLoad: ''

    Sent after window has completed loading

  • onUnload: ''

    Sent when window is closed

  • onError: ''

    Sent when the window cannot be loaded properly

  • onWindowActivated: ''

    Sent when user brings window to the front

  • onWindowDeactivated: ''

    Sent when user leaves the window

  • onWindowParamsChange: ''

    Sent when window parameters are changed via enyo.windows methods activateWindow or setWindowParams

  • onApplicationRelaunch: ''

    Sent when the application has been relaunched by the system manager

  • onWindowRotated: ''

    Sent when user rotates device

  • onOpenAppMenu: ''

    Sent when user taps on app menu area or hits the app menu key (ctrl+tilde) on desktop

  • onCloseAppMenu: ''

    Sent when the app menu is dismissed

  • onKeyup: ''

    Sent for DOM keyup event

  • onKeydown: ''

    Sent for DOM keydown event

  • onKeypress: ''

    Sent for DOM keypress event

  • onBack: ''

    Sent when user makes a back gesture or hits ESC key on desktop

Inheritance

Published properties inherited from enyo.Component

owner, name

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

dom/Gesture.js

enyo.gesture

enyo.gesture provides an event filter hooked into the enyo dispatcher. This intercepts some DOM events and turns them into special synthesized events.

  • "back" - Sent for the back gesture on webOS devices with a gesture area or on the ESC key in browsers
  • "click" - Normally you get the one sent by the system, but you can get a synthetic "click" when a drag has been initiated.
  • "dragstart", "dragfinish" - Sent for mouse moves that exceed a certain threshhold
  • "drag", "drop" - Sent to the original target of the mouse move to inform it about the item being moved over or released over another element
  • "dragover", "dragout" - Sent in place of mouseover and mouseout when there is an active drag
  • "mousehold", "mouseholdpulse", and "mouserelease" - Sent for mouse moves that stay within the drag threshhold. Used to implement hold actions.

Methods

There are no public methods defined.


dom/DomNode.js

enyo.DomNode

enyo.DomNode is an HTML DomNode abstraction.

enyo.DomNode is designed to represent much of the state of a DomNode, including nodeTag, attributes, and styles, without needing to be mapped to an actual node in DOM.

Virtualizing the DOM in this way allows us to optimize DOM rendering by managing changes in enyo.DomNode objects and propagating those changes into the actual document only when necessary or convenient. Additionally, it serves as a local cache for certain information that can be costly to gather directly from the DOM itself.

Controls in Enyo are an extension of Components into UI. enyo.DomNode is the first step in crafting Component into Control.

Extends

enyo.Component

Published Properties

  • showing: true

    Controls the display of this object.

    The showing property and the setShowing(), show(), and hide() methods are only conveniences for quickly setting or removing display: none style.

    The value of showing does not imply an object is actually visible or even rendered in DOM, it simply reflects this state of this specific style as a convenience.

    For any actual DOM node represented by this object, other CSS classes or custom selectors could cause the display property of the computedStyle to be out sync with showing.

    Also, note that showing has lower precedence than other ways for setting the display style for this object

    For example, if showing is false,

    this.applyStyle("display", null);
    

    will immediately display the object without changing the value of showing.

    Note that the getShowing() method tests the display style of the node and resets the showing property as needed before returning its value.

  • prepend: false

    If true, this node is prepended to its parent; otherwise, it's appended.

Methods

  • addClass: function(inClass)

    Adds CSS class name inClass to the className attribute of this object.

    // add the highlight class to this object
    this.addClass("highlight");
    

  • addRemoveClass: function(inClass, inTrueToAdd)

    Adds or removes CSS class name inClass from the className attribute of this object based on the value of inTrueToAdd.

    // add or remove the highlight class, depending on the "highlighted" property
    this.addRemoveClass("highlight", this.highlighted);
    

  • addStyles: function(inStyles)

    Adds CSS styles to the set of styles assigned to this object.

    inStyles is a string containing CSS styles in text format.

    this.$.box.addStyles("background-color: red; padding: 4px;");
    

  • applyStyle: function(inStyle, inValue)

    Applies a single style value to this object.

    this.$.box.applyStyle("z-index", 4);
    

    You can remove a style (restore it to default) by setting its value to null.

    this.$.box.applyStyle("z-index", null);
    

  • getClassName: function()

    Returns the className attribute (string).

  • hasClass: function(inClass)

    Returns true if the className attribute contains a class matching inClass.

    // returns true if _className_ is "bar foo baz", but false for "barfoobaz"
    var hasFooClass = this.$.control.hasClass("foo");
    

  • hasNode: function()

    Returns the DOM node that has been created and rendered for the object. If this node doesn't exist, returns null. After this call, the node property will be valid and can be checked directly.

    If hasNode() isn't null, the node property refers to a valid DOM node; otherwise, the node property should not be accessed.

    A DomNode object will only have a valid node after it has been rendered.

    if (this.hasNode()) {
        console.log(this.node.nodeType);
    }
    

  • removeClass: function(inClass)

    Removes CSS class name inClass from the className attribute of this object.

    inClass must have no leading or trailing spaces.

    Using a compound class name is supported, but the name is treated atomically. For example, given "a b c", removeClass("a b") will produce "c", but removeClass("a c") will produce "a b c".

    // remove the highlight class from this object
    this.removeClass("highlight");
    

  • setAttribute: function(inName, inValue)

    Sets the value of an attribute on this object. Set inValue to null to remove an attribute.

    // set the tabIndex attribute for this DomNode
    this.setAttribute("tabIndex", 3);
    // remove the index attribute
    this.setAttribute("index", null);
    

  • setClassName: function(inClassName)

    Replaces the className attribute. The className attribute represents the CSS classes assigned to this object. Note that a className can be a string that contains multiple classes. The className nomenclature comes from the DOM standards.

    this.$.control.setClassName("box blue-border highlighted");
    

  • setStyle: function(inStyle)

    Replaces the set of CSS styles assigned to this object.

    inStyle is a string containing CSS styles in text format.

    this.$.box.setStyle("color: black;");
    

Inheritance

Published properties inherited from enyo.Component

owner, name

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

dom/DomNodeBuilder.js

enyo.DomNodeBuilder

The DomNodeBuilder kind extends the DomNode component by providing methods for rendering.

Rendering refers to the process of generating actual DOM content as described by the component.

These rendering methods are important for Controls, all of which descend from DomNodeBuilder. Note that a single control typically represents a tree of other controls. Rendering the root generally renders the entire tree.

It's common to render an entire application into a document body, like so:

new MyApp().renderInto(document.body);

On any DomNodeBuilder-derived object, you can set the canGenerate property to false to inhibit HTML generation. It defaults to undefined.

Extends

enyo.DomNode

Published Properties

  • allowHtml: false

    When false, content is treated as plain text; when true, it's treated as HTML. Only set this to true when you trust the content because you generated it yourself or because you've already stripped off potentially malicious tags.

  • content: ""

    The content that will be put inside the DOM node created

Methods

  • hide: function()

    Hides this node (alias for setShowing(false)).

  • render: function()

    Renders this object into DOM, generating a DOM node if needed.

  • renderInto: function(inParentNode)

    Renders this object into the existing DOM node referenced by inParentNode.

  • rendered: function()

    Called whenever this object has been rendered. Override this method to perform tasks that require access to an actual DOM node.

    rendered: function() {
        this.inherited(arguments);
        if (this.hasNode()) {
            this.nodeHeight = this.node.offsetHeight;
        }
    }
    

  • show: function()

    Shows this node (alias for setShowing(true)).

Inheritance

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

dom/ContainedDomBuilder.js

enyo.ContainedDomBuilder

ContainedDomBuilder extends DomNodeBuilder with the ability to be contained by Controls.

Containment is similar to ownership for Components. Whereas ownership defines the messaging and lifecycle relationships for components, containment defines layout and behavioral relationships.

A ContainedDomBuilder can have a container. Containers are Control kinds, which are themselves ContainedDomBuilders. Therefore, Controls contain other Controls, and can be composed into a tree.

Containment is similar to the parent/child relationship in DOM, but the DOM parent/child relationship tends to be more complicated.

The container concept simplifies managing complex UI.

See enyo.Control for more information.

Extends

enyo.DomNodeBuilder

Published Properties

  • className: ""
  • container: null
  • parent: null

Methods

  • addContent: function(inContent, inDelim)
  • getOffset: function()
  • isDescendantOf: function(inAncestor)

Inheritance

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

dom/Control.js

enyo.Control

enyo.Control is a Component descendent that can be represented visually and can receive UI events.

Typically, a Control's visual representation corresponds to a node (and all its children) in DOM, but you are highly encouraged to consider only the higher level Control and Component hierarchies when designing Enyo applications, since these representations are much simpler than the actual DOM.

Control inherits from DomBuilder the ability to maintain its state, whether it's been rendered (represented in DOM) or not. This virtualization lets Enyo optimize actual DOM access and, in most cases, frees the coder from having to worry about DOM state.

Extends

enyo.ContainedDomBuilder

Published Properties

  • layoutKind: ""

Published Events

  • onclick: ""
  • onmousedown: ""
  • onmouseup: ""

Methods

  • broadcastMessage: function(inMessageName, inArgs)

    Send a message to me and all my controls

  • destroyControls: function()

    Destroys 'managed controls', the same set of controls returned by getControls.

  • getControls: function()

    Returns the 'non-private managed controls', which is not actually the same as the 'controls' array (note: this is a problem of taxonomy).

  • indexOfControl: function(inControl)

    Returns the index of a given managed control in a component's list of controls. @param inControl {Component} A managed control. @errata Current implementation returns index in this.controls, but index in this.getControls() makes more sense.

  • resized: function()

    Call after this control has been resized to allow it to process the size change. Implement a "resizeHandler" method to respond to being resized.

Inheritance

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

compatibility/webkitGesture.js

compatibility/webosGesture.js

base/layout/Grid.js

enyo.Grid

Extends

enyo.Control

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/layout/HLayout.js

enyo.HLayout

Methods

  • flow: function()

base/layout/FlexLayout.js

enyo.FlexLayout

A layout type that encapsulates the flexible box model exposed by CSS3.

Flex layouts are particularly useful for designs that need to fit objects to spaces. For example, say you have a header, middle section, and footer, and you want the header and footer to be always visible, with the middle section taking up the remaining space.

Note: Traditional HTML is not good at this kind of structure. In HTML, the sizing of objects generally proceeds from the inside out, which is, in a way, the opposite of fitting objects to a fixed space. (This dichotomy in the approach to layout is something that comes up regularly in discussions of Web-centric vs. desktop-centric applications.)

The FlexLayout aligns controls into vertically- or horizontally-stacked boxes. When the flex property is set on a control in a FlexLayout, the control expands to fill the available space not occupied by other controls. If multiple controls have their flex property set, they share the available space, each taking the fraction specified by its own flex value divided by the total flex value. For example, a control with flex: 5 in a layout with a total flex of 20 will take up one-quarter (i.e., 5/20) of the available space.

The pack property specifies how controls are aligned with respect to the main axis. Similarly, the align property specifies how controls are aligned along the orthogonal axis.

See enyo.HFlexLayout and enyo.VFlexLayout.

enyo.HFlexLayout

A horizontal flexible layout that displays controls left-to-right.

To create a caption with natural width, followed by a set of three equally-spaced buttons to the right, try:

{layoutKind: "HFlexLayout", style: "width: 500px;", components: [
    {content: "Here are some buttons:"},
    {kind: "Button", flex: 1, caption: "Left"},
    {kind: "Button", flex: 1, caption: "Center"},
    {kind: "Button", flex: 1, caption: "Right"}
]}

To control the alignment left-to-right, change the pack property's value. To control the alignment top-to-bottom, change the align property's value. For example, this creates a a set of horizontally-centered buttons positioned at the bottom of the container.

{kind: "Control", layoutKind: "HFlexLayout", style: "width: 300px; height: 500px;",
    pack: "center", align: "end", components: [
    {kind: "Button", caption: "Left"},
    {kind: "Button", caption: "Right"}
]}

Extends

enyo.FlexLayout

enyo.VFlexLayout

A vertical flexible layout that displays controls top-to-bottom.

To create a caption with natural height, followed by a set of three equally-spaced buttons below, try:

{layoutKind: "VFlexLayout", style: "height: 500px;", components: [
    {content: "Here are some buttons:"},
    {kind: "Button", flex: 1, caption: "Top"},
    {kind: "Button", flex: 1, caption: "Middle"},
    {kind: "Button", flex: 1, caption: "Bottom"}
]}

To control the alignment top-to-bottom, change the pack property's value. To control the alignment left-to-right, change the align property's value. For example, this creates a a set of vertically-centered buttons positioned at the right of the container.

{kind: "Control", layoutKind: "VFlexLayout", style: "width: 300px; height: 500px;",
    pack: "center", align: "end", components: [
    {kind: "Button", caption: "Top"},
    {kind: "Button", caption: "Bottom"}
]}

Extends

enyo.FlexLayout

enyo.HFlexBox

An HFlexBox displays controls using an enyo.HFlexLayout.

It is equivalent to specifying a Control with layoutKind set to HFlexLayout.

Extends

enyo.Control

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

enyo.VFlexBox

An VFlexBox displays controls using an enyo.VFlexLayout.

It is equivalent to specifying a Control with layoutKind set to VFlexLayout.

Extends

enyo.Control

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/scroller/ScrollStrategy.js

enyo.ScrollStrategy

enyo.ScrollStrategy implements scrolling dynamics simulation. It is a helper kind used by other scroller kinds.

enyo.ScrollStrategy is not typically created in application code.

Extends

enyo.Component

Published Properties

  • vertical: true
  • horizontal: true

Published Events

  • onScrollStart: "scrollStart"
  • onScroll: "scroll"
  • onScrollStop: "scrollStop"

Methods

  • start: function()

Inheritance

Published properties inherited from enyo.Component

owner, name

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/scroller/ScrollFades.js

enyo.ScrollFades

A scroller that provides a visual indication if content can be scrolled to the left, right, top, or bottom.

Extends

enyo.Control

Methods

  • showHideFades: function(inScroller)

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/scroller/DragScroller.js

enyo.DragScroller

enyo.DragScroller is a base kind that integrates the scrolling simulation provided by enyo.ScrollStrategy into a Control.

enyo.ScrollStrategy is not typically created in application code.

Extends

enyo.Control

Published Properties

  • horizontal: true

    Set to false to prevent horizontal scrolling.

  • vertical: true

    Set to false to prevent vertical scrolling.

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/scroller/BasicScroller.js

enyo.BasicScroller

enyo.BasicScroller provides touch-based scrolling for controls placed inside it.

Note that applications will typically create an enyo.Scroller instead of an enyo.BasicScroller.

Scroller provides a viewport in which the user can drag or flick to scroll content. Note that a user can drag beyond a valid scroll position. When this occurs, the scroller moves with increased tension before returning to a valid position with an accompanying animation.

Note that the scrolling of content exceeding the size of the viewport is not automatic; for content to scroll, it must be placed inside a scroller control.

Scroll Axes

By default, content scrolls along both the vertical and horizontal axes.

Scrolling in either dimension can be turned on or off. In addition, a scroller can be set to allow scrolling only when content actually exceeds the scroller's dimensions.

By default, the vertical axis always scrolls, whether or not the content exceeds the scroller's height, while the horizontal axis scrolls only if content exceeds the scroller's width. This automatic scrolling for the horizontal axis is set via the autoHorizontal property. It can be enabled for the vertical axis by setting autoVertical to true.

These auto properties have precedence over the horizontal and vertical properties, which both default to true.

Thus, to disable horizontal scrolling, for example, set both the autoHorizontal and horizontal properties to false.

{kind: "BasicScroller", autoHorizontal: false, horizontal: false}

Scroll Position

Scroll position can be set such that the scroller snaps to a position directly or such that the scroller animates to a position.

To set scroll position directly, without animation, set the scrollTop and scrollLeft properties.

buttonClick: function() {
    // don't allow scrolling beyond a left position of 500
    if (this.$.scroller.getScrollLeft() > 500) {
        this.$.scroller.setScrollLeft(500);
    }
}

To set scroll position with animation, use the scrollTo method.

buttonClick: function() {
    if (this.$.scroller.getScrollTop() > 100 || this.$.scroller.getScrollLeft() > 300) {
        this.$.scroller.scrollTo(100, 300);
    }
}

It's also possible to ensure that a given scroll position is visible in a scroller's viewport by calling the scrollIntoView method. If the scroll position is in view, the scroll position does not change. If not, the scroll position is set to the given position.

Sizing

A scroller control must have explicit dimensions. If it does not, it will simply expand to fit its content and will not provide scrolling. There are a number of ways to ensure that a scroller's dimensions are set, but most commonly, a scroller is placed inside a flex layout and given a flex value. For example,

{kind: "VFlexLayout", components: [
    {kind: "PageHeader", content: "A bunch of info"},
    // NOTE: the scroller has flex set to 1
    {kind: "BasicScroller", flex: 1, components: [
        {kind: "HtmlContent", srcId: "lotsOfText"}
    ]},
    {kind: "Toolbar"}
]}

Extends

enyo.DragScroller

Published Properties

  • scrollTop: 0
  • scrollLeft: 0
  • autoHorizontal: true

    Enables horizontal scrolling only if content exceeds the scroller's width.

  • autoVertical: false

    Enables vertical scrolling only if content exceeds the scroller's height.

  • fpsShowing: false

    Display fps counter

  • accelerated: true

    Use accelerated scrolling.

Published Events

  • onScrollStart: ""

    Event that fires when scrolling starts.

  • onBeforeScroll: ""

    Event that fires just before scroll position changes.

  • onScroll: ""

    Event that fires just after scroll position changes.

  • onScrollStop: ""

    Event that fires when scrolling stops.

Methods

  • getBoundaries: function()

    Returns an object describing the scroll boundaries, which are the dimensions of scrolling content. For example, if getBoundaries returns

    {top: 0, left: 0, bottom: 1000, left: 1000}
    

    then the scrolling content is 1000 by 1000.

  • isScrolling: function()

    Returns true if the scroller is scrolling when called.

  • scrollIntoView: function(inY, inX)

    Ensures that the specified position is displayed in the viewport. If the position is not currently in view, the specified position is scrolled to directly, without animation.

  • scrollTo: function(inY, inX)

    Animates a scroll to the specified position.

  • scrollToBottom: function()

    Sets the scroll position to the bottom of the content, without animation.

Inheritance

Published properties inherited from enyo.DragScroller

horizontal, vertical

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/scroller/Scroller.js

enyo.Scroller

enyo.Scroller provides touch-based scrolling for controls placed inside it. See enyo.BasicScroller for more information.

In addition to providing all the functionality of a BasicScroller, enyo.Scroller ensures that the dimensions of the scroller content are at least as large as the dimensions of the scroller itself.

Since this is typically desirable--it allows a background image to expand to fit the scroller, for one thing--applications should generally use enyo.Scroller.

Extends

enyo.BasicScroller

Inheritance

Published properties inherited from enyo.BasicScroller

scrollTop, scrollLeft, autoHorizontal, autoVertical, fpsShowing, accelerated

Published properties inherited from enyo.DragScroller

horizontal, vertical

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.BasicScroller

onScrollStart, onBeforeScroll, onScroll, onScrollStop

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.BasicScroller

getBoundaries, isScrolling, scrollIntoView, scrollTo, scrollToBottom

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/scroller/TransformScroller.js

base/scroller/SnapScroller.js

enyo.SnapScroller

enyo.SnapScroller is a scroller that snaps to the positions of the controls it contains. When dragged, the scroller moves normally; when a drag is finished, the scroller snaps to the scroll position of the control closest to the dragged position.

Snapping can only occur along one axis at a time. By default this is the horizontal axis. SnapScroller has an HFlexLayout, so its controls layout from left to right. Setting the layoutKind to VFlexLayout will enable vertical snapping. Here's an example:

{kind: "VFlexBox", components: [
    {kind: "SnapScroller", flex: 1, components: [
        {style: "background: red; width: 1000px;"},
        {style: "background: white; width: 1000px;"},
        {style: "background: blue; width: 1000px;"}
    ]}
]}

Extends

enyo.BasicScroller

Published Properties

  • index: 0

    Sets index to scroll directly (without animation) to the position of the control in scroller's list of controls at the value of index.

Published Events

  • onSnap: ""

    Event that fires when the user finishes dragging and snapping occurs.

  • onSnapFinish: ""

    Event that fires when snapping and scroller animation completes.

Methods

  • next: function()

    Scrolls to the control following (right or bottom) the one currently in view.

  • previous: function()

    Scrolls to the control preceding (left or top) the one currently in view.

  • snapTo: function(inIndex)

    Scrolls to the position of the control contained in the scroller's list of controls at inIndex.

Inheritance

Published properties inherited from enyo.BasicScroller

scrollTop, scrollLeft, autoHorizontal, autoVertical, fpsShowing, accelerated

Published properties inherited from enyo.DragScroller

horizontal, vertical

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.BasicScroller

onScrollStart, onBeforeScroll, onScroll, onScrollStop

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.BasicScroller

getBoundaries, isScrolling, scrollIntoView, scrollTo, scrollToBottom

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/scroller/FadeScroller.js

enyo.FadeScroller

Extends

enyo.Scroller

Inheritance

Published properties inherited from enyo.BasicScroller

scrollTop, scrollLeft, autoHorizontal, autoVertical, fpsShowing, accelerated

Published properties inherited from enyo.DragScroller

horizontal, vertical

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.BasicScroller

onScrollStart, onBeforeScroll, onScroll, onScrollStop

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.BasicScroller

getBoundaries, isScrolling, scrollIntoView, scrollTo, scrollToBottom

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/list/Flyweight.js

enyo.Flyweight

A control designed to be rendered multiple times. Typically, controls provide dynamic behavior in response to events and effect changes in rendering. Because flyweight is rendered multiple times, the question comes up: which rendering of the flyweight should update when an event occurs? To address this issue, whenever a DOM event is processed by a Flyweight object or any of its children, the flyweight automatically updates itself and its children to point to the rendering of itself in which the event occurred.

Extends

enyo.Control

Published Events

  • onNodeChange: ""
  • onDecorateEvent: ""

Methods

  • disableNodeAccess: function()
  • enableNodeAccess: function()
  • findNode: function(inNode)
  • setNodeByEvent: function(inEvent)

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

enyo.Flyweight.callWithoutNode

enyo.Flyweight.callWithoutNode: function(inControl, inFunc)
base/list/StateManager.js

base/list/RowServer.js

base/repeaters/Repeater.js

enyo.Repeater

Extends

enyo.Control

Published Properties

  • shouldDecorateRows: true

    Optionally decorate each row control with the row index, set via the "rowIndex" property. Decorating row items allows code to easily distinguish which row a control is in.

Published Events

  • onSetupRow: ""

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/repeaters/VirtualRepeater.js

enyo.VirtualRepeater

A control that displays a repeating list of rows. It is suitable for displaying medium-sized lists (maximum of ~100 items). A flyweight strategy is employed to render one set of row controls as needed for as many rows as are contained in the repeater.

A VirtualRepeater's components block contains the controls to be used for a single row. This set of controls will be rendered for each row.

The onSetupRow event allows for customization of row rendering. Here's a simple example:

components: [
    {kind: "VirtualRepeater", onSetupRow: "getItem", components: [
        {kind: "Item", layoutKind: "HFlexLayout", components: [
            {name: "caption", flex: 1},
            {kind: "Button", onclick: "buttonClick"}
        ]}
    ]}
],
getItem: function(inSender, inIndex) {
    if (inIndex < 100) {
        this.$.caption.setContent("I am item: " + inIndex);
        this.$.button.setCaption("Button" + inIndex);
        return true;
    }
}

In the above example, the control named "item" will be rendered for each row. When a row is rendered, the onSetupRow event is fired with the row index. The getItem method sets properties on controls in the row to customize the rendering of the row. Notice that it returns true if the index is less than 100. An onSetupRow handler must return true to indicate that the given row should be rendered. If it does not, the repeater will stop rendering.

Continuing with the above example, we have given the button an onclick handler. As previously noted, the button is rendered for each of the 100 rows. The onclick handler will fire for a click on any of the row buttons. It is common to need to know the exact row on which a user clicked. Events fired from within repeater rows contain this information in the rowIndex property of the DOM event object. For example:

buttonClick: function(inSender, inEvent) {
    this.log("The user clicked on item number: " + inEvent.rowIndex);
}

Extends

enyo.Control

Published Properties

  • accelerated: false
  • stripSize: 10

Published Events

  • onSetupRow: ""

Methods

  • controlsToRow: function(inRowIndex)

    Updates the repeater's controls to act as if they were rendered in the row with the given index. inRowIndex is the numeric index of the row to prepare.

  • fetchRowIndex: function()

    Fetches the index of the row that is currently receiving events.

  • fetchRowIndexByNode: function(inNode)

    Fetches the row index for a node in a repeater row. inNode is a node that is contained in a repeater row. Returns the index of the row in which inNode exists.

  • fetchRowNode: function(inRowIndex)

    Fetches the DOM node for the given row index.

  • renderRow: function(inRowIndex)

    Re-renders the content for a given row. inRowIndex is the numeric index of the row to render.

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/controls/LazyControl.js

enyo.LazyControl

A control that optionally defers creation of its components based on the setting of the lazy property. Call validateComponents to create and render components.

Extends

enyo.Control

Methods

  • componentsReady: function()

    Called after components are initialized. Use for initialization instead of create.

  • validateComponents: function()

    Ensures that components are created.

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/controls/Image.js

enyo.Image

An image control displays an image specified via the src property. The src can be an absolute or relative url. It can also be a path relative to any loaded enyo package.

For example:

{kind: "Image", src: "http://www.example.com/image.jpg"},
{kind: "Image", src: "images/image.jpg"},
{kind: "Image", src: "$enyo-Heritage/images/popup-heritage.png"}

To change the image, use setSrc as follows:

buttonClick: function() {
    this.$.image.setSrc("images/image2.jpg");
}

Extends

enyo.Control

Published Properties

  • src: "$base-themes-default-theme/images/blank.gif"

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/controls/Stateful.js

enyo.Stateful

A control primitive that can add or remove a CSS class based on the boolean value of a given state.

Stateful is a base kind that is typically not itself created.

Extends

enyo.Control

Published Properties

  • cssNamespace: "enyo"

    Prefix for css classes applied via setState.

Methods

  • setState: function(inState, inValue)

    Adds or removes a CSS state class specified by inState. If inValue is true, the class is added; if false, it is removed. The CSS class name is formed by combining the value of the cssNamespace property, a "-" character, and the value of inState. For example:

    this.$.stateful.setState("down", true);
    

    With the default cssNamespace of "enyo", this applies the CSS class "enyo-down" to this control. Note that multiple state classes may be applied.

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/controls/CustomButton.js

enyo.CustomButton

A CustomButton is a button without any visual treatment. It should be used when a button primitive with unique appearance is desired. Typically, a CSS class is specified via the className property. CustomButton implements mouse handling for a well-defined set of states. Initialize a button as follows:

{kind: "CustomButton", caption: "OK", className: "myButton", onclick: "buttonClick"}

Set the toggling property to true to create a button with toggling behavior of down when clicked and up when clicked again.

Extends

enyo.Stateful

Published Properties

  • caption: ""
  • disabled: false
  • isDefault: false
  • down: false
  • depressed: false
  • hot: false
  • toggling: false
  • allowDrag: false

Inheritance

Published properties inherited from enyo.Stateful

cssNamespace

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Stateful

setState

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/controls/Button.js

enyo.Button

The button control displays a themed button with a caption. If you need to display a button with custom visual treatment, use a custom button. Initialize a button as follows:

{kind: "Button", caption: "OK", onclick: "buttonClick"}

Extends

enyo.CustomButton

Inheritance

Published properties inherited from enyo.CustomButton

caption, disabled, isDefault, down, depressed, hot, toggling, allowDrag

Published properties inherited from enyo.Stateful

cssNamespace

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Stateful

setState

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/controls/AjaxContent.js

enyo.AjaxContent

A control that displays HTML loaded via an AJAX call to a remote url. Using an AjaxContent is a convenient way to specify a large amount of HTML.

Content is loaded asynchronously, and the onContentChanged event is fired when content is received.

{kind: "AjaxContent", url: "www.example.com/someText.html", onContentChanged: "ajaxContentChanged"}

To modify the value of the loaded content, implement the onContentChanged event and alter the value of the content property as follows:

ajaxContentChanged: function(inSender) {
    // change content to be all uppercase
    inSender.content = inSender.content.toUpperCase();
}

Extends

enyo.Control

Published Properties

  • url: ""

Published Events

  • onContentChanged: ""

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/controls/HtmlContent.js

enyo.HtmlContent

A control that displays HTML content defined in a web page's HTML source. Using an HtmlContent is a convenient way to specify a large amount of HTML.

The content property of a control can be used to specify HTML content, but it's not desirable to place a large amount of content in a components block:

{content: "This is some short text"}

Instead, use an HtmlContent. In an application's index.html file:

<body>
    <div id="myContent">This could be a large chunk of HTML.</div>
</body>

Then, in a kind's components block:

{kind: "HtmlContent", srcId: "myContent", onLinkClick: "htmlContentLinkClick"}

Note: Remember that in web page parsing, elements in the page defined after a <script> element aren't accessible to the script, as they've not yet been parsed and added to the DOM. So you should define those <div> elements in your body before your script tag is run to create the application objects.

HtmlContent provides special handling for links. Instead of navigating to the web page specified in a link when it is clicked, an onLinkClick event is generated. The second event argument is the URL of the link:

htmlContentLinkClick: function(inSender, inUrl) {
    // do something when the link is clicked.
    this.$.webView.setUrl(inUrl);
}

Extends

enyo.Control

Published Properties

  • srcId: ""

    optional ID of an element in the page from which to pull HTML content. If not set, this acts like an enyo.Control which has its allowHtml property set to true.

Published Events

  • onLinkClick: ""

    Event sent when a link inside the HtmlContent is clicked

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/controls/BasicInput.js

enyo.BasicInput

A text input primitive with default visual treatment. For example:

{kind: "BasicInput", value: "hello", onchange: "inputChange", onfocus: "inputFocus"}

The value property specifies the text displayed in the input. Note: the value property does not update as a user types. Instead, when the input blurs (loses focus), the value property updates and the onchange event is fired.

It is common to use getValue and setValue to get and set the value of an input; for example, to set the value of one input to that of another:

buttonClick: function() {
    var x = this.$.input1.getValue();
    this.$.input2.setValue(x);
}

Extends

enyo.Control

Published Properties

  • value: ""
  • disabled: false
  • readonly: false
  • placeholder: ""
  • placeholderClassName: ""
  • disabledClassName: "enyo-input-disabled"
  • tabIndex: ""

Published Events

  • onfocus: ""
  • onblur: ""
  • onchange: ""
  • onkeypress: ""

Methods

  • forceBlur: function(inCallback, inSync)

    Forces this input to be blurred (lose focus).

  • forceFocus: function(inCallback, inSync)

    Forces the input to receive keyboard focus.

  • forceSelect: function(inCallback, inSync)

    Forces selection of all text in this input.

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/controls/Input.js

enyo.Input

A text input control that supports auto-correction and hint text, and has default visual styling. To create an Input:

{kind: "Input", hint: "type something here", onchange: "inputChange"}

The value property specifies the text displayed in the input. The onchange event fires only when the input blurs (loses focus). Listen for the oninput event to get notified as the input content changes.

It is common to use getValue and setValue to get and set the value of an input; for example, to set the value of one input to that of another:

buttonClick: function() {
    var x = this.$.input1.getValue();
    this.$.input2.setValue(x);
}

Note: To properly style an Input in a group, use a RowGroup, like so:

{kind: "RowGroup", components: [
    {kind: "Input"},
    {kind: "Input"},
    {kind: "Input"}
]}

Extends

enyo.Control

Published Properties

  • hint: enyo._$L("Tap Here To Type")
  • value: ""
  • tabIndex: ""
  • spellcheck: true
  • autocorrect: true
  • autoKeyModifier: ""

    Possible settings: "num-lock", "caps-lock", "shift-lock", "shift-single", "num-single"

  • autoCapitalize: "sentence"

    Possible settings: "sentence", "title", "lowercase" (actual attribute is cap +)

  • autoEmoticons: false

    Set to true to enable auto-emoticons support.

  • autoLinking: false

    Set to true to enable auto-linking support.

  • autoWordComplete: true

    Set to false to disable automatic word completion.

  • inputType: ""

    Specifies the 'type' attribute on the input field. On webOS, this modifies the virtual keyboard layout. Supported values are "email" and "url".

  • inputClassName: ""

    CSS class to apply to the inner input control

  • focusClassName: "enyo-input-focus"

    CSS class to apply on focus

  • spacingClassName: "enyo-input-spacing"

    CSS class to apply to inner controls to control spacing

  • alwaysLooksFocused: false

    Set to true to make the input look focused when it's not.

  • selection: null

    The selection property is an object describing selected text. The start and end properties specify the zero-based starting and ending indexes of the selection. For example, if an input value is "Value" and getSelection returns {start: 1, end: 3}, then "al" is selected. To select "alu," call:

    this.$.input.setSelection({start: 1, end: 4});
    

  • disabled: false
  • changeOnInput: false

    Set to true to fire the onchange event as well as the oninput event whenever the input content is changed.

  • keypressInputDelay: 0

    Set to the number of milliseconds to delay the input event when a key is pressed. If another key is pressed within the delay interval, the input will be postponed and fired once only after the delay has elapsed without a key being pressed.

  • styled: true

    Set to false to avoid any default styling from being applied.

  • selectAllOnFocus: false

    Set to true to select all text when the input gains focus.

Published Events

  • onfocus: ""
  • onblur: ""
  • onchange: ""
  • oninput: ""
  • onmousedown: ""
  • onmouseup: ""
  • onkeypress: ""

    The onkeypress event can be used to filter out disallowed characters.

Methods

  • forceBlur: function(inCallback, inSync)

    Forces this input to be blurred (lose focus).

  • forceFocus: function(inCallback, inSync)

    Forces this input to be focused.

  • forceFocusEnableKeyboard: function()

    Forces this input to be focused and sets the keyboard to automatic mode.

  • forceSelect: function(inCallback, inSync)

    Forces selection of all text in this input.

  • hasFocus: function()

    Returns true if the input has keyboard focus.

  • isEmpty: function()

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/controls/InputBox.js

enyo.InputBox

A box styled like an input control. Use to arrange a set of controls adjacent to an input with all of the controls appearing to be inside the input. Note that by default, InputBox has a layoutKind of HFLexLayout.

For example, to place controls to the left and right of an input:

{kind: "InputBox", components: [
    {content: "Foo"},
    {kind: "BasicRichText", flex: 1, className: "enyo-input-inner"},
    {content: "Bar"}
]}

Extends

enyo.Control

Published Properties

  • alwaysLooksFocused: false
  • focusClassName: "enyo-input-focus"
  • spacingClassName: "enyo-input-spacing"

Published Events

  • onfocus: ""
  • onblur: ""

Methods

  • alwaysLooksFocusedChanged: function()
  • blurHandler: function(inSender, inEvent)
  • create: function()
  • focusHandler: function(inSender, inEvent)
  • layoutKindChanged: function()
  • spacingClassNameChanged: function(inOldValue)

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/controls/BasicRichText.js

enyo.BasicRichText

A multi-line text input that supports rich formatting such as bold, italics, and underlining. Note that rich formatting can be disabled by setting the richContent property to false.

Use the value property to get or set the displayed text. The onchange event fires when the control blurs (loses focus).

Create a BasicRichText as follows:

{kind: "BasicRichText", value: "To <b>boldly</b> go..", onchange: "richTextChange"}

Extends

enyo.BasicInput

Published Properties

  • richContent: true

Methods

  • getHtml: function()

Inheritance

Published properties inherited from enyo.BasicInput

value, disabled, readonly, placeholder, placeholderClassName, disabledClassName, tabIndex

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.BasicInput

onfocus, onblur, onchange, onkeypress

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.BasicInput

forceBlur, forceFocus, forceSelect

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/controls/RichText.js

enyo.RichText

A multi-line text input that supports rich formatting such as bold, italics, and underlining. Note that rich formatting can be disabled by setting the richContent property to false.

Use the value property to get or set the displayed text. The onchange event fires when the control blurs (loses focus).

Create a RichText as follows:

{kind: "RichText", value: "To <b>boldly</b> go..", onchange: "richTextChange"}


A styled rich text control.

See <a href="#enyo.RichText">enyo.RichText</a> for more information.

Extends

enyo.Input

Published Properties

  • richContent: true
  • maxTextHeight: null
  • selection: null

    The selection property is a DOM Selection object describing the selected text. It cannot be set. Instead, the selection can be altered by manipulating the object directly via the DOM Selection object API. For example, this.$.richText.getSelection().collapseToEnd();

Published Events

  • onchange: ""

Inheritance

Published properties inherited from enyo.Input

hint, value, tabIndex, spellcheck, autocorrect, autoKeyModifier, autoCapitalize, autoEmoticons, autoLinking, autoWordComplete, inputType, inputClassName, focusClassName, spacingClassName, alwaysLooksFocused, selection, disabled, changeOnInput, keypressInputDelay, styled, selectAllOnFocus

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Input

onfocus, onblur, onchange, oninput, onmousedown, onmouseup, onkeypress

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Input

forceBlur, forceFocus, forceFocusEnableKeyboard, forceSelect, hasFocus, isEmpty

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/controls/AnimatedImage.js

enyo.AnimatedImage

A control that animates based on its CSS background image. The className property should refer to a valid CSS class that defines a background image.

The background image should be constructed so that it contains a series of animation frames stacked vertically. The imageHeight property should be set to the height of an animation frame, and imageCount should be set to the number of frames.

The tick property changes animation speed by controlling the number of milliseconds between frames. Use the repeat property to set the number of times the animation should repeat. The default value of 0 indicates that the animation should repeat indefinitely.

Here's an example:

{kind: "AnimatedImage", className: "snoopyAnimation", imageHeight: "200", imageCount: "10"}

Call the start method to start the animation and the stop method to stop it:

startButtonClick: function() {
    this.$.animatedImage.start();
},
stopButtonClick: function() {
    this.$.animatedImage.stop();
}

Extends

enyo.Control

Published Properties

  • imageCount: 0
  • imageHeight: 32
  • repeat: -1
  • easingFunc: enyo.easing.linear

Methods

  • start: function()
  • stop: function()

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/controls/Iframe.js

enyo.Iframe

An iframe control loads inline a web page specified by its url property.

{kind: "IFrame", url: "www.example.com"}

Note that when the user interacts with the page loaded in the iframe and navigates to a different web page, the value of the url property does not update. To retrieve the currently loaded page, call fetchCurrentUrl. To reload the page specified by the url property, call refresh.

For example, to reload the page corresponding to the url property if it's not the currently displayed URL:

buttonClick: function() {
    if (this.$.iframe.getUrl() != this.$.iframe.fetchCurrentUrl()) {
        this.$.iframe.refresh();
    }
}

Extends

enyo.Control

Published Properties

  • url: ""

    URL of the web page to load in the iframe.

  • tabIndex: null

Methods

  • fetchCurrentUrl: function()

    Returns the URL of the loaded page. This URL is not necessarily the same as the value of the url property because the value of this.url is not updated when a user navigates to a different URL by interacting with the loaded page.

  • goBack: function()

    Navigates to the previous web page in the history list.

  • goForward: function()

    Navigates to the next web page in the history list.

  • refresh: function()

    Reloads the page specified by the value of the url property. Note that this is not necessarily the same as the currently displayed URL because the url property does not update when the user interacts with the loaded page.

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/controls/PopupLayer.js

enyo.PopupLayer

Extends

enyo.Control

Methods

  • create: function()
  • getChildContent: function()
  • hasNode: function()
  • render: function()
  • rendered: function()
  • teardownChildren: function()

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

enyo.getPopupLayer

enyo.getPopupLayer: function()
base/controls/BasicPopup.js

enyo.BasicPopup

Base kind for popup controls. Generally not for direct use.

Extends

enyo.LazyControl

Published Properties

  • modal: false
  • dismissWithClick: true
  • dismissWithEscape: true
  • shareScrim: true
  • scrimWhenModal: true
  • scrim: false
  • scrimClassName: ""
  • autoClose: false

    Close automatically if the application is minimized. Note that the popup will also close automatically in this case if dismissWithClick is true.

Published Events

  • onBeforeOpen: ""

    Event fired right before the popup is opened. If the popup's contained components are created lazily, they will be ready at this time. By handling this event, it's possible to affect popup contents before the popup is displayed.

    inFirstOpen {Boolean} Flag indicating if this is the first time the popup has opened.

  • onOpen: ""

    Event fired after the popup has been opened.

  • onClose: ""

    Event fired after the popup is closed.

    inEvent {Event} (optional) event that triggered the close. inReason {String} (optional) reason the popup was closed.

Methods

  • close: function(inEvent, inReason)

    Closes the popup. The inReason argument describes why the popup was closed. Any control inside a popup that has a popupHandler property will close the popup when clicked and will pass the value of popupHandler as the reason the popup was closed. In addition, the popup can be closed automatically in some cases and will pass a message of the form "popup:reason" in this case. For example, when a popup is open and is destroyed, it is closed with the reason "popup:destroyed."

    inEvent {Event} Event that triggered the close. inReason {String} Reason that this popup closed.

  • open: function()

    Opens the popup in its current position.

  • toggleOpen: function()

    If the popup is open, closes it; otherwise, opens it.

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.LazyControl

componentsReady, initComponents, validateComponents

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/controls/Popup.js

enyo.Popup

A popup is just floating elements embedded directly within the page context. It can popup/open at a specified position, and has support for modality and click to dismiss/close.

{kind: "Popup", components: [
    {content: "Hello World!"},
    {kind: "ListSelector", value: "Foo", items: ["Foo", "Bar", "Bot"]}
]}

To open the popup at the center:

openPopup: function() {
    this.$.popup.openAtCenter();
}

If dismissWithClick is set to true (default) and modal is false (default), then clicking anywhere not inside the popup will dismiss/close the popup. Also, you can close the popup programmatically by doing this:

closePopup: function() {
    this.$.popup.close();
}

Extends

enyo.BasicPopup

Published Properties

  • showHideMode: "auto"

    Controls how the popup will be shown and hidden:

    auto: when open and close are called, the popup will be shown and hidden
    manual: will not be shown or hidden; use this mode when controlling popup via custom animation
    transition: will be shown when opened and hidden when a css transition completes; use this 
    mode when animating via css transitions.
    

  • openClassName: ""

    CSS class that will be applied when the popup is open

  • showKeyboardWhenOpening: false

    If true, shows the keyboard before opening the popup. Manual keyboard mode is enabled when the popup is opened and must be restored for the keyboard to work automatically. It is most common to use this option when an Input should be focused when the keyboard is shown. In this case, implement an onOpen handler for the popup and focus the input using the method forceFocusEnableKeyboard, e.g., this.$.input.forceFocusEnableKeyboard();

Methods

  • openAroundControl: function(inControl, inAlwaysBelow, inAlign)

    Opens at the bottom, right of the specified control.

  • openAt: function(inRect, inReposition)

    Opens at the location specified by a location relative to the viewport.

    inRect {Object} rectangle specifying where to open the popup. May contain left, top or right, bottom properties. If both are specified left,top is used.

  • openAtCenter: function()

    Opens in the center of the viewport.

  • openAtControl: function(inControl, inOffset)

    Opens at the location of the specified control. If there is space, the popup's top, left corner will be displayed at the top, left position of the control. Otherwise, the popup's bottom, right will be displayed at the bottom, right of the control.

    inControl {Control} Control at whose location the popup will open.

    inOffset {Object} Object that may contain left and top properties to specify an offset relative to the location the popup would otherwise be positioned.

  • openAtEvent: function(inEvent, inOffset)

    Opens at the location of a mouse event (inEvent). The popup's position is automatically constrained so that it does not display outside the viewport.

    inEvent {Object} Dom mouse event object at the position of which, popup will open

    inOffset {Object} Object that may contain left and top properties to specify an offset relative to the location the popup would otherwise be positioned.

  • openNear: function(inDimensions, inAround, inAlwaysBelow)

Inheritance

Published properties inherited from enyo.BasicPopup

modal, dismissWithClick, dismissWithEscape, shareScrim, scrimWhenModal, scrim, scrimClassName, autoClose

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.BasicPopup

onBeforeOpen, onOpen, onClose

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.BasicPopup

close, open, toggleOpen

Methods inherited from enyo.LazyControl

componentsReady, initComponents, validateComponents

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/controls/Scrim.js

enyo.Scrim

A scrim is used to temporarily disable an application's user interface. It covers the screen with a translucent layer.

It's possible to create a scrim in a components block, but this usage is not common. Typically, a scrim is shown using enyo.scrim.show().

To show a scrim for 5 seconds:

buttonClick: function() {
    enyo.scrim.show();
    setTimeout(enyo.scrim.hide, 5000);
}

To show a scrim while a service is in flight:

components: [
    {kind: "PalmService", onResponse: "serviceResponse"},
    {kind: "Button", caption: "Call Service", onclick: "buttonClick"}
],
buttonClick: function() {
    this.$.service.call();
    enyo.scrim.show();
},
serviceResponse: function() {
    enyo.scrim.hide();
}

To show a scrim and then hide it when the user clicks on it:

components: [
    {kind: "Button", caption: "Show scrim", onclick: "buttonClick"},
    {kind: "Scrim", onclick: "scrimClick"}
],
buttonClick: function() {
    this.$.scrim.show();
},
scrimClick: function() {
    this.$.scrim.hide();
}

Extends

enyo.Control

Methods

  • addRemoveShowingClassName: function(inAdd)

    Adds or removes the specified class.

  • hideAtZIndex: function(inZIndex)

    Hides scrim at the specified ZIndex.

  • setZIndex: function(inZIndex)

    Sets scrim to show at the specified ZIndex.

  • showAtZIndex: function(inZIndex)

    Shows scrim at the specified ZIndex.

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/controls/LabeledContainer.js

enyo.LabeledContainer

A simple container with a label specified by the label property. By default, layoutKind is set to HFlexBox, and thus the label is displayed to the left of the container's content. Change layoutKind to VFlexBox to place the label above the content. The label will fill any space not taken up by the content.

NOTE: If additional control over the styling of the label or container content is required, use separate controls instead of a LabeledContainer.

{kind: "LabeledContainer", label: "3 buttons", components: [
    {kind: "Button", caption: "1"},
    {kind: "Button", caption: "2"},
    {kind: "Button", caption: "3"}
]}

Extends

enyo.HFlexBox

Published Properties

  • label: ""

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/controls/Progress.js

enyo.Progress

A virtual base class for anything with a range and position within that range, like a ProgressBar or Slider.

To set the progress, do this:

madeProgress: function(inValue) {
    this.$.progress.setPosition(inValue);
}

The default range is 0-100, but it can be customized like so:

{kind: "Progress", minimum: 50, maximum: 220, position: 70}

This will make a progress with a range of 50-220 and an initial position of 70.

Extends

enyo.Control

Published Properties

  • maximum: 100

    The maximum value of the range.

  • minimum: 0

    The minimum value of the range.

  • position: 0

    The current progress.

  • snap: 1

    The position will be rounded to a multiple of this property.

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/containers/Box.js

enyo.Box

Extends

enyo.Control

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

enyo.HBox

Extends

enyo.Box

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

enyo.VBox

Extends

enyo.Box

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/containers/BasicDrawer.js

enyo.BasicDrawer

A basic drawer control that animates vertically to open and close. The drawer may be opened by calling setOpen(true) or just open; it may be closed by calling setOpen(false) or just close. For example,

{kind: "Drawer", components: [
    {content: "Now you see me now you don't"},
    {kind: "Button", caption: "Close drawer", onclick: "closeDrawer"}
]}

Then, to close the drawer:

closeDrawer: function(inSender) {
    this.$.drawer.close();
}

Extends

enyo.Control

Published Properties

  • open: true

    Specifies whether the drawer should be open.

  • canChangeOpen: true

    Controls whether or not the value of the open property may be changed.

  • animate: true

    Set to false to avoid animations when the open state of a drawer changes.

Published Events

  • onOpenChanged: ""

    Event that fires when a drawer opens or closes.

  • onOpenAnimationComplete: ""

    Event that fires when a drawer animation completes.

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/containers/Drawer.js

enyo.Drawer

A drawer control with a label, which animates vertically to open and close. The drawer may be opened by calling setOpen(true) or just open; it may be closed by calling setOpen(false) or just close. For example,

{kind: "Drawer", caption: "Drawer", components: [
    {content: "Now you see me now you don't"},
    {kind: "Button", caption: "Close drawer", onclick: "closeDrawer"}
]}

Then, to close the drawer:

closeDrawer: function(inSender) {
    this.$.drawer.close();
}

Extends

enyo.Control

Published Properties

  • open: true

    Specifies whether the drawer should be open.

  • canChangeOpen: true

    Controls whether or not the value of the open property may be changed.

  • animate: true

    Set to false to avoid animations when the open state of a drawer changes.

  • captionClassName: ""

    CSS class to apply to the drawer caption.

  • caption: ""

    Caption to display above drawer content.

Published Events

  • onOpenChanged: ""

    Event that fires when a drawer opens or closes.

  • onOpenAnimationComplete: ""

    Event that fires when a drawer animation completes.

Methods

  • close: function()

    Convenience method to close a drawer; equivalent to setOpen(false).

  • open: function()

    Convenience method to open a drawer; equivalent to setOpen(true).

  • toggleOpen: function()

    Toggles the open state of the drawer.

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/containers/Pane.js

enyo.Pane

Pane is designed to host a set of view controls and show one view at a time. Any view may be selected and shown as needed. When a view is selected, it animates into display based on the type of transition specified in the transitionKind property. By default, views fade in. To specify a Pane with views that fly in, try:

{kind: "Pane", transitionKind: "enyo.transitions.LeftRightFlyin", components: [
    {kind: "mainView"},
    {kind: "otherView"}
]}

While a view may be any kind of control, views are typically complex collections of controls. Therefore it's often convenient to create kinds for each view, as in the example above. Also note that each view will be sized to fit the dimensions of the pane.

By default, the first view is selected (displayed). There are several ways to select views; use whichever method is most convenient for the application. For example, to select a view by reference:

this.$.pane.selectView(this.$.otherView);

To select a view by name:

this.$.pane.selectViewByName("otherView");

To select by index:

this.$.pane.selectViewByIndex(1);

Pane also maintains a history list of views that have been selected. This list may be navigated using the back and next methods.

Frequently, an application will need to retrieve information about the currently selected view. A pane's view property references the currently selected view. The getViewName and getViewIndex methods return the name and index of the selected view, respectively.

The onSelectView event fires whenever the selected view changes. For example:

{kind: "Pane", onSelectView: "viewSelected", components: [
    {kind: "mainView"},
    {kind: "searchView"}
]}

In the following example, we stop search processing when the search view is hidden:

viewSelected: function(inSender, inView, inPreviousView) {
    if (inPreviousView.name == "searchView") {
        this.cancelSearch();
    }
}

Pane also supports a performance-enhancing optimization that can defer the creation of views until they are selected. To enable this optimization, mark individual views with the lazy property set to true:

{kind: "Pane", components: [
    {kind: "mainView"},
    {kind: "otherView", lazy: true}
]}

You must use selectViewByName to select a view that has not yet been created:

this.$.pane.selectViewByName("otherView");

It's also possible to verify that a lazy marked view has been created without selecting it, by calling validateView(inName);

Extends

enyo.Control

Published Properties

  • transitionKind: "enyo.transitions.Fade"

Published Events

  • onSelectView: ""

    Event that fires whenever a view is selected. The event contains the current view and previous view. For example:

    viewSelected: function(inSender, inView, inPreviousView) {
        inView.startProcessing();
        inPreviousView.endProcessing();
    }
    

  • onCreateView: ""

    Event that fires when a view is selected by name but does not exist in either the view list or the set of lazy marked views. Handle this event to dynamically create the view. The event contains the requested view name. For example:

    paneCreateView: function(inSender, inName) {
        if (inName == "searchView") {
            this.$.pane.createComponent({kind: "searchView", owner: this});
        }
    }
    

Methods

  • back: function(e)

    Pane maintains a history of selected views in the history property. The back method selects the previous view in the history.

  • getView: function()

    Returns the currently selected view.

  • getViewIndex: function()

    Returns the index of the currently selected view.

  • getViewName: function()

    Returns the name of the currently selected view.

  • next: function()

    Pane maintains a history of selected views in the history property. The next method selects the next view in the history. This method is typically called in conjunction with back.

  • selectView: function(inView, inSync)

    Selects the view specified by the inView reference. Fires the onSelectView event. Set inSync to true to ensure that the view is selected sychronously.

  • selectViewByIndex: function(inIndex, inSync)

    Selects the view with the index inIndex. Fires the onSelectView event. Set inSync to true to ensure that the view is selected sychronously.

  • selectViewByName: function(inName, inSync)

    Selects the view with the name inName. Fires the onSelectView event. Set inSync to true to ensure that the view is selected sychronously.

  • validateView: function(inName)

    Checks whether the view specified by inName exists. If it does not exist, attempts to create the view by name from the list of lazy marked views. If the view is not found, fires the onCreateView event, which can be implemented to dynamically create a view by name.

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/containers/PaneLayout.js

enyo.PaneLayout

The layoutKind for a Pane.


base/containers/Transitions.js

enyo.transitions.Simple

A transition between two controls with no delay and no effect.

Extends

enyo.Component

Inheritance

Published properties inherited from enyo.Component

owner, name

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

enyo.transitions.LeftRightFlyin

A transition between two controls that animates the new control sliding in from the right or left.

Extends

enyo.transitions.Simple

Inheritance

Published properties inherited from enyo.Component

owner, name

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

enyo.transitions.Fade

A transition between two controls that animates a fade between them.

Extends

enyo.transitions.Simple

Inheritance

Published properties inherited from enyo.Component

owner, name

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/containers/FloatingHeader.js

enyo.FloatingHeader

A header that floats over the content at the top of its parent. Specify header content using a components block or the content property.

{kind: "FloatingHeader", content: "Page Header"}

or

{kind: "FloatingHeader", layoutKind: "HFlexLayout", components: [
    {content: "Header", flex: 1},
    {kind: "Button", caption: "Go"}
]}

Extends

enyo.Control

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/services/BasicService.js

enyo.BasicService

An enyo.BasicService manages interaction with a process whose response is available asynchronously. When the process is complete, the onResponse event, containing the service response, fires. If the response was successful, the onSuccess event fires; if not, the onFailure event fires.

To initiate the service, call the request method. Any properties relevant to the request should be passed in the inProps object. Note that a BasicService makes no assumptions about the actual asynchronous process. Instead, the request method creates an enyo.Request component, which manages the service request. A service may specify a requestKind, which is the kind for the request component. For example:

{kind: "Service", onResponse: "serviceResponse"}

To initiate this service, do the following:

buttonClick: function() {
    this.$.service.request({index: 27, message: ""});
},
serviceResponse: function(inSender, inResponse, inRequest) {
    // process response
}

Extends

enyo.Component

Published Properties

  • service: ""

    The name of the service. This information is delegated to the Request component.

  • timeout: 0

    The timeout, specified in milliseconds, after which the service should return a failure condition. If a request times out, the request object will have its didTimeout property set to true. A zero value indicates that no timeout will be checked.

Published Events

  • onSuccess: ""

    (inSender, inResponse, inRequest) Event sent when request returns as successful

  • onFailure: ""

    (inSender, inResponse, inRequest) Event sent when request returns as failure

  • onResponse: ""

    (inSender, inResponse, inRequest) Event sent always when request returns, whether successful or not

Methods

  • cancel: function()

    Cancels all requests.

  • request: function(inProps)

    Returns a new service Request component.

Inheritance

Published properties inherited from enyo.Component

owner, name

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

enyo.Request

An enyo.Request component is an abstract kind that manages a single asynchronous process. Request components are typically customized to perform specific tasks, like making an AJAX call.

Request components are not typically created on their own. Instead, they are made by an enyo.Service.

The call method should be implemented to initiate the request processing. The receive method should be called with the response. For example, the following simply calls the receive method with some dummy data:

call: function() {
    var dummyRequest = enyo.bind(this, "receive", {result: "ok"});
    setTimeout(dummyRequest, 100);
}

Extends

enyo.Component

Published Events

  • onRequestSuccess: "responseSuccess"
  • onRequestFailure: "responseFailure"
  • onRequestResponse: "response"

Methods

  • call: function()

    Initiates the request.

  • isFailure: function(inResponse)

    Called to determine if the response was a failure; usually overridden by specific Request types.

  • receive: function(inResponse)

    Processes the request's response.

Inheritance

Published properties inherited from enyo.Component

owner, name

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/services/Service.js

enyo.Service

An enyo.Service manages interaction with a process whose response is available asynchronously. See enyo.BasicService for more information.

In addition to the functionality of enyo.BasicService, enyo.Service adds support for making multiple request calls. Use the call method to initiate a service call. The call method takes two arguments. The first, inParams, is the parameters the request should use to make the service request; the second, inProps, can optionally customize the request itself. It's most common to pass event handler delegate names via call.

Here's an example:

{kind: "Service", service: "importantService", onResponse: "genericResponse"}

The service could be called in a variety of ways:

this.$.service.call({index: 5});

In this case, the genericResponse method will be called with the service response.

this.$.service.call({index: 10}, {onResponse: ""});

Extends

enyo.BasicService

Methods

  • call: function(inParams, inProps)

    Calls a service.

    inParams {Object} Parameters to send to the service.

    inProps {Object} (optional) Properties to set on the service call request, can include: onSuccess, onFailure, onResponse, name. You can pass additional properties here that will be visible in the event handlers via the inRequest argument.

  • cancelCall: function(inName)

    Cancels a specific service call request.

    inName {String} Name of the service call to cancel.

Inheritance

Published properties inherited from enyo.BasicService

service, timeout

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.BasicService

onSuccess, onFailure, onResponse

Methods inherited from enyo.BasicService

cancel, request

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/services/MockService.js

enyo.MockService

Extends

enyo.Service

Published Properties

  • method: ""
  • subscribe: false

Methods

  • call: function()

Inheritance

Published properties inherited from enyo.BasicService

service, timeout

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.BasicService

onSuccess, onFailure, onResponse

Methods inherited from enyo.Service

call, cancelCall

Methods inherited from enyo.BasicService

cancel, request

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/services/WebService.js

enyo.WebService

A web service component initiates and processes an AJAX request. This component is an abstraction of the XMLHttpRequest object.

To initialize a web service component:

{name: "getWeather", kind: "WebService",
    url: "http://somewebsite.com/weather.json",
    onSuccess: "gotWeather",
    onFailure: "gotWeatherFailure"}

To initiate the AJAX request:

this.$.getWeather.call({location: "Sunnyvale CA"});

Note: You can set any of the published properties via the setter function (e.g., setUrl()). For example, if you need to change the URL before initiating the AJAX request, you can do this:

this.$.getWeather.setUrl("http://somewebsite.com/Sunnyvale+CA/weather.json");
this.$.getWeather.call();

The params argument of call() can take either a JS object or a string. The JS object form will be converted to an application/x-www-form-urlencoded automatically; use the string form if you need to pass arguments to the server in a different format, but be sure to also set this to your own string. Be sure to also set the contentType property.

(Please see the Published Properties section for a full list of available options.)

All 2xx responses are treated as success, as well as 0 and unknown status. To process the AJAX response:

gotWeather: function(inSender, inResponse, inRequest) {
    this.results = inResponse;
}

If the handleAs property is set to "json" (default), the content of the responseText property will automatically be converted into a JavaScript object.

To handle failure:

gotWeatherFailure: function(inSender, inResponse, inRequest) {
    console.log("got failure from getWeather");
}

A third parameter, inRequest, is always passed to the event handler functions. It contains a lot of details about the request, including a reference to the actual XHR object. For example, status code can be retrieved via inRequest.xhr.status.

You can obtain HTTP response headers from the XHR object using getResponseHeader. For example, to get Content-Type in the response headers:

inRequest.xhr.getResponseHeader("Content-Type")

The default HTTP method is GET, to make a POST request, set method property to "POST". Here is an example of making a POST request:

{name: "login", kind: "WebService",
        url: "http://myserver.com/login",
        method: "POST",
        onSuccess: "loginSuccess",
        onFailure: "loginFailure"}

this.$.login.call({username: "foo", password: "bar"});

WebService requests to fetch local files will fail when using Google Chrome unless you start the browser with the --allow-file-access-from-files command-line switch.

Extends

enyo.Service

Published Properties

  • url: ""

    The URL for the service. This can be a relative URL if used to fetch resources bundled with the application.

  • method: "GET"

    The HTTP method to use for the request. Defaults to GET. Supported values include "GET", "POST", "PUT", and "DELETE".

  • handleAs: "json"

    How the response will be handled. Supported values are: "json", "text", "xml".

  • contentType: "application/x-www-form-urlencoded"

    The Content-Type header for the request as a String.

  • sync: false

    If true, makes a synchronous (blocking) call, if supported. Synchronous requests are not supported on HP webOS.

  • headers: null

    Optional additional request headers as a JS object, e.g., { "X-My-Header": "My Value", "Mood": "Happy" }, or null.

  • username: ""

    The optional user name to use for authentication purposes.

  • password: ""

    The optional password to use for authentication purposes.

Inheritance

Published properties inherited from enyo.BasicService

service, timeout

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.BasicService

onSuccess, onFailure, onResponse

Methods inherited from enyo.Service

call, cancelCall

Methods inherited from enyo.BasicService

cancel, request

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/media/sound.js

enyo.Sound

A component that allows you to play sound effects or other audio resources. This component is an abstraction of HTML 5 Audio object.

Initialize a sound component as follows:

{kind: "Sound", src: "http://mydomain.com/media/myfile.mp3"}

To play a sound, do this:

this.$.sound.play();

You can get a reference to the actual HTML 5 Audio object via this.$.sound.audio.

Extends

enyo.Component

Published Properties

  • src: ""

    URL of the sound file to play. Can be relative to the application's HTML file.

  • preload: true

    If true, loads the sound file when the control is created, trading increased network/memory usage for decreased latency.

  • audioClass: null

    (webOS only) Sound channel through which audio is played. Default channel is "defaultapp", which is used for application sounds. Use "media" for playback of music.

Methods

  • play: function()

    Plays the sound. If the sound is already playing, playback restarts at the beginning.

Inheritance

Published properties inherited from enyo.Component

owner, name

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

base/media/video.js

enyo.Video

A control that allows you to play video. This component is an abstraction of HTML 5 Video.

Initialize a video component as follows:

{kind: "Video", src: "http://www.w3schools.com/html5/movie.mp4"}

To play a video, do this:

this.$.video.play();

You can get a reference to the actual HTML 5 Video element via this.$.video.hasNode().

Extends

enyo.Control

Published Properties

  • src: ""

    Source URL of the video file. Can be relative to the application's HTML file.

  • showControls: true

    If true, shows controls for starting and stopping video playback.

  • autoplay: false

    If true, video playback starts automatically.

  • loop: false

    If true, when video playback finishes, it restarts from the beginning.

  • fitToWindow: false

    (webOS only) If true, stretches the video to fill the entire window.

Methods

  • pause: function()

    Pauses (or, if already paused, resumes) video playback.

  • play: function()

    Begins (or, if paused, resumes) video playback.

Inheritance

Published properties inherited from enyo.Control

layoutKind

Published properties inherited from enyo.ContainedDomBuilder

className, container, parent

Published properties inherited from enyo.DomNodeBuilder

allowHtml, content

Published properties inherited from enyo.DomNode

showing, prepend

Published properties inherited from enyo.Component

owner, name

Events inherited from enyo.Control

onclick, onmousedown, onmouseup

Methods inherited from enyo.Control

broadcastMessage, destroyControls, getControls, indexOfControl, resized

Methods inherited from enyo.ContainedDomBuilder

addContent, getOffset, isDescendantOf

Methods inherited from enyo.DomNodeBuilder

hide, render, renderInto, rendered, show

Methods inherited from enyo.DomNode

addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

Methods inherited from enyo.Component

create, createComponent, createComponents, destroy, destroyComponents, getComponents

Methods inherited from enyo.Object

error, log, warn

palm/platform/startup.js

enyo.requiresWindow

enyo.requiresWindow: function(inFunction)

enyo.hasWindow

enyo.hasWindow: function()
palm/system/system.js

enyo.setAllowedOrientation

enyo.setAllowedOrientation: function(inOrientation)

Sets the allowed orientation.

inOrientation is one of 'up', 'down', 'left', 'right', or 'free'

enyo.getWindowOrientation

enyo.getWindowOrientation: function()

Returns the actual orientation of the window. One of 'up', 'down', 'left' or 'right'.

enyo.sendOrientationChange

enyo.sendOrientationChange: function()

enyo.setFullScreen

enyo.setFullScreen: function(inMode)

On device, sets the full-screen mode of the window. If true, the system UI around the application is removed and you have access to the full display. Call with false to return to normal mode.

enyo.ready

enyo.ready: function()

Called by framework to tell webOS system that the UI is ready to display. This causes the transition from card with fading application icon to card with application user interface. Developers will usually not need to call this directly.

enyo.fetchAppId

enyo.fetchAppId: function()

Returns a string with the current application ID, e.g., "com.example.app.myapplication".

enyo.fetchAppRootPath

enyo.fetchAppRootPath: function()

Returns a string with the URL that is the root path of the application.

enyo.fetchAppInfo

enyo.fetchAppInfo: function()

Returns the contents of the application's appinfo.json as a read-only JS object.

enyo.fetchFrameworkConfig

enyo.fetchFrameworkConfig: function()

Returns the contents of the application's framework_config.json as a read-only JS object.

enyo.fetchRootFrameworkConfig

enyo.fetchRootFrameworkConfig: function()

Returns the contents of the framework's framework_config.json as a read-only JS object.

enyo.fetchDeviceInfo

enyo.fetchDeviceInfo: function()

Returns the contents of the system's device information as a JS object. When running on a desktop browser, this will return undefined.

This returned object has these properties:

bluetoothAvailableBooleanTrue if bluetooth is available on device
carrierNameStringName of carrier
coreNaviButtonBooleanTrue if physical core navi button available on device
keyboardAvailableBooleanTrue if physical keyboard available on device
keyboardSliderBooleanTrue if keyboard slider available on device
keyboardTypeStringKeyboard type, one of 'QWERTY', 'AZERTY', AZERTY_FR', 'QWERTZ', QWERTZ_DE'
maximumCardWidthIntegerMaximum card width in pixels
maximumCardHeightIntegerMaximum card height in pixels
minimumCardWidthIntegerMinimum card width in pixels
minimumCardHeightIntegerMinimum card height in pixels
modelNameStringModel name of device in UTF-8 format
modelNameAsciiStringModel name of device in ASCII format
platformVersionStringFull OS version string in the form "Major.Minor.Dot.Sub"
platformVersionDotIntegerSubset of OS version string: Dot version number
platformVersionMajorIntegerSubset of OS version string: Major version number
platformVersionMinorIntegerSubset of OS version string: Minor version number
screenWidthIntegerWidth in pixels
screenHeightIntegerHeight in pixels
serialNumberStringDevice serial number
wifiAvailableBooleanTrue if WiFi available on device


palm/system/keyboard.js

enyo.keyboard

A collection of methods to deal with the virtual keyboard on webOS. The virtual keyboard has two modes, the automatic mode (the default), where the keyboard automatically appears when the user puts focus on a text input control, and a manual mode where the keyboard is shown and hidden under program control.

Since the keyboard appears on screen with your application, you can have the default mode where your app window resizes or an alternative mode where the keyboard is a popup over your window. The second mode may be preferred if resizing your UI is an expensive operation, but in that case you'll need to ensure that the user input area isn't positioned under the keyboard.

Methods

    enyo.keyboard.setResizesWindow

    enyo.keyboard.setResizesWindow: function(inResizesWindow)

    Set the keyboard mode to either resize the application window (default) or to be displayed on top of application content.

    enyo.keyboard.setManualMode

    enyo.keyboard.setManualMode: function(inManual)

    Set the keyboard to be in manual mode. When in manual mode, the keyboard will not automatically display when an element that can receive keys is focused or blurred. When in manual mode, it's possible to show or hide the keyboard via enyo.keyboard.show and enyo.keyboard.hide.

    enyo.keyboard.suspend

    enyo.keyboard.suspend: function()

    enyo.keyboard.resume

    enyo.keyboard.resume: function()

    enyo.keyboard.show

    enyo.keyboard.show: function(inType)

    Show the keyboard. Requires that the keyboard is in manual mode; call enyo.keyboard.setManualMode(true) first.

    inType {Integer} Indicates the keyboard style to show, values are:

    • 0: Text (enyo.keyboard.typeText)
    • 1: Password (enyo.keyboard.typePassword)
    • 2: Search (enyo.keyboard.typeSearch)
    • 3: Range (enyo.keyboard.typeRange)
    • 4: Email (enyo.keyboard.typeEmail)
    • 5: Number (enyo.keyboard.typeNumber)
    • 6: Phone (enyo.keyboard.typePhone)
    • 7: URL (enyo.keyboard.typeURL)
    • 8: Color (enyo.keyboard.typeColor)

    enyo.keyboard.hide

    enyo.keyboard.hide: function()

    Hide the keyboard. Requires that the keyboard is in manual mode; call enyo.keyboard.setManualMode(true) first.

    enyo.keyboard.forceShow

    enyo.keyboard.forceShow: function(inType)

    Force the keyboard to show by setting manual keyboard mode and then showing the keyboard. See enyo.keyboard.show for inType values.

    enyo.keyboard.forceHide

    enyo.keyboard.forceHide: function()

    Force the keyboard to hide by setting manual keyboard mode and then hiding the keyboard.

    enyo.keyboard.isShowing

    enyo.keyboard.isShowing: function()

    Returns true if the keyboard is showing.

    enyo.keyboard.isManualMode

    enyo.keyboard.isManualMode: function()

    Returns true if the keyboard is in manual mode.


    palm/system/windows/windows.js

    enyo.windows

    enyo.windows provides a variety of utility methods for interacting with application windows.

    To open a window or activate an existing window, use the enyo.windows.activate. For example,

    enyo.windows.activate(undefined, "SearchWindow");
    

    Or, to open the window if it does not exist, add a url (the url may be absolute or relative).

    enyo.windows.activate("search/index.html", "SearchWindow");
    

    To facilitate communication between application windows, parameters can be sent. To send parameters to the window to be activated, add a params object:

    enyo.windows.activate("search/index.html", "SearchWindow", {query: "oranges"});
    

    Note that the activated window will fire a windowParamsChange event. The window parameters are available in the enyo.windowParams object. For example,

    windowParamsChangeHandler: function() {
        this.$.searchQueryInput.setValue(enyo.windowParams.query);
    }
    

    To send parameters to a window without activating it, use the setWindowParams method. For example,

    var searchWindow = enyo.windows.fetchWindow("SearchWindow");
    enyo.windows.setWindowParams(searchWindow, {safeSearch: true});
    

    When a window is activated and deactivated by the user or system, corresponding events will fire on any created enyo.ApplicationEvents objects. To respond to activation, provide a listener for its onWindowActivated event; to respond to deactivation, provide a hander for onWindowDeactivated.

    {kind: enyo.ApplicationEvents, 
     onWindowActivated: "wakeup",
     onWindowDeactivated: "sleep"},
    

    An application may be launched while it is already running (relaunch). By default, the application is simply brought into focus when this happens. This can occur either when a user launches the running application or a system service does so. In either case, new window params may be sent to the application. An application can customize its response to being relaunched based on this information by implementing a handler for the onApplicationRelaunch event as follows:

    {kind: enyo.ApplicationEvents, 
     onApplicationRelaunch: "relaunchHandler"},
    ...
    relaunchHandler: function(inSender, inEvent) {
        if (enyo.windowParams.openSearchWindow = true) {
            enyo.windows.activate("search/index.html", "SearchWindow");
            return true;
        }
    },
    ...
    

    Notice the event handler activates a window and then returns true. The return value indicates the event has been handled and the default action, focusing the root application window, should not occur.

    The applicationRelaunch event is always sent to the root window of an application. The root window is, by default, the first window created by the application. That window-level handler passed on the event to the various enyo.ApplicationEvents objects that have been created.

    When the application is headless (specifies noWindow: true in the appinfo) the root window is always the headless, non-displayed window. When the application is not headless, the root window may change. This occurs if the user closes the root window. In this case, the root window becomes the next opened window by the application. That window will now receive the applicationRelaunchHandler.

    Applications should be careful to consider that on the root window, enyo.windowParams are set by the system. On other windows this object is private to the application. Applications can use the applicationRelaunch to note that enyo.windowParams have been changed by the system.

    Methods

    • activate: function(inUrl, inName, inParams, inAttributes, inWindowInfo)

      Activate an application window by name. If the window is not already open and a url is specified, the window will be opened.

      • inUrl {String} Url for the window to open if it is not already opened. May be absolute or relative.
      • inName {String} Name of the window to activate.
      • inParams {Object} Data to send to the activated window. Will be available as enyo.windowParams.
      • inAttributes {Object} Optional window attributes. Use to customize the window type.
      • inWindowInfo {String} Optional window information. Use to provide extra system info.

      Example:

      enyo.windows.activate("search/index.html", "Search", {query: "oranges"});
      

    • activateWindow: function(inWindow, inParams)

      Activate a window by window reference. Optionally send window params to the window.

      • inWindow {Object} Reference to the window to be activated.
      • inParams {Object} Optional window params to send to the window.

      Example:

      enyo.windows.activateWindow(myWindow, {message: "Hello World"});
      

    • addBannerMessage: function()

      Adds a banner message; it will be displayed briefly before disappearing

      • inMessage: (required) message to display
      • inJson: (required) JSON-formatted string to pass to enyo.relaunch if banner is tapped
      • inIcon: icon to display
      • inSoundClass: sound class to play
      • inSoundPath: path to sound to play
      • inSoundDuration: duration of sound to play

    • deactivate: function(inName)

      Deactivate a window by name.

    • deactivateWindow: function(inWindow)

      Deactivate a window by reference.

    • fetchWindow: function(inName)

      Returns a reference to the window object specified by the given name.

      The specified name must correspond to a currently opened application window, i.e. a window in the list returned by enyo.windows.getWindows().

    • getActiveWindow: function()

      Returns a reference to the window object of the currently active application window.

    • getRootWindow: function()

      Returns the root application window.

    • getWindows: function()

      Returns an object listing the open windows by name, e.g.

      {window1: <window object>, window2: <window object> }
      

    • openDashboard: function(inUrl, inName, inParams, inAttributes)

      Opens an application dashboard.

      • inUrl {String} Url for the window html file. May be absolute or relative.
      • inName {String} Name of the window. This name can be used to retrieve the window. If one is not specified, a default name is supplied.
      • inParams {Object} Data to send to the opened window. Will be available as enyo.windowParams.
      • inAttributes {Object} Specify optional attributes, e.g., {webosDragMode:"manual"} to enable custom handling of drag events in dashboards, or {clickableWhenLocked:true} to make dashboards usable through the lock screen.

    • openPopup: function(inUrl, inName, inParams, inAttributes, inHeight, throb)

      Opens an application popup.

      • inUrl {String} Url for the window html file. May be absolute or relative.
      • inName {String} Name of the window. This name can be used to retrieve the window. If one is not specified, a default name is supplied.
      • inParams {Object} Data to send to the opened window. Will be available as enyo.windowParams.
      • inAttributes {Object} Specify optional attributes for special behavior.
      • inHeight {Integer} Height for the popup.
      • throb: {Boolean} 'true' to enable the LED throbber.

    • openWindow: function(inUrl, inName, inParams, inAttributes, inWindowInfo)

      Opens an application window. This method can also be used to open a specialized window by specifying inAttributes and inWindowInfo.

      • inUrl {String} Url for the window html file. May be absolute or relative.
      • inName {String} Name of the window. This name can be used to retrieve the window. If one is not specified, a default name is supplied.
      • inParams {Object} Data to send to the opened window. Will be available as enyo.windowParams.
      • inAttributes {Object} Optional window attributes. Use to customize the window type.
      • inWindowInfo {String} Optional window information. Use to provide extra system info.

      Example:

      enyo.windows.openWindow("search/index.html", "Search", {query: "oranges"});
      

    • removeBannerMessage: function(inId)

      Removes a banner message

      * inId: returned by addBannerMessage
      

    • renameWindow: function(inWindow, inName)

      Renames a window. Note that the final window name could be different than that specified, if a collision occurs

    • setWindowParams: function(inWindow, inParams)

      Send parameters to the given window. Application windows can communicate by sending window parameters to each other. Note, this method does not activate the window; if you want to activate the window use enyo.windows.activate.

      The window specified by inWindow will fire a windowParamsChange event asynchronously which can be implemented to perform work related to window parameters changing.

      • inWindow {Object} Window reference.
      • inParams {Object} Parameters to send to the window. This object will be made available as enyo.windowParams. Restricted to valid JSON (no functions, cycles, etc.).

    • setWindowProperties: function(inWindow, inProps)

      Set webOS system properties of the window. Pass in a window reference (use 'window' for self) to modify and JS object with name/value pairs as inProps.

      Possible property values include:

      blockScreenTimeoutBoolean. If true, the screen will not dim or turn off in the absence of user activity. If false, the timeout behavior will be reinstated.
      setSubtleLightbarBoolean. If true, the light bar will be made somewhat dimmer than normal. If false, it will return to normal.
      fastAccelerometerBoolean. If true, the accelerometer rate will increase to 30 hz; false by default, rate is at 4 hz. Note fast rate is active only for apps when maximized.


    palm/system/windows/agent.js

    palm/system/windows/browserAgent.js

    palm/system/windows/events.js

    palm/system/windows/manager.js

    palm/system/setuplogging.js

    palm/system/Dashboard.js

    enyo.Dashboard

    A component that manages a standard dashboard window in order to properly display a list of notification "layers". Public methods exist for adding and removing layers, which are objects of the following form:

    {
        icon: String, path to icon image for this layer.
        title: First line of text, bold by default.  HTML is automatically escaped.
        text: Second line of text, HTML is automatically escaped.
    }
    

    If the layers stack is empty, the dashboard window is closed. When the stack is not empty, the data from the topmost layer will be displayed. If the stack size is greater than 1, the size will be displayed in a little blue badge over the icon.

    Applications can create instances of this component for the various types of dashboards they require. For example, email uses one per email account, and one for the unified "all inboxes". Then apps can push/pop notification layers as appropriate.
    The component handles all logic for window creation, destruction, and UI display.

    Extends

    enyo.Component

    Published Properties

    • layers: null

      Array of layer objects specifying contents of dashboard.

    • smallIcon: ""

      Optional path to small icon to display when this dashboard window is hidden.

    Published Events

    • onIconTap: ""

      Fired when user taps the icon portion of a dashboard. Event includes the top layer object, and mouse event.

    • onMessageTap: ""

      Fired when user taps the message portion of a dashboard. Event includes the top layer object, and mouse event.

    • onTap: ""

      Fired when user taps anywhere in a dashboard. Event includes the top layer object, and mouse event.

    • onUserClose: ""

      Fired when user swipes away the dashboard (or the last layer). NOT sent when it is programmatically closed by emptying the layer stack.

    • onLayerSwipe: ""

      Fired when user swipes a dashboard layer away, unless it's the last one (that's onUserClose instead). Event includes the top layer object.

    • onDashboardActivated: ""

      Fired when the dashboard window is displayed/maximized.

    • onDashboardDeactivated: ""

      Fired when user dashboard window is concealed/minimized.

    Methods

    • create: function()
    • dbActivated: function(inSender)
    • dbDeactivated: function(inSender)
    • dbTapped: function(inSender, topLayer, event)
    • destroy: function()
    • iconTapped: function(inSender, topLayer, event)
    • layerSwiped: function(inSender, topLayer)
    • msgTapped: function(inSender, topLayer, event)
    • pop: function()
    • push: function(layer)
    • setLayers: function(layers)
    • updateWindow: function()
    • userClosed: function(inSender)

    Inheritance

    Published properties inherited from enyo.Component

    owner, name

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/system/CrossAppUI.js

    enyo.CrossAppUI

    A CrossAppUI control is used for displaying UI that resides outside the application itself (filepicker, people picker, etc).

    {kind: "CrossAppUI", app: "com.palm.app.statusbar", showing:false, params:...}
    

    Extends

    enyo.Iframe

    Published Properties

    • app: ""
    • path: ""

      String. id of the app whose UI will be displayed.

    • params: null

      String. Relative path from the target app's main index file to the index file to be displayed.

    Published Events

    • onResult: ""

    Methods

    • appChanged: function()
    • checkLoad: function()
    • create: function()
    • destroy: function()
    • gotAppInfo: function(inSender, response)
    • handleMessage: function(e)
    • paramsChanged: function()
    • pathChanged: function()
    • rendered: function()

    Inheritance

    Published properties inherited from enyo.Iframe

    url, tabIndex

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Iframe

    fetchCurrentUrl, goBack, goForward, refresh

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/system/CrossAppResult.js

    enyo.CrossAppResult

    A CrossAppTarget control is used to communicate with the "caller" who has invoked some UI using the CrossAppUI component.

    {kind: "CrossAppTarget", onParamsChange:"myHandleNewParams"}
    

    Extends

    enyo.Component

    Methods

    • sendResult: function(params)

    Inheritance

    Published properties inherited from enyo.Component

    owner, name

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/system/FilePicker.js

    enyo.FilePicker

    A FilePicker control is used for allowing the user to choose files using the standard picker UI.

    The onPickFile event fires with a response from the file picker if/when the user chooses a file. The response object is an array of objects indicating chosen files:

    [
        {
            fullPath: // Absolute File Path.
            iconPath: // Absolute File Path with ExtractFS prefix.
            attachmentType: // File Type (image, document, audio, video)
            size: // File Size in Bytes.
        },
        {
            ...
        },
        ...
    ]
    

    Extends

    enyo.Popup

    Published Properties

    • fileType: undefined

      Optional string or array. Limits displayed files to the given type (or types).
      Possible types are: 'image', 'audio', 'video', 'document'.

    • previewLabel: undefined

      Optional free form string to override the default string displayed at the top panel.

    • extensions: undefined

      Optional array of file extension strings, used to filter displayed files.

    • allowMultiSelect: false

      Optional boolean indicating if selection of multiple files is allowed.

    • currentRingtonePath: undefined

      Optional string contains the current ringtone absolute file path.

    • cropWidth: undefined

      Optional int to set the width of the crop window.

    • cropHeight: undefined

      Optional int to set the height of the crop window.

    Published Events

    • onPickFile: ""

      Sent with a response from the file picker (see above) when the user chooses a file.

    Methods

    • handleResult: function(inSender, result)
    • pickFile: function()

      Activates the modal FilePicker UI.

    • updateParams: function()

    Inheritance

    Published properties inherited from enyo.Popup

    showHideMode, openClassName, showKeyboardWhenOpening

    Published properties inherited from enyo.BasicPopup

    modal, dismissWithClick, dismissWithEscape, shareScrim, scrimWhenModal, scrim, scrimClassName, autoClose

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.BasicPopup

    onBeforeOpen, onOpen, onClose

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Popup

    openAroundControl, openAt, openAtCenter, openAtControl, openAtEvent, openNear

    Methods inherited from enyo.BasicPopup

    close, open, toggleOpen

    Methods inherited from enyo.LazyControl

    componentsReady, initComponents, validateComponents

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/layout/OrderedLayout.js

    palm/controls/Spinner.js

    enyo.Spinner

    A control that displays a spinner animation to indicate that activity is taking place.

    It's typical to show and hide the spinner to indicate activity. The spinner animation will automatically start when the spinner is shown. It's also possible to call start and stop to control the animation directly.

    For example, to show a spinner while a service response is being requested:

    components: [
        {kind: "PalmService", onResponse: "serviceResponse"},
        {kind: "Button", caption: "Call Service", onclick: "buttonClick"},
        {kind: "Spinner"}
    ],
    buttonClick: function() {
        this.$.service.call();
        this.$.spinner.show();
    },
    serviceResponse: function() {
        this.$.spinner.hide();
    }
    

    Note, extra care must be taken to use a Spinner in a list item. The spinner animation must be started manually, asynchronous to list rendering. It's possible to do this as follows:

    setupRow: function(inSender, inIndex) { if (this.data[inIndex].busy) { enyo.asyncMethod(this, "startSpinner", inIndex); } }, startSpinner: function(inIndex) { this.$.list.prepareRow(inIndex); this.$.spinner.show(); }

    Extends

    enyo.AnimatedImage

    Inheritance

    Published properties inherited from enyo.AnimatedImage

    imageCount, imageHeight, repeat, easingFunc

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.AnimatedImage

    start, stop

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    enyo.SpinnerLarge

    A control that displays a large spinner animation to indicate that activity is taking place.

    Extends

    enyo.Spinner

    Inheritance

    Published properties inherited from enyo.AnimatedImage

    imageCount, imageHeight, repeat, easingFunc

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.AnimatedImage

    start, stop

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/button/NotificationButton.js

    enyo.NotificationButton

    A button styled to go in a dashboard.

    {kind: "NotificationButton", label: "Snooze"}
    

    Extends

    enyo.Button

    Inheritance

    Published properties inherited from enyo.CustomButton

    caption, disabled, isDefault, down, depressed, hot, toggling, allowDrag

    Published properties inherited from enyo.Stateful

    cssNamespace

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Stateful

    setState

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/button/IconButton.js

    enyo.IconButton

    A Button with Enyo styling, an image in the button, and an optional text label below it.

    {kind: "IconButton", label: "I am a label", icon: "images/foo.png"}
    

    Extends

    enyo.CustomButton

    Published Properties

    • icon: ""
    • iconIsClassName: false

      If false then the icon property specifies an image file path; if true, it is a css className.

    Inheritance

    Published properties inherited from enyo.CustomButton

    caption, disabled, isDefault, down, depressed, hot, toggling, allowDrag

    Published properties inherited from enyo.Stateful

    cssNamespace

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Stateful

    setState

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/button/Pushable.js

    enyo.Pushable

    A Control that gets a gray highlight on mouse down. It generates an ondown event on mouse down, and an onup event on mouse up.

    {kind: "Pushable", content: "push me", ondown: "pushableDown", onup: "pushableUp"}
    
    pushableDown: function(inSender) {
        this.log(inSender.content + "is down");
    },
    pushableUp: function(inSender) {
        this.log(inSender.content + "is up");
    }
    

    Extends

    enyo.Control

    Published Events

    • ondown: ""
    • onup: ""

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/button/ActivityButton.js

    enyo.ActivityButton

    A Button that has a Spinner as an activity indicator. Use setActive() to start or stop the spinner.

    {kind: "ActivityButton", caption: "Hit me to spin", onclick: "toggleActivity"}
    
    toggleActivity: function(inSender) {
        var a = inSender.getActive();
        inSender.setActive(!a);
    }
    

    Extends

    enyo.Button

    Published Properties

    • active: false

    Inheritance

    Published properties inherited from enyo.CustomButton

    caption, disabled, isDefault, down, depressed, hot, toggling, allowDrag

    Published properties inherited from enyo.Stateful

    cssNamespace

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Stateful

    setState

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/button/GrabButton.js

    enyo.GrabButton

    Extends

    enyo.CustomButton

    Inheritance

    Published properties inherited from enyo.CustomButton

    caption, disabled, isDefault, down, depressed, hot, toggling, allowDrag

    Published properties inherited from enyo.Stateful

    cssNamespace

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Stateful

    setState

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/input/PasswordInput.js

    enyo.PasswordInput

    A text input control for typing in passwords and other confidential information. Inputted characters are masked. The value of the input can still be retrieved via getValue, e.g.:

    buttonClick: function() {
        var password = this.$.passwordInput.getValue();
    }
    

    Extends

    enyo.Input

    Inheritance

    Published properties inherited from enyo.Input

    hint, value, tabIndex, spellcheck, autocorrect, autoKeyModifier, autoCapitalize, autoEmoticons, autoLinking, autoWordComplete, inputType, inputClassName, focusClassName, spacingClassName, alwaysLooksFocused, selection, disabled, changeOnInput, keypressInputDelay, styled, selectAllOnFocus

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Input

    onfocus, onblur, onchange, oninput, onmousedown, onmouseup, onkeypress

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Input

    forceBlur, forceFocus, forceFocusEnableKeyboard, forceSelect, hasFocus, isEmpty

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/input/RoundedInput.js

    enyo.RoundedInput

    Extends

    enyo.Input

    Inheritance

    Published properties inherited from enyo.Input

    hint, value, tabIndex, spellcheck, autocorrect, autoKeyModifier, autoCapitalize, autoEmoticons, autoLinking, autoWordComplete, inputType, inputClassName, focusClassName, spacingClassName, alwaysLooksFocused, selection, disabled, changeOnInput, keypressInputDelay, styled, selectAllOnFocus

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Input

    onfocus, onblur, onchange, oninput, onmousedown, onmouseup, onkeypress

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Input

    forceBlur, forceFocus, forceFocusEnableKeyboard, forceSelect, hasFocus, isEmpty

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/input/ToolInput.js

    enyo.ToolInput

    Extends

    enyo.Input

    Inheritance

    Published properties inherited from enyo.Input

    hint, value, tabIndex, spellcheck, autocorrect, autoKeyModifier, autoCapitalize, autoEmoticons, autoLinking, autoWordComplete, inputType, inputClassName, focusClassName, spacingClassName, alwaysLooksFocused, selection, disabled, changeOnInput, keypressInputDelay, styled, selectAllOnFocus

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Input

    onfocus, onblur, onchange, oninput, onmousedown, onmouseup, onkeypress

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Input

    forceBlur, forceFocus, forceFocusEnableKeyboard, forceSelect, hasFocus, isEmpty

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/input/SearchInput.js

    enyo.SearchInput

    Extends

    enyo.Input

    Published Events

    • onCancel: ""

    Methods

    • iconClick: function()
    • inputHandler: function()
    • updateIconClass: function()
    • valueChanged: function()

    Inheritance

    Published properties inherited from enyo.Input

    hint, value, tabIndex, spellcheck, autocorrect, autoKeyModifier, autoCapitalize, autoEmoticons, autoLinking, autoWordComplete, inputType, inputClassName, focusClassName, spacingClassName, alwaysLooksFocused, selection, disabled, changeOnInput, keypressInputDelay, styled, selectAllOnFocus

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Input

    onfocus, onblur, onchange, oninput, onmousedown, onmouseup, onkeypress

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Input

    forceBlur, forceFocus, forceFocusEnableKeyboard, forceSelect, hasFocus, isEmpty

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/input/RoundedSearchInput.js

    enyo.RoundedSearchInput

    Extends

    enyo.SearchInput

    Inheritance

    Published properties inherited from enyo.Input

    hint, value, tabIndex, spellcheck, autocorrect, autoKeyModifier, autoCapitalize, autoEmoticons, autoLinking, autoWordComplete, inputType, inputClassName, focusClassName, spacingClassName, alwaysLooksFocused, selection, disabled, changeOnInput, keypressInputDelay, styled, selectAllOnFocus

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.SearchInput

    onCancel

    Events inherited from enyo.Input

    onfocus, onblur, onchange, oninput, onmousedown, onmouseup, onkeypress

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.SearchInput

    iconClick, inputHandler, updateIconClass, valueChanged

    Methods inherited from enyo.Input

    forceBlur, forceFocus, forceFocusEnableKeyboard, forceSelect, hasFocus, isEmpty

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/input/ToolSearchInput.js

    enyo.ToolSearchInput

    Extends

    enyo.SearchInput

    Inheritance

    Published properties inherited from enyo.Input

    hint, value, tabIndex, spellcheck, autocorrect, autoKeyModifier, autoCapitalize, autoEmoticons, autoLinking, autoWordComplete, inputType, inputClassName, focusClassName, spacingClassName, alwaysLooksFocused, selection, disabled, changeOnInput, keypressInputDelay, styled, selectAllOnFocus

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.SearchInput

    onCancel

    Events inherited from enyo.Input

    onfocus, onblur, onchange, oninput, onmousedown, onmouseup, onkeypress

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.SearchInput

    iconClick, inputHandler, updateIconClass, valueChanged

    Methods inherited from enyo.Input

    forceBlur, forceFocus, forceFocusEnableKeyboard, forceSelect, hasFocus, isEmpty

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/input/RoundedInputBox.js

    enyo.RoundedInputBox

    Extends

    enyo.InputBox

    Inheritance

    Published properties inherited from enyo.InputBox

    alwaysLooksFocused, focusClassName, spacingClassName

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.InputBox

    onfocus, onblur

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.InputBox

    alwaysLooksFocusedChanged, blurHandler, create, focusHandler, layoutKindChanged, spacingClassNameChanged

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/input/ToolInputBox.js

    enyo.ToolInputBox

    Extends

    enyo.InputBox

    Inheritance

    Published properties inherited from enyo.InputBox

    alwaysLooksFocused, focusClassName, spacingClassName

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.InputBox

    onfocus, onblur

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.InputBox

    alwaysLooksFocusedChanged, blurHandler, create, focusHandler, layoutKindChanged, spacingClassNameChanged

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/OrderedContainer.js

    enyo.OrderedContainer

    A control primitive that applies ordering CSS classes to its contents: enyo-first, enyo-middle, and enyo-last or enyo-single.

    This can help facilitate CSS styling in cases where the styling of the first and last controls differs from that of the middle controls. This occurs, for example, when the top and bottom controls in a group have rounded corners but the middle controls do not.

    {kind: "OrderedContainer", components: [
        {name: "first", content: "first"},
        {name: "middle", content: "middle"},
        {name: "last", content: "last"}
    ]}
    

    The above code produces a control named first with CSS class enyo-first, a control named middle with CSS class enyo-middle, and a control named last with CSS class enyo-last.

    Extends

    enyo.Control

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/button/ToolButton.js

    enyo.ToolButton

    A button styled to go in a Toolbar with an icon in the center.

    {kind: "ToolButton", icon: "images/foo.png"}
    

    Extends

    enyo.IconButton

    Methods

    • captionChanged: function()
    • setState: function(inState, inValue)

    Inheritance

    Published properties inherited from enyo.IconButton

    icon, iconIsClassName

    Published properties inherited from enyo.CustomButton

    caption, disabled, isDefault, down, depressed, hot, toggling, allowDrag

    Published properties inherited from enyo.Stateful

    cssNamespace

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Stateful

    setState

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/button/ButtonHeader.js

    enyo.ButtonHeader

    A button with menu styling, meant to contain other components within.

    {kind: "ButtonHeader", components: [
        {content: "This text goes inside the button"}
    ]}
    

    Extends

    enyo.Button

    Inheritance

    Published properties inherited from enyo.CustomButton

    caption, disabled, isDefault, down, depressed, hot, toggling, allowDrag

    Published properties inherited from enyo.Stateful

    cssNamespace

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Stateful

    setState

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/button/ToggleButton.js

    enyo.ToggleButton

    A control that looks like a switch with labels for two states. Each time a ToggleButton is tapped, it switches its state and fires an onChange event.

    {kind: "ToggleButton", onLabel: "foo", offLabel: "bar", onChange: "buttonToggle"}
    
    buttonToggle: function(inSender, inState) {
        this.log("Toggled to state" + inState);
    }
    

    To find out the state of the button, use getState:

    queryToggleState: function() {
        return this.$.toggleButton.getState();
    }
    

    Extends

    enyo.Control

    Published Properties

    • state: false
    • onLabel: enyo._$L("On")
    • offLabel: enyo._$L("Off")
    • disabled: false

    Published Events

    • onChange: ""

      The onChange event fires when the user changes the state of the toggle button, but not when the state is changed programmatically.

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/button/CheckBox.js

    enyo.CheckBox

    A box that shows or hides a check mark when clicked. The onChange event is fired when it is clicked. Use getChecked() to fetch the checked status.

    {kind: "CheckBox", onChange: "checkboxClicked"}
    
    checkboxClicked: function(inSender) {
        if (inSender.getChecked()) {
             this.log("I've been checked!");
        }
    }
    

    Extends

    enyo.Button

    Published Properties

    • checked: false

    Published Events

    • onChange: ''

      The onChange event fires when the user checks or unchecks the checkbox, but not when the state is changed programmatically.

    Inheritance

    Published properties inherited from enyo.CustomButton

    caption, disabled, isDefault, down, depressed, hot, toggling, allowDrag

    Published properties inherited from enyo.Stateful

    cssNamespace

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Stateful

    setState

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/PrevNextBanner.js

    enyo.PrevNextBanner

    A control with previous and next buttons to the left and right of a content area, which can contain other controls. The onPrevious and onNext events fire when the respective buttons are clicked.

    Extends

    enyo.HFlexBox

    Published Properties

    • previousDisabled: false
    • nextDisabled: false

    Published Events

    • onPrevious: ""
    • onNext: ""

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/WebView.js

    enyo.WebView

    A control that shows web content with built-in scroller.

    {kind: "WebView"}
    

    The URL to load can be specified when declaring the instance, or by calling setUrl.

    {kind: "WebView", url: "http://www.google.com"}
    
    goToUrl: function(inUrl) {
        this.$.webView.setUrl(inUrl);
    }
    

    Extends

    enyo.Control

    Published Properties

    • identifier: ""

      Page identifier, used to open new WebViews for new window requests.

    • url: ""

      URL for page, updated as user navigates. Relative URLs are not allowed.

    • minFontSize: 16

      Smallest font size shown on the page, used to stop text from becoming unreadable.

    • enableJavascript: true

      Boolean. If true, allows page to run JavaScript.

    • blockPopups: true

      Boolean. If false, allows page to request that new windows be opened.

    • acceptCookies: true

      Boolean. If true, allows WebView to accept cookies from server.

    • redirects: []

      Array of URL redirections specified as {regexp: string, cookie: string, enable: boolean}

    • networkInterface: ""

      The network interface.

    • ignoreMetaTags: false

      Boolean. If true, page ignores viewport-related meta tags.

    • cacheAdapter: true

      Boolean. If true (default), WebKit will cache the plugin when the node is hidden. If your app explicitly destroys the plugin outside the app lifecycle, you must set this to false.

    Published Events

    • onMousehold: ""
    • onResized: ""
    • onPageTitleChanged: ""
    • onUrlRedirected: ""
    • onSingleTap: ""
    • onLoadStarted: ""
    • onLoadProgress: ""
    • onLoadStopped: ""
    • onLoadComplete: ""
    • onFileLoad: ""
    • onAlertDialog: ""
    • onConfirmDialog: ""
    • onPromptDialog: ""
    • onSSLConfirmDialog: ""
    • onUserPasswordDialog: ""
    • onNewPage: ""
    • onPrint: ""
    • onEditorFocusChanged: ""
    • onError: ""
    • onDisconnected: ""

    Methods

    • acceptDialog: function()

      Accepts the current dialog.

    • cancelDialog: function()

      Cancels the current dialog.

    • clearCache: function()

      Clears the browser cache.

    • clearCookies: function()

      Clears cookies.

    • clearHistory: function()

      Clears browser history.

    • deleteImage: function(inPath)

      Deletes an image from the file system.

    • disconnect: function()

      Disconnects this WebView from the browser server.

    • generateIconFromFile: function(inPath, inIconPath, inLeft, inTop, inWidth, inHeight)

      Generates an icon from an image in the file system. Only works with PNG files.

    • goBack: function()

      Goes back one entry in history.

    • goForward: function()

      Goes forward one entry in history.

    • insertStringAtCursor: function(inString)

      If in an editable field, inserts a string at the current cursor position.

    • printFrame: function(inName, inJobId, inWidth, inHeight, inDpi, inLandscape, inReverseOrder)

      Shows the print dialog to print the current page.

    • reloadPage: function()

      Reloads the current page.

    • resizeImage: function(inFromPath, inToPath, inWidth, inHeight)

      Resizes an image in the file system.

    • saveImageAtPoint: function(inLeft, inTop, inDirectory, inCallback)

      Saves to the file system the image at the specified position.

    • sendDialogResponse: function(inResponse)

      Responds to the current dialog.

    • stopLoad: function()

      Stops loading the current page.

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/image/sizeable.js

    palm/controls/image/SizeableImage.js

    enyo.SizeableImage

    A control designed to view an image, with support for zooming. It is meant to be placed inside a Scroller.

    {kind: "Scroller", components: [
        {kind: "SizeableImage", src: "images/tree.jpg"}
    ]}
    

    The zoom level can be changed with setZoom.

    Extends

    enyo.VFlexBox

    Published Properties

    • src: ""
    • zoom: 1
    • autoSize: true
    • maxZoomRatio: 2

    Published Events

    • onImageLoaded: ""

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    enyo.SizeableCanvas

    Extends

    enyo.SizeableImage

    Inheritance

    Published properties inherited from enyo.SizeableImage

    src, zoom, autoSize, maxZoomRatio

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.SizeableImage

    onImageLoaded

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/image/ScrollingImage.js

    enyo.ScrollingImage

    A control designed to view an image, with support for zooming and panning.

    {kind: "ScrollingImage", src: "images/tree.jpg"}
    

    Extends

    enyo.SizeableImage

    Inheritance

    Published properties inherited from enyo.SizeableImage

    src, zoom, autoSize, maxZoomRatio

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.SizeableImage

    onImageLoaded

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/image/CroppableImage.js

    enyo.CroppableImage

    A control designed to crop a zoomable, pannable image.

    onCrop returns the parameters necessary to crop the image

    {
        suggestedXtop: left pixel start of the cropped image
        suggestedYtop: top pixel start of the cropped image
        suggestedScale: zoom%
        suggestedXsize: rounded X size of the cropped image
        suggestedYsize: rounded Y size of the cropped image
        sourceWidth: original image width
        sourceHeight: original image height
        sourceImage: absolute path to the image
        focusX: center of the cropped image in relation to width
        focusY: center of the cropped image in relation to height
    }
    

    Use a CroppableImage like so:

    {kind: "VFlexBox", components: [
        {kind: "CroppableImage" src:"image.jpg", flex:1, onCrop "cropHandler"},
        {kind: "Button", onclick:"crop"}
    ]}
    
    crop: function() { this.$.croppableImage.getCropParams() }
    

    Extends

    enyo.ScrollingImage

    Published Events

    • onCrop: ""

    Methods

    • getCropParams: function()

    Inheritance

    Published properties inherited from enyo.SizeableImage

    src, zoom, autoSize, maxZoomRatio

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.SizeableImage

    onImageLoaded

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/BasicCarousel.js

    enyo.BasicCarousel

    A control that provides the ability to slide back and forth between different views. If you have many views in the carousel, use Carousel.

    {kind: "BasicCarousel", flex: 1, components: [
        {kind: "View1"},
        {kind: "View2"},
        {kind: "View3"}
    ]}
    

    The default orientation of BasicCarousel is horizontal. You can change to vertical by setting layoutKind to "VFlexLayout".

    {kind: "BasicCarousel", layoutKind: "VFlexLayout", flex: 1, components: [
        {kind: "View1"},
        {kind: "View2"},
        {kind: "View3"}
    ]}
    

    Extends

    enyo.SnapScroller

    Published Properties

    • views: []
    • dragSnapThreshold: 0.01

    Methods

    • addViews: function(inViews)

      Adds additional views to the carousel. @param {Object} inViews

    • resize: function()

      Handles size changes. This method can be hooked up to a resizeHandler.

    • resizeHandler: function()

      Event handler for resize; if we're the root component, we'll automatically resize.

    Inheritance

    Published properties inherited from enyo.SnapScroller

    index

    Published properties inherited from enyo.BasicScroller

    scrollTop, scrollLeft, autoHorizontal, autoVertical, fpsShowing, accelerated

    Published properties inherited from enyo.DragScroller

    horizontal, vertical

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.SnapScroller

    onSnap, onSnapFinish

    Events inherited from enyo.BasicScroller

    onScrollStart, onBeforeScroll, onScroll, onScrollStop

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.SnapScroller

    next, previous, snapTo

    Methods inherited from enyo.BasicScroller

    getBoundaries, isScrolling, scrollIntoView, scrollTo, scrollToBottom

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/Carousel.js

    enyo.CarouselInternal

    Extends

    enyo.BasicCarousel

    Methods

    • fetchCurrentView: function()

      Returns the currently displayed view.

    • fetchView: function(inViewPos)

      Fetches the view corresponding to the view position "center", "left" or "right". "center" would always refer to the view currently displayed. "left" and "right" would be the left/right of currently displayed. Use this function to update the view already being shown. @param {String} position of the view to be fetched. Possible values are "center", "left" or "right".

    Inheritance

    Published properties inherited from enyo.BasicCarousel

    views, dragSnapThreshold

    Published properties inherited from enyo.SnapScroller

    index

    Published properties inherited from enyo.BasicScroller

    scrollTop, scrollLeft, autoHorizontal, autoVertical, fpsShowing, accelerated

    Published properties inherited from enyo.DragScroller

    horizontal, vertical

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.SnapScroller

    onSnap, onSnapFinish

    Events inherited from enyo.BasicScroller

    onScrollStart, onBeforeScroll, onScroll, onScrollStop

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.BasicCarousel

    addViews, resize, resizeHandler

    Methods inherited from enyo.SnapScroller

    next, previous, snapTo

    Methods inherited from enyo.BasicScroller

    getBoundaries, isScrolling, scrollIntoView, scrollTo, scrollToBottom

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    enyo.Carousel

    A control that provides the ability to slide back and forth between different views without having to load all the views initially.

    A single carousel could contain thousands of views/images. Loading all of them into memory at once would not be feasible. Carousel solves this problem by only holding onto the center view (C), the previous view (P), and the next view (N). Additional views are loaded as the user flips through the items in the Carousel.

    | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
                  P   C   N
    

    To initialize a carousel:

    {kind: "Carousel", flex: 1, onGetLeft: "getLeft", onGetRight: "getRight"}
    

    Use setCenterView to set the center view, and the onGetLeft and onGetRight events to build a scrolling list of views.

    create: function() {
        this.inherited(arguments);
        this.$.carousel.setCenterView(this.getView(this.index));
    },
    getView: function(inIndex) {
        return {kind: "HFlexBox", align: "center", pack: "center", content: inIndex};
    },
    getLeft: function(inSender, inSnap) {
        inSnap && this.index--;
        return this.getView(this.index-1);
    },
    getRight: function(inSender, inSnap) {
        inSnap && this.index++;
        return this.getView(this.index+1);
    }
    

    Extends

    enyo.CarouselInternal

    Published Events

    • onGetLeft: ""

      Gets the left view and also indicates if it is fired after a left transition.

    • onGetRight: ""

      Gets the right view and also indicates if it is fired after a right transition.

    Methods

    • setCenterView: function(inInfo)

      Sets the view to be used as the center view. This function will create the center view and fires events onGetLeft and onGetRight to get the view infos for creating left and right views. @param {Object} inInfo A config block describing the view control.

    Inheritance

    Published properties inherited from enyo.BasicCarousel

    views, dragSnapThreshold

    Published properties inherited from enyo.SnapScroller

    index

    Published properties inherited from enyo.BasicScroller

    scrollTop, scrollLeft, autoHorizontal, autoVertical, fpsShowing, accelerated

    Published properties inherited from enyo.DragScroller

    horizontal, vertical

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.SnapScroller

    onSnap, onSnapFinish

    Events inherited from enyo.BasicScroller

    onScrollStart, onBeforeScroll, onScroll, onScrollStop

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.CarouselInternal

    fetchCurrentView, fetchView

    Methods inherited from enyo.BasicCarousel

    addViews, resize, resizeHandler

    Methods inherited from enyo.SnapScroller

    next, previous, snapTo

    Methods inherited from enyo.BasicScroller

    getBoundaries, isScrolling, scrollIntoView, scrollTo, scrollToBottom

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/VirtualCarousel.js

    enyo.VirtualCarousel

    A control that displays a scrolling list of views. VirtualCarousel is optimized such that only three views are created even if the actual number of views is infinite. VirtualCarousel doesn't employ a flyweight strategy but does take into account the fact that object creation is expensive. A new view will not be created if there is an old view that can be reused.

    To initialize VirtualCarousel, use renderViews. The onSetupView event allows for updating the view for a given view index. The view returned in the event could be an old view that is not suitable for the given index, so is the user's responsiblitiy to update the view. Here's a simple example:

    {name: "carousel", kind: "VirtualCarousel", flex: 1, onSetupView: "setupView"}
    
    rendered: function() {
        this.inherited(arguments);
        var selectedViewIndex = 5;
        this.$.carousel.renderViews(selectedViewIndex);
    },
    setupView: function(inSender, inView, inViewIndex) {
        if (inViewIndex > 0 && inViewIndex < 30) {
            inView.setHeader("Hello " + inViewIndex);
            return true;
        }
    }
    

    An onSetupView handler must return true to indicate that the given view should be rendered.

    The onSnap event fires when the user finishes dragging and snapping occurs. onSnapFinish fires when snapping and scroller animation completes.

    To get a handle for the currently displayed view, use fetchCurrentView(). For example, to get the current displayed view after snapping is completed:

    {name: "carousel", kind: "VirtualCarousel", flex: 1, onSetupView: "setupView", onSnapFinish: "snapFinish"}
    
    snapFinish: function(inSender) {
        var view = this.$.carousel.fetchCurrentView();
    }
    

    To move the view programmatically, use next() or previous().

    Extends

    enyo.CarouselInternal

    Published Events

    • onSetupView: ""

    Methods

    • renderViews: function(inIndex, inForceCreate)

    Inheritance

    Published properties inherited from enyo.BasicCarousel

    views, dragSnapThreshold

    Published properties inherited from enyo.SnapScroller

    index

    Published properties inherited from enyo.BasicScroller

    scrollTop, scrollLeft, autoHorizontal, autoVertical, fpsShowing, accelerated

    Published properties inherited from enyo.DragScroller

    horizontal, vertical

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.SnapScroller

    onSnap, onSnapFinish

    Events inherited from enyo.BasicScroller

    onScrollStart, onBeforeScroll, onScroll, onScrollStop

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.CarouselInternal

    fetchCurrentView, fetchView

    Methods inherited from enyo.BasicCarousel

    addViews, resize, resizeHandler

    Methods inherited from enyo.SnapScroller

    next, previous, snapTo

    Methods inherited from enyo.BasicScroller

    getBoundaries, isScrolling, scrollIntoView, scrollTo, scrollToBottom

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/image/ViewImage.js

    enyo.ViewImage

    A ScrollingImage that is specially designed to work in a Carousel.

    {kind: "Carousel", flex: 1, components: [
        {kind: "ViewImage", src: "images/01.png"},
        {kind: "ViewImage", src: "images/02.png"},
        {kind: "ViewImage", src: "images/03.png"}
    ]}
    

    Extends

    enyo.ScrollingImage

    Published Properties

    • accelerated: true

    Published Events

    • onImageLoaded: "imageLoaded"

    Inheritance

    Published properties inherited from enyo.SizeableImage

    src, zoom, autoSize, maxZoomRatio

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.SizeableImage

    onImageLoaded

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/image/ImageView.js

    enyo.ImageView

    A Carousel that is designed to view an image full-screen, with support for zooming and panning, while optionally moving between additional images. It can be used to display a single image, or a set of images that may be flipped through.

    {kind: "ImageView", flex: 1, onGetLeft: "getLeft", onGetRight: "getRight"}
    

    Use centerSrc to specify the center image, and the onGetLeft and onGetRight events to build a scrolling list of images.

    create: function() {
        this.inherited(arguments);
        this.$.imageView.setCenterSrc(this.getImageUrl(this.index));
    },
    getImageUrl: function(inIndex) {
        var n = this.images[inIndex];
        if (n) {
            return "images/" + n;
        }
    },
    getLeft: function(inSender, inSnap) {
        inSnap && this.index--;
        return this.getImageUrl(this.index-1);
    },
    getRight: function(inSender, inSnap) {
        inSnap && this.index++;
        return this.getImageUrl(this.index+1);
    }
    

    Extends

    enyo.Carousel

    Published Properties

    • images: []
    • centerSrc: ""

    Methods

    • addImages: function(inImages)

      Adds additional images to the ImageView. @param {Object} inImages

    Inheritance

    Published properties inherited from enyo.BasicCarousel

    views, dragSnapThreshold

    Published properties inherited from enyo.SnapScroller

    index

    Published properties inherited from enyo.BasicScroller

    scrollTop, scrollLeft, autoHorizontal, autoVertical, fpsShowing, accelerated

    Published properties inherited from enyo.DragScroller

    horizontal, vertical

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Carousel

    onGetLeft, onGetRight

    Events inherited from enyo.SnapScroller

    onSnap, onSnapFinish

    Events inherited from enyo.BasicScroller

    onScrollStart, onBeforeScroll, onScroll, onScrollStop

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Carousel

    setCenterView

    Methods inherited from enyo.CarouselInternal

    fetchCurrentView, fetchView

    Methods inherited from enyo.BasicCarousel

    addViews, resize, resizeHandler

    Methods inherited from enyo.SnapScroller

    next, previous, snapTo

    Methods inherited from enyo.BasicScroller

    getBoundaries, isScrolling, scrollIntoView, scrollTo, scrollToBottom

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/Divider.js

    enyo.Divider

    A labeled divider with icon.

    Extends

    enyo.HFlexBox

    Published Properties

    • icon: ""

      URL for an image to be used as the divider's icon.

    • iconBorderCollapse: true
    • caption: "Divider"

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/AlphaDivider.js

    enyo.AlphaDivider

    A divider designed to show a single letter as its caption. For example:

    {kind: "AlphaDivider", caption: "S"}
    

    Extends

    enyo.Control

    Published Properties

    • caption: ""

    Methods

    • captionChanged: function()
    • create: function()

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/Header.js

    enyo.Header

    A control styled as a header fitting across the top of the application region.

    Content for Header can be specified either via the content property or by placing components in the Header. For example,

    {kind: "Header", content: "Header"}
    

    or

    {kind: "Header", components: [
        {content: "Header", flex: 1},
        {kind: "Button", caption: "Right-aligned button"}
    ]}
    

    Extends

    enyo.Control

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/PageHeader.js

    enyo.PageHeader

    A control styled as a header fitting across the top of the application window.

    Content for PageHeader can be specified either via the content property or by placing components in the PageHeader. For example,

    {kind: "PageHeader", content: "Header"}
    

    or

    {kind: "PageHeader", components: [
        {content: "Header", flex: 1},
        {kind: "Button", caption: "Right-aligned button"}
    ]}
    

    Extends

    enyo.Header

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/Toolbar.js

    enyo.Toolbar

    A container for items presented at the bottom of the screen. By default, the items are instances of ToolButton.

    Example toolbar with three buttons equally spaced apart:

    {kind: "Toolbar", components: [
        {caption: "foo"},
        {kind: "Spacer"},
        {caption: "bar"},
        {kind: "Spacer"},
        {caption: "baz"}
    ]}
    

    Other controls to put in a Toolbar are RadioToolButtonGroup and ToolButtonGroup.

    Extends

    enyo.HFlexBox

    Published Properties

    • fadeOnKeyboard: false

      Fade the toolbar into view when the virtual keyboard is hidden or raised

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/Item.js

    enyo.Item

    A control designed to display a group of stacked items, typically used in lists. Items have small guide lines between them and, by default, are highlighted when tapped. Set tapHighlight to false to prevent the highlighting.

    {flex: 1, name: "list", kind: "VirtualList", onSetupRow: "listSetupRow", components: [
        {kind: "Item", onclick: "listItemClick"}
    ]}
    

    Extends

    enyo.Stateful

    Published Properties

    • tapHighlight: false
    • disabled: false

    Inheritance

    Published properties inherited from enyo.Stateful

    cssNamespace

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Stateful

    setState

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/SwipeableItem.js

    enyo.SwipeableItem

    An item that can be swiped to show an inline confirmation prompt with confirm and cancel buttons. It is typically used to support swipe-to-delete in lists.

    The onConfirm event is fired when the user taps the confirm button, or when the user swipes the item while confirmRequired is false. The event provides the index of the item. For example:

    components: [
        {flex: 1, name: "list", kind: "VirtualList", onSetupRow: "listSetupRow", components: [
            {kind: "SwipeableItem", onConfirm: "deleteItem"}
        ]}
    ],
    deleteItem: function(inSender, inIndex) {
        // remove data
        this.someData.splice(inIndex, 1);
    }
    

    Extends

    enyo.Item

    Published Properties

    • swipeable: true

      Set to false to prevent swiping.

    • confirmRequired: true

      If false, no confirm prompt is displayed, and swipes immediately trigger an onConfirm event.

    • confirmCaption: enyo._$L("Delete")

      Caption shown for the confirm button in the confirm prompt.

    • cancelCaption: enyo._$L("Cancel")

      Caption shown for the cancel button in the confirm prompt.

    • confirmShowing: false
    • confirmWhenAutoHidden: false

      If the confirm prompt is automatically hidden--for example, in a list context when a confirm prompt is shown for another row--automatically send an onConfirm event.

    • allowLeft: true

      Allows the item to be swiped to the left.

    Published Events

    • onConfirm: ""

      Event fired when the user clicks the confirm button or, if confirmRequired is false, when the item is swiped. The event includes the index of the swiped item.

    • onCancel: ""

      Event fired when the user clicks the cancel button in the confirm prompt. The event includes the index of the swiped item.

    • onSwipe: ""

      Event fired when the user swipes the item. The event includes the index of the swiped item.

    • onConfirmShowingChanged: ""

      Event fired when the confirm prompt is shown or hidden.

    • onDrag: ""

      Event fired repeatedly as the item is dragged. Includes the total x pixel delta from at-rest position.

    Inheritance

    Published properties inherited from enyo.Item

    tapHighlight, disabled

    Published properties inherited from enyo.Stateful

    cssNamespace

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Stateful

    setState

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/menu/Menu.js

    enyo.Menu

    A control that displays a set of items in a popup.

    {kind: "Menu"}
    

    Items can be specified as child components of the Menu:

    {kind: "Menu", components: [
        {caption: "Palm"},
        {caption: "Yahoo"},
        {caption: "Facebook"}
    ]}
    

    Items can also be set with setItems, like this:

    this.$.menu.setItems(["Palm", "Yahoo", "Facebook"]);
    

    By default, items are instances of MenuItem. But you can change this to use different kinds for items. Here is an example using MenuCheckItem:

    {kind: "Menu", defaultKind: "MenuCheckItem"}
    

    To open the popup menu at the center, do the following:

    openPopup: function() {
        this.$.menu.openAtCenter();
    }
    

    Extends

    enyo.Popup

    Published Properties

    • autoCloseSubItems: true

    Inheritance

    Published properties inherited from enyo.Popup

    showHideMode, openClassName, showKeyboardWhenOpening

    Published properties inherited from enyo.BasicPopup

    modal, dismissWithClick, dismissWithEscape, shareScrim, scrimWhenModal, scrim, scrimClassName, autoClose

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.BasicPopup

    onBeforeOpen, onOpen, onClose

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Popup

    openAroundControl, openAt, openAtCenter, openAtControl, openAtEvent, openNear

    Methods inherited from enyo.BasicPopup

    close, open, toggleOpen

    Methods inherited from enyo.LazyControl

    componentsReady, initComponents, validateComponents

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/menu/MenuItem.js

    enyo.MenuItem

    A labeled item with icon. It is meant to go inside a Menu.

    Extends

    enyo.Control

    Published Properties

    • caption: ""
    • value: undefined
    • icon: ""
    • orderStyle: ""
    • open: false
    • disabled: false
    • hideIcon: false
    • tapHighlight: true

    Published Events

    • onclick: "menuItemClick"

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    enyo.MenuCheckItem

    An labeled item with icon and checkmark. It is meant to go inside a Menu.

    Extends

    enyo.MenuItem

    Published Properties

    • checked: false

    Inheritance

    Published properties inherited from enyo.MenuItem

    caption, value, icon, orderStyle, open, disabled, hideIcon, tapHighlight

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.MenuItem

    onclick

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/popup/PopupSelect.js

    enyo.PopupSelect

    A Menu with support for selection.

    {kind: "PopupSelect", onSelect: "popupSelect"}
    

    The onSelect event is fired when a selection is made, like so:

    popupSelect: function(inSender, inSelected) {
        var value = inSelected.getValue();
    }
    

    Extends

    enyo.Menu

    Published Properties

    • items: []

      An array of config objects or strings representing items. Note that specified components are automatically added to the items array. Items are owned by the PopupSelect and therefore event handlers should not be specified on them. Use the onSelect event to respond to an item selection.

    • selected: null

    Published Events

    • onSelect: ""

    Methods

    • componentsReady: function()
    • importProps: function(inProps)

    Inheritance

    Published properties inherited from enyo.Menu

    autoCloseSubItems

    Published properties inherited from enyo.Popup

    showHideMode, openClassName, showKeyboardWhenOpening

    Published properties inherited from enyo.BasicPopup

    modal, dismissWithClick, dismissWithEscape, shareScrim, scrimWhenModal, scrim, scrimClassName, autoClose

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.BasicPopup

    onBeforeOpen, onOpen, onClose

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Popup

    openAroundControl, openAt, openAtCenter, openAtControl, openAtEvent, openNear

    Methods inherited from enyo.BasicPopup

    close, open, toggleOpen

    Methods inherited from enyo.LazyControl

    componentsReady, initComponents, validateComponents

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/popup/PopupList.js

    enyo.PopupList

    A PopupSelect that renders items inside a VirtualRepeater.

    {kind: "PopupList", onSelect: "popupSelect"}
    

    To set items, use setItems:

    this.$.popupList.setItems([
        "Jan", "Feb", "Mar", "Apr", "May", "Jun",
        "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
    ]);
    

    Extends

    enyo.PopupSelect

    Published Events

    • onSetupItem: ""

    Inheritance

    Published properties inherited from enyo.PopupSelect

    items, selected

    Published properties inherited from enyo.Menu

    autoCloseSubItems

    Published properties inherited from enyo.Popup

    showHideMode, openClassName, showKeyboardWhenOpening

    Published properties inherited from enyo.BasicPopup

    modal, dismissWithClick, dismissWithEscape, shareScrim, scrimWhenModal, scrim, scrimClassName, autoClose

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.PopupSelect

    onSelect

    Events inherited from enyo.BasicPopup

    onBeforeOpen, onOpen, onClose

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.PopupSelect

    componentsReady, importProps

    Methods inherited from enyo.Popup

    openAroundControl, openAt, openAtCenter, openAtControl, openAtEvent, openNear

    Methods inherited from enyo.BasicPopup

    close, open, toggleOpen

    Methods inherited from enyo.LazyControl

    componentsReady, initComponents, validateComponents

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/popup/ModalDialog.js

    enyo.ModalDialog

    A fixed width Popup, with a header, designed to be used as an interactive dialog box.

    {kind: "ModalDialog", caption: "Dialog Title"}
    

    Extends

    enyo.Popup

    Published Properties

    • caption: ""
    • contentHeight: ""

      Height to apply to the content of the popup. Specify a value for this when the popup's content should be explicitly, rather than naturally, sized.

    • contentClassName: ""

      Name of a CSS class to apply to the content of the popup.

    Methods

    • calcContentSizeDelta: function()
    • captionChanged: function()
    • componentsReady: function()
    • contentClassNameChanged: function(inOldValue)
    • contentHeightChanged: function()
    • create: function()
    • layoutKindChanged: function()

    Inheritance

    Published properties inherited from enyo.Popup

    showHideMode, openClassName, showKeyboardWhenOpening

    Published properties inherited from enyo.BasicPopup

    modal, dismissWithClick, dismissWithEscape, shareScrim, scrimWhenModal, scrim, scrimClassName, autoClose

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.BasicPopup

    onBeforeOpen, onOpen, onClose

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Popup

    openAroundControl, openAt, openAtCenter, openAtControl, openAtEvent, openNear

    Methods inherited from enyo.BasicPopup

    close, open, toggleOpen

    Methods inherited from enyo.LazyControl

    componentsReady, initComponents, validateComponents

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/CustomListSelector.js

    enyo.CustomListSelector

    A control that provides a display similar to an HTML select, used to select one item from a set of many choices. When the CustomListSelector is tapped, a scrolling popup of available choices is shown. The user taps an item to select it, closing the popup and changing the displayed item to the selected one.

    The items for a CustomListSelector can be specified as an array of strings or objects specifying a caption and a value. For example:

    components: [
        {kind: "CustomListSelector", value: 2, onChange: "itemChanged", items: [
            {caption: "One", value: 1},
            {caption: "Two", value: 2},
            {caption: "Three", value: 3},
        ]}
    ],
    itemChanged: function(inSender, inValue, inOldValue) {
        this.setSomeOption(inValue);
    }
    

    The onChange event fires when the selected item changes. Note that the onSelect event fires whenever an item is selected.

    The value of a CustomListSelector may be set directly or retrieved as follows:

    buttonClick: function() {
        if (this.$.customListSelector.getValue() > 10) {
            this.$.customListSelector.setValue(10);
        }
    }
    

    Note that you cannot set a value not in the items list.

    The property hideItem can be used to hide the displayed item.

    Extends

    enyo.Control

    Published Properties

    • value: undefined

      The currently selected value.

    • items: []

      An array of strings or objects specifying the item choices. If objects are specified, they are component configurations and do not specify a kind. Typically, a caption and value are specified.

    • label: ""

      A label descibing the set of available choices. It is shown to the left of the drop-down arrow.

    • hideItem: false

      Hides the displayed item.

    • hideArrow: false

      Hides the drop-down arrow.

    • disabled: false
    • popupAlign: "right"

      Determines with which side of the list selector to align the popup; defaults to right, can also be left.

    • contentPack: "start"

      Determines if the content of the list selector is packed to start (default), middle, or end.

    Published Events

    • onChange: ""

      Event fired when the selected value changes. The event sends both the current and previous values.

    • onSelect: ""

      Event fired whenever an item is selected, even if it is the same item that was previously selected.

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/ListSelector.js

    enyo.ListSelector

    A control that provides a display similar to an HTML select, used to select one item from a set of many choices. When the ListSelector is tapped, a scrolling popup of available choices is shown. The user taps an item to select it, closing the popup and changing the displayed item to the selected one.

    The items for a ListSelector can be specified as an array of strings or objects specifying a caption and a value. For example:

    components: [
        {kind: "ListSelector", value: 2, onChange: "itemChanged", items: [
            {caption: "One", value: 1},
            {caption: "Two", value: 2},
            {caption: "Three", value: 3},
        ]}
    ],
    itemChanged: function(inSender, inValue, inOldValue) {
        this.setSomeOption(inValue);
    }
    

    ListSelector uses PopupList, which uses VirtualRepeater to render items to optimize creation and rendering time. This makes ListSelector less customizable; for example, it can't have different kinds for items. If you need to customize ListSelector, use CustomListSelector.

    The onChange event fires when the selected item changes. Note that the onSelect event fires whenever an item is selected.

    The value of a ListSelector may be set directly or retrieved as follows:

    buttonClick: function() {
        if (this.$.listSelector.getValue() > 10) {
            this.$.listSelector.setValue(10);
        }
    }
    

    Note that you cannot set a value not in the items list.

    The property hideItem can be used to hide the displayed item.

    Extends

    enyo.CustomListSelector

    Inheritance

    Published properties inherited from enyo.CustomListSelector

    value, items, label, hideItem, hideArrow, disabled, popupAlign, contentPack

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.CustomListSelector

    onChange, onSelect

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/button/RadioGroup.js

    enyo.RadioGroup

    A group of RadioButton objects laid out horizontally. Within the same radio group, tapping on one radio button will release any previously tapped radio button. The onChange event is fired when the selected radio button is changed.

    {kind: "RadioGroup", onChange: "radioButtonSelected", components: [
        {caption: "foo"},
        {caption: "bar"},
        {caption: "baz"}
    ]}
    

    To get the value (or index) of the currently selected button, use getValue():

    radioButtonSelected: function(inSender) {
        this.log("Selected button" + inSender.getValue());
    }
    

    Extends

    enyo.OrderedContainer

    Published Properties

    • value: 0

    Published Events

    • onChange: ""

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/button/RadioButton.js

    enyo.RadioButton

    An IconButton meant to go inside a RadioGroup. The value property identifies the button in the group. If this property is not set, the index of the button is used.

    {kind: "RadioButton", value: "foo"}
    

    Extends

    enyo.IconButton

    Published Properties

    • value: ""
    • depressed: false

    Published Events

    • onmousedown: ""

    Inheritance

    Published properties inherited from enyo.IconButton

    icon, iconIsClassName

    Published properties inherited from enyo.CustomButton

    caption, disabled, isDefault, down, depressed, hot, toggling, allowDrag

    Published properties inherited from enyo.Stateful

    cssNamespace

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Stateful

    setState

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/button/TabGroup.js

    enyo.TabGroup

    A TabGroup is a RadioGroup with tab bar styling.

    Extends

    enyo.RadioGroup

    Inheritance

    Published properties inherited from enyo.RadioGroup

    value

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.RadioGroup

    onChange

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/button/TabButton.js

    enyo.TabButton

    A TabButton is a RadioButton meant to go inside a TabGroup.

    Extends

    enyo.RadioButton

    Inheritance

    Published properties inherited from enyo.RadioButton

    value, depressed

    Published properties inherited from enyo.IconButton

    icon, iconIsClassName

    Published properties inherited from enyo.CustomButton

    caption, disabled, isDefault, down, depressed, hot, toggling, allowDrag

    Published properties inherited from enyo.Stateful

    cssNamespace

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.RadioButton

    onmousedown

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Stateful

    setState

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/menu/AppMenu.js

    enyo.AppMenu

    An application menu that appears in the upper left corner of the screen when the user taps the left-hand side of the status bar.

    By default, an application menu's items are instances of AppMenuItem.

    Example menu with two items and a submenu:

    {kind: "AppMenu", components: [
        {caption: "New Card", onclick: "openNewCard"},
        {caption: "Help"},
        {caption: "Find", components: [
            {caption: "Find Next"},
            {caption: "Find Prev"}
        ]}
    ]}
    

    To signal that the app menu should be shown, an "openAppMenu" event is fired to the application. When it should be hidden, a "closeAppMenu" event is fired. An application should implement methods to respond to these events as follows:

    openAppMenuHandler: function() {
        this.$.appMenu.open();
    },
    closeAppMenuHandler: function() {
        this.$.appMenu.close();
    }
    

    Extends

    enyo.Menu

    Published Properties

    • automatic: true

    Inheritance

    Published properties inherited from enyo.Menu

    autoCloseSubItems

    Published properties inherited from enyo.Popup

    showHideMode, openClassName, showKeyboardWhenOpening

    Published properties inherited from enyo.BasicPopup

    modal, dismissWithClick, dismissWithEscape, shareScrim, scrimWhenModal, scrim, scrimClassName, autoClose

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.BasicPopup

    onBeforeOpen, onOpen, onClose

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Popup

    openAroundControl, openAt, openAtCenter, openAtControl, openAtEvent, openNear

    Methods inherited from enyo.BasicPopup

    close, open, toggleOpen

    Methods inherited from enyo.LazyControl

    componentsReady, initComponents, validateComponents

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/menu/AppMenuItem.js

    enyo.AppMenuItem

    Extends

    enyo.MenuItem

    Methods

    • create: function()

    Inheritance

    Published properties inherited from enyo.MenuItem

    caption, value, icon, orderStyle, open, disabled, hideIcon, tapHighlight

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.MenuItem

    onclick

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/menu/HelpMenu.js

    enyo.HelpMenu

    Menu item for Help. Should be used by an application to provide user access to additional help content. It is meant to be used inside an enyo.AppMenu.

    {kind: "AppMenu", components: [
        {kind: "EditMenu"},
        {kind: "HelpMenu", target: "http://help.palm.com/phone/index.html"}
    ]}
    

    For internal HP/Palm applications, this will start the on-device Help application. If the target points outside the palm.com domain, this will instead launch the web browser to display the content.

    Extends

    enyo.AppMenuItem

    Published Properties

    • target: ""

    Methods

    • itemClick: function()

    Inheritance

    Published properties inherited from enyo.MenuItem

    caption, value, icon, orderStyle, open, disabled, hideIcon, tapHighlight

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.MenuItem

    onclick

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.AppMenuItem

    create

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/button/ToolButtonGroup.js

    enyo.ToolButtonGroup

    A container for a group of buttons designed to go inside a Toolbar. The buttons are laid out horizontally.

    By default, the components in a menu toolbar are instances of GroupedToolButton.

    {kind: "Toolbar", components: [
        {kind: "ToolButtonGroup", components: [
            {icon: "images/menu-icon-back.png", onclick: "goBack"},
            {icon: "images/menu-icon-forward.png", onclick: "goForward"},
            {icon: "images/menu-icon-refresh.png", onclick: "refresh"}
        ]}
    ]}
    

    Extends

    enyo.OrderedContainer

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/menu/EditMenu.js

    enyo.EditMenu

    A submenu with items to perform select all, cut, copy, and paste commands. It is meant to go inside an AppMenu.

    {kind: "AppMenu", components: [
        {kind: "EditMenu"},
        {caption: "Some other item"}
    ]}
    

    Extends

    enyo.AppMenuItem

    Published Properties

    • autoDisableItems: true

      If true, edit menu items will automatically disable if the focused element does not support editing. This setting will override the individual item disabled properties.

    • selectAllDisabled: false
    • cutDisabled: false
    • copyDisabled: false
    • pasteDisabled: false
    • showShortcuts: false

    Published Events

    • onSelectAll: ""
    • onCut: ""
    • onCopy: ""
    • onPaste: ""

    Inheritance

    Published properties inherited from enyo.MenuItem

    caption, value, icon, orderStyle, open, disabled, hideIcon, tapHighlight

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.MenuItem

    onclick

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.AppMenuItem

    create

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/menu/EditMenuItem.js

    palm/controls/button/GroupedToolButton.js

    enyo.GroupedToolButton

    An IconButton with menu styling. It is meant to go inside a ToolButtonGroup.

    Extends

    enyo.IconButton

    Inheritance

    Published properties inherited from enyo.IconButton

    icon, iconIsClassName

    Published properties inherited from enyo.CustomButton

    caption, disabled, isDefault, down, depressed, hot, toggling, allowDrag

    Published properties inherited from enyo.Stateful

    cssNamespace

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Stateful

    setState

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/button/RadioToolButton.js

    enyo.RadioToolButton

    A RadioToolButton with toolbar styling. It is meant to go inside a RadioToolButtonGroup.

    Extends

    enyo.RadioButton

    Inheritance

    Published properties inherited from enyo.RadioButton

    value, depressed

    Published properties inherited from enyo.IconButton

    icon, iconIsClassName

    Published properties inherited from enyo.CustomButton

    caption, disabled, isDefault, down, depressed, hot, toggling, allowDrag

    Published properties inherited from enyo.Stateful

    cssNamespace

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.RadioButton

    onmousedown

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Stateful

    setState

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/button/RadioToolButtonGroup.js

    enyo.RadioToolButtonGroup

    A group of RadioToolButton objects with toolbar styling.

    {kind: "RadioToolButtonGroup", components: [
        {icon: "images/foo.png"},
        {label: "bar"},
        {icon: "images/baz.png"}
    ]}
    

    Also see RadioGroup for more examples.

    Extends

    enyo.RadioGroup

    Inheritance

    Published properties inherited from enyo.RadioGroup

    value

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.RadioGroup

    onChange

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/picker/PickerButton.js

    enyo.PickerButton

    A button that serves as a base control for Picker.

    Extends

    enyo.CustomButton

    Published Properties

    • focus: false

    Published Events

    • onFocusChange: ""

    Inheritance

    Published properties inherited from enyo.CustomButton

    caption, disabled, isDefault, down, depressed, hot, toggling, allowDrag

    Published properties inherited from enyo.Stateful

    cssNamespace

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Stateful

    setState

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/picker/Picker.js

    enyo.Picker

    A control offering a selection of items.

    A picker can be initialized with a simple array of strings, like so:

    {kind: "Picker", value: "name", items: ["title", "name", "first last", "bool"], onChange: "pickerPick"}
    

    You can also specify caption and value seperately, like so:

    {kind: "Picker", value: "am", items: [
        {caption: "A.M.", value: "am"},
        {caption: "P.M.", value: "pm"}
    ]}
    

    The selected item can be retrieved by calling getValue, like so:

    pickerPick: function(inSender) {
        this.fieldType = this.$.picker.getValue();
    }
    

    Extends

    enyo.PickerButton

    Published Properties

    • value: ""
    • textAlign: "center"
    • items: []

      An array of simple strings representing items.

    • scrim: false
    • modal: true

    Published Events

    • onChange: ""

    Inheritance

    Published properties inherited from enyo.PickerButton

    focus

    Published properties inherited from enyo.CustomButton

    caption, disabled, isDefault, down, depressed, hot, toggling, allowDrag

    Published properties inherited from enyo.Stateful

    cssNamespace

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.PickerButton

    onFocusChange

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Stateful

    setState

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/picker/IntegerPicker.js

    enyo.IntegerPicker

    A control that allows selection from a single integer field. The default selection range is 0-9. You can adjust the range by setting the min and max properties.

    {kind: "IntegerPicker", label: "rating", min: 0, max: 10, onChange: "pickerChange"}
    

    The selected integer can be retrieved by calling getValue, like so:

    pickerPick: function(inSender) {
        var rating = this.$.integerPicker.getValue();
    }
    

    Extends

    enyo.HFlexBox

    Published Properties

    • label: "value"
    • value: 0
    • min: 0
    • max: 9

    Published Events

    • onChange: ""

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/picker/PickerGroup.js

    enyo.PickerGroup

    A container used to group multiple Pickers together.

    {kind: "PickerGroup", label: "preferences", onChange: "pickerPick", components: [
        {name: "searchEnginePicker", value: "Google", items: ["Google", "Yahoo", "Bing"]},
        {name: "contactTypePicker", value: "Mail", items: ["Mail", "IM", "Text"]}
    ]}
    

    The selected items can be retrieved by calling getValue, like so:

    pickerPick: function(inSender) {
        this.searchEngine = this.$.searchEnginePicker.getValue();
        this.contactType = this.$.contactTypePicker.getValue();
    }
    

    Extends

    enyo.HFlexBox

    Published Properties

    • label: ""
    • labelClass: ""

    Published Events

    • onChange: ""

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/picker/TimePicker.js

    enyo.TimePicker

    A PickerGroup that offers selection of the hour and minutes, with an optional AM/PM selector. The TimePicker uses the JavaScript Date object to represent the chosen time.

    {kind: "TimePicker", label: "start time", onChange: "pickerPick"}
    

    The selected time can be retrieved by calling getValue, like so:

    pickerPick: function(inSender) {
        var startTime = this.$.timePicker.getValue();
    }
    

    To enable 24-hour mode, do this:

    {kind: "TimePicker", label: "start time", is24HrMode: true, onChange: "pickerPick"}
    

    Extends

    enyo.PickerGroup

    Published Properties

    • label: enyo._$L("time")
    • value: null
    • minuteInterval: 1
    • is24HrMode: null

    Inheritance

    Published properties inherited from enyo.PickerGroup

    label, labelClass

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.PickerGroup

    onChange

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/picker/DatePicker.js

    enyo.DatePicker

    A PickerGroup that offers selection of the month, day and year. The DatePicker uses the JavaScript Date object to represent the chosen date.

    {kind: "DatePicker", label: "birthday", onChange: "pickerPick"}
    

    The selected date can be retrieved by calling getValue, like so:

    pickerPick: function(inSender) {
        var bDate = this.$.datePicker.getValue();
    }
    

    The year range can be adjusted by setting the minYear and maxYear properties, like so:

    {kind: "DatePicker", label: "birthday", minYear: 1900, maxYear: 2011, onChange: "pickerPick"}
    

    Extends

    enyo.PickerGroup

    Published Properties

    • label: enyo._$L("date")
    • value: null
    • hideDay: false
    • hideMonth: false
    • hideYear: false
    • minYear: 1900
    • maxYear: 2099

    Inheritance

    Published properties inherited from enyo.PickerGroup

    label, labelClass

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.PickerGroup

    onChange

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/progress/ProgressBar.js

    enyo.ProgressBar

    A control that shows the current progress of a process in a horizontal bar. By default, it animates progress changes.

    {kind: "ProgressBar"}
    {kind: "ProgressBar", animationPosition: false}
    

    See Progress for usage examples.

    Extends

    enyo.Progress

    Published Properties

    • animatePosition: true

      Controls whether progress changes are animated.

    Published Events

    • onBeginAnimation: ""
    • onEndAnimation: ""

    Methods

    • setPositionImmediate: function(inPosition)

      Set position immediately to the given position, bypassing animation.

    Inheritance

    Published properties inherited from enyo.Progress

    maximum, minimum, position, snap

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/progress/ProgressBarItem.js

    enyo.ProgressBarItem

    A progress bar that looks like a list item.

    {kind: "ProgressBarItem"}
    

    See Progress for usage examples.

    Extends

    enyo.ProgressBar

    Methods

    • create: function()

    Inheritance

    Published properties inherited from enyo.ProgressBar

    animatePosition

    Published properties inherited from enyo.Progress

    maximum, minimum, position, snap

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.ProgressBar

    onBeginAnimation, onEndAnimation

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.ProgressBar

    setPositionImmediate

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/progress/ProgressButton.js

    enyo.ProgressButton

    A progress bar that looks like a list item.

    {kind: "ProgressButton"}
    

    See Progress for usage examples.

    Extends

    enyo.ProgressBar

    Published Properties

    • cancelable: true

    Published Events

    • onCancel: ""

    Methods

    • cancelableChanged: function()
    • create: function()

    Inheritance

    Published properties inherited from enyo.ProgressBar

    animatePosition

    Published properties inherited from enyo.Progress

    maximum, minimum, position, snap

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.ProgressBar

    onBeginAnimation, onEndAnimation

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.ProgressBar

    setPositionImmediate

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/progress/Slider.js

    enyo.Slider

    A control that presents a range of selection options in the form of a horizontal slider with a control knob that can be tapped and dragged to the desired location.

    {kind: "Slider", onChanging: "sliderChanging", onChange: "sliderChange"}
    

    The onChanging event is fired when dragging the control knob. The onChange event is fired when the position is set, either by finishing a drag or by tapping the bar.

    Extends

    enyo.ProgressBar

    Published Properties

    • tapPosition: true

      Controls whether position may be set by tapping an arbitrary position on the bar. If false, position may only be set by dragging the knob.

    Published Events

    • onChange: ""
    • onChanging: ""

    Inheritance

    Published properties inherited from enyo.ProgressBar

    animatePosition

    Published properties inherited from enyo.Progress

    maximum, minimum, position, snap

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.ProgressBar

    onBeginAnimation, onEndAnimation

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.ProgressBar

    setPositionImmediate

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/progress/ProgressSlider.js

    enyo.ProgressSlider

    A control that combines a Slider with a ProgressBar.

    {kind: "ProgressSlider"}
    

    The lockBar, barPosition, barMinimum, and barMaximum properties can be used to constrain user input. The barPosition, barMinimum, and barMaximum properties are only active when lockBar is true.

    For example, to make a progress slider that allows dragging between 50 and 70, do this:

    {kind: "ProgressSlider", lockBar: true, barMinimum: 50, barMaximum: 70}
    

    To make a progress slider that snaps to multiples of 10, do this:

    {kind: "ProgressSlider", lockBar: true, snap: 10}
    

    Extends

    enyo.Slider

    Published Properties

    • lockBar: false
    • barPosition: 0
    • altBarPosition: 0
    • barMinimum: 0
    • barMaximum: 100

    Inheritance

    Published properties inherited from enyo.Slider

    tapPosition

    Published properties inherited from enyo.ProgressBar

    animatePosition

    Published properties inherited from enyo.Progress

    maximum, minimum, position, snap

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Slider

    onChange, onChanging

    Events inherited from enyo.ProgressBar

    onBeginAnimation, onEndAnimation

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.ProgressBar

    setPositionImmediate

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/ConfirmPrompt.js

    enyo.ConfirmPrompt

    A prompt with confirm and cancel buttons. The onConfirm and onCancel events fire when the user clicks the confirm and cancel buttons, respectively.

    Extends

    enyo.HFlexBox

    Published Properties

    • confirmCaption: enyo._$L("Confirm")
    • cancelCaption: enyo._$L("Cancel")

    Published Events

    • onConfirm: "confirmAction"
    • onCancel: "cancelAction"

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    enyo.ScrimmedConfirmPrompt

    A prompt with confirm and cancel buttons that scrims the rest of the application when shown.

    Extends

    enyo.Control

    Published Properties

    • confirmCaption: enyo._$L("Confirm")
    • cancelCaption: enyo._$L("Cancel")

    Published Events

    • onConfirm: ""
    • onCancel: ""

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/Spacer.js

    enyo.Spacer

    A control that fills the space between other controls in a flex layout by setting its flex property to 1. For example:

    {kind: "HFlexBox", components: [
        {kind: "Button", caption: "On the left"},
        {kind: "Spacer"},
        {kind: "Button", caption: "On the right"}
    ]}
    

    Extends

    enyo.Control

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/controls/Hybrid.js

    enyo.Hybrid

    This control used to instantiate a PDK hybrid object within a Enyo application.

    In order to have mouse events passed to the hybrid plugin, you need to add your own requiresDomMousedown property to the control with the value true.

    Non-visible plugins are supported with width and height of 0. They are still in the DOM of the page, and re-rendering them will cause the plugin executable to be shutdown and restarted. The enyo.Hybrid code will automatically apply a "float: left" style to 0-size plugins so they don't interfere with page layout.

    If you use a hybrid in a non-webOS context, only the width and height properties are used, creating an inert object with no methods or behavior. This is mainly useful for testing how the control interacts with your application layout.

    Extends

    enyo.Control

    Published Properties

    • executable: ""

      REQUIRED: name of plugin executable to run

    • params: []

      an array of strings; if provided, used as command line parameters to plugin

    • alphaBlend: false

      set to true to enable premultiplied alpha-blending for plugins. Enable if you want to blend the plugin display contents with the HTML elements below it on the page. Set to false for faster drawing.

    • killTransparency: false

      set to true to stop plugin layer from clearing transparency information from display surface. Should always be used with alphaBlend: false. Used to allow showing video layer from video tag playback through a hybrid object.

    • cachePlugin: false

      if true, plugin will remain alive when hidden. Useful if you're hosting this in a pane or other part of the page where you don't want the plugin process to be killed and restarted later.

    • allowKeyboardFocus: false

      if true, allows plugin to get focus when tapped by setting its tabIndex property

    • passTouchEvents: false

      if true, plugin will register for touch events from WebKit

    • bgcolor: null

      background color to use for displaying plugin before initial draw or during resize. It's a string of the form, "rrggbb" using hex digits, with "000000" being black, "FFFFFF" being white. If null, use default gray color. This can only be set at creation time.

    • height: 0

      height of the plugin object

    • width: 0

      width of the plugin object

    Published Events

    • onPluginReady: ""

      sent when the plugin has is ready to allow method calls. This is either signaled directly by remoteadapter on newer webOS builds or signaled by the plugin code using PDL_CallJS() to call the "ready" method.

    • onPluginConnected: ""

      sent when the plugin executable has been started and has a made a connection back to the plugin.

    • onPluginDisconnected: ""

      sent when the plugin executable has disconnected, usually due to the process ending.

    Methods

    • addCallback: function(name, callback, defer)

      Add a callback function to the plugin object that can be called by PDL_CallJS() from the plugin. name is a string, the name to use for the callback method on the plugin. callback is a function that will be called with "this" pointing to the actual DOM node of the plugin, so use enyo.bind to redirect it to the appropriate context. The defer parameter is an optional boolean. If true, the callback will be called asynchronously so it can make calls back into the plugin.

    • callPluginMethod: function(methodName)

      Call a method on the plugin with the result returned immediately to the caller. The arguments to the method are supplied as arguments to this function after the method name as a string. If the hybrid plugin is not ready for calls, this will throw an exception.

    • callPluginMethodDeferred: function(callback, methodName)

      Call a method on the plugin with the result returned through a callback function. If the hybrid plugin is not ready for calls, this will defer the call to be done after the plugin is ready. You can pass null as the callback if you don't care about the result.

    • focus: function()

      tell the system to put focus on the hybrid window and show the on-screen keyboard if available

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/containers/Group.js

    enyo.Group

    A control used to show a series of controls visually grouped together. A group can optionally describe itself with a caption.

    Here's an example:

    {kind: "Group", caption: "Audio/Video Options", components: [
        {kind: "HFlexBox", components: [
            {content: "Sound", flex: 1},
            {kind: "ToggleButton"}
        ]},
        {kind: "HFlexBox", components: [
            {content: "Video", flex: 1},
            {kind: "ToggleButton"}
        ]}
    ]}
    

    Extends

    enyo.Control

    Published Properties

    • caption: ""
    • contentFit: false

      If true, then the group's content is expanded to fit the size of the group. This should be used when the group is given an explicit size and its content should fit to that size.

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/containers/RowGroup.js

    enyo.RowGroup

    A Group in which each control is automatically displayed in an Item, so they have small guide lines between them.

    Here's an example:

    {kind: "RowGroup", caption: "Audio/Video Options", components: [
        {layoutKind: "HFlexLayout", components: [
            {content: "Sound", flex: 1},
            {kind: "ToggleButton"}
        ]},
        {layoutKind: "HFlexLayout", components: [
            {content: "Video", flex: 1},
            {kind: "ToggleButton"}
        ]}
    ]}
    

    Extends

    enyo.Group

    Methods

    • constructor: function()
    • hideRow: function(inIndex)

      Hide the row at the given inIndex.

    • showRow: function(inIndex)

      Show the row at the given inIndex.

    Inheritance

    Published properties inherited from enyo.Group

    caption, contentFit

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    enyo.RowItem

    Extends

    enyo.Item

    Methods

    • addRemoveOrderClassName: function(inClass, inAdd)
    • setOrderStyle: function(inClass)

    Inheritance

    Published properties inherited from enyo.Item

    tapHighlight, disabled

    Published properties inherited from enyo.Stateful

    cssNamespace

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Stateful

    setState

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/containers/DividerDrawer.js

    enyo.DividerDrawer

    A drawer with its caption styled to look like a divider. An arrow button shows the open state of the drawer.

    A caption and an icon for the caption may be provided.

    Extends

    enyo.Drawer

    Published Properties

    • icon: ""

      URL for an image to be used as the icon.

    • caption: ""

    Inheritance

    Published properties inherited from enyo.Drawer

    open, canChangeOpen, animate, captionClassName, caption

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Drawer

    onOpenChanged, onOpenAnimationComplete

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Drawer

    close, open, toggleOpen

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/containers/Toaster.js

    enyo.Toaster

    A Popup that displays a set of controls over other content. A toaster attaches to the bottom, left, right, or top of the screen and, when shown, slides in from off the screen.

    Note, it's typically a good idea to control the vertical position of the toaster by giving it an absolute top and/or bottom position via css.

    To show a toaster asking the user to confirm a choice, try the following:

    components: [
        {kind: "Button", caption: "Confirm choice", onclick: "showToaster"},
        {kind: "Toaster", flyInFrom: "right", components: [
            {content: "Are you sure?"},
            {layoutKind: "HFlexLayout", pack: "center", components: [
                {kind: "Button", caption: "OK", onclick: "confirmClick"},
                {kind: "Button", caption: "Cancel", onclick: "cancelClick"}
            ]}
        ]}
    ],
    showToaster: function() {
        this.$.toaster.open();
    },
    confirmClick: function() {
        // process confirmation
        this.doConfirm();
        // then close dialog
        this.$.toaster.close();
    },
    cancelClick: function() {
        this.$.toaster.close();
    }
    

    Extends

    enyo.Popup

    Published Properties

    • flyInFrom: "bottom"

      Direction from which the toaster should fly in when it is opened. One of: "bottom", "top", "left", or "right"

    Inheritance

    Published properties inherited from enyo.Popup

    showHideMode, openClassName, showKeyboardWhenOpening

    Published properties inherited from enyo.BasicPopup

    modal, dismissWithClick, dismissWithEscape, shareScrim, scrimWhenModal, scrim, scrimClassName, autoClose

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.BasicPopup

    onBeforeOpen, onOpen, onClose

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Popup

    openAroundControl, openAt, openAtCenter, openAtControl, openAtEvent, openNear

    Methods inherited from enyo.BasicPopup

    close, open, toggleOpen

    Methods inherited from enyo.LazyControl

    componentsReady, initComponents, validateComponents

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/containers/Dialog.js

    enyo.Dialog

    A Popup that displays a set of controls over other content. A dialog attaches to the bottom of the screen and, when shown, animates up from the bottom of the screen.

    To show a dialog asking the user to confirm a choice, try the following:

    components: [
        {kind: "Button", caption: "Confirm choice", onclick: "showDialog"},
        {kind: "Dialog", components: [
            {content: "Are you sure?"},
            {layoutKind: "HFlexLayout", pack: "center", components: [
                {kind: "Button", caption: "OK", onclick: "confirmClick"},
                {kind: "Button", caption: "Cancel", onclick: "cancelClick"}
            ]}
        ]}
    ],
    showDialog: function() {
        this.$.dialog.open();
    },
    confirmClick: function() {
        // process confirmation
        this.doConfirm();
        // then close dialog
        this.$.dialog.close();
    },
    cancelClick: function() {
        this.$.dialog.close();
    }
    

    Extends

    enyo.Toaster

    Inheritance

    Published properties inherited from enyo.Toaster

    flyInFrom

    Published properties inherited from enyo.Popup

    showHideMode, openClassName, showKeyboardWhenOpening

    Published properties inherited from enyo.BasicPopup

    modal, dismissWithClick, dismissWithEscape, shareScrim, scrimWhenModal, scrim, scrimClassName, autoClose

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.BasicPopup

    onBeforeOpen, onOpen, onClose

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Popup

    openAroundControl, openAt, openAtCenter, openAtControl, openAtEvent, openNear

    Methods inherited from enyo.BasicPopup

    close, open, toggleOpen

    Methods inherited from enyo.LazyControl

    componentsReady, initComponents, validateComponents

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/containers/DialogPrompt.js

    enyo.DialogPrompt

    A special Dialog designed to prompt the user to answer a question affirmatively or negatively. It displays a title and message, along with accept and cancel buttons.

    The title, message, acceptButtonCaption, and cancelButtonCaption can all be set as needed.

    The onAccept and onCancel events are fired when the user clicks the accept and cancel buttons, respectively.

    Here's an example:

    {
        kind: "DialogPrompt",
        title: "Mood Prompt",
        message: "Are you having a good day?",
        acceptButtonCaption: "Yes",
        cancelButtonCaption: "No",
        onAccept: "fetchMoreWork",
        onCancel: "fetchABreak"
    }
    

    Extends

    enyo.Dialog

    Published Properties

    • title: ""
    • message: ""
    • acceptButtonCaption: enyo._$L("OK")
    • cancelButtonCaption: enyo._$L("Cancel")

    Published Events

    • onAccept: ""
    • onCancel: ""

    Methods

    • open: function(inTitle, inMessage, inAcceptButtonCaption, inCancelButtonCaption)

    Inheritance

    Published properties inherited from enyo.Toaster

    flyInFrom

    Published properties inherited from enyo.Popup

    showHideMode, openClassName, showKeyboardWhenOpening

    Published properties inherited from enyo.BasicPopup

    modal, dismissWithClick, dismissWithEscape, shareScrim, scrimWhenModal, scrim, scrimClassName, autoClose

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.BasicPopup

    onBeforeOpen, onOpen, onClose

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Popup

    openAroundControl, openAt, openAtCenter, openAtControl, openAtEvent, openNear

    Methods inherited from enyo.BasicPopup

    close, open, toggleOpen

    Methods inherited from enyo.LazyControl

    componentsReady, initComponents, validateComponents

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/containers/SlidingView.js

    enyo.SlidingView

    A view that slides back and forth and is designed to be a part of a SlidingPane.

    SlidingView objects have a "dragAnywhere" property, whose default value is true. This allows the user to drag the view from any point inside the panel that is not already a draggable region (e.g., a Scroller). If dragAnywhere is set to false, then the view can still be dragged via any control inside it whose "slidingHandler" property is set to true.

    The "peekWidth" property specifies the amount the paneview should be offset from the left when it is selected. This allows controls on the underlying view object to the left of the selected one to be partially revealed.

    SlidingView has some other published properties that are less frequently used. The "minWidth" property specifies a minimum width for view content, and "edgeDragging" lets the user drag the view from its left edge. (The default value of edgeDragging is false.)

    The last view in a SlidingPane is special, it is resized to fit the available space. The onResize event is fired when this occurs.

    Extends

    enyo.Control

    Published Properties

    • dragAnywhere: true

      Can drag panel from anywhere (note: does not work if there's another drag surface (e.g. scroller)).

    • edgeDragging: false

      Can drag/toggle by dragging on left edge of sliding panel.

    • fixedWidth: false

      Whether content width should or should not be adjusted based on size changes.

    • minWidth: 0

      Minimum content width.

    • peekWidth: 0

      Amount we should be shifted right to reveal panel underneath us when selected.

    • dismissible: false

      Whether or not the view may be dragged right to dismiss it

    Published Events

    • onResize: ""

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/containers/SlidingPane.js

    enyo.SlidingPane

    A control designed to present a horizontal layout of SlidingView controls, which are panel controls that can slide one on top of another. The user can drag the views left and right and they'll stay connected. If a view is moved to the far left, it will cover any views to the left of it.

    SlidingViews can have explicit width or be flexed. In either case, they are displayed in SlidingPane's client region, which is an HFlexBox. The view on the far right is special--it will always behave as flexed unless its fixedWidth property is set to true.

    SlidingPane exposes the same selection methods as Pane. The selected view is the one displayed at the far left of the group.

    SlidingGroup also has two layout modes--the normal layout, in which views are placed left-to-right, and a narrow layout, in which views are stacked, taking up the entire width of the SlidingPane. A SlidingPane can automatically toggle between these layouts if its resize method is hooked up to respond to window resizing. The "multiViewMinWidth" property has a default value of 500 and is the pivot point between the two layouts.

    Here's an example:

    {kind: "SlidingPane", flex: 1, components: [
        {name: "left", width: "320px"},
        {name: "middle", width: "320px", peekWidth: 68},
        {name: "right", flex: 1, onResize: "slidingResize"}
    ]}
    

    Extends

    enyo.Pane

    Published Properties

    • multiView: true
    • multiViewMinWidth: 500
    • canAnimate: true
    • dismissDistance: 100

    Published Events

    • onSlideComplete: ""

    Inheritance

    Published properties inherited from enyo.Pane

    transitionKind

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Pane

    onSelectView, onCreateView

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Pane

    back, getView, getViewIndex, getViewName, next, selectView, selectViewByIndex, selectViewByName, validateView

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/services/PalmService.js

    enyo.PalmService

    An asynchronous controller handling Palm Service (LS2) requests.

    An Enyo service call is typically created in two parts: a component declaration and a method invocation on that component. The component describes the service endpoint and, optionally, how the results will be handled. The method invocation kicks it all off. The purpose of the component declaration is the same as for all components: to bring important flow information to the top level and refactor boilerplate code.

    Add a Service component to describe as much as you know ahead of time about the request and its handling:

    {
        name: "listAccounts",
        kind: "PalmService",
        service: "palm://com.palm.service.accounts/",
        method: "listAccounts",
        onSuccess: "gotAccounts",
        onFailure: "genericFailure",
        subscribe: false
    }
    

    Declaring the component does not actually start a service request; it just sets everything up beforehand, so you can make the request later with a minimum of configuration. Be sure to hang the component off the most appropriate owner--the owner's lifecycle should fit the desired lifetime of the service call.

    Call the service with some parameters:

    this.$.listAccounts.call({
        capability: "MAIL"
    });
    

    Handle the response in your onSuccess/onFailure/onResponse handler:

    gotAccounts: function(inSender, inResponse) {
        console.log("got these accounts: " + enyo.json.stringify(inResponse));
    }
    

    Response handlers are just specialized event handlers, so inSender here is the service. For PalmService objects, inResponse is a pre-parsed JavaScript object.

    The different response events are fired under the following conditions:

  • onSuccess is called on a "successful" response. For PalmService objects, this is called for responses with { "returnValue": true } or { "errorCode": 0 }.
  • onFailure is called on any response that isn't classified as "successful".
  • onResponse is called on any kind of response.
  • You can also defer assignment of all the other properties of the request until the call is actually made. This is handy when you want to re-use a single service for different kinds of requests:

    {name: "accounts", kind: "PalmService", onFailure: "genericFailure"}
    ...
    this.$.accounts.call(
        {
            capability: "MAIL"
        },
        {
            method: "listAccounts",
            onSuccess: "gotAccounts"
        }
    );
    this.$.accounts.call(
        {
            ...
        },
        {
            method: "createAccount",
            onSuccess: "createdAccount"
        }
    );
    

    If you are calling a subscription service, you must set the "subscribe" property to true. This will add a "subscribe":true value to the params of the service call and also tell the PalmService object to defer the automatic destruction behavior that it normally happens after your response callback. You can call the destroy method of the PalmService component when you want to unsubscribe from the service.

    Extends

    enyo.Service

    Published Properties

    • method: ""

      name of method to call

    • subscribe: null

      should be true if you're calling a method that returns multiple results

    • resubscribe: false

      set to true to have your subscription automatically restarted when it gets a failure response

    • params: null

      object containing parameters for the service call

    Inheritance

    Published properties inherited from enyo.BasicService

    service, timeout

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.BasicService

    onSuccess, onFailure, onResponse

    Methods inherited from enyo.Service

    call, cancelCall

    Methods inherited from enyo.BasicService

    cancel, request

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    enyo.PalmService.Request

    Extends

    enyo.Request

    Inheritance

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Request

    onRequestSuccess, onRequestFailure, onRequestResponse

    Methods inherited from enyo.Request

    call, isFailure, receive

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/services/PalmServices.js

    enyo.palmServices

    Properties

    • system: "palm://com.palm.systemservice/"
    • telephony: "palm://com.palm.telephony/"
    • database: "luna://com.palm.db/"
    • application: "palm://com.palm.applicationManager/"
    • accounts: "palm://com.palm.service.accounts/"

    palm/services/SystemService.js

    enyo.SystemService

    A PalmService that allows applications to access various system settings.

    {kind: "enyo.SystemService"}
    

    Extends

    enyo.PalmService

    Inheritance

    Published properties inherited from enyo.PalmService

    method, subscribe, resubscribe, params

    Published properties inherited from enyo.BasicService

    service, timeout

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.BasicService

    onSuccess, onFailure, onResponse

    Methods inherited from enyo.Service

    call, cancelCall

    Methods inherited from enyo.BasicService

    cancel, request

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/services/DbService.js

    enyo.DbService

    A PalmService with some handy features:

  • dbKind is a DbService published property, so 'putKind' can omit 'id' and 'find' can omit 'from'.
  • Setting the inherited subscribe property also sets watch: true on 'find' and 'search' requests.
  • Use DbService like most PalmServices:

    {name: "findDoodads", kind: "DbService", dbKind: "com.palm.doodad:1", method: "find", onSuccess: "gotDoodads"}
    

    To call the service:

    this.$.findDoodads.call({
        query: {
            // notice that 'from' is not needed since 'dbKind' is in the component
            where: [...],
            orderBy: "name",
            limit: 10
        }
    });
    

    Extends

    enyo.PalmService

    Published Properties

    • dbKind: ""

      • {String} Db kind for this store.

    • reCallWatches: false
    • resubscribe: true

    Published Events

    • onWatch: ""

    Inheritance

    Published properties inherited from enyo.PalmService

    method, subscribe, resubscribe, params

    Published properties inherited from enyo.BasicService

    service, timeout

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.BasicService

    onSuccess, onFailure, onResponse

    Methods inherited from enyo.Service

    call, cancelCall

    Methods inherited from enyo.BasicService

    cancel, request

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    enyo.DbService.Request

    Extends

    enyo.PalmService.Request

    Published Events

    • onRequestWatch: "responseWatch"

    Methods

    • isWatch: function(inResponse)
    • processResponse: function()

    Inheritance

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Request

    onRequestSuccess, onRequestFailure, onRequestResponse

    Methods inherited from enyo.Request

    call, isFailure, receive

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/services/TempDbService.js

    enyo.TempDbService

    Extends

    enyo.DbService

    Inheritance

    Published properties inherited from enyo.DbService

    dbKind, reCallWatches, resubscribe

    Published properties inherited from enyo.PalmService

    method, subscribe, resubscribe, params

    Published properties inherited from enyo.BasicService

    service, timeout

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.DbService

    onWatch

    Events inherited from enyo.BasicService

    onSuccess, onFailure, onResponse

    Methods inherited from enyo.Service

    call, cancelCall

    Methods inherited from enyo.BasicService

    cancel, request

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/services/MockPalmService.js

    palm/services/bridge/WebosConnect.js

    enyo.WebosConnect

    • Gateway to the webOS API.
      • The following methods are available in the applet.
      • getDefaultDeviceId()
    • Return the default device UID.
    • @return UID of the default device
      • executeNovacomCommand(deviceId, command, onDataFunc, onDisconnectFunc)
    • Execute the given novacom run command.
    • @param deviceId Device to connect to; use default device if null
    • @param command The command to be executed (e.g. /bin/ls)
    • @param onDataFunc Name of the JavaScript callback function to call when data is received
    • @param onDisconnectFunc Name of the JavaScript callback function to call when the connection returns
    • @return an interface to the connection, available methods are connected() and disconnect()
      • putFile(deviceId, src, dest)
    • Put a file onto the device's file system.
    • @param deviceId Device to connect to; use default device if null
    • @param src URL of the file to be uploaded (e.g. file:///Users/foo/wallpaper.jpg)
    • @param dest The path of the file you want to write (e.g. /media/internal/wallpaper.jpg)
      • getFile(deviceId, src, dest)
    • Get a file from the device's file system.
    • @param deviceId Device to connect to; use default device if null
    • @param src The path of the file you want to read (e.g. /media/internal/wallpaper.jpg)
    • @param dest the path of the file you want to write (e.g. /Users/foo/wallpaper.jpg)

    Extends

    enyo.Component

    Methods

    • create: function()
    • defer: function(inArgs)
    • execute: function(inCommand, inDataCallback, inDisconnectCallback)
    • executeNovacomCommand: function(inCommand, inDataCallback, inDisconnectCallback)
    • flush: function()
    • getFile: function(inSrc, inDst)
    • isReady: function()
    • putFile: function(inSrc, inDst)

    Inheritance

    Published properties inherited from enyo.Component

    owner, name

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/services/bridge/WebOsPalmServiceBridge.js

    enyo.WebOsPalmServiceBridge

    Extends

    enyo.Component

    Published Events

    • onData: ""

    Methods

    • call: function(inUrl, inJson)
    • cancel: function()
    • create: function()
    • createCallbacks: function()
    • destroy: function()
    • destroyCallbacks: function()
    • execute: function(inCommand)
    • gotData: function(inResponse)
    • gotDisconnect: function()

    Inheritance

    Published properties inherited from enyo.Component

    owner, name

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    enyo.PalmService.WebosRequest

    Extends

    enyo.DbService.Request

    Methods

    • createBridge: function()
    • webosData: function(inSender, inResponse)

    Inheritance

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.DbService.Request

    onRequestWatch

    Events inherited from enyo.Request

    onRequestSuccess, onRequestFailure, onRequestResponse

    Methods inherited from enyo.DbService.Request

    isWatch, processResponse

    Methods inherited from enyo.Request

    call, isFailure, receive

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/list/VirtualScroller.js

    palm/list/Buffer.js

    palm/list/DisplayBuffer.js

    palm/list/DomBuffer.js

    palm/list/BufferedScroller.js

    palm/list/ScrollingList.js

    enyo.ScrollingList

    Manages a long list by rendering only small portions of the list at a time. Uses flyweight strategy via onSetupRow. We suggest users stick to the derived kind VirtualList instead. VirtualList introduces a paging strategy for backing data, but it can be ignored if it's not needed.

    Extends

    enyo.VFlexBox

    Published Events

    • onSetupRow: ""

      sent with arguments (inSender,inIndex) to ask owner to prepare the row with specificed index by setting the properties of the objects in the list's components. Return true if you should keep getting more onSetupRow events for more items.

    Methods

    • fetchRowIndex: function()

      return the index of the active row

    • prepareRow: function(inIndex)

      move the active index of the list to inIndex where it can be altered

    • punt: function()

      completely reset the list so that it reloads all data and rerenders

    • refresh: function()

      redraw any visible items in the list to reflect data changes without adjusting the list positition

    • reset: function()

      clear the list's internal state and refresh

    • update: function()

      adjust rendering buffers to fit display

    • updateRow: function(inIndex)

      indicate that a row has changed so the onSetupRow callback will be called for it

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/list/Selection.js

    enyo.Selection

    This is used to manage row selection state for lists.

    Extends

    enyo.Component

    Published Properties

    • multi: false

      if true, allow multiple selections

    Published Events

    • onSelect: ""

      Fires when an item is selected.

      {kind: "Selection", onSelect: "selectRow"...
      ...
      selectRow: function(inSender, inKey, inPrivateData) {
          ...
      

      inKey is whatever key was used to register the selection, usually a row index.

      inPrivateData references data registered with this key by the code that made the selection.

    • onDeselect: ""

      Fires when an items is deselected.

      {kind: "Selection", onSelect: "deselectRow"...
      ...
      deselectRow: function(inSender, inKey, inPrivateData)
          ...
      

      inKey is whatever key was used to request the deselection, usually a row index.

      inPrivateData references data registered with this key by the code that made the original selection.

    • onChange: ""

      Sent when selection changes (but not when the selection is cleared).

    Methods

    • clear: function()

      remove all selections

    • deselect: function(inKey)

      deselect a row

    • isSelected: function(inKey)

      returns true if the inKey row is selected

    • select: function(inKey, inData)

      select a row. If the selection has the multi property set to false, it will also deselect the previous selection.

    • setByKey: function(inKey, inSelected, inData)

      manually set a row to selected or unselected

    • toggle: function(inKey, inData)

      toggle selection for a row. If the multi is false, toggling a selection on will deselect the previous selection

    Inheritance

    Published properties inherited from enyo.Component

    owner, name

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/list/VirtualList.js

    enyo.VirtualList

    A control that displays a scrolling list of rows. It is suitable for displaying very large lists. VirtualList is optimized such that only a small portion of the list is rendered at a given time. A flyweight strategy is employed to render one set of list row controls as needed for as many rows as are contained in the list.

    Note: Because a VirtualList contains a Scroller, it must have a fixed size. If a list with variable height is required, use an enyo.VirtualRepeater.

    Basic Use

    A VirtualList's components block contains the controls to be used for a single row. This set of controls will be rendered for each row.

    The onSetupRow event allows for customization of row rendering. Here's a simple example:

    components: [
        {kind: "VirtualList", onSetupRow: "setupRow", components: [
            {kind: "Item", layoutKind: "HFlexLayout", components: [
                {name: "caption", flex: 1},
                {kind: "Button", onclick: "buttonClick"}
            ]}
        ]}
    ],
    setupRow: function(inSender, inIndex) {
        if (inIndex < 100) {
            this.$.caption.setContent("I am item: " + inIndex);
            this.$.button.setCaption("Button" + inIndex);
            return true;
        }
    }
    

    In the above example, the control named "item" will be rendered for each row. When a row is rendered, the onSetupRow event is fired with the row index. The setupRow method sets properties on controls in the row to customize the rendering of the row. Notice that it returns true if the index is less than 100. An onSetupRow handler must return true to indicate that the given row should be rendered. If it does not, the list will stop rendering.

    Continuing with the above example, we have given the button an onclick handler. As previously noted, the button is rendered for each of the 100 list rows. The onclick handler will fire for a click on any of the row buttons. It is common to need to know the exact row on which a user clicked. Events fired from within list rows contain this information in the rowIndex property of the DOM event object. For example:

    buttonClick: function(inSender, inEvent) {
        this.log("The user clicked on item number: " + inEvent.rowIndex);
    }
    

    Modifying List Rows

    Sometimes a list row will need to be modified. For example, if a user clicks on a row, the application might want to indicate that the row has been selected by making a color change. In this case, a row item could have an onclick handler that stores the index of the selected row. The onSetupRow handler would use this information to decorate the selected row. To instruct the list to render, call the refresh method. Here's an example:

    itemClick: function(inSender, inEvent) {
        this.selectedRow = inEvent.rowIndex;
    },
    setupRow: function(inSender, inIndex) {
        // check if the row is selected
        var isRowSelected = (inIndex == this.selectedRow);
        // color the row if it is
        this.$.item.applyStyle("background", isRowSelected ? "blue" : null);
        // ...
    }
    

    Data Handling

    It's common for an application to have a set of data that should be displayed as a list. Here's an example that uses an array of data to display list rows:

    data: [
        {color: "Green", action: "Go"}, 
        {color: "Yellow", action: "Go Faster"}
        {color: "Red", action: "Stop"}
    ],
    setupRow: function(inSender, inIndex) {
        var row = this.data[inIndex];
        if (row) {
            this.$.caption.setContent("When you see a " + row.color + " light:");
            this.$.button.setCaption(row.action);
            return true;
        }
    }
    

    Sometimes it isn't practical to gather all the data that needs to be rendered in a list, all at one time. VirtualList provides the onAcquirePage event to allow an application to perform work, such as retrieving data, when a section of the list needs to be rendered. The number of items VirtualList expects to be in each page is determined by the pageSize property.

    For example, this service call could be made to acquire some data for a page of list items:

    {kind: "VirtualList", onAcquirePage: "acquireListPage", onSetupRow: "setupRow", components: [
    
    // ...
    
    acquireListPage: function(inSender, inPage) {
        var index = inPage * inSender.pageSize;
        // if we don't have data for this page...
        if (!this.data[index]) {
            // get it from a service
            this.$.service.call({index: index}, {index: index, onSuccess: "dataResponse"})
        }
    }
    

    In this case, the data is not available until the service responds. We've passed the index of the data row to retrieve to the service request object, so we can use it to populate our data array when the service responds.

    Again, when the list should be re-rendered, call the refresh method.

    dataResponse: function(inSender, inResponse, inRequest) {
        // put the retrieved data into the application's store of data (method omitted)
        this.storeData(inRequest.index, inResponse.results);
        //
        // prompt the list to render.
        this.$.list.refresh();
    }
    

    Extends

    enyo.ScrollingList

    Published Properties

    • lookAhead: 2
    • pageSize: 10

    Published Events

    • onAcquirePage: ""
    • onDiscardPage: ""

    Methods

    • getSelection: function()

      Returns the selection component (enyo.Selection) that manages the selection state for this list.

    • isSelected: function(inRowIndex)

      Get the selection state for the given row index.

    • select: function(inRowIndex, inData)

      Set the selection state for the given row index.

    • setMultiSelect: function(inMulti)

      Enable/disable multi-select mode

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.ScrollingList

    onSetupRow

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.ScrollingList

    fetchRowIndex, prepareRow, punt, refresh, reset, update, updateRow

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/list/dbUtil.js

    palm/list/DbPages.js

    palm/list/DbList.js

    enyo.DbList

    A control designed to display data stored in a mojodb database as a list of rows. A DbList uses an enyo.VirtualList to manage list rendering.

    Extends

    enyo.VirtualList

    Published Properties

    • pageSize: 20
    • desc: false

    Published Events

    • onQuery: ""

      Fires when a database query should be made. DbList maintains a store of database data but does not directly interact with the database. Use an enyo.DbService or compatible kind to perform the database query.

      Handlers have this signature:

      function(inSender, inQuery)
      

      inSender {Object} This object
      inQuery {Object} Database query to perform.

    • onSetupRow: ""

      Fires when a row is to be rendered. Handler should populate row controls with relevant data as needed.

      Handlers have this signature:

      function(inSender, inRecord, inIndex)
      

      inSender {Object} This object
      inRecord {Object} Object containing row data.
      inIndex {Integer} Index of the row.

    Methods

    • punt: function()
    • reset: function()

    Inheritance

    Published properties inherited from enyo.VirtualList

    lookAhead, pageSize

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.VirtualList

    onAcquirePage, onDiscardPage

    Events inherited from enyo.ScrollingList

    onSetupRow

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.VirtualList

    getSelection, isSelected, select, setMultiSelect

    Methods inherited from enyo.ScrollingList

    fetchRowIndex, prepareRow, punt, refresh, reset, update, updateRow

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/list/DbRepeaterList.js

    enyo.DbRepeaterList

    Extends

    enyo.VFlexBox

    Published Properties

    • pageSize: 50
    • stripSize: 20

    Published Events

    • onQuery: ""
    • onSetupRow: ""

    Methods

    • build: function()
    • create: function()
    • fetch: function(inRow)
    • getItem: function(inSender, inIndex)
    • punt: function()
    • queryResponse: function(inResponse, inRequest)
    • refresh: function()
    • rendered: function()
    • reset: function()
    • scrollToBottom: function()
    • stripSizeChanged: function(inSender)
    • updateRow: function(inIndex)

    Inheritance

    Published properties inherited from enyo.Control

    layoutKind

    Published properties inherited from enyo.ContainedDomBuilder

    className, container, parent

    Published properties inherited from enyo.DomNodeBuilder

    allowHtml, content

    Published properties inherited from enyo.DomNode

    showing, prepend

    Published properties inherited from enyo.Component

    owner, name

    Events inherited from enyo.Control

    onclick, onmousedown, onmouseup

    Methods inherited from enyo.Control

    broadcastMessage, destroyControls, getControls, indexOfControl, resized

    Methods inherited from enyo.ContainedDomBuilder

    addContent, getOffset, isDescendantOf

    Methods inherited from enyo.DomNodeBuilder

    hide, render, renderInto, rendered, show

    Methods inherited from enyo.DomNode

    addClass, addRemoveClass, addStyles, applyStyle, getClassName, hasClass, hasNode, removeClass, setAttribute, setClassName, setStyle

    Methods inherited from enyo.Component

    create, createComponent, createComponents, destroy, destroyComponents, getComponents

    Methods inherited from enyo.Object

    error, log, warn

    palm/list/MockDb.js

    palm/tellurium/loader.js

    palm/tellurium/service.js

    palm/tellurium/events.js

    palm/tellurium/enyo-events.js

    Tellurium.events

    Methods

    • setup: function()

    Tellurium.events.dom

    Properties

    • types:
      • keyup: "key"
      • keydown: "key"
      • keypress: "key"
      • mouseup: "mouse"
      • mousedown: "mouse"
      • mousehold: "mouse"
      • mouserelease: "mouse"
      • click: "mouse"
      • flick: "flick"
      • dragStart: "drag"
    • keyDetails:
      • type: true
      • keyCode: true
      • keyIdentifier: true
      • ctrlKey: true
      • altKey: true
      • shiftKey: true
      • metaKey: true
    • mouseDetails:
      • type: true
      • detail: true
      • screenX: true
      • screenY: true
      • pageX: true
      • pageY: true
      • clientX: true
      • clientY: true
      • ctrlKey: true
      • altKey: true
      • shiftKey: true
      • metaKey: true
      • button: true

    Methods

    • handle: function(inType, inEvent)
    • makeDragPayload: function(inEvent)
    • makeFlickPayload: function(inEvent)
    • makeKeyPayload: function(inEvent)
    • makeMousePayload: function(inEvent)
    • mixinPayloadDetails: function(inPayload, inEvent, inDetails)
    • setup: function()

    Tellurium.events.enyo

    Properties

    • types:
      • onSelectView: enyo.Pane

    Methods

    • makeSelectViewPayload: function(inView, inLastView)
    • setup: function()
    • setupHandler: function(inPrototype, inName)
    • wrapEvent: function(inPrototype, inMethod, inOriginal, inName, inPayloadHandler)

    palm/tellurium/locator.js

    palm/tellurium/dom.js

    palm/tellurium/cards.js

    palm/tellurium/widgets.js

    palm/tellurium/startup.js

    g11n/address/javascript/address.js

    enyo.g11n.Address

    enyo.g11n.Address

    enyo.g11n.Address: function(address, params)

    Creates a new Address instance and parses a physical address.

    • address (String): Free-form address to parse, or a JavaScript object containing the fields
    • params (Object): Parameters to send to the parser

    locale to use to parse the address. If not specified, this function will use the current locale.

    This function parses a physical address written in a free-form string. It returns an object with a number of properties from the list below that it may have extracted from that address.

    The following is a list of properties that the algorithm will return:

    • streetAddress: The street address, including house numbers
    • locality: The locality of this address (usually a city or town)
    • region: The region where the locality is located. In the U.S., this corresponds to the state.
    • postalCode: Country-specific code for expediting mail. In the U.S., this is the zip code.
    • country: The country of the address

    For any individual property, if the address does not contain that property, it is left out.

    When an address cannot be parsed properly, the entire address will be placed into the streetAddress property.

    Returns an object with the various properties listed above.


    g11n/address/javascript/format.js

    enyo.g11n.AddressFmt

    enyo.g11n.AddressFmt

    enyo.g11n.AddressFmt: function(params)

    Creates a new formatter object to format physical addresses in a particular way.

    The params object may contain the following properties, both of which are optional:

    • locale - The locale to use to format this address. If not specified, it uses the formats locale of the device.
    • style - The style of this address. The default style for each country usually includes all valid fields for that country.

    Returns a formatter instance that can format multiple addresses.

    enyo.g11n.AddressFmt.prototype

    enyo.g11n.AddressFmt.prototype.format

    enyo.g11n.AddressFmt.prototype.format: function(address)

    This function formats a physical address (enyo.g11n.Address instance) for display. Whitespace is trimmed from the beginning and end of final resulting string, and multiple consecutive whitespace characters in the middle of the string are compressed down to 1 space character.

    If the Address instance is for a locale that is different than the locale for this formatter, then a hybrid address is produced. The country name is located in the correct spot for the current formatter's locale, but the rest of the fields are formatted according to the default style of the locale of the actual address.

    Example: Consider a mailing address for a location in China. If formatted for the U.S., the address may have "People's Republic of China" in English as the last line. However, if the address is formatted for China, the country will appear in the first line of the address. In the US, the country is on the last line, but in China the country is usually on the first line.

    Returns a String containing the formatted address.


    g11n/name/javascript/name.js

    enyo.g11n.Name

    enyo.g11n.Name

    enyo.g11n.Name: function(name, params)

    Parses a personal name written in a free-form string.

    • name (String): Name of a person to parse
    • params (Object): Parameters controlling the parsing of the name

    This constructor returns an object with a number of properties from the list below, which it may have extracted from that name. Because some properties (e.g., "middleName") may contain multiple names, each property may be a single string with spaces and punctuation in the middle of it.

    If any names cannot be assigned to one of these properties, they will be be inserted into the "givenName" property.

    The following is a list of name properties that the algorithm will return:

    • prefix: Any titles, such as "President" or "Dr.", or honorifics, such as "Don" in Spanish or "Mister" in English that preceed the name
    • givenName: The given name(s) of the person, which is often unique to that person within a family or group
    • familyName: The family name(s) of a person that is shared with other family members
    • middleName: Auxilliary given name(s)
    • suffix: Any suffixes that are attached to a name, such as "Jr." or "M.D." in English, or honorifics like "-san" in Japanese

    For any individual property, if there are multiple names for that property, they will be returned as a single string with the original punctuation preserved. For example, if the name is "John Jacob Jingleheimer Schmidt", there are two middle names and they will be returned as the string: "Jacob Jingleheimer"

    Suffixes may be optionally appended to names using a comma. If commas appear in the original name, they will be preserved in the output of the suffix property so that they can be reassembled again later by NameFmt.format() properly.

    For any titles or honorifics that are considered a whole, the name is returned as a single string. For example, if the name to parse is "The Right Honourable James Clawitter", the honorific would be returned as a prefix with the whole string "The Right Honourable".

    When a compound name is found in the name string, the conjunction is placed in the givenName property.

    Example: "John and Mary Smith"
    output:

    {
       givenName: "John and Mary",
       familyName: "Smith"
    }
    

    This can be considered to be two names: "John Smith and Mary Smith". Without conjunctions, the words "and Mary" would have been considered middle names of the person "John Smith".

    There are a few special cases where the name is parsed differently from what the rules of the given locale would imply. If the name is composed entirely of Asian characters, it is parsed as an Asian name, even in non-Asian locales. If the locale is an Asian locale, and the name is composed entirely of Latin alphabet characters, the name is parsed as a generic Western name (using US/English rules). In this way, Asian and western names can be mixed in the same list, and they will all be parsed reasonably correctly.

    When a name cannot be parsed properly, the entire name will be placed into the givenName property.

    Returns an object with the various properties listed above.


    g11n/name/javascript/format.js

    enyo.g11n.NameFmt

    enyo.g11n.NameFmt

    enyo.g11n.NameFmt: function(params)

    Identifiers for use with the length property of the formatter parameters.

    Creates a formatter object that formats personal names for display.

    The params object can contain the following properties:

    • style (String): The format style to use with this name. Default is shortName.
    • locale (String): Locale to use to format the name. If not specified, this function will use the current formats locale.

    The style parameter should be passed as one of the following:

    • enyo.g11n.Name.shortName: Formats the shortest unique name. For most locales, this is the first (given) name and the family name.
    • enyo.g11n.Name.mediumName: Formats the most common parts of the name. For most locales, this is the short name plus a middle name.
    • enyo.g11n.Name.longName: Formats all parts of the name that are available.

    enyo.g11n.NameFmt.prototype

    Methods

    • format: function(name)

      Formats an enyo.g11n.Name instance for display.

      If the name does not contain all the parts required for the style, those parts will be left blank.

      There are two basic styles of formatting: European and Asian. If the formatter object is set for European style, but an Asian name is passed to the format method, then this method will format the Asian name with a generic Asian template. Similarly, if the formatter is set for an Asian style, and a European name is passed to the format method, the formatter will use a generic European template.

      This means it is always safe to format any name with a formatter for any locale. You should always get something reasonable as output.

      This method returns a string containing the formatted name.


    g11n/phone/base/javascript/utils.js

    g11n/phone/base/javascript/phoneloc.js

    g11n/phone/base/javascript/plan.js

    enyo.g11n.NumPlan

    enyo.g11n.NumPlan

    enyo.g11n.NumPlan: function(params)

    Returns info about the dialing/numbering plan of a particular locale.

    It is up to the callers to release the JSON files from the cache.


    g11n/phone/base/javascript/states.js

    g11n/phone/format/javascript/styles.js

    enyo.g11n.FmtStyles.prototype

    Methods

    • getStyle: function(getStyle)

      Returns the style with the given name, or the default style if there is no style with that name.

    enyo.g11n.FmtStyles.getRegions

    enyo.g11n.FmtStyles.getRegions: function(getRegions)

    Returns an array of regions supported by this phone formatter. Each item in the array has a lower-cased ISO "countryCode" and a "countryName" property.

    The countryName property is in English, not localized.


    g11n/phone/format/javascript/format.js

    enyo.g11n.PhoneFmt

    enyo.g11n.PhoneFmt

    enyo.g11n.PhoneFmt: function(params)

    Creates a new phone number formatter object that formats numbers according to the parameters.

    The params object may contain zero or more of the following parameters:

    • locale (String): Locale to use to format this number, or undefined to use the default locale (optional)
    • style (String): The name of style to use to format this number, or undefined to use the default style (optional)
    • mcc (String): The MCC of the country to use if the number is a local number and the country code is not known (optional)

    Some regions have more than one style of formatting, and the style parameter selects which style the user prefers. The style names can be found by calling FmtStyles.getExamples().

    If the MCC is given, numbers will be formatted in the manner of the country specified by the MCC. If it is not given, but the locale is, the manner of the country in the locale will be used. If neither the locale nor MCC is given, then the country of the phone locale for the device is used.

    enyo.g11n.PhoneFmt.prototype

    Methods


      g11n/phone/parse/javascript/handler.js

      g11n/phone/parse/javascript/phone.js

      enyo.g11n.PhoneNumber

      enyo.g11n.PhoneNumber

      enyo.g11n.PhoneNumber: function(number, params)

      Creates a new PhoneNumber instance that parses the phone number parameter for its constituent parts, and stores them as separate fields in the returned object.

      • number (String/Object): A free-form phone number to be parsed, or a JavaScript object containing the already-parsed fields
      • params (Object): Parameters that guide the parser in parsing the number.

      The params object may include these properties:

      • locale (String): The locale with which to parse the number
      • mcc (String): The MCC associated with the carrier that the phone is currently connected to, if known

      This function is locale-sensitive, and will assume any number passed to it is appropriate for the given locale. If the MCC is given, this method will assume that numbers without an explicit country code have been dialled within the country given by the MCC. This affects how things like area codes are parsed. If the MCC is not given, this method will use the given locale to determine the country code. If the locale is also not explicitly given, then this function uses the current phone region as the default.

      The input number may contain any formatting characters for the given locale. Each field that is returned in the JSON object is a simple string of digits with all formatting and whitespace characters removed.

      The number is broken down into its parts, regardless of whether it contains formatting characters. If a particular part cannot be extracted from the given number, the field will not be returned as a field in the object. If no fields can be extracted from the number at all, then all digits found in the string will be returned in the subscriberNumber field. If the number parameter contains no digits, an empty object is returned.

      The output JSON has the following fields:

      • vsc - If this number starts with a VSC (Vertical Service Code, or "star code"), this field will contain the star and the code together.
      • iddPrefix - The prefix for international direct dialing. This can be in the form of a plus character or the IDD access code for the given locale.
      • countryCode - If this number is an international direct dial number, this is the country code.
      • cic - For "dial-around" services (access to other carriers), this is the prefix used as the carrier identification code.
      • emergency - An emergency services number
      • mobilePrefix - Prefix that introduces a mobile phone number
      • trunkAccess - Trunk access code (long-distance access)
      • serviceCode - Like a geographic area code, but it is a required prefix for various services
      • areaCode - Geographic area codes
      • subscriberNumber - The unique number of the person or company that pays for this phone line
      • extension - In some countries, extensions are dialed directly without going through an operator or a voice prompt system. If the number includes an extension, it is given in this field.
      • invalid - This property is added and set to true if the parser finds that the number is invalid in the numbering plan for the country. This method will make its best effort at parsing, but any digits after the error will go into the subscriberNumber field.

      The following rules determine how the number is parsed:

      • If the number starts with a character that is alphabetic instead of numeric, do not parse the number at all. There is a good chance that it is not really a phone number. In this case, an empty json object will be returned.
      • If the phone number uses the plus notation or explicitly uses the international direct dialing prefix for the given locale, then the country code is identified in the number. The rules of given locale are used to parse the IDD prefix, and then the rules of the country in the prefix are used to parse the rest of the number.
      • If a country code is provided as an argument to the function call, use that country's parsing rules for the number. This is intended for apps like contacts that know what the country is of the person that owns the phone number and can pass that on as a hint.
      • If the appropriate locale cannot be easily determined, default to using the rules for the current user's region.

      Example: parsing the number "+49 02101345345-78" will yield the following properties:

       {
         iddPrefix: "+",
         countryCode: "49",
         areaCode: "02101",
         subscriberNumber: "345345",
         extension: "78"
       }
      

      Note that in this example, because international direct dialing is explicitly used in the number, the part of this number after the IDD prefix and country code will be parsed exactly the same way in all locales with German rules (country code 49).

      Regions currently supported are:

      • NANP (North American Numbering Plan) countries - USA, Canada, Bermuda, various Caribbean nations
      • UK
      • Republic of Ireland
      • Germany
      • France
      • Spain
      • Italy
      • Mexico
      • India
      • People's Republic of China
      • Netherlands
      • Belgium
      • Luxembourg
      • Australia
      • New Zealand
      • Singapore

      enyo.g11n.PhoneNumber.prototype

      Methods

      • compare: function(other)

        This routine will compare two phone numbers in a locale-sensitive manner to see if they possibly reference the same phone number.

        • other (Object): Second phone number to compare this one to

        In many places, there are multiple ways to reach the same phone number. In North America for example, you might have a number with the trunk access code of "1" and another without, and they reference the exact same phone number. This is considered a strong match. For a different pair of numbers, one may be a local number and the other a full phone number with area code, which may reference the same phone number if the local number happens to be located in that area code. However, you cannot say for sure if it is in that area code, so it will be considered a somewhat weaker match.

        Similarly, in other countries, there are sometimes different ways of reaching the same destination, and the way that numbers match depends on the locale.

        The various phone number fields are handled differently for matches. There are various fields that do not need to match at all. For example, you may enter "00" or "+" into your phone to start international direct dialing, so the iddPrefix field does not need to match at all.

        Typically, fields that require matches need to match exactly if both sides have a value for that field. If both sides specify a value and those values differ, that is a strong non-match. If one side does not have a value and the other does, that causes a partial match, because the number with the missing field may possibly have an implied value that matches the other number. For example, the numbers "650-555-1234" and "555-1234" have a partial match as the local number "555-1234" might possibly have the same 650 area code as the first number, and might possibly not. If both sides do not specify a value for a particular field, that field is considered matching.

        The values of the following fields are ignored when performing matches:

        • vsc
        • iddPrefix
        • cic
        • trunkAccess

        The values of the following fields matter if they do not match:

        • countryCode - A difference causes a moderately strong problem except for certain countries where there is a way to access the same subscriber via IDD and via intranetwork dialing.
        • mobilePrefix - A difference causes a possible non-match.
        • serviceCode - A difference causes a possible non-match.
        • areaCode - A difference causes a possible non-match.
        • subscriberNumber - A difference causes a very strong non-match.
        • extension - A difference causes a minor non-match.

        Returns a non-negative integer describing the percentage quality of the match. 100 means a very strong match (100%), while lower numbers are less and less strong, down to 0, meaning no match at all.

      • equals: function(equals)

        Determines whether or not the other phone number is exactly equal to the current one.

        The difference between the compare method and the equals method is that the compare method compares normalized numbers with each other and returns the degree of match, whereas the equals operator returns true if and only if the two numbers contain the same fields and the field values are exactly the same. Functions and other non-phone number properties are not compared.


      g11n/phone/geo/javascript/geo.js

      enyo.g11n.GeoLocator

      enyo.g11n.GeoLocator: function(params)

      Creates a new geo locator instance that behaves according to the given parameters.

      The params object may contain zero or more of the following properties:

      • locale: Locale to use for geolocation
      • mcc: mcc of the carrier the device is currently connected to, which specifies the locale

      If the MCC is not available, this method will fall back to the passed-in locale parameter if it is available.

      If the locale parameter is also not available, this method relies on the default phone region of the device.

      enyo.g11n.GeoLocator.prototype

      Methods