aspose.diagram
Class Window

Represents an open window in a Microsoft Visio instance. This element contains information necessary to exactly re-create a user interface window in the application workspace when the DatadiagramML file is initially opened by Visio.

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
functiongetContainer()
functionsetContainer(value)
           ID of container: Page, Sheet, or Master. Only relevant and necessary if ContainerType is specified.
functiongetContainerType()
functionsetContainerType(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.
functiongetDocument()
functionsetDocument(value)
           File path of the document displayed in this window. This attribute is relevant for windows whose WindowType is specified as Stencil.
functiongetDynamicGridEnabled()
functionsetDynamicGridEnabled(value)
           Specifies whether the dynamic grid feature is enabled for a document or window. The value of the property is BOOL integer constant.
functiongetGlueSettings()
functionsetGlueSettings(value)
           Specifies the objects that shapes glue to when glue is enabled in the document. The value of the property is GlueSettingsValue integer constant.
functiongetID()
functionsetID(value)
           The unique ID of the element within its parent element.
functiongetMaster()
functionsetMaster(value)
           Master ID if this window is displaying a master.
functiongetPage()
functionsetPage(value)
           Page ID if this window is displaying a page. Relevant only when WindowType is specified as Drawing and ContainerType is specified as Page.
functiongetParentWindow()
functionsetParentWindow(value)
           ID of window in which this stencil window is contained. Relevant only when WindowType is specified as Stencil.
functiongetReadOnly()
functionsetReadOnly(value)
           Read-only flag if this stencil is not a document stencil. The value of the property is BOOL integer constant.
functiongetSheet()
functionsetSheet(value)
           ID of sheet in container. Relevant only when Container is specified as Sheet.
functiongetShowConnectionPoints()
functionsetShowConnectionPoints(value)
           Specifies whether connection points are shown in a window. The value of the property is BOOL integer constant.
functiongetShowGrid()
functionsetShowGrid(value)
           Specifies whether a grid is shown in the drawing window. The value of the property is BOOL integer constant.
functiongetShowGuides()
functionsetShowGuides(value)
           Specifies whether guides are shown in the drawing window. The value of the property is BOOL integer constant.
functiongetShowPageBreaks()
functionsetShowPageBreaks(value)
           Specifies whether page breaks are shown in a window. The value of the property is BOOL integer constant.
functiongetShowRulers()
functionsetShowRulers(value)
           Specifies whether rulers are shown in the drawing window. The value of the property is BOOL integer constant.
functiongetSnapAngles()
           Contains a collection of SnapAngle elements.
functiongetSnapExtensions()
functionsetSnapExtensions(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.
functiongetSnapSettings()
functionsetSnapSettings(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.
functiongetStencilGroup()
functionsetStencilGroup(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.
functiongetStencilGroupPos()
functionsetStencilGroupPos(value)
           Contains an integer that specifies the relative position of a stencil within a group in a window.
functiongetTabSplitterPos()
functionsetTabSplitterPos(value)
           Specifies the width of the page tab control of a drawing window (as a fraction of the total width of the drawing window).
functiongetViewCenterX()
functionsetViewCenterX(value)
           Optional double.
functiongetViewCenterY()
functionsetViewCenterY(value)
           Optional double.
functiongetViewScale()
functionsetViewScale(value)
           Optional double.
functiongetWindowHeight()
functionsetWindowHeight(value)
           Height of the window rectangle.
functiongetWindowLeft()
functionsetWindowLeft(value)
           Left coordinate of the window rectangle.
functiongetWindowState()
functionsetWindowState(value)
           This attribute can be a sum of the following values. The value of the property is WindowStateValue integer constant.
functiongetWindowTop()
functionsetWindowTop(value)
           Top coordinate of the window rectangle.
functiongetWindowType()
functionsetWindowType(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.
functiongetWindowWidth()
functionsetWindowWidth(value)
           Width of the window rectangle.
 

Constructor Detail

Window

function Window()
Constructor.

Property Getters/Setters Detail

getStencilGroup/setStencilGroup : String 

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.

getStencilGroupPos/setStencilGroupPos : Number 

function getStencilGroupPos() / function setStencilGroupPos(value)
Contains an integer that specifies the relative position of a stencil within a group in a window.

getShowRulers/setShowRulers : Number 

function getShowRulers() / function setShowRulers(value)
Specifies whether rulers are shown in the drawing window. The value of the property is BOOL integer constant.

getShowGrid/setShowGrid : Number 

function getShowGrid() / function setShowGrid(value)
Specifies whether a grid is shown in the drawing window. The value of the property is BOOL integer constant.

getShowPageBreaks/setShowPageBreaks : Number 

function getShowPageBreaks() / function setShowPageBreaks(value)
Specifies whether page breaks are shown in a window. The value of the property is BOOL integer constant.

getShowGuides/setShowGuides : Number 

function getShowGuides() / function setShowGuides(value)
Specifies whether guides are shown in the drawing window. The value of the property is BOOL integer constant.

getShowConnectionPoints/setShowConnectionPoints : Number 

function getShowConnectionPoints() / function setShowConnectionPoints(value)
Specifies whether connection points are shown in a window. The value of the property is BOOL integer constant.

getGlueSettings/setGlueSettings : Number 

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.

getSnapSettings/setSnapSettings : Number 

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.

getSnapExtensions/setSnapExtensions : Number 

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.

getSnapAngles : FloatPointNumCollection 

function getSnapAngles()
Contains a collection of SnapAngle elements.

getDynamicGridEnabled/setDynamicGridEnabled : Number 

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.

getTabSplitterPos/setTabSplitterPos : Number 

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

getID/setID : Number 

function getID() / function setID(value)
The unique ID of the element within its parent element.

getWindowType/setWindowType : Number 

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.

getWindowState/setWindowState : Number 

function getWindowState() / function setWindowState(value)
This attribute can be a sum of the following values. The value of the property is WindowStateValue integer constant.

getDocument/setDocument : String 

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.

getWindowLeft/setWindowLeft : Number 

function getWindowLeft() / function setWindowLeft(value)
Left coordinate of the window rectangle.

getWindowTop/setWindowTop : Number 

function getWindowTop() / function setWindowTop(value)
Top coordinate of the window rectangle.

getWindowWidth/setWindowWidth : long 

function getWindowWidth() / function setWindowWidth(value)
Width of the window rectangle.

getWindowHeight/setWindowHeight : long 

function getWindowHeight() / function setWindowHeight(value)
Height of the window rectangle.

getMaster/setMaster : Master 

function getMaster() / function setMaster(value)
Master ID if this window is displaying a master.

getContainerType/setContainerType : Number 

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.

getContainer/setContainer : Number 

function getContainer() / function setContainer(value)
ID of container: Page, Sheet, or Master. Only relevant and necessary if ContainerType is specified.

getSheet/setSheet : Number 

function getSheet() / function setSheet(value)
ID of sheet in container. Relevant only when Container is specified as Sheet.

getReadOnly/setReadOnly : Number 

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.

getParentWindow/setParentWindow : Number 

function getParentWindow() / function setParentWindow(value)
ID of window in which this stencil window is contained. Relevant only when WindowType is specified as Stencil.

getPage/setPage : Page 

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.

getViewScale/setViewScale : Number 

function getViewScale() / function setViewScale(value)
Optional double.

getViewCenterX/setViewCenterX : Number 

function getViewCenterX() / function setViewCenterX(value)
Optional double.

getViewCenterY/setViewCenterY : Number 

function getViewCenterY() / function setViewCenterY(value)
Optional double.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cellss Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.