////////////////////////////////////////////////////////////////// // GML TOOLBAR RULES #ALIAS[g=core.svg:GmlDrawing] #INCLUDE[gml:defs.inc] Configure RULES var category = 'Toolbar'; $ENV.defineRule({ id:'getToolbarColumns', category:category, description:'Gets the toolbar columns that will be displayed in the Toolbar editor dialog', parameters:'gml:Unit unit!,gml:Element element!, env:GRID_DEF[] columns', restrictive:true }); $ENV.extendRule('getToolbarColumns', { constraint:'element isa gml:Configurable', behavior:function() { columns.push({id: 'controlType', type: 'str' ,caption: '#TEXT[XCOL_GRID_UI_CONTROL]', readonly:true,width: 170}); columns.push({id: 'name', type: 'str',caption: '#TEXT[XCOL_GRID_NAME]', readonly:true, hide:true}); columns.push({id: 'id', type: 'str', caption: '#TEXT[XCOL_GRID_ID]', readonly: true, hide:true}); columns.push({id: 'label', type: 'expr', caption: '#TEXT[XCOL_GRID_LABEL]', readonly: false}); columns.push({id: 'tooltip',type: 'expr' , caption: '#TEXT[XCOL_GRID_TOOLTIP]', readonly:true}); columns.push({id: 'action',type: 'str' , caption: '#TEXT[XCOL_GRID_ACTION]', readonly:true}); return true; }, comments:'⇒ Interactor' }); ////////////////////////////////////////////////////////////////// // i022031: added getAllowedToolbarControlsNesting rule (todo: extract to xml if required) $ENV.defineRule({ id:'getToolbarAllowedGroupNestingLevel', category:category, description:'Defines the Toolbar groups nesting level - to what depth can a group be added into an existing group', parameters:'gml:Unit unit!, gml:Interactor interactor!, gml:Element group!', behavior: function() { return 999; }, restrictive:true });