PageRenderTime 13ms CodeModel.GetById 10ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/lib/titanium/mobile/ui/DashboardItem.hx

http://github.com/visup/haxe-titanium-api
Haxe | 101 lines | 33 code | 7 blank | 61 comment | 0 complexity | 45f50578d67c393df3baa90eac64c5ad MD5 | raw file
  1package titanium.mobile.ui;
  2import titanium.mobile.core.BaseView;
  3import titanium.mobile.core.Dispatcher;
  4import titanium.mobile.core.Point;
  5
  6/**
  7DashboardItem class
  8
  9Documentation available at:
 10http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.DashboardItem-object.html
 11
 12- namespace
 13
 14Titanium.UI.DashboardItem
 15
 16- type
 17
 18object
 19
 20- subtype
 21
 22proxy
 23
 24- description
 25
 26An item that represents a visual icon in the [[Titanium.UI.DashboardView]]. The Dashboard Item is created by the method `Titanium.UI.createDashboardItem`.
 27
 28- since
 29
 301.2
 31
 32- platforms
 33
 34iphone, ipad
 35
 36- properties
 37
 38badge[int]: the badge value or `0` to remove the badge
 39image[string]: the URL to the image
 40selectedImage[string]: the URL to the image to display when the item is depressed (clicked)
 41canDelete[boolean]: a boolean to indicate if this item can be deleted when it edit mode
 42
 43- events
 44
 45click: fired when a [[Titanium.UI.DashboardItem]] is clicked
 46move: fired when a  [[Titanium.UI.DashboardItem]] is moved during editing
 47delete: fired when a  [[Titanium.UI.DashboardItem]] is deleted during editings
 48
 49- event : click
 50
 51item: the [[Titanium.UI.DashboardItem]] that was clicked
 52location: the location object with the properties `x` and `y` of where in the parent view the click was
 53
 54- event : move
 55
 56item: the [[Titanium.UI.DashboardItem]] that was moved
 57items: the pending data array in the new order (uncommitted)
 58
 59- event : delete
 60
 61item: the [[Titanium.UI.DashboardItem]] that was deleted
 62
 63**/
 64#if iphoneos
 65
 66typedef DashboardItemClickEvent = 
 67{ > Event,
 68	item:DashboardItem,
 69	location:Point
 70}
 71
 72typedef DashboardItemDeleteEvent = 
 73{ > Event,
 74	item:DashboardItem
 75}
 76
 77typedef DashboardItemMoveEvent = 
 78{ > Event,
 79	item:DashboardItem,
 80	items:Array<DashboardItem>
 81}
 82
 83@:native("Titanium.UI.DashboardItem")
 84extern class DashboardItem extends Dispatcher
 85{
 86	// static constructor
 87	public inline static function create(?params:Dynamic):DashboardItem
 88		return titanium.mobile.UI.createDashboardItem(params)
 89		
 90	// events
 91	public inline static var CLICK_EVENT = "click";
 92	public inline static var DELETE_EVENT = "delete";
 93	public inline static var MOVE_EVENT = "move";
 94	
 95	// properties
 96	public var badge:Int;
 97	public var canDelete:Bool;
 98	public var image:String;
 99	public var selectedImage:String;
100}
101#end