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 | ||
---|---|---|
method | getContainer() | |
method | setContainer(value) | |
ID of container: Page, Sheet, or Master. Only relevant and necessary if ContainerType is specified. | ||
method | getContainerType() | |
method | 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. | ||
method | getDocument() | |
method | setDocument(value) | |
File path of the document displayed in this window. This attribute is relevant for windows whose WindowType is specified as Stencil. | ||
method | getDynamicGridEnabled() | |
method | setDynamicGridEnabled(value) | |
Specifies whether the dynamic grid feature is enabled for a document or window. The value of the property is BOOL integer constant. | ||
method | getGlueSettings() | |
method | 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. | ||
method | getID() | |
method | setID(value) | |
The unique ID of the element within its parent element. | ||
method | getMaster() | |
method | setMaster(value) | |
Master ID if this window is displaying a master. | ||
method | getPage() | |
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. | ||
method | getParentWindow() | |
method | setParentWindow(value) | |
ID of window in which this stencil window is contained. Relevant only when WindowType is specified as Stencil. | ||
method | getReadOnly() | |
method | setReadOnly(value) | |
Read-only flag if this stencil is not a document stencil. The value of the property is BOOL integer constant. | ||
method | getSheet() | |
method | setSheet(value) | |
ID of sheet in container. Relevant only when Container is specified as Sheet. | ||
method | getShowConnectionPoints() | |
method | setShowConnectionPoints(value) | |
Specifies whether connection points are shown in a window. The value of the property is BOOL integer constant. | ||
method | getShowGrid() | |
method | setShowGrid(value) | |
Specifies whether a grid is shown in the drawing window. The value of the property is BOOL integer constant. | ||
method | getShowGuides() | |
method | setShowGuides(value) | |
Specifies whether guides are shown in the drawing window. The value of the property is BOOL integer constant. | ||
method | getShowPageBreaks() | |
method | setShowPageBreaks(value) | |
Specifies whether page breaks are shown in a window. The value of the property is BOOL integer constant. | ||
method | getShowRulers() | |
method | setShowRulers(value) | |
Specifies whether rulers are shown in the drawing window. The value of the property is BOOL integer constant. | ||
method | getSnapAngles() | |
Contains a collection of SnapAngle elements.
|
||
method | getSnapExtensions() | |
method | 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. | ||
method | getSnapSettings() | |
method | 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. | ||
method | getStencilGroup() | |
method | 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. | ||
method | getStencilGroupPos() | |
method | setStencilGroupPos(value) | |
Contains an integer that specifies the relative position of a stencil within a group in a window. | ||
method | getTabSplitterPos() | |
method | 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). | ||
method | getViewCenterX() | |
method | setViewCenterX(value) | |
Optional double. | ||
method | getViewCenterY() | |
method | setViewCenterY(value) | |
Optional double. | ||
method | getViewScale() | |
method | setViewScale(value) | |
Optional double. | ||
method | getWindowHeight() | |
method | setWindowHeight(value) | |
Height of the window rectangle. | ||
method | getWindowLeft() | |
method | setWindowLeft(value) | |
Left coordinate of the window rectangle. | ||
method | getWindowState() | |
method | setWindowState(value) | |
This attribute can be a sum of the following values. The value of the property is WindowStateValue integer constant. | ||
method | getWindowTop() | |
method | setWindowTop(value) | |
Top coordinate of the window rectangle. | ||
method | getWindowType() | |
method | 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. | ||
method | getWindowWidth() | |
method | setWindowWidth(value) | |
Width of the window rectangle. |
String getStencilGroup() / setStencilGroup(value)
int getStencilGroupPos() / setStencilGroupPos(value)
int getShowRulers() / setShowRulers(value)
int getShowGrid() / setShowGrid(value)
int getShowPageBreaks() / setShowPageBreaks(value)
int getShowGuides() / setShowGuides(value)
int getShowConnectionPoints() / setShowConnectionPoints(value)
int getGlueSettings() / setGlueSettings(value)
int getSnapSettings() / setSnapSettings(value)
int getSnapExtensions() / setSnapExtensions(value)
FloatPointNumCollection getSnapAngles()
int getDynamicGridEnabled() / setDynamicGridEnabled(value)
float getTabSplitterPos() / setTabSplitterPos(value)
int getID() / setID(value)
int getWindowType() / setWindowType(value)
int getWindowState() / setWindowState(value)
String getDocument() / setDocument(value)
int getWindowLeft() / setWindowLeft(value)
int getWindowTop() / setWindowTop(value)
long getWindowWidth() / setWindowWidth(value)
long getWindowHeight() / setWindowHeight(value)
Master getMaster() / setMaster(value)
int getContainerType() / setContainerType(value)
int getContainer() / setContainer(value)
int getSheet() / setSheet(value)
int getReadOnly() / setReadOnly(value)
int getParentWindow() / setParentWindow(value)
Page getPage() / setPage(value)
float getViewScale() / setViewScale(value)
float getViewCenterX() / setViewCenterX(value)
float getViewCenterY() / setViewCenterY(value)