-
Notifications
You must be signed in to change notification settings - Fork 3
Supplied Injections
Matan edited this page Sep 14, 2010
·
4 revisions
The purpose of the document is to explain what injections are made available by HandBones and what their rolls are.
These injections can be done anywhere you want at any time.
| Class | Description |
|---|---|
| SettingsModel | This is the parsed result of your site.xml. You probably won’t need to use this model unless you defined a data node in your site.xml. |
| NavigatorModel | Very simple model, keeps reference to the current page and the previous page. You’ll use this when building your “page switching” view/mediator. |
| SizeModel | The SizeModel keeps track of the stage dimensions and page dimensions. You use this everywhere your view components are dependent on the size of the stage and/or size of the page. You need to manually define the page size. In most cases the page size is dependent on the stage size. Simply map a command to listen to the SizeEvent.RESIZE and manually set what the page size should be. The SizeModel will then dispatch SizeEvent.PAGE_RESIZE. |
| ContextMenuModel | Maintains ContextMenu instance, this model is populated from your site.xml. |
| ICookieModel | Manages your local storage. |
| Class | Description |
|---|---|
| ISettingsService | You can define where and what your site.xml is and called, so you must manually invoke the loading of the xml file by injecting this service and pass it the url to the file. This will kick off the HandBones internals. |
| IAssetLoader | Used for multi file loading through out HandBones. Please see AssetLoader on github. |
| Class | Description |
|---|---|
| IActionMap | Singleton instance of the ActionMap. You can manually map you actions via IActionMap, but if the view component is destroyed you HAVE to unmap it manually as well. There are localised implementations that automatically unmap their mappings, much like Robotlegs’s EventMap. See the ActionMap wiki page. |
| INavigotor | Practically a wrapper for SWFAddress, here you can manually invoke urls, change the current page, etc. If you are using the ActionMap you don’t need to inject this. |
| ITracker | Links to Google Analytics, here you can manually invoke tracking of anything you like. If you are using actions with tracking nodes, the tracking will be done automatically. |
These injection will only be satisfied when a page is currently active. HandBones automatically maps and unmaps injection rules when pages startup and shutdown. This is way it’s important that the page dispatches PageEvent.STARTUP and PageEvent.SHUTDOWN_COMPLETE.
| Class | Description |
|---|---|
| IPage | This will give you reference to the current page’s view component. In most cases you won’t need to use this. |
| Class | Description |
|---|---|
| IPageModel | At init phase each page defined in the site.xml is given it’s very own model. This contains reference to parsed xml and their custom mapping instances. |
| Class | Description |
|---|---|
| IGroupLoader | An instance of IGroupLoader is created for each page, this group loader handles all the assets to be loaded in this scope. |
Each of these basically wrap something else. The only difference is that they keep track of what has been map in this scope. This allows automatic unmapping when the page is destroyed.
| Class | Description |
|---|---|
| IPageCommandMap | Wraps the Robotlegs ICommandMap |
| IPageInjector | Wraps the Robotlegs IInjector |
| IPageMediatorMap | Wraps the Robotlegs IMediatorMap |
| IPageViewMap | Wraps the Robotlegs IViewMap |