Skip to content

Commit

Permalink
Update Api ref to 0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ErjanGavalji committed Apr 22, 2015
1 parent 6984a0f commit 5c00dd5
Show file tree
Hide file tree
Showing 66 changed files with 553 additions and 227 deletions.
5 changes: 4 additions & 1 deletion ApiReference/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- ["data/observable-array"](data/observable-array/)
- ["data/virtual-array"](data/virtual-array/)
- ["file-system"](file-system/)
- ["file-system/file-name-resolver"](file-system/file-name-resolver/)
- ["file-system/file-system-access"](file-system/file-system-access/)
- ["fps-meter"](fps-meter/)
- ["fps-meter/fps-native"](fps-meter/fps-native/)
Expand Down Expand Up @@ -50,12 +51,15 @@
- ["ui/list-picker"](ui/list-picker/)
- ["ui/list-view"](ui/list-view/)
- ["ui/page"](ui/page/)
- ["ui/placeholder"](ui/placeholder/)
- ["ui/progress"](ui/progress/)
- ["ui/scroll-view"](ui/scroll-view/)
- ["ui/search-bar"](ui/search-bar/)
- ["ui/segmented-bar"](ui/segmented-bar/)
- ["ui/slider"](ui/slider/)
- ["ui/styling"](ui/styling/)
- ["ui/styling/css-selector"](ui/styling/css-selector/)
- ["ui/styling/style-property"](ui/styling/style-property/)
- ["ui/styling/stylers"](ui/styling/stylers/)
- ["ui/styling/visual-state-constants"](ui/styling/visual-state-constants/)
- ["ui/switch"](ui/switch/)
Expand All @@ -65,7 +69,6 @@
- ["ui/text-view"](ui/text-view/)
- ["ui/time-picker"](ui/time-picker/)
- ["ui/web-view"](ui/web-view/)
- ["utils/containers"](utils/containers/)
- ["utils/types"](utils/types/)
- ["utils/utils"](utils/utils/)
- ["xml"](xml/)
4 changes: 3 additions & 1 deletion ApiReference/application/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ For example if you have page called "main.js" in a folder called "subFolder" and
var application = require("application");
application.mainModule = "app/subFolder/main";
application.start();
- **resources** - _Object_.
An application level static resources.
- **cssFile** - _String_.
The application level css file name (starting from the application root). Used to set css across all pages.
Css will be applied for every page and page css will be applied after.
- **cssSelectorsCache** - _Array_ of _Object_.
- **cssSelectorsCache** - _Array_ of [_CssSelector_](../ui/styling/css-selector/CssSelector.md).
Cached css selectors created from the content of the css file.
- **android** - [_AndroidApplication_](../application/AndroidApplication.md).
This is the Android-specific application object instance.
Expand Down
13 changes: 13 additions & 0 deletions ApiReference/data/observable/HOW-TO.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@ Using Observable objects requires the "data/observable" module.
``` JavaScript
var observable = require("data/observable");
```
### Creating an Observable
``` JavaScript
var json = {
Name: "John",
Age: 34,
Married: true
};
var person = new observable.Observable(json);
var name = person.get("Name");
var age = person.get("Age");
var married = person.get("Married");
// console.log(name + " " + age + " " + married); // Prints out "John 34 true" if uncommented.
```
### Responding to property changes
``` JavaScript
var person = new observable.Observable();
Expand Down
12 changes: 12 additions & 0 deletions ApiReference/file-system/file-name-resolver/FileNameResolver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
nav-title: "Class file-system/file-name-resolver.FileNameResolver"
title: "Class file-system/file-name-resolver.FileNameResolver"
description: "Class file-system/file-name-resolver.FileNameResolver"
---
## Class: "file-system/file-name-resolver".FileNameResolver

##### Instance Functions
- **resolveFileName(** path _String_, ext _String_ **)** _String_
- **path** - _String_
- **ext** - _String_
- _**return**_ - _String_
12 changes: 12 additions & 0 deletions ApiReference/file-system/file-name-resolver/PlatformContext.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
nav-title: "Object file-system/file-name-resolver.PlatformContext"
title: "Object file-system/file-name-resolver.PlatformContext"
description: "Object file-system/file-name-resolver.PlatformContext"
---
## Object: "file-system/file-name-resolver".PlatformContext

##### Properties
- **width** - _Number_.
- **height** - _Number_.
- **os** - _String_.
- **deviceType** - _String_.
27 changes: 27 additions & 0 deletions ApiReference/file-system/file-name-resolver/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
nav-title: "Module file-system/file-name-resolver"
title: "Module file-system/file-name-resolver"
description: "Module file-system/file-name-resolver"
---
# Module: "file-system/file-name-resolver"

``` JavaScript
// To import the "file-system/file-name-resolver" module:
var file_systemfile_name_resolver = require("file-system/file-name-resolver");
```

Class | Description
------|------------
[FileNameResolver](../../file-system/file-name-resolver/FileNameResolver.md) |

Object | Description
------|------------
[PlatformContext](../../file-system/file-name-resolver/PlatformContext.md) |

##### Functions
- **findFileMatch(** path _String_, ext _String_, candidates _Array_..., context [_PlatformContext_](../../file-system/file-name-resolver/PlatformContext.md) **)** _String_
- **path** - _String_
- **ext** - _String_
- **candidates** - _Array_ of _String_
- **context** - [_PlatformContext_](../../file-system/file-name-resolver/PlatformContext.md)
- _**return**_ - _String_
13 changes: 13 additions & 0 deletions ApiReference/location/AndroidLocationManager.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
nav-title: "Object location.AndroidLocationManager"
title: "Object location.AndroidLocationManager"
description: "Object location.AndroidLocationManager"
---
## Object: "location".AndroidLocationManager
Provides Android specific data related to location.

##### Properties
- **manager** - _Object_.
The android-specific location manager [LocationManager](http://developer.android.com/reference/android/location/LocationManager.html)
- **minimumUpdateTime** - _Number_.
The minimum time interval between subsequent location updates, in milliseconds.
2 changes: 1 addition & 1 deletion ApiReference/location/HOW-TO.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ and there will be no wait. You can use `options.maximumAge` to specify you don't

``` JavaScript
var locationModule = require("location");
// options can also look like { maximumAge: 2000, timeout: 20 }
// options can also look like { maximumAge: 2000, timeout: 20 * 1000 }
locationModule.getLocation({ maximumAge: 30000, timeout: 0 }).then(function (location) {
console.log('Location received: ' + location);
}, function (error) {
Expand Down
6 changes: 4 additions & 2 deletions ApiReference/location/LocationManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ Provides methods for querying geolocation (in case available) on the target plat
The desired accuracy in meters. Defaults to DesiredAccuracy.HIGH
- **updateDistance** - _Number_.
The update distance filter in meters. Specifies how often to update. Default on iOS is no filter, on Android it is 0 meters.
- **minimumUpdateTime** - _Number_.
The minimum time interval between subsequent location updates, in milliseconds (ignored on iOS).
- **isStarted** - _Boolean_.
True if the location listener is already started. In this case all other start requests will be ignored.
- **lastKnownLocation** - [_Location_](../location/Location.md).
Returns last known location from device's location services or null of no known last location.
- **android** - [_AndroidLocationManager_](../location/AndroidLocationManager.md).
An android-specific data for location.
- **ios** - [_iOSLocationManager_](../location/iOSLocationManager.md).
An ios-specific data for location.

##### Instance Functions
- **startLocationMonitoring(** onLocation _Function_..., onError? _Function_..., options? [_Options_](../location/Options.md) **)**
Expand Down
6 changes: 4 additions & 2 deletions ApiReference/location/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ Class | Description
Object | Description
------|------------
[Options](../location/Options.md) | Provides options for location monitoring.
[AndroidLocationManager](../location/AndroidLocationManager.md) | Provides Android specific data related to location.
[iOSLocationManager](../location/iOSLocationManager.md) | Provides iOS specific data related to location.

##### Functions
- **getLocation(** options? [_Options_](../location/Options.md) **)** _Promise_...
Fires a single shot location search. If you specify timeout in options, location search will fail on timeout.
Fires a single shot location search. If you specify timeout in options (milliseconds), location search will stop on timeout.
If you specify timeout = 0 it just requests the last known location.
However if you specify maximumAge and the location received is older it won't be received.
- **options** - _(optional)_ - [_Options_](../location/Options.md)
An optional object specifying location update settings.
- An optional object specifying location update settings.
- _**return**_ - _Promise_ of [_Location_](../location/Location.md)
11 changes: 11 additions & 0 deletions ApiReference/location/iOSLocationManager.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
nav-title: "Object location.iOSLocationManager"
title: "Object location.iOSLocationManager"
description: "Object location.iOSLocationManager"
---
## Object: "location".iOSLocationManager
Provides iOS specific data related to location.

##### Properties
- **manager** - _CLLocationManager_.
The ios-specific location manager [CLLocationManager](https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocationManager_Class/)
4 changes: 4 additions & 0 deletions ApiReference/platform/ScreenMetrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,9 @@ An object containing screen information.
Gets the absolute width of the screen in pixels.
- **heightPixels** - _Number_.
Gets the absolute height of the screen in pixels.
- **widthDIPs** - _Number_.
Gets the absolute width of the screen in density independent pixels.
- **heightDIPs** - _Number_.
Gets the absolute height of the screen in density independent pixels.
- **scale** - _Number_.
The logical density of the display. This is a scaling factor for the Density Independent Pixel unit.
6 changes: 4 additions & 2 deletions ApiReference/platform/device.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: "Class platform.device"
##### Static Properties
- **model** - _String_.
Gets the model of the device.
For example: "Nexus 5" or "iPhone.
For example: "Nexus 5" or "iPhone".
- **os** - _String_.
Gets the model of the device.
For example: "Android" or "iOS".
Expand All @@ -20,4 +20,6 @@ For example: 4.4.4(android), 8.1(ios)
For example: 19(android), 8.1(ios).
- **deviceType** - _String_.
Gets the type current device.
Available values: "phone", "tablet".
Available values: "phone", "tablet".
- **uuid** - _String_.
Gets the uuid
2 changes: 2 additions & 0 deletions ApiReference/text/formatted-string/FormattedString.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ A class used to create a formatted (rich text) string.
Gets or sets underline which will be used for all spans that not have a specific value for underline.
- **strikethrough** - _Number_.
Gets or sets strikethrough which will be used for all spans that not have a specific value for strikethrough.
- **parent** - [_View_](../../ui/core/view/View.md).
Gets the parent view of the formatted string.

##### Instance Functions
- **toString()** _String_
Expand Down
14 changes: 4 additions & 10 deletions ApiReference/ui/core/bindable/Bindable.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ Represents an extended DependencyObservable object that supports data-binding.
- **bindingContextProperty** - [_Property_](../../../ui/core/dependency-observable/Property.md).
Represents the dependency Property used to back the bindingContext value.

##### Static Functions
- **_getBindingOptions(** name _String_, bindingExpression _String_ **)** [_BindingOptions_](../../../ui/core/bindable/BindingOptions.md)
- **name** - _String_
- **bindingExpression** - _String_
- _**return**_ - [_BindingOptions_](../../../ui/core/bindable/BindingOptions.md)

##### Instance Properties
- **bindingContext** - _Object_.
Gets or sets the binding context of this instance. This object is used as a source for each Binding that does not have a source object specified.
Expand All @@ -32,9 +26,9 @@ Represents an extended DependencyObservable object that supports data-binding.
Removes the existing binding (if any) for the specified property.
- **property** - _String_
The name of the property to unbind.
- **_updateTwoWayBinding(** propertyName _String_, value _Object_ **)**
- **propertyName** - _String_
- **value** - _Object_
- **_onBindingContextChanged(** oldValue _Object_, newValue _Object_ **)**
- **oldValue** - _Object_
- **newValue** - _Object_
- **newValue** - _Object_
- **_updateTwoWayBinding(** propertyName _String_, value _Object_ **)**
- **propertyName** - _String_
- **value** - _Object_
4 changes: 3 additions & 1 deletion ApiReference/ui/core/dependency-observable/Property.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ Represents a special Property which supports changed callback, metadata and valu
- **id** - _Number_.
Gets the id of the property. This is used for fast lookup. This is a read-only property.
- **metadata** - [_PropertyMetadata_](../../../ui/core/dependency-observable/PropertyMetadata.md).
Gets the PropertyMetadata object associated with the property. This is a read-only property.
Gets the PropertyMetadata object associated with the property. This is a read-only property.
- **valueConverter** - _Function_(value _String_) _Object_.
Gets the valueConverter function associated with the property. This is a read-only property.
45 changes: 27 additions & 18 deletions ApiReference/ui/core/view/View.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ description: "Class ui/core/view.View"
---
## Class: "ui/core/view".View
_Inherits:_ [_ProxyObject_](../../../ui/core/proxy/ProxyObject.md)
_Conform to:_ [_ApplyXmlAttributes_](../../../ui/core/view/ApplyXmlAttributes.md)
This class is the base class for all UI components.
A View occupies a rectangular area on the screen and is responsible for drawing and layouting of all UI components within.

Expand Down Expand Up @@ -45,18 +44,20 @@ size is smaller than the size the view wants to be.
- _**return**_ - _Number_

##### Instance Properties
- **width** - _Number_.
Gets or sets the desired width of the view.
- **height** - _Number_.
Gets or sets the desired height of the view.
- **color** - [_Color_](../../../color/Color.md).
Gets or sets the color of the view.
- **backgroundColor** - [_Color_](../../../color/Color.md).
Gets or sets the background color of the view.
- **minWidth** - _Number_.
Gets or sets the minimum width the view may grow to.
- **minHeight** - _Number_.
Gets or sets the minimum height the view may grow to.
- **horizontalAlignment** - _String_.
Gets or sets the alignment of this view within its parent along the Horizontal axis.
- **verticalAlignment** - _String_.
Gets or sets the alignment of this view within its parent along the Vertical axis.
- **width** - _Number_.
Gets or sets the desired width of the view.
- **height** - _Number_.
Gets or sets the desired height of the view.
- **margin** - _String_.
Gets or sets margin style property.
- **marginLeft** - _Number_.
Specifies extra space on the left side of this view.
- **marginTop** - _Number_.
Expand All @@ -65,8 +66,24 @@ size is smaller than the size the view wants to be.
Specifies extra space on the right side of this view.
- **marginBottom** - _Number_.
Specifies extra space on the bottom side of this view.
- **padding** - _String_.
Gets or sets padding style property.
- **paddingLeft** - _Number_.
Specify the left padding of this view.
- **paddingTop** - _Number_.
Specify the top padding of this view.
- **paddingRight** - _Number_.
Specify the right padding of this view.
- **paddingBottom** - _Number_.
Specify the bottom padding of this view.
- **horizontalAlignment** - _String_.
Gets or sets the alignment of this view within its parent along the Horizontal axis.
- **verticalAlignment** - _String_.
Gets or sets the alignment of this view within its parent along the Vertical axis.
- **visibility** - _String_.
Gets or sets the visibility of the view.
- **opacity** - _Number_.
Gets or sets the opacity style property.
- **isEnabled** - _Boolean_.
Gets or sets a value indicating whether the the view is enabled. This affects the appearance of the view.
- **isUserInteractionEnabled** - _Boolean_.
Expand All @@ -84,11 +101,11 @@ size is smaller than the size the view wants to be.
- **cssType** - _String_.
- **visualState** - _String_.
- **isLoaded** - _Boolean_.
- **_context** - _Object_.
- **_domId** - _Number_.
- **_cssClasses** - _Array_ of _String_.
- **_isAddedToNativeVisualTree** - _Boolean_.
- **_childrenCount** - _Number_.
- **_context** - _Object_.
- **_nativeView** - _Object_.
- **_isVisible** - _Boolean_.

Expand Down Expand Up @@ -159,14 +176,6 @@ Returns a value indicating whether this view or one of its descendants actually
- _**return**_ - [_GesturesObserver_](../../../ui/gestures/GesturesObserver.md)
- **onLoaded()**
- **onUnloaded()**
- **applyXmlAttribute(** attributeName _String_, attrValue _Object_ **)** _Boolean_
Called for every attribute in xml declaration. <... fontAttributes="bold" ../>
- **attributeName** - _String_
- the name of the attribute (fontAttributes)
- **attrValue** - _Object_
- the value of the attribute (bold)
Should return true if this attribute is handled and there is no need default handler to process it.
- _**return**_ - _Boolean_
- **_addView(** view [_View_](../../../ui/core/view/View.md) **)**
- **view** - [_View_](../../../ui/core/view/View.md)
- **_removeView(** view [_View_](../../../ui/core/view/View.md) **)**
Expand Down
6 changes: 5 additions & 1 deletion ApiReference/ui/date-picker/DatePicker.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ Represents an date picker.
- **month** - _Number_.
Gets or sets the month. The months start from 1.
- **day** - _Number_.
Gets or sets the day. The days start from 1.
Gets or sets the day. The days start from 1.
- **maxDate** - _Date_.
Gets or sets the max date.
- **minDate** - _Date_.
Gets or sets the min date.
2 changes: 2 additions & 0 deletions ApiReference/ui/date-picker/HOW-TO.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ var datePicker = new datePickerModule.DatePicker();
datePicker.year = 1980;
datePicker.month = 2;
datePicker.day = 9;
datePicker.minDate = new Date(1975, 0, 29);
datePicker.maxDate = new Date(2045, 4, 12);
```
15 changes: 15 additions & 0 deletions ApiReference/ui/enums/MenuItemPosition/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
nav-title: "Module ui/enums.MenuItemPosition"
title: "Module ui/enums.MenuItemPosition"
description: "Module ui/enums.MenuItemPosition"
---
## Namespace: "ui/enums".MenuItemPosition
Specifies android MenuItem position.

##### Variables
- **actionBar** - _String_.
Always show this item as a button in an Action Bar.
- **actionBarIfRoom** - _String_.
Show this item as a button in an Action Bar if the system decides there is room for it.
- **popup** - _String_.
Never show this item as a button in an Action Bar.
Loading

0 comments on commit 5c00dd5

Please sign in to comment.