Skip to main content

%ZEN.SVGComponent.svgFrame

class %ZEN.SVGComponent.svgFrame extends %ZEN.Component.component, %ZEN.SVGComponent.abstractSVGGroup

This is a specialized type of group that is used to place a set of SVG components within a page.
Only groups and SVG components can be places within an svgFrame. An error will occur if an HTML component is placed within an svgFrame.

Property Inventory

Method Inventory

Parameters

parameter DEFAULTHEIGHT = 100;
Default height of frame in parent page.
parameter DEFAULTWIDTH = 300;
Default width of frame in parent page.
parameter POSTCOMPILEACTIONS = schema,SVG;
Internal parameter. This is a list of which post-compile actions this component is registered for.

Properties

property backgroundStyle as %ZEN.Datatype.svgStyle [ InitialExpression = "fill: white;" ];
CSS style used for the background of this frame.
Note: this background style must include a fill value or else mouse events within this frame will not work correctly.
Property methods: backgroundStyleDisplayToLogical(), backgroundStyleGet(), backgroundStyleIsValid(), backgroundStyleLogicalToDisplay(), backgroundStyleLogicalToOdbc(), backgroundStyleNormalize(), backgroundStyleSet()
property document as %ZEN.Datatype.string (XMLPROJECTION = "none", ZENCLIENTONLY = 1, ZENSETTING = 0);
Client-side property that points to SVG document embedded within this element.
Property methods: documentDisplayToLogical(), documentGet(), documentIsValid(), documentLogicalToDisplay(), documentLogicalToOdbc(), documentNormalize(), documentSet()
property dragCanvas as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true, then the user can use the pointing device (mouse) to drag the canvas of this frame. This will update the values of the offsetX and offsetY properties and move the shapes on the canvas.
Property methods: dragCanvasDisplayToLogical(), dragCanvasGet(), dragCanvasIsValid(), dragCanvasLogicalToDisplay(), dragCanvasLogicalToOdbc(), dragCanvasLogicalToXSD(), dragCanvasNormalize(), dragCanvasSet(), dragCanvasXSDToLogical()
property editMode as %ZEN.Datatype.string (VALUELIST = ",none,select,drag") [ InitialExpression = "none" ];
Edit mode of this frame. This specifies how the pointer device (mouse) will interact with shapes on this frame.
"none" - no interaction.
"select" - a mouse click will select a shape.
"drag" - the mouse can select and move the shape.
Property methods: editModeDisplayToLogical(), editModeGet(), editModeIsValid(), editModeLogicalToDisplay(), editModeLogicalToOdbc(), editModeNormalize(), editModeSet()
property frameStyle as %ZEN.Datatype.style;
User defined style used for the svgFrame.
Property methods: frameStyleDisplayToLogical(), frameStyleGet(), frameStyleIsValid(), frameStyleLogicalToDisplay(), frameStyleLogicalToOdbc(), frameStyleNormalize(), frameStyleSet()
property gridX as %ZEN.Datatype.integer [ InitialExpression = 25 ];
If snapToGrid is true, this defines the width of each cell in the sizing grid.
Property methods: gridXDisplayToLogical(), gridXGet(), gridXIsValid(), gridXLogicalToDisplay(), gridXLogicalToOdbc(), gridXNormalize(), gridXSet()
property gridY as %ZEN.Datatype.integer [ InitialExpression = 25 ];
If snapToGrid is true, this defines the height of each cell in the sizing grid.
Property methods: gridYDisplayToLogical(), gridYGet(), gridYIsValid(), gridYLogicalToDisplay(), gridYLogicalToOdbc(), gridYNormalize(), gridYSet()
property offsetX as %ZEN.Datatype.integer [ InitialExpression = 0 ];
This is the offset, along the x axis, of the coordinates of this frame from its upper, left-hand corner.
Property methods: offsetXDisplayToLogical(), offsetXGet(), offsetXIsValid(), offsetXLogicalToDisplay(), offsetXLogicalToOdbc(), offsetXNormalize(), offsetXSet()
property offsetY as %ZEN.Datatype.integer [ InitialExpression = 0 ];
This is the offset, along the y axis, of the coordinates of this frame from its upper, left-hand corner.
Property methods: offsetYDisplayToLogical(), offsetYGet(), offsetYIsValid(), offsetYLogicalToDisplay(), offsetYLogicalToOdbc(), offsetYNormalize(), offsetYSet()
property ondragCanvas as %ZEN.Datatype.eventHandler;
ondragCanvas event handler: This event is fired as the user drags the background canvas using a pointing device.
A variable, done, is passed to this event handler and indicates if the if the operation is completed.
Property methods: ondragCanvasDisplayToLogical(), ondragCanvasGet(), ondragCanvasIsValid(), ondragCanvasLogicalToDisplay(), ondragCanvasLogicalToOdbc(), ondragCanvasNormalize(), ondragCanvasSet()
property onmouseWheel as %ZEN.Datatype.eventHandler;
onmouseWheel event handler: This event is fired as the user moves the wheel on their mouse over the background rectangle of this frame.
Currently only available in FireFox.
Property methods: onmouseWheelDisplayToLogical(), onmouseWheelGet(), onmouseWheelIsValid(), onmouseWheelLogicalToDisplay(), onmouseWheelLogicalToOdbc(), onmouseWheelNormalize(), onmouseWheelSet()
property onmoveItem as %ZEN.Datatype.eventHandler;
onmoveItem event handler: This event is fired when this frame is in drag mode and the user moves one or more selected items.
Refer to the selectedItems property for the list of items.
A variable, done, is passed to this event handler and indicates if the if the operation is completed.
Property methods: onmoveItemDisplayToLogical(), onmoveItemGet(), onmoveItemIsValid(), onmoveItemLogicalToDisplay(), onmoveItemLogicalToOdbc(), onmoveItemNormalize(), onmoveItemSet()
property onresizeItem as %ZEN.Datatype.eventHandler;
onresizeItem event handler: This event is fired when this frame is in drag mode and the user resizes one or more selected items.
Refer to the selectedItems property for the list of items.
A variable, done, is passed to this event handler and indicates if the if the operation is completed.
Property methods: onresizeItemDisplayToLogical(), onresizeItemGet(), onresizeItemIsValid(), onresizeItemLogicalToDisplay(), onresizeItemLogicalToOdbc(), onresizeItemNormalize(), onresizeItemSet()
property onselectItem as %ZEN.Datatype.eventHandler;
onselectItem event handler: This event is fired when the user changes the number of selected items on this frame (either by selecting or unselecting an item). A variable, item, is passed to this event handler and refers to the item most recently selected or unselected.
Property methods: onselectItemDisplayToLogical(), onselectItemGet(), onselectItemIsValid(), onselectItemLogicalToDisplay(), onselectItemLogicalToOdbc(), onselectItemNormalize(), onselectItemSet()
property onzoom as %ZEN.Datatype.eventHandler;
onzoom event handler: This event is fired whenever the zoom level for this frame is changed.
Property methods: onzoomDisplayToLogical(), onzoomGet(), onzoomIsValid(), onzoomLogicalToDisplay(), onzoomLogicalToOdbc(), onzoomNormalize(), onzoomSet()
property parameters as array of %ZEN.Auxiliary.parameter (XMLKEYNAME = "paramName", XMLNAME = "parameter", XMLPROJECTION = "ELEMENT");
User-defined list of parameters. These are passed on as URL parameters to the CSP Page class that renders the SVG contents.
Note: In early versions of Zen, the xml attribute used to identify items within this array was called "key"; it was later changed to "paramName" to be consistent with other components.
Property methods: parametersBuildValueArray(), parametersCollectionToDisplay(), parametersCollectionToOdbc(), parametersDisplayToCollection(), parametersGet(), parametersGetObject(), parametersGetObjectId(), parametersGetSwizzled(), parametersIsValid(), parametersOdbcToCollection(), parametersSet(), parametersSetObject(), parametersSetObjectId()
property selectedItem as %ZEN.SVGComponent.svgComponent (XMLPROJECTION = "NONE", ZENSETTING = 0);
Primary selected svg component within this frame (if any).
If there are multiple selected items, this is the most recent selection.
Property methods: selectedItemGet(), selectedItemGetSwizzled(), selectedItemIsValid(), selectedItemNewObject(), selectedItemSet()
property selectedItems as list of %ZEN.SVGComponent.svgComponent (XMLPROJECTION = "NONE", ZENSETTING = 0);
Set of currently selected svg components within this frame.
Property methods: selectedItemsBuildValueArray(), selectedItemsCollectionToDisplay(), selectedItemsCollectionToOdbc(), selectedItemsDisplayToCollection(), selectedItemsGet(), selectedItemsGetObject(), selectedItemsGetObjectId(), selectedItemsGetSwizzled(), selectedItemsIsValid(), selectedItemsOdbcToCollection(), selectedItemsSet(), selectedItemsSetObject(), selectedItemsSetObjectId()
property snapToGrid as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true, all mouse operations (sizing and dragging) will be constrained to lie on the "grid" defined by gridX and gridY.
Property methods: snapToGridDisplayToLogical(), snapToGridGet(), snapToGridIsValid(), snapToGridLogicalToDisplay(), snapToGridLogicalToOdbc(), snapToGridLogicalToXSD(), snapToGridNormalize(), snapToGridSet(), snapToGridXSDToLogical()
property svgAutoSize as %ZEN.Datatype.boolean [ InitialExpression = 1 ];
If true, then the size of the svg canvas (the backing rectangle for this frame) will be automatically calculated (and updated) based on its contents.
The minimum size of the canvas is based on the values of svgWidth and svgHeight.
If false, the size is based on the values of svgWidth and svgHeight.
If the dragCanvas is true, then this property will be ignored.
Property methods: svgAutoSizeDisplayToLogical(), svgAutoSizeGet(), svgAutoSizeIsValid(), svgAutoSizeLogicalToDisplay(), svgAutoSizeLogicalToOdbc(), svgAutoSizeLogicalToXSD(), svgAutoSizeNormalize(), svgAutoSizeSet(), svgAutoSizeXSDToLogical()
property svgGroup as %ZEN.Datatype.string (XMLPROJECTION = "none", ZENCLIENTONLY = 1, ZENSETTING = 0);
Client-side property that points to the enclosing SVG group element.
Property methods: svgGroupDisplayToLogical(), svgGroupGet(), svgGroupIsValid(), svgGroupLogicalToDisplay(), svgGroupLogicalToOdbc(), svgGroupNormalize(), svgGroupSet()
property svgHeight as %ZEN.Datatype.integer (MINVAL = 0);
Height (in pixels) of svg canvas. If not specified, then the height of the svg canvas will be the height of this frame.
Property methods: svgHeightDisplayToLogical(), svgHeightGet(), svgHeightIsValid(), svgHeightLogicalToDisplay(), svgHeightLogicalToOdbc(), svgHeightNormalize(), svgHeightSet()
property svgPage as %ZEN.Datatype.className (ZENSETTING = 0);
Optional. Specifies the name of the CSP page class (subclass of svgPage) that renders the SVG content wrapper within this svgFrame.
Property methods: svgPageDisplayToLogical(), svgPageGet(), svgPageIsValid(), svgPageLogicalToDisplay(), svgPageLogicalToOdbc(), svgPageNormalize(), svgPageSet()
property svgRoot as %ZEN.Datatype.string (XMLPROJECTION = "none", ZENCLIENTONLY = 1, ZENSETTING = 0);
Client-side property that points to the enclosing SVG root element (top svg element).
Property methods: svgRootDisplayToLogical(), svgRootGet(), svgRootIsValid(), svgRootLogicalToDisplay(), svgRootLogicalToOdbc(), svgRootNormalize(), svgRootSet()
property svgWidth as %ZEN.Datatype.integer (MINVAL = 0);
Width (in pixels) of svg canvas. If not specified, then the width of the svg canvas will be the width of this frame.
Property methods: svgWidthDisplayToLogical(), svgWidthGet(), svgWidthIsValid(), svgWidthLogicalToDisplay(), svgWidthLogicalToOdbc(), svgWidthNormalize(), svgWidthSet()
property svgWindow as %ZEN.Datatype.string (XMLPROJECTION = "none", ZENCLIENTONLY = 1, ZENSETTING = 0);
Client-side property that points to SVG window object embedded within this element.
Property methods: svgWindowDisplayToLogical(), svgWindowGet(), svgWindowIsValid(), svgWindowLogicalToDisplay(), svgWindowLogicalToOdbc(), svgWindowNormalize(), svgWindowSet()
property zoom as %ZEN.Datatype.float (MINVAL = 1) [ InitialExpression = 100 ];
Zoom level as a percentage (100 equals no zoom).
Property methods: zoomDisplayToLogical(), zoomGet(), zoomIsValid(), zoomLogicalToDisplay(), zoomLogicalToOdbc(), zoomNormalize(), zoomSet()
property zoomLevels as %ZEN.Datatype.csv [ InitialExpression = "10,25,50,75,100,125,150,175,200,300,400,500" ];
This is a comma-delimited list of suggested zoom levels.
These values are used by the zoomIn() and zoomOut() methods.
Property methods: zoomLevelsDisplayToLogical(), zoomLevelsGet(), zoomLevelsIsValid(), zoomLevelsLogicalToDisplay(), zoomLevelsLogicalToOdbc(), zoomLevelsNormalize(), zoomLevelsSet()
property zoomWithWheel as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true, then this frame will automatically zoom in and out in response to mouse wheel events (FireFox only).
Property methods: zoomWithWheelDisplayToLogical(), zoomWithWheelGet(), zoomWithWheelIsValid(), zoomWithWheelLogicalToDisplay(), zoomWithWheelLogicalToOdbc(), zoomWithWheelLogicalToXSD(), zoomWithWheelNormalize(), zoomWithWheelSet(), zoomWithWheelXSDToLogical()

Methods

method %DrawHTML()
Inherited description: Static HTML display method: draw the BODY of this component as HTML.
Subclasses implement this in order to render the static HTML contents of a component.
method %OnAddToPageAfter() as %Status
Called just after this form is added to the page.
Make sure that the page's useSVG flag is set.
clientmethod canDragShapes() [ Language = javascript ]
Return true if shapes can be dragged on this frame.
clientmethod getSVGDocument() [ Language = javascript ]
Return the embedded SVG document object.
clientmethod getSelectedItem() [ Language = javascript ]
Return the current selected item within this frame. If no item is selected, return null. If more than one item is selected, return the primary selection (last item selected).
clientmethod getSelectedItems() [ Language = javascript ]
Return the set of currently selected items within this frame as an array of components.
clientmethod getZoomIndex(x) [ Language = javascript ]
Return current zoom index of this frame.
clientmethod isSelected(item) [ Language = javascript ]
Test if given item is selected.
clientmethod mousedownHandler(evt) [ Language = javascript ]
Mouse down handler for this frame.
clientmethod mousemoveHandler(evt) [ Language = javascript ]
Mouse move handler for frame.
clientmethod mouseupHandler(evt) [ Language = javascript ]
Mouse up handler for frame.
clientmethod mousewheelHandler(evt) [ Language = javascript ]
Mouse wheel event handler for this frame.
clientmethod moveItem(item, dx, dy) [ Language = javascript ]
Move the given component to a new position (depending on its parent's layout options).
clientmethod onloadHandler() [ Language = javascript ]
This client event, if present, is fired when the page is loaded.
clientmethod selectItem(item, add) [ Language = javascript ]
Select the specified item.
item must be a component within this frame.
If add is true, add (or remove if already selected) the item to the set of selected items, otherwise select only the item.
If item is null, unselect all items.
abstract clientmethod selectItemHandler(item, add) [ Language = javascript ]
Notification that an item has been selected. This can be implemented by a subclass. If this method is defined and returns false, the onselectItem callback will not be fired.
clientmethod setEditMode(mode) [ Language = javascript ]
Set the edit mode of the frame.
clientmethod setOffsets(x, y) [ Language = javascript ]
Set the x and y offsets for this frame. This specifies how far the upper left corner of the frame is translated.
clientmethod setProperty(property, value, value2) [ Language = javascript ]
Set the value of a named property.
clientmethod setZoom(value) [ Language = javascript ]
Set the zoom level of this frame to given percentage value.
clientmethod setZoomIndex(idx, x, y) [ Language = javascript ]
This will zoom this canvas to the (0-based) zoom index (i.e., entry in the zoomLevels array) specified by idx.
x and y, if defined, are the center point for the zoom. If not defined, the center of the frame is used.
clientmethod startDragCanvas(evt) [ Language = javascript ]
Start of drag canvas operation.
clientmethod startMove(evt, shape) [ Language = javascript ]
Start of move shape(s) operation.
clientmethod startResize(evt, shape, which) [ Language = javascript ]
Start of resize operation.
clientmethod svgLoadHandler(win) [ Language = javascript ]
Notification that the embedded SVG page is loaded.
clientmethod zoomIn(x, y) [ Language = javascript ]
Set the zoom level for this frame to the next higher value (as compared with the current level) in the zoomLevels list.
x and y, if defined, are the center point for the zoom. If not defined, the center of the frame is used.
clientmethod zoomOut(x, y) [ Language = javascript ]
Set the zoom level for this frame to the next lower value (as compared with the current level) in the zoomLevels list.
x and y, if defined, are the center point for the zoom. If not defined, the center of the frame is used.

Inherited Members

Inherited Properties

Inherited Methods

Subclasses

FeedbackOpens in a new tab