Example:
var aspose = aspose || {}; aspose.diagram = require("aspose.diagram"); diagram = new aspose.diagram.Diagram("TextBoxes.vsdx"); // get window object by index window = diagram.getWindows().get(0); // set visibility of grid window.setShowGrid(aspose.diagram.BOOL.TRUE); // set visibility of guides window.setShowGuides(aspose.diagram.BOOL.TRUE); // set visibility of rulers window.setShowRulers(aspose.diagram.BOOL.TRUE); // set visibility of page breaks window.setShowPageBreaks(aspose.diagram.BOOL.TRUE); diagram.save("out-DisplayGridsRulersGuidesAndPageBreaks.vsdx", aspose.diagram.SaveFileFormat.VSDX);
Constructor Summary |
---|
Window()
Constructor. |
Property Getters/Setters Summary | ||
---|---|---|
function | getContainer() | |
function | setContainer(value) | |
ID of container: Page, Sheet, or Master. Only relevant and necessary if ContainerType is specified. | ||
function | getContainerType() | |
function | setContainerType(value) | |
May be one of the following values: Document, Page, or Master. Only relevant when WindowType is specified as Drawing or Sheet. The value of the property is ContainerTypeValue integer constant. | ||
function | getDocument() | |
function | setDocument(value) | |
File path of the document displayed in this window. This attribute is relevant for windows whose WindowType is specified as Stencil. | ||
function | getDynamicGridEnabled() | |
function | setDynamicGridEnabled(value) | |
Specifies whether the dynamic grid feature is enabled for a document or window. The value of the property is BOOL integer constant. | ||
function | getGlueSettings() | |
function | setGlueSettings(value) | |
Specifies the objects that shapes glue to when glue is enabled in the document. The value of the property is GlueSettingsValue integer constant. | ||
function | getID() | |
function | setID(value) | |
The unique ID of the element within its parent element. | ||
function | getMaster() | |
function | setMaster(value) | |
Master ID if this window is displaying a master. | ||
function | getPage() | |
function | setPage(value) | |
Page ID if this window is displaying a page. Relevant only when WindowType is specified as Drawing and ContainerType is specified as Page. | ||
function | getParentWindow() | |
function | setParentWindow(value) | |
ID of window in which this stencil window is contained. Relevant only when WindowType is specified as Stencil. | ||
function | getReadOnly() | |
function | setReadOnly(value) | |
Read-only flag if this stencil is not a document stencil. The value of the property is BOOL integer constant. | ||
function | getSheet() | |
function | setSheet(value) | |
ID of sheet in container. Relevant only when Container is specified as Sheet. | ||
function | getShowConnectionPoints() | |
function | setShowConnectionPoints(value) | |
Specifies whether connection points are shown in a window. The value of the property is BOOL integer constant. | ||
function | getShowGrid() | |
function | setShowGrid(value) | |
Specifies whether a grid is shown in the drawing window. The value of the property is BOOL integer constant. | ||
function | getShowGuides() | |
function | setShowGuides(value) | |
Specifies whether guides are shown in the drawing window. The value of the property is BOOL integer constant. | ||
function | getShowPageBreaks() | |
function | setShowPageBreaks(value) | |
Specifies whether page breaks are shown in a window. The value of the property is BOOL integer constant. | ||
function | getShowRulers() | |
function | setShowRulers(value) | |
Specifies whether rulers are shown in the drawing window. The value of the property is BOOL integer constant. | ||
function | getSnapAngles() | |
Contains a collection of SnapAngle elements. | ||
function | getSnapExtensions() | |
function | setSnapExtensions(value) | |
Specifies whether a specific snap extension setting is enabled or disabled for the active window. The value can be a sum of the values in the following table. The value of the property is SnapExtensionsValue integer constant. | ||
function | getSnapSettings() | |
function | setSnapSettings(value) | |
Specifies the objects that shapes snap to when snap is active in the window. The value may be a sum of the values in the following table. The value of the property is SnapSettingsValue integer constant. | ||
function | getStencilGroup() | |
function | setStencilGroup(value) | |
Specifies the group of merged stencil windows of which the window is a member. This attribute is relevant only for Window elements whose WindowType attribute is Stencil, and only if the stencil window is part of a merged group of stencil windows. All stencil windows that are part of the same merged group have the same StencilGroup element value. | ||
function | getStencilGroupPos() | |
function | setStencilGroupPos(value) | |
Contains an integer that specifies the relative position of a stencil within a group in a window. | ||
function | getTabSplitterPos() | |
function | setTabSplitterPos(value) | |
Specifies the width of the page tab control of a drawing window (as a fraction of the total width of the drawing window). | ||
function | getViewCenterX() | |
function | setViewCenterX(value) | |
Optional double. | ||
function | getViewCenterY() | |
function | setViewCenterY(value) | |
Optional double. | ||
function | getViewScale() | |
function | setViewScale(value) | |
Optional double. | ||
function | getWindowHeight() | |
function | setWindowHeight(value) | |
Height of the window rectangle. | ||
function | getWindowLeft() | |
function | setWindowLeft(value) | |
Left coordinate of the window rectangle. | ||
function | getWindowState() | |
function | setWindowState(value) | |
This attribute can be a sum of the following values. The value of the property is WindowStateValue integer constant. | ||
function | getWindowTop() | |
function | setWindowTop(value) | |
Top coordinate of the window rectangle. | ||
function | getWindowType() | |
function | setWindowType(value) | |
An enumerated value that may be one of the following: Drawing, Sheet, Stencil, or Icon.A Window element of WindowType='Stencil' must appear after its parent drawing window (WindowType='Drawing') and before any other drawing window elements. The value of the property is WindowTypeValue integer constant. | ||
function | getWindowWidth() | |
function | setWindowWidth(value) | |
Width of the window rectangle. |
Constructor Detail |
---|
function Window()
Property Getters/Setters Detail |
---|
getStencilGroup/setStencilGroup : String | |
function getStencilGroup() / function setStencilGroup(value) |
getStencilGroupPos/setStencilGroupPos : Number | |
function getStencilGroupPos() / function setStencilGroupPos(value) |
getShowRulers/setShowRulers : Number | |
function getShowRulers() / function setShowRulers(value) |
getShowGrid/setShowGrid : Number | |
function getShowGrid() / function setShowGrid(value) |
getShowPageBreaks/setShowPageBreaks : Number | |
function getShowPageBreaks() / function setShowPageBreaks(value) |
getShowGuides/setShowGuides : Number | |
function getShowGuides() / function setShowGuides(value) |
getShowConnectionPoints/setShowConnectionPoints : Number | |
function getShowConnectionPoints() / function setShowConnectionPoints(value) |
getGlueSettings/setGlueSettings : Number | |
function getGlueSettings() / function setGlueSettings(value) |
getSnapSettings/setSnapSettings : Number | |
function getSnapSettings() / function setSnapSettings(value) |
getSnapExtensions/setSnapExtensions : Number | |
function getSnapExtensions() / function setSnapExtensions(value) |
getSnapAngles : FloatPointNumCollection | |
function getSnapAngles() |
getDynamicGridEnabled/setDynamicGridEnabled : Number | |
function getDynamicGridEnabled() / function setDynamicGridEnabled(value) |
getTabSplitterPos/setTabSplitterPos : Number | |
function getTabSplitterPos() / function setTabSplitterPos(value) |
getID/setID : Number | |
function getID() / function setID(value) |
getWindowType/setWindowType : Number | |
function getWindowType() / function setWindowType(value) |
getWindowState/setWindowState : Number | |
function getWindowState() / function setWindowState(value) |
getDocument/setDocument : String | |
function getDocument() / function setDocument(value) |
getWindowLeft/setWindowLeft : Number | |
function getWindowLeft() / function setWindowLeft(value) |
getWindowTop/setWindowTop : Number | |
function getWindowTop() / function setWindowTop(value) |
getWindowWidth/setWindowWidth : long | |
function getWindowWidth() / function setWindowWidth(value) |
getWindowHeight/setWindowHeight : long | |
function getWindowHeight() / function setWindowHeight(value) |
getMaster/setMaster : Master | |
function getMaster() / function setMaster(value) |
getContainerType/setContainerType : Number | |
function getContainerType() / function setContainerType(value) |
getContainer/setContainer : Number | |
function getContainer() / function setContainer(value) |
getSheet/setSheet : Number | |
function getSheet() / function setSheet(value) |
getReadOnly/setReadOnly : Number | |
function getReadOnly() / function setReadOnly(value) |
getParentWindow/setParentWindow : Number | |
function getParentWindow() / function setParentWindow(value) |
getPage/setPage : Page | |
function getPage() / function setPage(value) |
getViewScale/setViewScale : Number | |
function getViewScale() / function setViewScale(value) |
getViewCenterX/setViewCenterX : Number | |
function getViewCenterX() / function setViewCenterX(value) |
getViewCenterY/setViewCenterY : Number | |
function getViewCenterY() / function setViewCenterY(value) |