EDOBE XDOM TAKE 6 IR - PRODUCTSHEET Especificações Página 164

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 304
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 163
CHAPTER 4: User-Interface Tools Graphic customization objects 164
A custom element's onDraw event handler function is not called when the mouse enters or leaves the
screen region occupied by the element. If you need to force a drawing update in such cases, you must call
notify("onDraw") for the element, in response to a mouseOver or mouseout event for the element.
In the following example, the script forces a visual update for a
customButton element when the mouse
enters or leaves the button, by handling
mouseover or mouseout events for the custom button:
var res =
"""palette {
text:’Custom elements demo’,
properties:{ closeOnKey:’OSCmnd+W’, resizeable:true },
customBtn: Custom {
type:’customButton’,
text:’Redraw original image’
},
customImageViewer: Custom {
type:’customView’,
alignment:[’fill’,’fill’]
}
}""";
var w = new Window (res);
w.customBtn.onDraw = drawButton;
w.customBtn.addEventListener (’mouseover’, btnMouseEventHandler, false);
w.customBtn.addEventListener (’mouseout’, btnMouseEventHandler, false);
...
function btnMouseEventHandler (event) {
try {
// Redraw the button on mouseover and mouseout
event.target.notify("onDraw");
}
catch (e) {
customBoundedValue
Can be used to implement controls whose 'value' can vary within minimum
and maximum bounds, like the Progressbar
, Slider, and Scrollbar. Has the
same additional properties as those controls:
value
minvalue
maxvalue
shortcutKey
If the value property is changed, the control receives an onChange event
notification, followed by an onDraw
event notification, so the element can
redraw itself with the changed state.
customButton
Can be used to implement various types of button controls, like the Button,
IconButton
with text, Checkbox, and so on. Additional properties are:
image
shortcutKey
text
value
customView
Has an image property that allows a script to define an image to display.
If no onDraw
function is defined and the image property is set, the default
appearance is simply the specified image, rendered centered in the bounds of
the element.
Vista de página 163
1 2 ... 159 160 161 162 163 164 165 166 167 168 169 ... 303 304

Comentários a estes Manuais

Sem comentários