PERGOLA LOGO

System References

The properties listed here are references to system components and system layers.

pergola.background

Reference to the desktop background. See the pergola.Background class for the list of properties and methods.

pergola.colorpicker

Reference to the system color picker. See the pergola.Colorpicker class for the list of properties and methods. The color picker can be initialized by any object, designated as user.

pergola.container

Reference to HTML element when container is specified in the configuration file (HTML + SVG mode).

pergola.coordinates

Reference to the system's coordinates editing gadget. See the pergola.Coordinates class for the list of properties and methods. Use to show coordinates (or anything, like length, distance, etc.) at the pointer's coordinates in the user space.

pergola.contextMenus

Reference to system layer. Default parent node for custom context menus.

pergola.defs

Reference to <defs> element with id “pergola_defs”.

pergola.desktop

Reference to system layer. Although elements can be appended to this layer, all user objects should be appended to the pergola.user layer.

pergola.dialogs

Reference to system layer. This layer ranks high in the layers system, and it's where the dialogs are. Preemptive dialogs (with the preemptive property set) are placed in the next layer up. You never need to access this layer, unless you design your own dialog panel without using the pergola.Panel class.

pergola.doc

Reference to document.documentElement (standalone SVG) or outermost <svg> in HTML container.

pergola.dragarea

Reference to the system's drag area. Pergola creates an instance of the pergola.Dragarea class at runtime.

pergola.fileDialog

Reference to the system's file dialog. Pergola creates an instance of the pergola.Panel class for opening or saving a file, with lazy loading. The file dialog can be initialized through a menu or some other object, specifying the user object, the title string, the path URL, and the callback function properties.

Since the panel's file list needs to be updated on each use, invoke the pergola.getFiles() utility function (as a method of the object requiring the service by using the function's call() method), which sends a request, updates the file list, changes the title, and opens the initialized dialog.

The pergola.getFiles() function is referenced by the Class (superclass) getFiles() prototype method, and therefore for instances of classes inheriting from Class you don't need to use the function's call() method.

pergola.findDialog

Reference to the system's find panel. Pergola creates an instance of the pergola.Panel class for this purpose, with lazy loading. The find panel can be initialized by any object, designated as user, specifying the fn callback function.

To initialize the dialog invoke the pergola.find() utility function (as a method of the object requiring the service by using the function's call() method).

The panel's getData() instance method returns an object with these properties: value string representing the input; regexp regular expression; flags the regular expression flags as per panel's “Case Insensitive” checkbox; wholeWord boolean representing the state of the “Whole Word” checkbox. The suggested practice is to invoke this method as first statement of the callback function. Learn more in THE FIND DIALOG section of the Tutorial.

Reference to the system's menubar. Pergola creates an instance of the pergola.Menubar class at runtime if systemMenu is set to true in the config file.

pergola.notification

Reference to the system's notification dialog. Pergola creates an instance of the pergola.Panel class at runtime. Initial values can be overridden in the skins file (pergola.presentationAttributes.notification). To use the notification, invoke pergola.message().

pergola.preemptive

Reference to system layer. This is where the dialogs with the preemptive property set are appended.

pergola.rubberBox

Reference to the system's rubber band box. Pergola creates an instance of the pergola.RubberBox class at runtime.

pergola.systemComponents

Reference to system layer containing: debugger; dialogs; preemptive dialogs; quick tips; coordinates tip; context menus; drag area; taskbar. Do not append anything to this layer. The preferred layer for user objects is pergola.user.

pergola.tabsDock

Reference to the system's tabs dock (located on taskbar). Pergola creates an instance of the pergola.TabsDock class at runtime. The tabs are open windows' tabs. User tab docks can also be created.

pergola.taskbar

Reference to the system's taskbar. Pergola creates an instance of the pergola.Taskbar class at runtime. User taskbars can also be created.

pergola.user

Reference to system layer; default container for all classes and preferred container for user orphan objects and elements.

pergola.presentationAttributes

Object defining properties whose names correspond to the pergola classes. Each object property defines SVG paint, geometry, or other proprietary attributes. Paint and geometry attribute names use SVG vocabulary (e.g. x, width, "fill-opacity", etc.). Besides these, the object property all defines the common attributes "font-family" and "font-size" applied to the Class superclass and to the document, and the stroke attribute for the Class superclass. The text object property defines the fill, fillInverse, and shadow properties with values computed from theme luminosity.