PERGOLA LOGO

pergola.Window

System events: YES.

User events and functions: NO

System component.

Listed: class properties/methods; prototype properties and methods; instance properties. Prototype properties and methods inherited by the Class superclass are not listed.

class

active()

Returns the last element in windows. You don't normally need to invoke this method explicitly.

exist(name)

name is a string specifying the tentative name of a window. Returns true if name already exists. You don't normally need to invoke this method explicitly.

tabs

Array – stores WindowTab instances.

untitled

1 – number.

unnamed()

Returns the string "Untitled_" + untitled post-incremented. You don't normally need to invoke this method explicitly.

windows

Array – stores Window instances.

prototype

PROPERTIES

parent

pergola.user.

isOpen

true – boolean.

minimized

false – boolean.

isFull

false – boolean.

resizable

true – boolean.

fill

Defined in pergola.presentationAttributes – string.

scrollSize

Defined in pergola.presentationAttributes – number (user space units) representing the Scrollbar size.

x

200 – number (user space units).

y

160 – number (user space units).

margin

4 – number (user space units).

width

680 – number (user space units).

height

520 – number (user space units).

minWidth

340 – number (user space units).

minHeight

200 – number (user space units).

hasCommands

true – boolean.

hasToolBar

true – boolean.

hasZoomAndPan

true – boolean.

hasStatus

true – boolean.

statusHeight

0 – number (user space units); if not overridden, default StatusBar height applies.

hasUndo

false – boolean.

type

"regular" – string; allowed values: "regular"; "map"; "editor"; "datagrid".

mousewheel

"zoom" – string; allowed values are "zoom" "scroll" "" (empty string). Specifies how the mouse wheel should act on this doc. The empty string (or any value that resolves to false) disables the mousewheel.

docBgResizable

true – boolean; determines if this doc.background must be resized on transformations.

scrollType

"regular" – string; allowed values: "regular"; "navigation".

dependencies

false – boolean.

METHODS

activateTool(tool)

System. Dependency of toolInit. Activates specified exclusive (radio) tool button and releases previous active tool in collection.

addMenu(object)

object defines menu object properties. Use this method when you need to reference objects of the window's content that are only known after the window's instantiation and populating processes are completed. The property separator can also be specified as property of a menu item, and its value must be: new pergola.Separator(); a pergola.Separator object is added between the current item and the following one. Use case of this method in the datagrid example.

addTools(object)

object defines tool properties as a group of tools to add to this toolBar; the property separator can also be specified (it should typically be the first property), and in this case a pergola.Separator object is added between the current group and the previous one. The method can be invoked during the construction of this (in this contains function), or at any stage after construction. References of the added tools are stored in this tools, and in this exclusiveTools if the exclusive property is set in the tool's initialization object.

Note: currently tools can only be added as groups (but the group may contain one single tool). This restriction may be removed in a future release.

bringToFront()

Makes this the topmost window. Manages suspension/reactivation of this and of previous active window's exclusiveTools. If this dependencies, invokes this updateDependencies(). You don't normally need to invoke this method explicitly.

build([object])

this inherits the properties specified in object; prototype properties specified in object are overridden. Creates elements. Returns this.

close()

Closes this (can reopen).

closeGroupPos()

Returns the computed position number for this closeGroup. You don't normally need to invoke this method explicitly.

datagridMaker(o)

o is an object with the required binding URL string property (remote mode), or object property (local mode). o can specify pergola.Datagrid prototype properties to override. The method assigns a pergola.DataGrid instance to this datagrid property and processes the specified binding property to retrieve the data.

In remote mode the method invokes pergola.pergola.xhrGET(); the pergola.DataGrid build() method is invoked asynchronously by the request's callback. Learn more in the DATAGRID section of the Tutorial.

fullH()

Returns the computed full height number value.

fullW()

Returns the computed full width number value.

getCandidate()

Finds the next best candidate window and invokes the bringToFront() method. You don't normally need to invoke this method explicitly.

handToolDoubleClick(evt)

System. Dependency of toolInit. Handles double click on hand tool (reset to origin).

itineraryToolDoubleClick(evt)

System. Dependency of toolInit. Handles double click on itinerary tool (reset itinerary).

lensToolDoubleClick(evt)

System. Dependency of toolInit. Handles double click on lens tool (reset zoom level).

logoMaker(o)

Creates a window logo placed on the top bar. o is an object specifying the required symbol property, which can get a symbol or a string representing an image URL. o can specify optional x and y number properties. If symbol represents an image URL, the width and height number properties must be specified. If the replace boolean property is specified and true, the current logo will be replaced.

maximize()

Maximizes this to full screen.

maximizeInit()

If this isFull invokes this reduce(), otherwise invokes this maximize(). You don't need to invoke this method explicitly.

minimize()

Minimizes this. You don't normally need to invoke this method explicitly.

move()

Reference to pergola.Window.superClass.moveXY() method.

reduce()

Reduces this from full screen.

transformUpdate()

Invoked on mutations and transformations of this doc.transformable and/or of this container.

releaseTool(tool)

System. Dependency of toolInit. Releases specified exclusive (radio) tool button.

resizeInit(evt)

System. Returns an object for initialization of pergola.dragarea on window resize by button.

Note: window resize by frame is managed by pergola.Frame.

resizeN(evt)

System. Callback for window resize by frame.

resizeS(evt)

System. Callback for window resize by frame.

resizeE(evt)

System. Callback for window resize by frame.

resizeW(evt)

System. Callback for window resize by frame.

release()

This method is invoked after resize or move operations. The function is empty and it's designed to be overridden by instance methods for windows where layers may need to be repositioned. You don't normally need to invoke this method explicitly.

reopen()

Reopens a closed window.

restore()

Restores this minimized. You don't normally need to invoke this method explicitly.

toolInit(evt, tool)

System. Initializes activation or release of tool and launches the mechanism for tools management. The method and its cascade of dependencies is currently only used as a method of window instances. The tools are from the set of the window's collection. See pergola.ToolButton for its properties and methods.

terminate()

Removes this container from the DOM; releases services; deletes references; destroys this. The value of this name is available.

updateDependencies()

If this dependencies is overridden, this method must also be overridden. In the absence of the instance method this prototype method shows an alert with a reminder. You don't normally need to invoke this method explicitly.

(Mapping Utilities)

centerMap(c)

Mapping utility. c is an object defining the lon and lat properties; centers map at c.

getLocation(evt)

Mapping utility. Callback for this doc.transformable on mousemove event (registered upon selection of ToolButton instance with the location property set). This method is not invoked as a method of this. Invokes the pergola.Window.active class method, passing as parameter the call to this map.pointLocation() method, compensated to this doc.ctm and this map origin.

setLocation()

Mapping utility. Callback for this locLon and this locLat. Invokes this map.center() as a setter; invokes this status.center().

lonToRange(lon)

Mapping utility. If the lon longitude number is outside the -180–180 range, forces lon within the valid range with positive/negative compensation. Returns lon.

showMapFeatureLayer(o)

o is a geoJson layer (property of this map). Toggles on/off the layer's display.

mapZoom(z)

Mapping utility. z is a number representing a zoom value. Invokes this map.zoom() method as setter; invokes this mapZoomLevelMark(); invokes this status.zoom().

mapZoomLevelMark([z])

Mapping utility. z is a nuber representing a zoom value. If not specified, z is the current zoom level (returned by this map.zoom() method invoked as getter). Updates the check-mark in this "Zoom Level" menu of mapping application.

mapViewsToggle(view)

Mapping utility. view is a string specifying a "view" type ("Aerial", "Aerial With Labels", "Road"). Callback for this "Views" menu items.

mapGutterPositionOnScroll()

System. Updates graticule's gutter position on map transformations.

mapHelpToggleOn(evt)

Toggles on map help panel.

mapHelpToggleOff(evt)

Toggles off map help panel.

mapMaker()

Mapping utility. Assigns a polymaps.map object to this map (this type must be "map"). In the mapping application example a function that invokes this method is assigned to this contains. Note: this type must be set to "map", but the map property is not declared automatically. See the Maps chapter in the tutorial; see also “Building Web Applications with SVG” (Microsoft Press) for the case study.

instance

name

String. If not passed to the constructor, gets "Untitled_" + untitled.

id

String. The return value of this name.toXML(). This container ID. Used as prefix where other elements' IDs are attributed.

owner

If specified, designates the owner object.

tools

Array. Stores references to tools added using this addTools() method.

exclusiveTools

Array. Stores references to exclusive tools added using this addTools() method.

undoManager

Object. If this hasUndo, new pergola.Undo instance.

title

String. The title of this topBar. If this name was set at instantiation, this name, otherwise a friendly "Untitled" based string.

container

<svg> element.

doc

pergola.Doc instance.

frame

pergola.Frame instance.

status

If this hasStatus, pergola.StatusBar instance.

zoomLevel

If this type is "map", pergola.Input instance (statusbar field).

locLon

If this type is "map", pergola.Input instance (statusbar field).

locLat

If this type is "map", pergola.Input instance (statusbar field).

map

If this type is "map", polymaps.map object.

commands

<g> element.

topBar

pergola.WindowTopBar instance.

progress

pergola.Progress instance.

closeGroup

<g> element.

minimizeBtn

pergola.CommandButton instance.

full

pergola.CommandButton instance.

closeBtn

pergola.CommandButton instance.

toolBar

If this hasToolBar, pergola.ToolBar instance.

paneY

The computed y coordinate number for the window pane.

If specified, pergola.Menu instance.

If this menu, pergola.Menubar instance.

lensTool

If this hasZoomAndPan, pergola.ToolButton instance.

zoomDown

If this hasZoomAndPan, pergola.ToolButton instance.

zoomUp

If this hasZoomAndPan, pergola.ToolButton instance.

handTool

If this hasZoomAndPan, pergola.ToolButton instance.

itineraryTool

If this type is "map", pergola.ToolButton instance.

measureTool

If this type is "map", pergola.ToolButton instance.

mapHelp

If this type is "map", pergola.ToolButton instance.

If this type is "map", pergola.Panel instance.

background

pergola.Background instance.

hScrollBar

pergola.Scrollbar instance.

vScrollBar

pergola.Scrollbar instance.

resizeBtn

pergola.Button instance.

tab

If this hasCommands, pergola.WindowTab instance.

preview

If this hasCommands, pergola.Preview instance.

clone

<svg> element containing a clone of this doc transformable group.

contains

If specified, node or function.