asposediagram.api

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
methodgetContainer()
method
           ID of container: Page, Sheet, or Master. Only relevant and necessary if ContainerType is specified.
methodgetContainerType()
method
           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.
methodgetDocument()
method
           File path of the document displayed in this window. This attribute is relevant for windows whose WindowType is specified as Stencil.
methodgetDynamicGridEnabled()
method
           Specifies whether the dynamic grid feature is enabled for a document or window. The value of the property is BOOL integer constant.
methodgetGlueSettings()
method
           Specifies the objects that shapes glue to when glue is enabled in the document. The value of the property is GlueSettingsValue integer constant.
methodgetID()
method
setID(value)
           The unique ID of the element within its parent element.
methodgetMaster()
method
setMaster(value)
           Master ID if this window is displaying a master.
methodgetPage()
method
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.
methodgetParentWindow()
method
           ID of window in which this stencil window is contained. Relevant only when WindowType is specified as Stencil.
methodgetReadOnly()
method
           Read-only flag if this stencil is not a document stencil. The value of the property is BOOL integer constant.
methodgetSheet()
method
setSheet(value)
           ID of sheet in container. Relevant only when Container is specified as Sheet.
methodgetShowConnectionPoints()
method
           Specifies whether connection points are shown in a window. The value of the property is BOOL integer constant.
methodgetShowGrid()
method
           Specifies whether a grid is shown in the drawing window. The value of the property is BOOL integer constant.
methodgetShowGuides()
method
           Specifies whether guides are shown in the drawing window. The value of the property is BOOL integer constant.
methodgetShowPageBreaks()
method
           Specifies whether page breaks are shown in a window. The value of the property is BOOL integer constant.
methodgetShowRulers()
method
           Specifies whether rulers are shown in the drawing window. The value of the property is BOOL integer constant.
methodgetSnapAngles()
Contains a collection of SnapAngle elements.
methodgetSnapExtensions()
method
           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.
methodgetSnapSettings()
method
           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.
methodgetStencilGroup()
method
           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.
methodgetStencilGroupPos()
method
           Contains an integer that specifies the relative position of a stencil within a group in a window.
methodgetTabSplitterPos()
method
           Specifies the width of the page tab control of a drawing window (as a fraction of the total width of the drawing window).
methodgetViewCenterX()
method
           Optional double.
methodgetViewCenterY()
method
           Optional double.
methodgetViewScale()
method
           Optional double.
methodgetWindowHeight()
method
           Height of the window rectangle.
methodgetWindowLeft()
method
           Left coordinate of the window rectangle.
methodgetWindowState()
method
           This attribute can be a sum of the following values. The value of the property is WindowStateValue integer constant.
methodgetWindowTop()
method
           Top coordinate of the window rectangle.
methodgetWindowType()
method
           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.
methodgetWindowWidth()
method
           Width of the window rectangle.
 

    • Constructor Detail

      • Window

        Window()
        Constructor.
    • Property Getters/Setters Detail

      • getStencilGroup/setStencilGroup : String 

        String getStencilGroup() / 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 : int 

        int getStencilGroupPos() / setStencilGroupPos(value)
        
        Contains an integer that specifies the relative position of a stencil within a group in a window.
      • getShowRulers/setShowRulers : int 

        int getShowRulers() / setShowRulers(value)
        
        Specifies whether rulers are shown in the drawing window. The value of the property is BOOL integer constant.
      • getShowGrid/setShowGrid : int 

        int getShowGrid() / setShowGrid(value)
        
        Specifies whether a grid is shown in the drawing window. The value of the property is BOOL integer constant.
      • getShowPageBreaks/setShowPageBreaks : int 

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

        int getShowGuides() / setShowGuides(value)
        
        Specifies whether guides are shown in the drawing window. The value of the property is BOOL integer constant.
      • getShowConnectionPoints/setShowConnectionPoints : int 

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

        int getGlueSettings() / 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 : int 

        int getSnapSettings() / 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 : int 

        int getSnapExtensions() / 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.
      • getDynamicGridEnabled/setDynamicGridEnabled : int 

        int getDynamicGridEnabled() / 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 : float 

        float getTabSplitterPos() / 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 : int 

        int getID() / setID(value)
        
        The unique ID of the element within its parent element.
      • getWindowType/setWindowType : int 

        int getWindowType() / 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 : int 

        int getWindowState() / setWindowState(value)
        
        This attribute can be a sum of the following values. The value of the property is WindowStateValue integer constant.
      • getDocument/setDocument : String 

        String getDocument() / 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 : int 

        int getWindowLeft() / setWindowLeft(value)
        
        Left coordinate of the window rectangle.
      • getWindowTop/setWindowTop : int 

        int getWindowTop() / setWindowTop(value)
        
        Top coordinate of the window rectangle.
      • getWindowWidth/setWindowWidth : long 

        long getWindowWidth() / setWindowWidth(value)
        
        Width of the window rectangle.
      • getWindowHeight/setWindowHeight : long 

        long getWindowHeight() / setWindowHeight(value)
        
        Height of the window rectangle.
      • getMaster/setMaster : Master 

        Master getMaster() / setMaster(value)
        
        Master ID if this window is displaying a master.
      • getContainerType/setContainerType : int 

        int getContainerType() / 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 : int 

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

        int getSheet() / setSheet(value)
        
        ID of sheet in container. Relevant only when Container is specified as Sheet.
      • getReadOnly/setReadOnly : int 

        int getReadOnly() / setReadOnly(value)
        
        Read-only flag if this stencil is not a document stencil. The value of the property is BOOL integer constant.
      • getParentWindow/setParentWindow : int 

        int getParentWindow() / setParentWindow(value)
        
        ID of window in which this stencil window is contained. Relevant only when WindowType is specified as Stencil.
      • getPage/setPage : Page 

        Page getPage() / 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 : float 

        float getViewScale() / setViewScale(value)
        
        Optional double.
      • getViewCenterX/setViewCenterX : float 

        float getViewCenterX() / setViewCenterX(value)
        
        Optional double.
      • getViewCenterY/setViewCenterY : float 

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