Initializing A Custom Element Box - Adobe GoLive CS2 Programmer's Manual

Hide thumbs Also See for GoLive CS2:
Table of Contents

Advertisement

SDK Programmer's Guide
You can provide event handlers to respond to various user-interaction events for your custom element:
Event
parseBox
drawBox
boxResized
inspectBox
control
interaction
events

Initializing a custom element box

GoLive initializes a box object in response to any of the following events:
The user drops an Objects palette icon onto a GoLive document window.
GoLive reads a document containing a custom HTML element defined by the <jsxelement> and
<jsxpaletteentry> elements.
The user switches to the Layout view from another view in the document window.
Adobe GoLive CS2 SDK
Triggering action
The document is
reparsed: for example,
box dropped on page,
containing document
is read, switch from
Layout to another
view
The window
containing the box
must be redrawn: for
example, box
dropped on page, box
resized, box selected
Box resized
Box selected
Inspector control
changed
Description
Register handler with the
The
object passed to the handler contains the
boxEvent
affected
object. It also contains the height and width, and
box
the reason for the event:
2: Box was repositioned
3: Custom element dropped from Objects palette or
pasted from clipboard.
The handler can initialize the box's appearance according to
the current property values.
Register handlers with the
GoLive passes handlers a
draw
Object. The handler can draw the visual representation
of the custom element. Use the
draw rectangles and ovals, or set color in the custom box, or
draw the graphics defined with
Register handlers with the
GoLive passes handlers a
new width, and new height. The handler can update the
height and width in the markup elements associated with the
box, and update the Inspector's height and width controls.
Called if the Inspector window is open. Register handlers with
the
object.
box
GoLive passes handlers an
contains the Inspector
window
target box. The handler can update the Inspector window.
Register handlers with the
GoLive passes handlers a
object which contains the location and details of the mouse
action that triggered the event.
The handler can make the appropriate change in the markup
for the custom element being inspected. Changing the
markup may in turn cause the
fire.
Custom Elements
object.
document
object.
box
object, which contains a
paintEvent
object to display text,
draw
tags in the custom box.
<img>
object.
box
object, which contains the
boxEvent
object, which
inspectEvent
object associated with the
object.
box
object, or a
UIEvent
mouseEvent
parseBox
or
drawBox
83
events to

Advertisement

Table of Contents
loading

Table of Contents