Detailed instructions for use are in the User's Guide.
[. . . ] Dreamweaver API Reference
Trademarks Add Life to the Web, Afterburner, Aftershock, Andromedia, Allaire, Animation PowerPack, Aria, Attain, Authorware, Authorware Star, Backstage, Bright Tiger, Clustercats, Cold Fusion, Contribute, Design in Motion, Director, Dream Templates, Dreamweaver, Drumbeat 2000, EDJE, EJIPT, Extreme 3D, Fireworks, Flash, Fontographer, FreeHand, Generator, HomeSite, JFusion, JRun, Kawa, Know Your Site, Knowledge Objects, Knowledge Stream, Knowledge Track, LikeMinds, Lingo, Live Effects, MacRecorder Logo and Design, Macromedia, Macromedia Action!, Macromedia Flash, Macromedia M Logo & Design, Macromedia Spectra, Macromedia xRes Logo and Design, MacroModel, Made with Macromedia, Made with Macromedia Logo and Design, MAGIC Logo and Design, Mediamaker, Movie Critic, Open Sesame!, Roundtrip HTML, Shockwave, Sitespring, SoundEdit, Titlemaker, UltraDev, Web Design 101, what the web can be, and Xtra are either registered or trademarks of Macromedia, Inc. and may be registered in the United States or in other jurisdictions including internationally. Other product names, logos, designs, titles, words or phrases mentioned within this publication may be trademarks, servicemarks, or tradenames of Macromedia, Inc. or other entities and may be registered in certain jurisdictions including internationally. [. . . ] 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
· The floaterName argument is the name of a floating panel. If floaterName does not match
one of the built-in panel names, Dreamweaver searches in the Configuration/Floaters folder for a file called floaterName. htm where floaterName is the name of a floating panel.
210
Chapter 12: Workspace
The floaterName values for built-in Dreamweaver panels are the strings to the right of the panel names in the following list:
Assets = "assets" Behaviors = "behaviors" Code inspector = "html" Components = "server components" CSS Styles = "css styles" Bindings = "data sources" Frames = "frames" History = "history" HTML Styles = "html styles" Insert bar = "objects" Layers = "layers" Library = "library" Link Checker Results = "linkchecker" Properties = "properties" Reference = "reference" Report Results = "reports" Search Results = "search" Server Behaviors = "server behaviors" Site = "site" Site Files = "site files" Site Map - "site map" Snippets = "snippets" Tag inspector = "tag inspector" Target Browser Check Results = "btc" Templates = "templates" Validation Results = "validation" 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.
Window functions
211
dreamweaver. getFocus()
Availability
Dreamweaver 4.
Description
This function determines what part of the application is currently in focus.
Arguments bAllowFloaters
· The bAllowFloaters argument is a Boolean value: true if you want the function to return
the name of the floating panel, if a floating panel has focus; false otherwise.
Returns
One of the following strings:
· · · · · ·
The "document" string if the document window is in focus The "site" string if the Site panel is in focus The "textView" string if the Text view is in focus The "html" string if the Code inspector is in focus The floaterName string, if bAllowFloaters is true and a floating panel has focus, where floaterName is "objects", "properties", "launcher", "library", "css styles", "html styles", "behaviors", "timelines", "layers", "frames", "templates", or "history" (Macintosh) The "none" string if neither the Site panel nor any document windows are open
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.
212
Chapter 12: Workspace
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
· The bMinimize argument is a Boolean value: true if windows should be minimized; false if
the minimized windows should be restored.
Returns
Nothing. dreamweaver. setActiveWindow()
Availability
Dreamweaver 3.
Description
This function activates the window that contains the specified document.
Arguments documentObject, {bActivateFrame}
· The documentObject argument is the object at the root of a document's DOM tree (the value
that the dreamweaver. getDocumentDOM() function returns).
· The bActivateFrame argument is optional, and is applicable only if documentObject is
inside a frameset. The bActivateFrame argument is a Boolean value: true activates the frame that contains the document as well as the window that contains the frameset; false otherwise.
Returns
Nothing.
Window functions
213
dreamweaver. setFloaterVisibility()
Availability
Dreamweaver 3.
Description
This function specifies whether to make a particular floating panel or inspector visible.
Arguments floaterName, bIsVisible
· The floaterName argument is the name of a floating panel. If floaterName does not match
one of the built-in panel names, Dreamweaver searches in the Configuration/Floaters folder for a file called floaterName. htm where floaterName is the name of a floating panel. If Dreamweaver cannot find a floating panel named floaterName, this function has no effect. The floaterName values for built-in Dreamweaver panels are the strings to the right of the panel names in the following list:
Assets = "assets" Behaviors = "behaviors" Code inspector = "html" Components = "server components" CSS Styles = "css styles" Bindings = "data sources" Frames = "frames" History = "history" HTML Styles = "html styles" Insert bar = "objects" Layers = "layers" Library = "library" Link Checker Results = "linkchecker" Properties = "properties" Reference = "reference" Report Results = "reports" Search Results = "search" Server Behaviors = "server behaviors" Site = "site" Site Files = "site files" Site Map = "site map" Snippets = "snippets"
214
Chapter 12: Workspace
Tag inspector = "tag inspector" Target Browser Check Results = "btc" Templates = "templates" Validation Results = "validation"
The bIsVisible argument is a Boolean value that indicates whether to make the floating panel visible.
Returns
Nothing. dreamweaver. setPrimaryView()
Availability
Dreamweaver 4.
Description
This function displays the specified view at the top of the document window.
Arguments viewString
· The viewString argument is the view to display at the top of the document window; it can be
one of the following values: "design" or "code".
Returns
Nothing. dreamweaver. setSnapDistance()
Availability
Dreamweaver 4.
Description
This function sets the snapping distance in pixels.
Arguments snapDistance
· The snapDistance argument is an integer that represents the snapping distance in pixels. Specify 0 to turn off the Snap feature.
Returns
Nothing.
Window functions
215
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).
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).
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.
216
Chapter 12: Workspace
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
· The floaterName argument is the name of the window. If the floating panel name is
reference,
the visible/invisible state of the Reference panel is updated by the user's selection in Code view. All other panels track the selection all the time, but the Reference panel tracks the selection in Code view only when the user invokes tracking.
Returns
Nothing. dreamweaver. updateReference()
Availability
Dreamweaver 4.
Description
This function updates the Reference floating panel. [. . . ] dreamweaver. snippetpalette. canEditSnippet()
Availability
Dreamweaver MX.
Description
Checks whether you can edit the currently selected item and returns either a true or false value so you can enable or disable menu items for editing.
Arguments
None.
Returns
A Boolean value: true if you can edit the currently selected item; false otherwise.
454
Chapter 19: Enablers
dreamweaver. snippetpalette. canInsert()
Availability
Dreamweaver MX.
Description
Checks whether you can insert or apply the selected element and returns either a true or false value so you can enable or disable menu items for inserting or applying.
Arguments
None.
Returns
A Boolean value: true if you can insert or apply the selected element; false otherwise. site. browseDocument()
Availability
Dreamweaver 4.
Description
Opens all selected documents in a browser window. It is the same as using the Preview in Browser command.
Arguments browserName
· The browserName argument is the name of a browser as defined in the Preview in Browser
preferences. If omitted, this argument defaults to the user's primary browser.
Returns
Nothing. [. . . ]