Creating Source And Preview Controls; Creating Controls With Parameters - Adobe GoLive CS2 Programmer's Manual

Hide thumbs Also See for GoLive CS2:
Table of Contents

Advertisement

SDK Programmer's Guide
by defining an
the control and its property values. See

Creating source and preview controls

The source control is a complete JavaScript source editor, with line numbering, source completion, and
so on. The user can change preferred settings using the same preference controls or context menu as in
the other GoLive Source views.
The value of a source control is the content of the source code to display:
<jsxcontrol name="mySrc" type="source"
value="function test(){writeln('this is a test function');}"
posx="15" posy="15" width="225" height="140">
The preview control is a web browser display; it provides complete HTML rendering and navigation in a
UI control. You can render local HTML pages in a preview control in your window, and can access and
browse pages on the web. The control can also display content such as QuickTime and Macromedia®
Flash™ (SWF).
Use the
preview object functions
Use
setSource
Use
goForward

Creating controls with parameters

To initialize the numeric limits of the scrollbar , slider , and progressbar controls, enclose
<jsxparam> elements in the <jsxcontrol> element. For each of these, you must specify minimum and
maximum values, using parameters named min and max .
For example, to create a progressbar control:
<jsxcontrol name="ctrl1" type="progressbar" posx="15" posy="15"
width="225" height="16">
<jsxparam name="min" value="0">
<jsxparam name="max" value="10">
</jsxcontrol>
The direction (horizontal or vertical) of the control is given by its metrics. If the height value is greater
than the width value, it is vertical; otherwise it is horizontal.
For a scrollbar control, you must also initialize line (a delta value for when you click the marker to
move one line) and page (a delta for when you click the bar to move one page):
<jsxcontrol name="ctrl1" type="scrollbar" posx="15" posy="15"
width="225" height="16">
<jsxparam name="min" value="0">
<jsxparam name="max" value="1">
<jsxparam name="line" value="0.01">
<jsxparam name="page" value="0.1">
</jsxcontrol>
For a slider control, initialize steps (the number of tick marks):
<jsxcontrol name="ctrl1" type="slider" posx="15" posy="15"
width="225" height="16">
Adobe GoLive CS2 SDK
onChange
event handler; the exact action that triggers the event depends on the type of
to control the display:
or
to specify what to display.
setFile
,
, and
goBack
goHome
'Handling editing actions' on page
to navigate within the display history programmatically.
Windows and Controls
74.
69

Advertisement

Table of Contents
loading

Table of Contents