The Toolbar Definition File - Adobe 38040334 - Dreamweaver CS3 User Manual

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

function getCurrentValue()
{
var title = "";
var dom = dw.getDocumentDOM();
if (dom)
title = dom.getTitle();
return title;
}
Until the user enters a title for the document, the
in the text box. After the user enters a title, the
it as the new document title.
To see the complete HTML file that contains the JavaScript functions for the Title text box, see the EditTitle.htm file
in the Toolbars/MM folder.
The MM folder is reserved for Adobe files. Create another folder inside the Toolbars folder, and place your JavaScript
code in that folder.

The toolbar definition file

A toolbar is simply a list of radio buttons, check buttons, edit boxes, and other toolbar items, optionally divided by
tags. Each toolbar item can be a reference to an item using the
separator
tag, or a complete toolbar item definition, for a check box or an edit box, for example, as described in
separator
"Toolbar item tags" on page 170.
Each toolbar definition file starts with the following declarations:
<?xml version="1.0" encoding="optional
<!DOCTYPE toolbarset SYSTEM "-//Macromedia//DWExtension toolbar 5.0">
If the encoding is omitted, Dreamweaver uses the default encoding of the operating system.
After the declarations, the file consists of a single
,
,
toolbar
itemref
separator
,
radiobutton
menubutton
is an abbreviated excerpt from the toolbars.xml file, illustrates the hierarchy of tags in the toolbar file. The example
substitutes ellipses (. . .) for the toolbar item attributes that are described in the following sections.
<?xml version="1.0"?>
<!DOCTYPE toolbarset SYSTEM "-//Macromedia//DWExtension toolbar 5.0">
<toolbarset>
<!-- main toolbar -->
<toolbar id="DW_Toolbar_Main" label="Document">
<radiobutton id="DW_CodeView" . . ./>
<radiobutton id="DW_SplitView" . . ./>
<radiobutton id="DW_DesignView" . . ./>
<separator/>
<checkbutton id="DW_LiveDebug" . . ./>
<checkbutton id="DW_LiveDataView" . . ./>
<separator/>
<editcontrol id="DW_SetTitle" . . ./>
<menubutton id="DW_FileTransfer" . . ./>
getTitle()
getTitle()
_
encoding"?>
toolbarset
,
, and
include
itemtype
,
,
,
dropdown
combobox
editcontrol
function returns Untitled Document, which appears
function returns that value, and Dreamweaver displays
itemref
tag, which contains any number of the following tags:
tags, where
is a
itemtype
, or
. The following example, which
colorpicker
DREAMWEAVER CS3
Extending Dreamweaver
tag, a separator using the
,
,
button
checkbutton
166

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents