/* <copyright>
This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
</copyright> */
var Montage = require("montage/core/core").Montage,
Component = require("montage/ui/component").Component,
cssShorthandMap = require("js/panels/CSSPanel/css-shorthand-map").CSS_SHORTHAND_MAP,
nj = require("js/lib/NJUtils").NJUtils;
/*
Styles Manager
________________________________________
Interface for dealing with stylesheets
Properties:
- Stage stylesheet
- Default user stylesheet (e.g. styles.css)
Methods:
- Rules:
- Get matching rules for element
- Add rule
- Delete rule
- Enable rule
- Disable rule
- Styles:
- Add styles of existing rules
- Delete styles of existing rules
- Enable style
- Disable style
- Stylesheets:
- Add local or external stylesheets (needs file I/O for creating external sheets)
- Delete stylesheets
- Enable stylesheets
- Disable stylesheets
use case : set background color
- needs to know most specific rule WITH that property
-
*/
var stylesController = exports.StylesController = Montage.create(Component, {
///// Initialize after the active document has been set, and
///// bind the document to prop w/ setter. The setter calls to find
///// the stage and default css files.
handleAppLoaded : {
value: function() {
///// Bind app's activeDocument property to
///// styles controller's _activeDocument property
// Object.defineBinding(this, "activeDocument", {
// boundObject: this.application.ninja,
// boundObjectPropertyPath: "currentDocument",
// oneway: true
// });
}
},
deserializedFromTemplate : {
value: function() {
|