1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en" lang=
"en">
5 <meta http-equiv=
"content-type" content=
"text/html; charset=utf-8" />
6 <meta name=
"generator" content=
"JsDoc Toolkit" />
8 <title>JsDoc Reference - pwlib.tools.hand
</title>
10 <style type=
"text/css">
14 font: 12px "Lucida Grande", Tahoma
, Arial
, Helvetica
, sans-serif
;
21 background-color: #ccc;
36 border-top: 1px solid
#7F8FB1;
44 border: 1px dashed
#ccc;
54 background-color: #F3F3F3;
66 list-style-type: none
;
69 font-family: arial
, sans-serif
;
80 .summaryTable { width: 100%; }
88 h2
{ font-size: 110%; }
89 caption
, div
.sectionTitle
91 background-color: #7F8FB1;
95 padding: 2px 6px 2px 6px;
96 border: 1px #7F8FB1 solid
;
99 div
.sectionTitle
{ margin-bottom: 8px; }
100 .summaryTable thead { display: none
; }
106 border-bottom: 1px #7F8FB1 solid
;
107 border-right: 1px #7F8FB1 solid
;
110 /*col#summaryAttributes {}*/
111 .summaryTable td
.attributes
113 border-left: 1px #7F8FB1 solid
;
118 td
.attributes
, .fixedFont
122 font-family: "Courier New",Courier
,monospace
;
126 .summaryTable td
.nameDescription
133 .summaryTable td
.nameDescription
, .description
140 .summaryTable { margin-bottom: 8px; }
153 .detailList dt { margin-left: 20px; }
162 .light
, td
.attributes
, .light
a:link
, .light
a:visited
177 <!-- ============================== header ================================= -->
178 <!-- begin static/header.html -->
181 <!-- end static/header.html -->
183 <!-- ============================== classes index ============================ -->
185 <!-- begin publish.classesIndex -->
186 <div align=
"center"><a href=
"../index.html">Class Index
</a>
187 |
<a href=
"../files.html">File Index
</a></div>
190 <ul class=
"classList">
192 <li><i><a href=
"../symbols/_global_.html">_global_
</a></i></li>
194 <li><a href=
"../symbols/PaintWeb.html">PaintWeb
</a></li>
196 <li><a href=
"../symbols/pwlib.html">pwlib
</a></li>
198 <li><a href=
"../symbols/pwlib.appEvent.html">pwlib.appEvent
</a></li>
200 <li><a href=
"../symbols/pwlib.appEvent.appDestroy.html">pwlib.appEvent.appDestroy
</a></li>
202 <li><a href=
"../symbols/pwlib.appEvent.appInit.html">pwlib.appEvent.appInit
</a></li>
204 <li><a href=
"../symbols/pwlib.appEvent.canvasSizeChange.html">pwlib.appEvent.canvasSizeChange
</a></li>
206 <li><a href=
"../symbols/pwlib.appEvent.clipboardUpdate.html">pwlib.appEvent.clipboardUpdate
</a></li>
208 <li><a href=
"../symbols/pwlib.appEvent.commandRegister.html">pwlib.appEvent.commandRegister
</a></li>
210 <li><a href=
"../symbols/pwlib.appEvent.commandUnregister.html">pwlib.appEvent.commandUnregister
</a></li>
212 <li><a href=
"../symbols/pwlib.appEvent.configChange.html">pwlib.appEvent.configChange
</a></li>
214 <li><a href=
"../symbols/pwlib.appEvent.extensionRegister.html">pwlib.appEvent.extensionRegister
</a></li>
216 <li><a href=
"../symbols/pwlib.appEvent.extensionUnregister.html">pwlib.appEvent.extensionUnregister
</a></li>
218 <li><a href=
"../symbols/pwlib.appEvent.guiFloatingPanelStateChange.html">pwlib.appEvent.guiFloatingPanelStateChange
</a></li>
220 <li><a href=
"../symbols/pwlib.appEvent.guiHide.html">pwlib.appEvent.guiHide
</a></li>
222 <li><a href=
"../symbols/pwlib.appEvent.guiResizeEnd.html">pwlib.appEvent.guiResizeEnd
</a></li>
224 <li><a href=
"../symbols/pwlib.appEvent.guiResizeStart.html">pwlib.appEvent.guiResizeStart
</a></li>
226 <li><a href=
"../symbols/pwlib.appEvent.guiShow.html">pwlib.appEvent.guiShow
</a></li>
228 <li><a href=
"../symbols/pwlib.appEvent.guiTabActivate.html">pwlib.appEvent.guiTabActivate
</a></li>
230 <li><a href=
"../symbols/pwlib.appEvent.historyUpdate.html">pwlib.appEvent.historyUpdate
</a></li>
232 <li><a href=
"../symbols/pwlib.appEvent.imageCrop.html">pwlib.appEvent.imageCrop
</a></li>
234 <li><a href=
"../symbols/pwlib.appEvent.imageSave.html">pwlib.appEvent.imageSave
</a></li>
236 <li><a href=
"../symbols/pwlib.appEvent.imageSaveResult.html">pwlib.appEvent.imageSaveResult
</a></li>
238 <li><a href=
"../symbols/pwlib.appEvent.imageSizeChange.html">pwlib.appEvent.imageSizeChange
</a></li>
240 <li><a href=
"../symbols/pwlib.appEvent.imageZoom.html">pwlib.appEvent.imageZoom
</a></li>
242 <li><a href=
"../symbols/pwlib.appEvent.selectionChange.html">pwlib.appEvent.selectionChange
</a></li>
244 <li><a href=
"../symbols/pwlib.appEvent.shadowAllow.html">pwlib.appEvent.shadowAllow
</a></li>
246 <li><a href=
"../symbols/pwlib.appEvent.toolActivate.html">pwlib.appEvent.toolActivate
</a></li>
248 <li><a href=
"../symbols/pwlib.appEvent.toolPreactivate.html">pwlib.appEvent.toolPreactivate
</a></li>
250 <li><a href=
"../symbols/pwlib.appEvent.toolRegister.html">pwlib.appEvent.toolRegister
</a></li>
252 <li><a href=
"../symbols/pwlib.appEvent.toolUnregister.html">pwlib.appEvent.toolUnregister
</a></li>
254 <li><a href=
"../symbols/pwlib.appEvents.html">pwlib.appEvents
</a></li>
256 <li><a href=
"../symbols/pwlib.browser.html">pwlib.browser
</a></li>
258 <li><a href=
"../symbols/pwlib.dom.html">pwlib.dom
</a></li>
260 <li><a href=
"../symbols/pwlib.dom.KeyboardEventListener.html">pwlib.dom.KeyboardEventListener
</a></li>
262 <li><a href=
"../symbols/pwlib.dom.keyCodes.html">pwlib.dom.keyCodes
</a></li>
264 <li><a href=
"../symbols/pwlib.dom.keyCodes_fixes.html">pwlib.dom.keyCodes_fixes
</a></li>
266 <li><a href=
"../symbols/pwlib.dom.keyCodes_Safari2.html">pwlib.dom.keyCodes_Safari2
</a></li>
268 <li><a href=
"../symbols/pwlib.dom.keyNames.html">pwlib.dom.keyNames
</a></li>
270 <li><a href=
"../symbols/pwlib.extensions.html">pwlib.extensions
</a></li>
272 <li><a href=
"../symbols/pwlib.extensions.colormixer.html">pwlib.extensions.colormixer
</a></li>
274 <li><a href=
"../symbols/pwlib.extensions.moodle.html">pwlib.extensions.moodle
</a></li>
276 <li><a href=
"../symbols/pwlib.extensions.mousekeys.html">pwlib.extensions.mousekeys
</a></li>
278 <li><a href=
"../symbols/pwlib.fileCache.html">pwlib.fileCache
</a></li>
280 <li><a href=
"../symbols/pwlib.gui.html">pwlib.gui
</a></li>
282 <li><a href=
"../symbols/pwlib.guiColorInput.html">pwlib.guiColorInput
</a></li>
284 <li><a href=
"../symbols/pwlib.guiFloatingPanel.html">pwlib.guiFloatingPanel
</a></li>
286 <li><a href=
"../symbols/pwlib.guiResizer.html">pwlib.guiResizer
</a></li>
288 <li><a href=
"../symbols/pwlib.guiTabPanel.html">pwlib.guiTabPanel
</a></li>
290 <li><a href=
"../symbols/pwlib.tools.html">pwlib.tools
</a></li>
292 <li><a href=
"../symbols/pwlib.tools.bcurve.html">pwlib.tools.bcurve
</a></li>
294 <li><a href=
"../symbols/pwlib.tools.cpicker.html">pwlib.tools.cpicker
</a></li>
296 <li><a href=
"../symbols/pwlib.tools.ellipse.html">pwlib.tools.ellipse
</a></li>
298 <li><a href=
"../symbols/pwlib.tools.eraser.html">pwlib.tools.eraser
</a></li>
300 <li><a href=
"../symbols/pwlib.tools.hand.html">pwlib.tools.hand
</a></li>
302 <li><a href=
"../symbols/pwlib.tools.insertimg.html">pwlib.tools.insertimg
</a></li>
304 <li><a href=
"../symbols/pwlib.tools.line.html">pwlib.tools.line
</a></li>
306 <li><a href=
"../symbols/pwlib.tools.pencil.html">pwlib.tools.pencil
</a></li>
308 <li><a href=
"../symbols/pwlib.tools.polygon.html">pwlib.tools.polygon
</a></li>
310 <li><a href=
"../symbols/pwlib.tools.rectangle.html">pwlib.tools.rectangle
</a></li>
312 <li><a href=
"../symbols/pwlib.tools.selection.html">pwlib.tools.selection
</a></li>
314 <li><a href=
"../symbols/pwlib.tools.text.html">pwlib.tools.text
</a></li>
318 <!-- end publish.classesIndex -->
322 <!-- ============================== class title ============================ -->
323 <h1 class=
"classTitle">
325 Class pwlib.tools.hand
328 <!-- ============================== class summary ========================== -->
329 <p class=
"description">
332 The hand tool. This tool allows the user to drag the image canvas
336 <br /><i>Defined in:
</i> <a href=
"../symbols/src/src_tools_hand.js.html">hand.js
</a>.
340 <!-- ============================== constructor summary ==================== -->
342 <table class=
"summaryTable" cellspacing=
"0" summary=
"A summary of the constructor documented in the class pwlib.tools.hand.">
343 <caption>Class Summary
</caption>
346 <th scope=
"col">Constructor Attributes
</th>
347 <th scope=
"col">Constructor Name and Description
</th>
352 <td class=
"attributes"> </td>
353 <td class=
"nameDescription" >
354 <div class=
"fixedFont">
355 <b><a href=
"../symbols/pwlib.tools.hand.html#constructor">pwlib.tools.hand
</a></b>(app)
357 <div class=
"description"></div>
364 <!-- ============================== properties summary ===================== -->
368 <table class=
"summaryTable" cellspacing=
"0" summary=
"A summary of the fields documented in the class pwlib.tools.hand.">
369 <caption>Field Summary
</caption>
372 <th scope=
"col">Field Attributes
</th>
373 <th scope=
"col">Field Name and Description
</th>
379 <td class=
"attributes"><private
> <inner
> </td>
380 <td class=
"nameDescription">
381 <div class=
"fixedFont">
382 <b><a href=
"../symbols/pwlib.tools.hand.html#-needsScroll">needsScroll
</a></b>
384 <div class=
"description">Tells if the viewport needs to be scrolled.
</div>
389 <td class=
"attributes"><private
> </td>
390 <td class=
"nameDescription">
391 <div class=
"fixedFont">
392 <b><a href=
"../symbols/pwlib.tools.hand.html#prevTool">prevTool
</a></b>
394 <div class=
"description">Holds the previous tool ID.
</div>
399 <td class=
"attributes"><private
> <inner
> </td>
400 <td class=
"nameDescription">
401 <div class=
"fixedFont">
402 <b><a href=
"../symbols/pwlib.tools.hand.html#-timer">timer
</a></b>
404 <div class=
"description">The interval ID used for invoking the viewport drag operation every few
416 <!-- ============================== methods summary ======================== -->
420 <table class=
"summaryTable" cellspacing=
"0" summary=
"A summary of the methods documented in the class pwlib.tools.hand.">
421 <caption>Method Summary
</caption>
424 <th scope=
"col">Method Attributes
</th>
425 <th scope=
"col">Method Name and Description
</th>
431 <td class=
"attributes"> </td>
432 <td class=
"nameDescription">
433 <div class=
"fixedFont"><b><a href=
"../symbols/pwlib.tools.hand.html#activate">activate
</a></b>()
435 <div class=
"description">Tool activation event handler.
</div>
440 <td class=
"attributes"> </td>
441 <td class=
"nameDescription">
442 <div class=
"fixedFont"><b><a href=
"../symbols/pwlib.tools.hand.html#deactivate">deactivate
</a></b>(ev)
444 <div class=
"description">Tool deactivation event handler.
</div>
449 <td class=
"attributes"><inner
> </td>
450 <td class=
"nameDescription">
451 <div class=
"fixedFont"><b><a href=
"../symbols/pwlib.tools.hand.html#-ev_mousemove">ev_mousemove
</a></b>(ev)
453 <div class=
"description">The
<code>mousemove
</code> event handler.
</div>
458 <td class=
"attributes"><inner
> </td>
459 <td class=
"nameDescription">
460 <div class=
"fixedFont"><b><a href=
"../symbols/pwlib.tools.hand.html#-ev_mouseup">ev_mouseup
</a></b>(ev)
462 <div class=
"description">The
<code>mouseup
</code> event handler.
</div>
467 <td class=
"attributes"> </td>
468 <td class=
"nameDescription">
469 <div class=
"fixedFont"><b><a href=
"../symbols/pwlib.tools.hand.html#keydown">keydown
</a></b>(ev)
471 <div class=
"description">Allows the user to press
<kbd>Escape
</kbd> to stop dragging the canvas, and
472 to return to the previous tool.
</div>
477 <td class=
"attributes"> </td>
478 <td class=
"nameDescription">
479 <div class=
"fixedFont"><b><a href=
"../symbols/pwlib.tools.hand.html#mousedown">mousedown
</a></b>(ev)
481 <div class=
"description">Initialize the canvas drag.
</div>
486 <td class=
"attributes"> </td>
487 <td class=
"nameDescription">
488 <div class=
"fixedFont"><b><a href=
"../symbols/pwlib.tools.hand.html#preActivate">preActivate
</a></b>()
490 <div class=
"description">Tool preactivation event handler.
</div>
495 <td class=
"attributes"><inner
> </td>
496 <td class=
"nameDescription">
497 <div class=
"fixedFont"><b><a href=
"../symbols/pwlib.tools.hand.html#-viewportScroll">viewportScroll
</a></b>()
499 <div class=
"description">Perform the canvas drag operation.
</div>
509 <!-- ============================== events summary ======================== -->
512 <!-- ============================== constructor details ==================== -->
514 <div class=
"details"><a name=
"constructor"> </a>
515 <div class=
"sectionTitle">
519 <div class=
"fixedFont">
520 <b>pwlib.tools.hand
</b>(app)
523 <div class=
"description">
532 <dl class=
"detailList">
533 <dt class=
"heading">Parameters:
</dt>
536 <span class=
"light fixedFont">{
<a href=
"../symbols/PaintWeb.html">PaintWeb
</a>}
</span> <b>app
</b>
539 <dd>Reference to the main paint application object.
</dd>
553 <!-- ============================== field details ========================== -->
555 <div class=
"sectionTitle">
559 <a name=
"-needsScroll"> </a>
560 <div class=
"fixedFont"><private
> <inner
>
562 <span class=
"light">{Boolean}
</span>
566 <div class=
"description">
567 Tells if the viewport needs to be scrolled.
578 <dl class=
"detailList">
579 <dt class=
"heading">Default Value:
</dt>
588 <a name=
"prevTool"> </a>
589 <div class=
"fixedFont"><private
>
591 <span class=
"light">{String}
</span>
595 <div class=
"description">
596 Holds the previous tool ID.
610 <a name=
"-timer"> </a>
611 <div class=
"fixedFont"><private
> <inner
>
617 <div class=
"description">
618 The interval ID used for invoking the viewport drag operation every few
629 <dl class=
"detailList">
630 <dt class=
"heading">See:
</dt>
632 <dd>PaintWeb.config.toolDrawDelay
</dd>
642 <!-- ============================== method details ========================= -->
644 <div class=
"sectionTitle">
648 <a name=
"activate"> </a>
649 <div class=
"fixedFont">
655 <div class=
"description">
656 Tool activation event handler.
673 <a name=
"deactivate"> </a>
674 <div class=
"fixedFont">
677 <b>deactivate
</b>(ev)
680 <div class=
"description">
681 Tool deactivation event handler.
689 <dl class=
"detailList">
690 <dt class=
"heading">Parameters:
</dt>
709 <a name=
"-ev_mousemove"> </a>
710 <div class=
"fixedFont"><inner
>
713 <b>ev_mousemove
</b>(ev)
716 <div class=
"description">
717 The
<code>mousemove
</code> event handler. This simply stores the current
726 <dl class=
"detailList">
727 <dt class=
"heading">Parameters:
</dt>
730 <span class=
"light fixedFont">{Event}
</span> <b>ev
</b>
733 <dd>The DOM Event object.
</dd>
746 <a name=
"-ev_mouseup"> </a>
747 <div class=
"fixedFont"><inner
>
750 <b>ev_mouseup
</b>(ev)
753 <div class=
"description">
754 The
<code>mouseup
</code> event handler.
762 <dl class=
"detailList">
763 <dt class=
"heading">Parameters:
</dt>
782 <a name=
"keydown"> </a>
783 <div class=
"fixedFont">
785 <span class=
"light">{Boolean}
</span>
789 <div class=
"description">
790 Allows the user to press
<kbd>Escape
</kbd> to stop dragging the canvas, and
791 to return to the previous tool.
799 <dl class=
"detailList">
800 <dt class=
"heading">Parameters:
</dt>
803 <span class=
"light fixedFont">{Event}
</span> <b>ev
</b>
806 <dd>The DOM Event object.
</dd>
814 <dl class=
"detailList">
815 <dt class=
"heading">Returns:
</dt>
817 <dd><span class=
"light fixedFont">{Boolean}
</span> True if the key was recognized, or false if not.
</dd>
826 <a name=
"mousedown"> </a>
827 <div class=
"fixedFont">
833 <div class=
"description">
834 Initialize the canvas drag.
842 <dl class=
"detailList">
843 <dt class=
"heading">Parameters:
</dt>
846 <span class=
"light fixedFont">{Event}
</span> <b>ev
</b>
849 <dd>The DOM event object.
</dd>
862 <a name=
"preActivate"> </a>
863 <div class=
"fixedFont">
865 <span class=
"light">{Boolean}
</span>
869 <div class=
"description">
870 Tool preactivation event handler.
882 <dl class=
"detailList">
883 <dt class=
"heading">Returns:
</dt>
885 <dd><span class=
"light fixedFont">{Boolean}
</span> True if the tool can become active, or false if not.
</dd>
894 <a name=
"-viewportScroll"> </a>
895 <div class=
"fixedFont"><inner
>
898 <b>viewportScroll
</b>()
901 <div class=
"description">
902 Perform the canvas drag operation. This function is called every few
905 <p>Press
<kbd>Escape
</kbd> to stop dragging and to get back to the previous
925 <!-- ============================== event details ========================= -->
932 <!-- ============================== footer ================================= -->
933 <div class=
"fineprint" style=
"clear:both">
935 Documentation generated by
<a href=
"http://code.google.com/p/jsdoc-toolkit/" target=
"_blank">JsDoc Toolkit
</a> 2.3.0 on Mon Jul
27 2009 14:
56:
59 GMT+
0300 (EEST)