File format changes
We updated our scheme layout file format suffix from .pslayout to .cmpsl to comform to the cm file format naming standards. The old .pslayout file format can still continue to be used, but the new .cmpsl file format can only be used in CET 12.0 and cannot be opened in CET 11.5 or earlier.
Abstract Industry changes
There were some subsets that wasn't supported in the propsSchemeUIFactory before. We have now moved them to cm/core/propsSchemeUiFactory.
Class: IndPropsSchemeUIFactory - in cm/abstract/industry/indPropsSchemeUiFactory.cm
Old: extend public bool useDoubleFieldControl(Object value, SubSet domain); New: public bool useDoubleFieldControl(Object value, SubSet domain); Old: extend public bool useDistanceFieldControl(Object value, SubSet domain); New: public bool useDistanceFieldControl(Object value, SubSet domain); Removed: extend public bool useDropDownControl(Object value, SubSet domain); Removed: extend public void appendDropDownControl(Window parent, Window[] controls, Object value, SubSet domain); Removed: extend public str toolTipText(Object value, SubSet domain); Removed: extend public str getKey(Object value, SubSet domain); Removed: private void storeValueCB(Control c);
Core changes
Removed Class: PropsSchemeQPVessel
This class has been removed for performance and reduce maintenance effort, together with the schemeSystemKeyRef method. If you implement this method in your class, you can just remove it.
The "More Properties" functionality is now driven by two new methods below added in CoreObject. You will get this functionality if you implement propsSchemeSystemKey method, and call initFromPropsScheme() for your snapper.
SchemePropsCacheKey decides which snappers have the same list of properties in More Properties, and by default it uses the snapper class. If that is not good enough, you can consider overriding this and defining your own cache key.
Alternatively you can also override the schemeProps method (pre-existing method in CoreObject) if you know before hand what properties you want to show up in the more properties method.
Removed: public void ensurePropsSchemeQPVessel(CoreObject obj, str systemKey) Removed: public void PropsScheme::schemeSystemKeyRef() New: extend public str CoreObject::propsSchemeSystemKey() New: extend public CoreObject::schemePropsCacheKey() New: public void initFromPropsScheme(PropObj obj)
Core PropsScheme changes
Class renaming
Old: public class PropsSchemeCard extends PropsSchemeUIFactory New: public class PropsSchemeCardFactory extends PropsSchemeUIFactory Old: public class PropsSchemeCardSection extends PropsSchemeUIFactory New: public class PropsSchemeCardSectionFactory extends PropsSchemeUIFactory Old: public class PropsSchemePushProxyData extends PropObj New: public class PropsSchemeProxyPushObj extends PropObj Old: public class PsLayoutPropertyEntryProxyData extends PropsSchemePushProxyData New: public class PsLayoutProxyPushObj extends PropsSchemeProxyPushObj
Changes in cm/core/propsScheme package
Class: PropsScheme
Added option for brightened preset image. Used for hovered image of presets.
Old: extend public Image presetImage(bool isThumbnail, sizeI targetSize=(-1, -1)); New: extend public Image presetImage(bool isThumbnail, sizeI targetSize=(-1, -1), bool brightened=false);
Class: PropsSchemeContainer
Added quickLoad parameter for lazy loading. This allows loaded schemes to not init data until needed. Last saved scheme keys is now a seq to allow for loading saved schemes that was saved with old scheme system keys. See KitchenDemo extension on example of handling changed scheme system keys.
Old: extend public void loadLastSavedSchemes(); New: extend public void loadLastSavedSchemes(bool quickLoad=false); Old: extend public str lastSavedSchemesKey(); New: extend public str[] lastSavedSchemesKeys();
Class: PropsSchemeDialog
Removed: extend public bool ignoreUnsaveSchemes(World w); Removed: extend public SubWindow buildPresetWindow(); Old: extend public void setScheme(PropsScheme scheme); New: extend public void setScheme(PropsScheme s, bool force=false); Removed: extend public void rebuildPresetsWindows(); Removed: extend public void updateButtons(); Old: extend public void pushSchemeToPreview() New: extend public void pushSchemeToPreview(bool systemApply=true)
Class: PropsSchemeManager
Added parameter for lazy load.
Old: extend public PropsScheme[] loadSchemes(Url url, bool highlight=true, symbol{} missingPackages=null); New: extend public PropsScheme[] loadSchemes(Url url, bool highlight=true, symbol{} missingPackages=null, bool quickLoad=false);
Class: PropsSchemeProxyPushBehavior
//Field Removed: public PropObj receiver : stream=null; Removed: public str key : stream=null; Removed: public Object value : stream=null; Removed: public Object env : stream=null; //Method: Removed: public constructor() {} Removed: public loadFailedResult loadFailed(ObjectFormatter formatter, LoadFailure failure); Removed: extend public void initialize(str key, PropObj receiver, Object value, Object env=nul); Removed: extend public Object proxyPulledValue(PropObj z, Object value, Object env=null); Old: public constructor(PropObj translatedReceiver); New: public constructor(PropObj translatedReceiver=null); Old: extend public void proxyPullProp(str key, PropObj z, PropObj data, Object env=null); New: extend public void proxyPullProp(str key, PropObj source, PropObj receiver, Object env=null); Old: extend public Object proxyPullEnv(); New: extend public Object proxyPullEnv(PropObj source, PropObj receiver); Old: extend public Object proxyPullValue(PropObj z, str k, Object env=null); New: extend public Object proxyPullValue(str key, PropObj source, PropObj receiver, Object env=null); Old: extend public str proxyPushKey(); New: extend public str proxyPushKey(str key); Old: extend public PropObj proxyPushReceiver(); New: extend public PropObj proxyPushReceiver(PropObj receiver); Old: extend public Object proxyPushEnv(); New: extend public Object proxyPushEnv(PropObj source, PropObj receiver); Old: extend public PushPropsEnv proxyPusherEnv(); New: extend public PushPropsEnv proxyPusherEnv(PropObj source, PropObj receiver); Old: extend public PushPropsEnv proxyReceiverEnv(); New: extend public PushPropsEnv proxyReceiverEnv(PropObj source, PropObj receiver); Old: extend public bool proxyAllowPushProp(PropObj translatedReceiver); New: extend public bool proxyAllowPushProp(str key, PropObj source, PropObj receiver, Object value, Object env=null); Old: extend public void beforePushProp(PropObj translatedReceiver); New: extend public void beforePushProp(str key, PropObj source, PropObj receiver, Object value, Object env=null); Old: extend public void afterPushProp(PropObj translatedReceiver); New: extend public void afterPushProp(str key, PropObj source, PropObj receiver, Object value, Object env=null); Old: extend public bool pushProxyData(); New: extend public bool pushProxyObj(str key, PropObj source, PropObj receiver, Object value, Object env=null);
Class: PropsSchemeSelectButton
Old: public constructor(Window parent, // inherited key arguments .. // extends arguments str systemKey=null, Image presetImage=null); New: public constructor(Window parent, // inherited key arguments .. // extends arguments str systemKey=null);
Changes in cm/core/propsScheme/layout
Class: PsLayout
Removed version since it was not used and it was already handled in the streaming process.
Removed: public str version; Old: public constructor(str version="1.0"); New: public constructor(); Old: public constructor(str key, str label, str version="1.0"); New: public constructor(str key, str label); Class: PsLayoutEntriesCardStyle Old: extend public str previewLabel(); New: extend public str previewLabel(PsLayoutEntryTVI item=null);
Class: PsLayoutAbstractPropertyEntry
Passed in type so we can push with the intended defined type rather than the boxed class. Renamed method with added parameter, and removed featureCode method since it does not make sense at this level.
Old: public constructor(str key, str label, Object domain, Object value=null, function(PropsSchemeUIFactory, PsLayout, Object) propSetCb=null); New: public constructor(str key, str label, Object domain, Object value=null, Type t=null, function(PropsSchemeUIFactory, PsLayout, Object) propSetCb=null); Old: final public bool pushProxyData(PropObj receiver, Object value, bool xtrace=false); New: extend public bool pushProxyObj(PropObj receiver, PropObj source, Object value, bool xtrace=false); Removed: extend public str featureCode();
Class: PsLayoutPropertyProxyPushBehavior
Removed: extend public PsLayoutAbstractPropertyEntry entry(); Old: public str proxyPushKey(); New: public str proxyPushKey(str key); Old: public bool pushProxyData(); New: public bool pushProxyObj(str key, PropObj source, PropObj receiver, Object value, Object env=null); Old: public bool proxyAllowPushProp(PropObj z); New: public bool proxyAllowPushProp(str key, PropObj source, PropObj receiver, Object value, Object env=null); Old: public void beforePushProp(PropObj translatedReceiver); New: public void beforePushProp(str key, PropObj source, PropObj receiver, Object value, Object env=null); Old: public void afterPushProp(PropObj translatedReceiver); New: public void afterPushProp(str key, PropObj source, PropObj receiver, Object value, Object env=null);
Changes in cm/core/propsScheme/layout/editor
Class Removed
Removed: PsLayoutControlRenamerField;
Added parameter in function.
Old: public void showLayoutTabEditLabelDialog(Window window); New: public void showLayoutItemTVIEditLabelDialog(Window window, str label);
Class: PsLayoutPropertyEntryTVI Change parent class
Old: public class PsLayoutPropertyEntryTVI extends PsLayoutEntryTVI New: public class PsLayoutPropertyEntryTVI extends PsLayoutEntryInsertTVI
Removed unused
Removed: public PsLayoutAbstractPropertyEntry candidate; Removed: public void beginDrag(); Removed: public void dragging(pointI mouseScreenPos); Removed: public void endDrag(TreeViewItem itemOver); Removed: public DialogWindow createDragWindow();
Class: PsLayoutItemContainer Remove unused
Removed: final public void beginRename(Control c); Removed: final public bool inRenameMode(); Removed: final public void endRename();
Class: PsLayoutSectionLabel Removed unused.
Removed: extend public void prepareRenamer(PsLayoutControlRenamerField renamer);
Class: PsLayoutTabTVI Changed parent class.
Old: public class PsLayoutTabTVI extends PropsSchemeOneTreeViewItem New: public class PsLayoutTabTVI extends PsLayoutItemTVI
Moved fields and methods to PsLayoutItemTVI.
Removed: public PsLayoutTab tab; Removed: private bool onRemove; Removed: private bool onEdit; Removed: private bool onHandle; Removed: private bool onLabel; Removed: private bool disableEditEvent; Removed: private rectI removeRect; Removed: private rectI editRect; Removed: private rectI handleRect; Removed: public constructor(str key, str label, PsLayoutTab tab); Removed: public void setLabel(str label); Removed: public str toolTipText(); Removed: public int labelEndMargin(); Removed: public void draw(PixelDevice d, rectI r, rectI clipRect, treeViewItemState state, treeViewSelectionStyle style); Removed: extend public void drawDragHandle(PixelDevice c, rectI r, rectI clipRect); Removed: extend public void drawIcons(PixelDevice c, rectI r, rectI clipRect); Removed: public void drawLabel(PixelDevice d, rectI r, rectI clipRect, treeViewItemState state, treeViewSelectionStyle style); Removed: public void drawMainArrow(PixelDevice c, rectI r, rectI clipRect); Removed: public bool move(TreeViewMouseInfo mi); Removed: public bool exit(TreeViewMouseInfo mi); Removed: public bool click(TreeViewMouseInfo mi); Removed: public bool release(TreeViewMouseInfo mi); Removed: public bool release2(TreeViewMouseInfo mi); Removed: public void selected(TreeViewItem{} previous); Removed: public DialogWindow createDragWindow(); Removed: public Cursor getCursor(TreeViewMouseInfo mi); Removed: public bool rightClick(TreeViewMouseInfo mi);
Class: PsLayoutTabTreeView Changed parent class.
Old: public class PsLayoutTabTreeView extends PsLayoutTreeView; New: public class PsLayoutTabTreeView extends PsLayoutItemTreeView;
Removed unused
Removed: extend public void prepareRenamer(PsLayoutControlRenamerField renamer);
Moved to PsLayoutItemTreeView
Removed: public PsLayout schemeLayout; Removed: public void beginDrag(pointI p); Removed: public void drag(pointI p); Removed: public void endDrag(pointI p);
Catalog related changes
cm/abstract/dataSymInterface/selOption.syntax.cm
Added new flag putDsOptionCpy in DsiSelOModifyEnv, defaults to false. When true, will always put a copy of the DsOption
Old: public constructor(Object owner=null, bool setDefault=true, bool chopInvalid=true, bool typeDsOption=false, bool putMerge=false, bool domainFirstRootItem=false, bool domainRootItems=false, bool multiGet=false) New: public constructor(Object owner=null, bool setDefault=true, bool chopInvalid=true, bool typeDsOption=false, bool putMerge=false, bool domainFirstRootItem=false, bool domainRootItems=false, bool multiGet=false, bool putDsOptionCpy=false)
cm/abstract/dataSymbol/scheme/layout/dsPsLayoutPropertyProxyPushBehavior.cm
DsPsLayoutPropertyProxyPushBehavior no longer an abstract class. Added source, pusherEnv and receiverEnv as parameter for methods below.
Old: extend public bool pushDsOptionalFeatureProxyData(DsPsLayoutPropertyEntry entry, PropObj receiver, DsPData data, DsiPDataOption o, SFeature f, bool pushNullDataOnly=false, bool xtrace=false); New: extend public bool pushDsOptionalFeatureProxyData(DsPsLayoutPropertyEntry entry, PropObj source, PropObj receiver, DsPData data, DsiPDataOption o, SFeature f, Object pushEnv=null, PushPropsEnv receiverEnv=null, PushPropsEnv pusherEnv=null, bool pushNullDataOnly=false, bool xtrace=false); Old: extend public bool pushDsMultiSelFeatureProxyData(DsPsLayoutPropertyEntry entry, PropObj receiver, DsPData data, DsiPDataOption o, SFeature f, bool xtrace=false); New: extend public bool pushDsMultiSelFeatureProxyData(DsPsLayoutPropertyEntry entry, PropObj source, PropObj receiver, DsPData data, DsiPDataOption o, SFeature f, Object pushEnv=null, PushPropsEnv receiverEnv=null, PushPropsEnv pusherEnv=null, bool xtrace=false);
Removed methods below:
Removed: public Object proxyPulledValue(PropObj z, Object value, Object env=null); Removed: public PsLayoutPropertyEntryProxyData proxyPushData(); Removed: extend public PsLayoutPropertyEntryProxyData proxyPushData(str key); Removed: public str proxyPushKey(str pipeKey);
Class: DsPsLayoutPropertyEntry
Made featureCode private with getter and setter. Getter override by GroupEntry.
Removed public str featureCode; Added: private str _featureCode; Added: extend public str featureCode=(str n) { return _featureCode = n; } Added: extend public str featureCode() { return _featureCode; }
cm/abstract/dataSymbol/scheme/layout/functions.cm
Added complete download callback for dsLoadLayout so that hybrid extensions can rebuild their libraries (to make the scheme button show) when the layout is done downloading. For an example, please look at dataFika's scheme class.
Old: public PsLayout dsLoadLayout(DsPData data, bool activeOnly=true); New: public PsLayout dsLoadLayout(DsPData data, function(Object) completeDlCB, bool activeOnly=true); Old: public PsLayout[] dsLoadAllLayouts(DsPData data, bool activeOnly=true); New: public PsLayout[] dsLoadAllLayouts(DsPData data, function(Object) completeDlCB=null, bool activeOnly=true);
Lazy Schemes
On the catalog side, we have introduced 'DsPsLayoutLazyPropsScheme' as a empty placeholder for your catalog schemes. The real scheme is created only when the user activates the scheme (for example access it in the scheme dialog, or placing an object that calls initFromPropsScheme). This means that your schemes will still show up on the scheme explorer, but we wont have to load its values until the user actually tries to use it.
For non catalog schemes, we have also added support for lazy data initialization for similar purpose. It will work even with schemes saved to the drawing. The data will not be initialized until the user tries to use the scheme.
Comments
0 comments
Please sign in to leave a comment.