< Day Day Up > |
Window functions handle operations that are related to the document window and the floating panels. The window functions show and hide floating panels, determine which part of the Document window has focus, and set the active document. For operations that are related specifically to the Site panel, see "Site functions" on page 760. NOTE Some of the functions in this section operate only on Windows. The description of a function indicates whether this is the case. dom.getFocus()Availability Dreamweaver 3. Description This function determines the part of the document that is currently in focus. Arguments None. Returns One of the following strings:
dom.getView()Availability Dreamweaver 4. Description This function determines which view is visible. Arguments None. Returns "design", "code", or "split", depending on the visible view. dom.getWindowTitle()Availability Dreamweaver 3. Description This function gets the title of the window that contains the document. Arguments None. Returns A string that contains the text that appears between the TITLE tags in the document, or nothing, if the document is not in an open window. dom.setView()Availability Dreamweaver 4. Description This function shows or hides the Design or Code view to produce a design-only, code-only, or split view. Arguments viewString
Returns Nothing. dreamweaver.bringAttentionToFloater()Availability Dreamweaver MX. Description Brings the specified panel or inspector to the front, and draws attention to the panel or inspector by making it flash, which is slightly different functionality than dw.toggleFloater(). Arguments floaterName
Returns Nothing. Example The following example opens and flashes the Assets panel: dw.bringAttentionToFloater("library"); dreamweaver.cascade()Availability Dreamweaver MX (Windows only), Dreamweaver 8 (added Macintosh support). Description Cascades the document windows, starting in the upper left corner and positioning each window below and slightly offset from the previous one. Arguments None. Returns Nothing. Example The following example cascades the open documents: dw.cascade() dreamweaver.getActiveWindow()Availability Dreamweaver 3. Description This function gets the document in the active window. Arguments None. Returns The document object that corresponds to the document in the active window; or, if the document is in a frame, the document object that corresponds to the frameset. dreamweaver.getDocumentList()Availability Dreamweaver 3. Description This function gets a list of all the open documents. Arguments None. Returns An array of document objects, each corresponding to an open Document window. If a document window contains a frameset, the document object refers to the frameset, not the contents of the frames. dreamweaver.getFloaterVisibility()Availability Dreamweaver 3. Description This function checks whether the specified panel or inspector is visible. Arguments floaterName
Returns A Boolean value: TRue if the floating panel is visible and in the front; false otherwise or if Dreamweaver cannot find a floating panel named floaterName. dreamweaver.getFocus()Availability Dreamweaver 4. Description This function determines what part of the application is currently in focus. Arguments bAllowFloaters
Returns One of the following strings:
dreamweaver.getPrimaryView()Availability Dreamweaver 4. Description This function determines which view is visible as the primary view in the front. Arguments None. Returns The "design" or "code" strings, depending on which view is visible or on the top in a split view. dreamweaver.getSnapDistance()Availability Dreamweaver 4. Description This function returns the snapping distance in pixels. Arguments None. Returns An integer that represents the snapping distance in pixels. The default is 10 pixels; 0 indicates that the Snap feature is off. dreamweaver.minimizeRestoreAll()Availability Dreamweaver 4. Description This function minimizes (reduces to an icon) or restores all windows in Dreamweaver. Arguments bMinimize
Returns Nothing. dreamweaver.setActiveWindow()Availability Dreamweaver 3. Description This function activates the window that contains the specified document. Arguments documentObject, {bActivateFrame}
Returns Nothing. dreamweaver.setFloaterVisibility()Availability Dreamweaver 3. Description This function specifies whether to make a particular floating panel or inspector visible. Arguments floaterName, bIsVisible
Returns Nothing. dreamweaver.setPrimaryView()Availability Dreamweaver 4. Description This function displays the specified view at the top of the document window. Arguments viewString
Returns Nothing. dreamweaver.setSnapDistance()Availability Dreamweaver 4. Description This function sets the snapping distance in pixels. Arguments snapDistance
Returns Nothing. dreamweaver.showProperties()Availability Dreamweaver 3. Description This function makes the Property inspector visible and gives it focus. Arguments None. Returns Nothing. dreamweaver.tileHorizontally()Availability Dreamweaver MX (Windows only), Dreamweaver 8 (added Macintosh support). Description Tiles the document windows horizontally, positioning each window next to another one without overlapping the documents. This process is similar to splitting the workspace vertically. Arguments None. Returns Nothing. Example The following example tiles the open documents horizontally: dw.tileHorizontally() dreamweaver.tileVertically()Availability Dreamweaver MX (Windows only), Dreamweaver 8 (added Macintosh support). Description Tiles the document window vertically, positioning one document window behind the other without overlapping documents. This is similar to splitting the workspace horizontally. Arguments None. Returns Nothing. Example The following example tiles the open documents vertically: dw.tileVertically() dreamweaver.toggleFloater()Availability Dreamweaver 3. Description This function shows, hides, or brings to the front the specified panel or inspector. NOTE This function is meaningful only in the menus.xml file. To show, bring forward, or hide a floating panel, use dw.setFloaterVisibility(). Arguments floaterName
Returns Nothing. dreamweaver.updateReference()Availability Dreamweaver 4. Description This function updates the Reference floating panel. If the Reference floating panel is not visible, dw.updateReference() makes it visible and then updates it. Arguments None. Returns Nothing. |
< Day Day Up > |