new Window()

Constructor.

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);

Methods

getContainer()

ID of container: Page, Sheet, or Master. Only relevant and necessary if ContainerType is specified.

getContainerType()

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.

getDocument()

File path of the document displayed in this window. This attribute is relevant for windows whose WindowType is specified as Stencil.

getDynamicGridEnabled()

Specifies whether the dynamic grid feature is enabled for a document or window. The value of the property is BOOL integer constant.

getGlueSettings()

Specifies the objects that shapes glue to when glue is enabled in the document. The value of the property is GlueSettingsValue integer constant.

getID()

The unique ID of the element within its parent element.

getMaster()

Master ID if this window is displaying a master.

getPage()

Page ID if this window is displaying a page. Relevant only when WindowType is specified as Drawing and ContainerType is specified as Page.

getParentWindow()

ID of window in which this stencil window is contained. Relevant only when WindowType is specified as Stencil.

getReadOnly()

Read-only flag if this stencil is not a document stencil. The value of the property is BOOL integer constant.

getSheet()

ID of sheet in container. Relevant only when Container is specified as Sheet.

getShowConnectionPoints()

Specifies whether connection points are shown in a window. The value of the property is BOOL integer constant.

getShowGrid()

Specifies whether a grid is shown in the drawing window. The value of the property is BOOL integer constant.

getShowGuides()

Specifies whether guides are shown in the drawing window. The value of the property is BOOL integer constant.

getShowPageBreaks()

Specifies whether page breaks are shown in a window. The value of the property is BOOL integer constant.

getShowRulers()

Specifies whether rulers are shown in the drawing window. The value of the property is BOOL integer constant.

getSnapAngles()

Contains a collection of SnapAngle elements.

getSnapExtensions()

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.

getSnapSettings()

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.

getStencilGroup()

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.

getStencilGroupPos()

Contains an integer that specifies the relative position of a stencil within a group in a window.

getTabSplitterPos()

Specifies the width of the page tab control of a drawing window (as a fraction of the total width of the drawing window).

getViewCenterX()

Optional double.

getViewCenterY()

Optional double.

getViewScale()

Optional double.

getWindowHeight()

Height of the window rectangle.

getWindowLeft()

Left coordinate of the window rectangle.

getWindowState()

This attribute can be a sum of the following values. The value of the property is WindowStateValue integer constant.

getWindowTop()

Top coordinate of the window rectangle.

getWindowType()

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.

getWindowWidth()

Width of the window rectangle.

setContainer()

ID of container: Page, Sheet, or Master. Only relevant and necessary if ContainerType is specified.

setContainerType()

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.

setDocument()

File path of the document displayed in this window. This attribute is relevant for windows whose WindowType is specified as Stencil.

setDynamicGridEnabled()

Specifies whether the dynamic grid feature is enabled for a document or window. The value of the property is BOOL integer constant.

setGlueSettings()

Specifies the objects that shapes glue to when glue is enabled in the document. The value of the property is GlueSettingsValue integer constant.

setID()

The unique ID of the element within its parent element.

setMaster()

Master ID if this window is displaying a master.

setPage()

Page ID if this window is displaying a page. Relevant only when WindowType is specified as Drawing and ContainerType is specified as Page.

setParentWindow()

ID of window in which this stencil window is contained. Relevant only when WindowType is specified as Stencil.

setReadOnly()

Read-only flag if this stencil is not a document stencil. The value of the property is BOOL integer constant.

setSheet()

ID of sheet in container. Relevant only when Container is specified as Sheet.

setShowConnectionPoints()

Specifies whether connection points are shown in a window. The value of the property is BOOL integer constant.

setShowGrid()

Specifies whether a grid is shown in the drawing window. The value of the property is BOOL integer constant.

setShowGuides()

Specifies whether guides are shown in the drawing window. The value of the property is BOOL integer constant.

setShowPageBreaks()

Specifies whether page breaks are shown in a window. The value of the property is BOOL integer constant.

setShowRulers()

Specifies whether rulers are shown in the drawing window. The value of the property is BOOL integer constant.

setSnapExtensions()

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.

setSnapSettings()

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.

setStencilGroup()

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.

setStencilGroupPos()

Contains an integer that specifies the relative position of a stencil within a group in a window.

setTabSplitterPos()

Specifies the width of the page tab control of a drawing window (as a fraction of the total width of the drawing window).

setViewCenterX()

Optional double.

setViewCenterY()

Optional double.

setViewScale()

Optional double.

setWindowHeight()

Height of the window rectangle.

setWindowLeft()

Left coordinate of the window rectangle.

setWindowState()

This attribute can be a sum of the following values. The value of the property is WindowStateValue integer constant.

setWindowTop()

Top coordinate of the window rectangle.

setWindowType()

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.

setWindowWidth()

Width of the window rectangle.