rsence 2.0.0.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/INSTALL.rdoc +295 -0
- data/LICENSE +622 -0
- data/README.rdoc +24 -0
- data/VERSION +1 -0
- data/bin/build_client.rb +254 -0
- data/bin/help +6 -0
- data/bin/launch.rb +120 -0
- data/bin/rdoc.sh +2 -0
- data/bin/restart +6 -0
- data/bin/rsence +120 -0
- data/bin/run +6 -0
- data/bin/run.rb +6 -0
- data/bin/save +6 -0
- data/bin/start +6 -0
- data/bin/status +6 -0
- data/bin/stop +6 -0
- data/conf/config.ru +5 -0
- data/conf/default_conf.yaml +337 -0
- data/conf/default_strings.yaml +77 -0
- data/conf/local_conf.yaml +14 -0
- data/conf/unicorn.conf +78 -0
- data/js/comm/comm/autosync/autosync.js +18 -0
- data/js/comm/comm/autosync/js.inc +0 -0
- data/js/comm/comm/comm.js +195 -0
- data/js/comm/comm/js.inc +0 -0
- data/js/comm/comm/queue/js.inc +0 -0
- data/js/comm/comm/queue/queue.js +183 -0
- data/js/comm/comm/session/js.inc +0 -0
- data/js/comm/comm/session/session.js +51 -0
- data/js/comm/comm/sessionwatcher/js.inc +0 -0
- data/js/comm/comm/sessionwatcher/sessionwatcher.js +43 -0
- data/js/comm/comm/transporter/js.inc +0 -0
- data/js/comm/comm/transporter/transporter.js +257 -0
- data/js/comm/comm/urlresponder/js.inc +0 -0
- data/js/comm/comm/urlresponder/urlresponder.js +148 -0
- data/js/comm/comm/values/js.inc +0 -0
- data/js/comm/comm/values/values.js +432 -0
- data/js/comm/jsloader/js.inc +0 -0
- data/js/comm/jsloader/jsloader.js +114 -0
- data/js/comm/reloadapp/js.inc +0 -0
- data/js/comm/reloadapp/reloadapp.js +150 -0
- data/js/comm/reloadapp/themes/default/reloadapp_warning-ie6.gif +0 -0
- data/js/comm/reloadapp/themes/default/reloadapp_warning.png +0 -0
- data/js/comm/sha/js.inc +0 -0
- data/js/comm/sha/sha.js +432 -0
- data/js/comm/values/value/js.inc +0 -0
- data/js/comm/values/value/value.js +182 -0
- data/js/comm/values/valuematrix/js.inc +0 -0
- data/js/comm/values/valuematrix/valuematrix.js +138 -0
- data/js/controls/button/button.js +57 -0
- data/js/controls/button/js.inc +0 -0
- data/js/controls/button/themes/bright/button.css +89 -0
- data/js/controls/button/themes/bright/button.html +7 -0
- data/js/controls/button/themes/bright/button_parts1-ie6.gif +0 -0
- data/js/controls/button/themes/bright/button_parts1.png +0 -0
- data/js/controls/button/themes/default/button.css +89 -0
- data/js/controls/button/themes/default/button.html +7 -0
- data/js/controls/button/themes/default/button_parts1-ie6.gif +0 -0
- data/js/controls/button/themes/default/button_parts1.png +0 -0
- data/js/controls/checkbox/checkbox.js +47 -0
- data/js/controls/checkbox/js.inc +0 -0
- data/js/controls/checkbox/themes/default/checkbox.css +69 -0
- data/js/controls/checkbox/themes/default/checkbox.html +5 -0
- data/js/controls/checkbox/themes/default/checkbox_parts1-ie6.gif +0 -0
- data/js/controls/checkbox/themes/default/checkbox_parts1.png +0 -0
- data/js/controls/datetime/calendar/calendar.js +197 -0
- data/js/controls/datetime/calendar/js.inc +0 -0
- data/js/controls/datetime/calendar/themes/default/calendar.css +108 -0
- data/js/controls/datetime/calendar/themes/default/calendar.html +9 -0
- data/js/controls/datetime/calendar/themes/default/calendar_arrows-ie6.gif +0 -0
- data/js/controls/datetime/calendar/themes/default/calendar_arrows.png +0 -0
- data/js/controls/datetime/datetimevalue/datetimevalue.js +246 -0
- data/js/controls/datetime/datetimevalue/js.inc +0 -0
- data/js/controls/datetime/timesheet/js.inc +0 -0
- data/js/controls/datetime/timesheet/themes/default/timesheet.css +30 -0
- data/js/controls/datetime/timesheet/themes/default/timesheet.html +2 -0
- data/js/controls/datetime/timesheet/timesheet.js +182 -0
- data/js/controls/datetime/timesheet_item/js.inc +0 -0
- data/js/controls/datetime/timesheet_item/themes/default/timesheet_item.css +42 -0
- data/js/controls/datetime/timesheet_item/themes/default/timesheet_item.html +8 -0
- data/js/controls/datetime/timesheet_item/timesheet_item.js +247 -0
- data/js/controls/datetime/timesheet_item_edit/js.inc +0 -0
- data/js/controls/datetime/timesheet_item_edit/timesheet_item_edit.js +274 -0
- data/js/controls/dialogs/alert_sheet/alert_sheet.js +62 -0
- data/js/controls/dialogs/alert_sheet/js.inc +0 -0
- data/js/controls/dialogs/confirm_sheet/confirm_sheet.js +36 -0
- data/js/controls/dialogs/confirm_sheet/js.inc +0 -0
- data/js/controls/dialogs/sheet/js.inc +0 -0
- data/js/controls/dialogs/sheet/sheet.js +83 -0
- data/js/controls/dialogs/sheet/themes/default/sheet.css +64 -0
- data/js/controls/dialogs/sheet/themes/default/sheet.html +14 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_bg-ie6.gif +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_bg.png +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_dim-ie6.gif +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_dim.png +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_parts1-ie6.gif +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_parts1.png +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_parts2-ie6.gif +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_parts2.png +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_warning-ie6.gif +0 -0
- data/js/controls/dialogs/sheet/themes/default/sheet_warning.png +0 -0
- data/js/controls/imageview/imageview.js +108 -0
- data/js/controls/imageview/js.inc +0 -0
- data/js/controls/imageview/themes/default/blank.gif +0 -0
- data/js/controls/lists/checkboxlist/checkboxlist.js +170 -0
- data/js/controls/lists/checkboxlist/js.inc +0 -0
- data/js/controls/lists/listitems/js.inc +0 -0
- data/js/controls/lists/listitems/listitems.js +65 -0
- data/js/controls/lists/radiobuttonlist/js.inc +0 -0
- data/js/controls/lists/radiobuttonlist/radiobuttonlist.js +126 -0
- data/js/controls/passwordcontrol/js.inc +0 -0
- data/js/controls/passwordcontrol/passwordcontrol.js +22 -0
- data/js/controls/passwordcontrol/themes/default/passwordcontrol.css +0 -0
- data/js/controls/passwordcontrol/themes/default/passwordcontrol.html +18 -0
- data/js/controls/progress/progressbar/js.inc +0 -0
- data/js/controls/progress/progressbar/progressbar.js +36 -0
- data/js/controls/progress/progressbar/themes/default/progressbar.css +16 -0
- data/js/controls/progress/progressbar/themes/default/progressbar.html +2 -0
- data/js/controls/progress/progressindicator/js.inc +0 -0
- data/js/controls/progress/progressindicator/progressindicator.js +43 -0
- data/js/controls/radiobutton/js.inc +0 -0
- data/js/controls/radiobutton/radiobutton.js +41 -0
- data/js/controls/radiobutton/themes/default/radiobutton.css +69 -0
- data/js/controls/radiobutton/themes/default/radiobutton.html +5 -0
- data/js/controls/radiobutton/themes/default/radiobutton_parts1-ie6.gif +0 -0
- data/js/controls/radiobutton/themes/default/radiobutton_parts1.png +0 -0
- data/js/controls/sliders/slider/js.inc +0 -0
- data/js/controls/sliders/slider/slider.js +356 -0
- data/js/controls/sliders/slider/themes/default/hslider_tracks-ie6.gif +0 -0
- data/js/controls/sliders/slider/themes/default/hslider_tracks.png +0 -0
- data/js/controls/sliders/slider/themes/default/slider.css +108 -0
- data/js/controls/sliders/slider/themes/default/slider.html +5 -0
- data/js/controls/sliders/slider/themes/default/slider_thumbs-ie6.gif +0 -0
- data/js/controls/sliders/slider/themes/default/slider_thumbs.png +0 -0
- data/js/controls/sliders/vslider/js.inc +0 -0
- data/js/controls/sliders/vslider/themes/default/vslider.css +52 -0
- data/js/controls/sliders/vslider/themes/default/vslider.html +5 -0
- data/js/controls/sliders/vslider/themes/default/vslider_tracks-ie6.gif +0 -0
- data/js/controls/sliders/vslider/themes/default/vslider_tracks.png +0 -0
- data/js/controls/sliders/vslider/vslider.js +40 -0
- data/js/controls/stepper/js.inc +0 -0
- data/js/controls/stepper/stepper.js +212 -0
- data/js/controls/stepper/themes/default/stepper-ie6.gif +0 -0
- data/js/controls/stepper/themes/default/stepper.css +14 -0
- data/js/controls/stepper/themes/default/stepper.html +2 -0
- data/js/controls/stepper/themes/default/stepper.png +0 -0
- data/js/controls/stringview/js.inc +0 -0
- data/js/controls/stringview/stringview.js +49 -0
- data/js/controls/stringview/themes/default/stringview.css +8 -0
- data/js/controls/stringview/themes/default/stringview.html +1 -0
- data/js/controls/tab/js.inc +0 -0
- data/js/controls/tab/tab.js +276 -0
- data/js/controls/tab/themes/bright/tab.css +76 -0
- data/js/controls/tab/themes/bright/tab.html +6 -0
- data/js/controls/tab/themes/bright/tab_bg_color-ie6.gif +0 -0
- data/js/controls/tab/themes/bright/tab_bg_color.png +0 -0
- data/js/controls/tab/themes/bright/tab_border_pattern-ie6.gif +0 -0
- data/js/controls/tab/themes/bright/tab_border_pattern.png +0 -0
- data/js/controls/tab/themes/bright/tab_parts1-ie6.gif +0 -0
- data/js/controls/tab/themes/bright/tab_parts1.png +0 -0
- data/js/controls/tab/themes/default/tab.css +77 -0
- data/js/controls/tab/themes/default/tab.html +6 -0
- data/js/controls/tab/themes/default/tab_bg_color-ie6.gif +0 -0
- data/js/controls/tab/themes/default/tab_bg_color.png +0 -0
- data/js/controls/tab/themes/default/tab_border_pattern-ie6.gif +0 -0
- data/js/controls/tab/themes/default/tab_border_pattern.png +0 -0
- data/js/controls/tab/themes/default/tab_parts1-ie6.gif +0 -0
- data/js/controls/tab/themes/default/tab_parts1.png +0 -0
- data/js/controls/textarea/js.inc +0 -0
- data/js/controls/textarea/textarea.js +23 -0
- data/js/controls/textarea/themes/default/textarea.css +21 -0
- data/js/controls/textarea/themes/default/textarea.html +18 -0
- data/js/controls/textcontrol/js.inc +0 -0
- data/js/controls/textcontrol/textcontrol.js +372 -0
- data/js/controls/textcontrol/themes/default/textcontrol.css +107 -0
- data/js/controls/textcontrol/themes/default/textcontrol.html +18 -0
- data/js/controls/textcontrol/themes/default/textcontrol_parts1-ie6.gif +0 -0
- data/js/controls/textcontrol/themes/default/textcontrol_parts1.png +0 -0
- data/js/controls/textcontrol/themes/default/textcontrol_parts2-ie6.gif +0 -0
- data/js/controls/textcontrol/themes/default/textcontrol_parts2.png +0 -0
- data/js/controls/textcontrol/themes/default/textcontrol_parts3-ie6.gif +0 -0
- data/js/controls/textcontrol/themes/default/textcontrol_parts3.png +0 -0
- data/js/controls/uploader/js.inc +0 -0
- data/js/controls/uploader/themes/default/upload_progress.gif +0 -0
- data/js/controls/uploader/themes/default/uploader.css +108 -0
- data/js/controls/uploader/themes/default/uploader.html +27 -0
- data/js/controls/uploader/uploader.js +153 -0
- data/js/controls/validatorview/js.inc +0 -0
- data/js/controls/validatorview/themes/default/validator-ie6.gif +0 -0
- data/js/controls/validatorview/themes/default/validator.png +0 -0
- data/js/controls/validatorview/themes/default/validatorview.css +0 -0
- data/js/controls/validatorview/themes/default/validatorview.html +0 -0
- data/js/controls/validatorview/validatorview.js +55 -0
- data/js/controls/window/js.inc +0 -0
- data/js/controls/window/themes/default/window.css +219 -0
- data/js/controls/window/themes/default/window.html +17 -0
- data/js/controls/window/themes/default/window_bg_active-ie6.gif +0 -0
- data/js/controls/window/themes/default/window_bg_active.png +0 -0
- data/js/controls/window/themes/default/window_bg_inactive-ie6.gif +0 -0
- data/js/controls/window/themes/default/window_bg_inactive.png +0 -0
- data/js/controls/window/themes/default/window_buttons-ie6.gif +0 -0
- data/js/controls/window/themes/default/window_buttons.png +0 -0
- data/js/controls/window/themes/default/window_parts1-ie6.gif +0 -0
- data/js/controls/window/themes/default/window_parts1.png +0 -0
- data/js/controls/window/themes/default/window_parts2-ie6.gif +0 -0
- data/js/controls/window/themes/default/window_parts2.png +0 -0
- data/js/controls/window/window.js +284 -0
- data/js/core/class/class.js +317 -0
- data/js/core/class/js.inc +0 -0
- data/js/core/elem/elem.js +1376 -0
- data/js/core/elem/js.inc +0 -0
- data/js/core/event/event.js +1021 -0
- data/js/core/event/js.inc +0 -0
- data/js/core/iefix/ie_css_element.htc +5 -0
- data/js/core/iefix/ie_css_style.htc +5 -0
- data/js/core/iefix/iefix.js +359 -0
- data/js/core/iefix/js.inc +0 -0
- data/js/debugg/debugg.js +43 -0
- data/js/debugg/js.inc +0 -0
- data/js/foundation/application/application.js +209 -0
- data/js/foundation/application/js.inc +0 -0
- data/js/foundation/control/control.js +342 -0
- data/js/foundation/control/controldefaults/controldefaults.js +59 -0
- data/js/foundation/control/controldefaults/js.inc +0 -0
- data/js/foundation/control/dummyvalue/dummyvalue.js +50 -0
- data/js/foundation/control/dummyvalue/js.inc +0 -0
- data/js/foundation/control/dyncontrol/dyncontrol.js +494 -0
- data/js/foundation/control/dyncontrol/js.inc +0 -0
- data/js/foundation/control/dyncontrol/themes/default/dyncontrol.css +0 -0
- data/js/foundation/control/dyncontrol/themes/default/dyncontrol.html +0 -0
- data/js/foundation/control/eventresponder/eventresponder.js +713 -0
- data/js/foundation/control/eventresponder/js.inc +0 -0
- data/js/foundation/control/js.inc +0 -0
- data/js/foundation/control/valueresponder/js.inc +0 -0
- data/js/foundation/control/valueresponder/valueresponder.js +77 -0
- data/js/foundation/geom/point/js.inc +0 -0
- data/js/foundation/geom/point/point.js +202 -0
- data/js/foundation/geom/rect/js.inc +0 -0
- data/js/foundation/geom/rect/rect.js +610 -0
- data/js/foundation/json_renderer/js.inc +0 -0
- data/js/foundation/json_renderer/json_renderer.js +231 -0
- data/js/foundation/system/js.inc +0 -0
- data/js/foundation/system/system.js +369 -0
- data/js/foundation/thememanager/js.inc +0 -0
- data/js/foundation/thememanager/thememanager.js +387 -0
- data/js/foundation/view/js.inc +0 -0
- data/js/foundation/view/markupview/js.inc +0 -0
- data/js/foundation/view/markupview/markupview.js +113 -0
- data/js/foundation/view/morphanimation/js.inc +0 -0
- data/js/foundation/view/morphanimation/morphanimation.js +236 -0
- data/js/foundation/view/view.js +1804 -0
- data/js/foundation/view/viewdefaults/js.inc +0 -0
- data/js/foundation/view/viewdefaults/viewdefaults.js +25 -0
- data/js/views/centerview/centerview.js +45 -0
- data/js/views/centerview/js.inc +0 -0
- data/js/views/inlineview/inlineview.js +14 -0
- data/js/views/inlineview/js.inc +0 -0
- data/js/views/scrollview/js.inc +0 -0
- data/js/views/scrollview/scrollview.js +39 -0
- data/lib/conf/default.rb +220 -0
- data/lib/conf/wizard.rb +303 -0
- data/lib/daemon/daemon.rb +293 -0
- data/lib/http/broker.rb +102 -0
- data/lib/http/rackup.rb +88 -0
- data/lib/http/request.rb +69 -0
- data/lib/http/response.rb +63 -0
- data/lib/plugins/gui_plugin.rb +129 -0
- data/lib/plugins/guiparser.rb +114 -0
- data/lib/plugins/plugin.rb +652 -0
- data/lib/plugins/plugin_plugins.rb +47 -0
- data/lib/plugins/plugin_sqlite_db.rb +72 -0
- data/lib/plugins/plugin_util.rb +96 -0
- data/lib/plugins/pluginmanager.rb +517 -0
- data/lib/plugins/servlet.rb +69 -0
- data/lib/session/msg.rb +291 -0
- data/lib/session/sessionmanager.rb +491 -0
- data/lib/session/sessionstorage.rb +314 -0
- data/lib/transporter/transporter.rb +254 -0
- data/lib/util/gzstring.rb +5 -0
- data/lib/values/hvalue.rb +323 -0
- data/lib/values/valuemanager.rb +152 -0
- data/plugins/client_pkg/client_pkg.rb +186 -0
- data/plugins/client_pkg/info.yaml +25 -0
- data/plugins/client_pkg/lib/client_pkg_build.rb +569 -0
- data/plugins/client_pkg/lib/client_pkg_cache.rb +50 -0
- data/plugins/client_pkg/lib/client_pkg_serve.rb +210 -0
- data/plugins/client_pkg/log/build_log +0 -0
- data/plugins/index_html/img/loading.gif +0 -0
- data/plugins/index_html/img/riassence.gif +0 -0
- data/plugins/index_html/index_html.rb +150 -0
- data/plugins/index_html/tmpl/index.html +22 -0
- data/plugins/index_html/tmpl/startup_index.html +29 -0
- data/plugins/legacy/disabled +0 -0
- data/plugins/legacy/disabled- +0 -0
- data/plugins/legacy/info.yaml +22 -0
- data/plugins/legacy/legacy.rb +15 -0
- data/plugins/main/js/riassence_ns.js +87 -0
- data/plugins/main/main.rb +234 -0
- data/plugins/main/values.yaml +8 -0
- data/plugins/ticketservices/lib/common.rb +300 -0
- data/plugins/ticketservices/lib/favicon.rb +38 -0
- data/plugins/ticketservices/lib/file.rb +58 -0
- data/plugins/ticketservices/lib/img.rb +50 -0
- data/plugins/ticketservices/lib/objblob.rb +66 -0
- data/plugins/ticketservices/lib/rsrc.rb +34 -0
- data/plugins/ticketservices/lib/upload.rb +206 -0
- data/plugins/ticketservices/ticketservices.rb +268 -0
- data/var/db/.git_include +0 -0
- data/var/log/.git_include +0 -0
- data/var/run/.git_include +0 -0
- metadata +390 -0
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,713 @@
|
|
1
|
+
/* Riassence Framework
|
2
|
+
* Copyright 2006 Riassence Inc.
|
3
|
+
* http://riassence.com/
|
4
|
+
*
|
5
|
+
* You should have received a copy of the GNU General Public License along
|
6
|
+
* with this software package. If not, contact licensing@riassence.com
|
7
|
+
*/
|
8
|
+
|
9
|
+
/*** = Description
|
10
|
+
** Automatic event responder. Defines what events HControl listens to
|
11
|
+
** and actions to be taken.
|
12
|
+
**
|
13
|
+
** = Event handler methods
|
14
|
+
** Pre-defined event handler methods, extend these in your subclass.
|
15
|
+
**
|
16
|
+
** +focus+:: Called when the component gets focus
|
17
|
+
** +blur+:: Called when the component loses focus
|
18
|
+
** +mouseDown+:: Called when the mouse button is pushed down
|
19
|
+
** +mouseUp+:: Called when the mouse button is released
|
20
|
+
** +mouseWheel+:: Called when the mouse wheel is used
|
21
|
+
** +startDrag+:: Called when the mouse button
|
22
|
+
** is pressed (and item is draggable).
|
23
|
+
** +endDrag+:: Called when the mouse button
|
24
|
+
** is released (and item is draggable).
|
25
|
+
** +drag+:: Called when the mouse is moved and mouse button
|
26
|
+
** is down (and item is draggable).
|
27
|
+
** +drop+:: Called when a draggable item is released
|
28
|
+
** on the droppable.
|
29
|
+
** +startHover+:: Called when a draggable item is moved
|
30
|
+
** over the droppable.
|
31
|
+
** +endHover+:: Called when a draggable item is moved out
|
32
|
+
** of the droppable.
|
33
|
+
** +keyDown+:: Called when the user presses a key, and
|
34
|
+
** the control is active.
|
35
|
+
** +keyUp+:: Called when the user releases a key, and
|
36
|
+
** the control is active.
|
37
|
+
** +textEnter+:: Called when the user releases a key regardless
|
38
|
+
** if the control is active or not.
|
39
|
+
** +gainedActiveStatus+:: Called when the component gets activated.
|
40
|
+
** +lostActiveStatus+:: Called when the component gets deactivated.
|
41
|
+
***/
|
42
|
+
HEventResponder = HClass.extend({
|
43
|
+
|
44
|
+
/** Default event listeners.
|
45
|
+
**/
|
46
|
+
defaultEvents: {
|
47
|
+
},
|
48
|
+
|
49
|
+
/** = Description
|
50
|
+
* The event responder interface for +HControl+.
|
51
|
+
* Registers the events defined by boolean properties of
|
52
|
+
* the events object to the control instance. The event manager
|
53
|
+
* handles the event mapping and abstraction itself.
|
54
|
+
* NOTE startDrag vs mouseDown and endDrag vs mouseUp events
|
55
|
+
* conflict, if both are set simultaneously.
|
56
|
+
*
|
57
|
+
* = Parameters
|
58
|
+
* +_events+:: A +{ event: state }+ Object structure, sets events based on the
|
59
|
+
* keys and the flag. All states are Booleans (true or false).
|
60
|
+
* A true state means the event listening for the event is
|
61
|
+
* enabled and a false state means the event listening is disabled.
|
62
|
+
* See the Event Types below:
|
63
|
+
*
|
64
|
+
* == Event States
|
65
|
+
* Event State:: Description
|
66
|
+
* +mouseMove+:: The global +mouseMove+ event state. The component receives
|
67
|
+
* this event regardless if it's focused or not. The event
|
68
|
+
* responder method for it is +mouseMove+ and it receives the
|
69
|
+
* absolute x and y coordinates of the mouse pointer when the
|
70
|
+
* mouse cursor position changes. Can also be toggled
|
71
|
+
* separately by using the +setMouseMove+ method.
|
72
|
+
* +textEnter+:: The global +textEnter+ event state. The component receives
|
73
|
+
* this event regardless if it's focused or not. The event
|
74
|
+
* responder method for it is +textEnter+ and it receives a
|
75
|
+
* every time a key on the keyboard is pressed. Can also
|
76
|
+
* be toggled separately by using the +setTextEnter+ method.
|
77
|
+
* +click+:: The local +click+ event state. The component receives
|
78
|
+
* this event only if it's focused. The event responder
|
79
|
+
* method for it is +click+ and it receives the absolute x
|
80
|
+
* and y coordinates of the mouse pointer as well as which
|
81
|
+
* mouse button was used to trigger the event. Can also be
|
82
|
+
* toggled separately by using the +setClickable+ method.
|
83
|
+
* +mouseDown+:: The local +mouseDown+ event state. The component receives
|
84
|
+
* this event only if it's focused. The event responder
|
85
|
+
* method for it is +mouseDown+ and it receives the absolute x
|
86
|
+
* and y coordinates of the mouse pointer as well as which
|
87
|
+
* mouse button was used to trigger the event. Can also be
|
88
|
+
* toggled separately by using the +setMouseDown+ method.
|
89
|
+
* +mouseUp+:: The local +mouseUp+ event state. The component receives
|
90
|
+
* this event only if it's focused. The event responder
|
91
|
+
* method for it is +mouseUp+ and it receives the absolute x
|
92
|
+
* and y coordinates of the mouse pointer as well as which
|
93
|
+
* mouse button was used to trigger the event. Can also be
|
94
|
+
* toggled separately by using the +setMouseUp+ method.
|
95
|
+
* +mouseWheel+:: The local +mouseWheel+ event state. The component receives
|
96
|
+
* this event only if it's focused. The event responder
|
97
|
+
* method for it is +mouseWheel+ and it receives the delta of
|
98
|
+
* the amount of the mouse scroll wheel was rolled: a floating
|
99
|
+
* point number, larger or smaller than 0, depending on the
|
100
|
+
* direction the scroll wheel was rolled. Can also be
|
101
|
+
* toggled separately by using the +setMouseWheel+ method.
|
102
|
+
* +draggable+:: The local +draggable+ event states. The component receives
|
103
|
+
* these events only if it's focused. The event responders
|
104
|
+
* methods are +startDrag+, +drag+ and +endDrag+. The events
|
105
|
+
* receive the mouse cursor coordinates.
|
106
|
+
* Can also be toggled separately by using the +setDraggable+
|
107
|
+
* method.
|
108
|
+
* +droppable+:: The local +droppable+ event states. The component receives
|
109
|
+
* this event only if another component is dragged (hovered)
|
110
|
+
* or dropped with the area of this component as the target.
|
111
|
+
* The event responders method for it are +hoverStart+,
|
112
|
+
* +drop+ and +hoverEnd+.
|
113
|
+
* Can also be toggled separately by using the
|
114
|
+
* +setDroppable+ method.
|
115
|
+
* +keyDown+:: The local +keyDown+ event state. The component receives
|
116
|
+
* this event only if it's focused. The event responder
|
117
|
+
* method for it is +keyDown+ and it receives the ascii key
|
118
|
+
* code whenever a keyboard key is pressed. Can also be
|
119
|
+
* toggled separately by using the +setKeyDown+ method.
|
120
|
+
* +keyUp+:: The local +keyUp+ event state. The component receives
|
121
|
+
* this event only if it's focused. The event responder
|
122
|
+
* method for it is +keyUp+ and it receives the ascii key
|
123
|
+
* code whenever a keyboard key is released. Can also be
|
124
|
+
* toggled separately by using the +setKeyUp+ method.
|
125
|
+
*
|
126
|
+
* = Usage
|
127
|
+
* HControl.new(
|
128
|
+
* [0,0,100,20],
|
129
|
+
* HApplication.nu()
|
130
|
+
* ).setEvents({
|
131
|
+
* mouseUp: true,
|
132
|
+
* mouseDown: true
|
133
|
+
* });
|
134
|
+
*
|
135
|
+
* = Returns
|
136
|
+
* +self+
|
137
|
+
*
|
138
|
+
**/
|
139
|
+
setEvents: function(_events) {
|
140
|
+
if(!this.events) {
|
141
|
+
this.events = HClass.extend( {
|
142
|
+
mouseMove: false,
|
143
|
+
mouseDown: false,
|
144
|
+
mouseUp: false,
|
145
|
+
draggable: false,
|
146
|
+
droppable: false,
|
147
|
+
keyDown: false,
|
148
|
+
keyUp: false,
|
149
|
+
mouseWheel: false,
|
150
|
+
textEnter: false,
|
151
|
+
click: false,
|
152
|
+
resize: false
|
153
|
+
} ).extend( this.defaultEvents ).nu();
|
154
|
+
}
|
155
|
+
if(_events) {
|
156
|
+
this.events = this.events.extend( _events );
|
157
|
+
}
|
158
|
+
this.events.ctrl = this;
|
159
|
+
// EVENT.focusOptions[this.elemId] = this.events;
|
160
|
+
// var _mmoveStatus = this.events.mouseMove,
|
161
|
+
// _mmoveIndex = EVENT.coordListeners.indexOf(this.elemId);
|
162
|
+
// if (_mmoveStatus && (_mmoveIndex===-1)){
|
163
|
+
// EVENT.coordListeners.push(this.elemId);
|
164
|
+
// }
|
165
|
+
// else if ((!_mmoveStatus) && (_mmoveIndex!==-1)){
|
166
|
+
// EVENT.coordListeners.splice(_mmoveIndex,1);
|
167
|
+
// }
|
168
|
+
EVENT.reg( this, this.events);
|
169
|
+
return this;
|
170
|
+
},
|
171
|
+
|
172
|
+
/** = Description
|
173
|
+
* Enables the HControl instance, if the enabled flag is true, and disables
|
174
|
+
* it if enabled is false. A disabled HControl won't respond events.
|
175
|
+
* Component themes reflect the disabled state typically with
|
176
|
+
* a dimmer appearance.
|
177
|
+
*
|
178
|
+
* = Parameters
|
179
|
+
* +_flag+:: Boolean; true enables, false disables.
|
180
|
+
*
|
181
|
+
* = Returns
|
182
|
+
* +this+
|
183
|
+
*
|
184
|
+
**/
|
185
|
+
setEnabled: function(_flag) {
|
186
|
+
|
187
|
+
var _this = this,
|
188
|
+
_elemId = this.elemId,
|
189
|
+
_sysViews = HSystem.views,
|
190
|
+
i = 0,
|
191
|
+
_views = _this.views,
|
192
|
+
_viewsLen = _views.length;
|
193
|
+
|
194
|
+
// Enable/disable the children first.
|
195
|
+
for (; i < _viewsLen; i++) {
|
196
|
+
_sysViews[_views[i]].setEnabled(_flag);
|
197
|
+
}
|
198
|
+
|
199
|
+
if (_this.enabled === _flag) {
|
200
|
+
// No change in enabled status, do nothing.
|
201
|
+
return this;
|
202
|
+
}
|
203
|
+
|
204
|
+
_this.enabled = _flag;
|
205
|
+
|
206
|
+
if(_flag) {
|
207
|
+
EVENT.reg(_this, _this.events);
|
208
|
+
}
|
209
|
+
else {
|
210
|
+
EVENT.unreg(_this);
|
211
|
+
}
|
212
|
+
|
213
|
+
// Toggle the CSS class: enabled/disabled
|
214
|
+
_this.toggleCSSClass(_elemId, HControl.CSS_ENABLED, _flag);
|
215
|
+
_this.toggleCSSClass(_elemId, HControl.CSS_DISABLED, !_flag);
|
216
|
+
return this;
|
217
|
+
},
|
218
|
+
|
219
|
+
|
220
|
+
/** = Description
|
221
|
+
* Alternative flag setter for the mouseMove event type. If set to true,
|
222
|
+
* starts listening to mouseDown events when the component has focus.
|
223
|
+
*
|
224
|
+
* = Parameters
|
225
|
+
* +_flag+:: Set the mouseDown event listening on/off (true/false) for
|
226
|
+
* the component instance.
|
227
|
+
*
|
228
|
+
* = Returns
|
229
|
+
* +self+
|
230
|
+
*
|
231
|
+
**/
|
232
|
+
setMouseMove: function(_flag) {
|
233
|
+
this.events.mouseMove = _flag;
|
234
|
+
this.setEvents();
|
235
|
+
return this;
|
236
|
+
},
|
237
|
+
|
238
|
+
/** = Description
|
239
|
+
* Alternative flag setter for the click event type. If set to true,
|
240
|
+
* starts listening to click events when the component has focus.
|
241
|
+
*
|
242
|
+
* = Parameters
|
243
|
+
* +_flag+:: Set the click event listening on/off (true/false) for
|
244
|
+
* the component instance.
|
245
|
+
*
|
246
|
+
* = Returns
|
247
|
+
* +self+
|
248
|
+
*
|
249
|
+
**/
|
250
|
+
setClickable: function(_flag) {
|
251
|
+
this.events.click = _flag;
|
252
|
+
this.setEvents();
|
253
|
+
return this;
|
254
|
+
},
|
255
|
+
|
256
|
+
/** = Description
|
257
|
+
* Registers or releases event listening for mouseDown events depending on
|
258
|
+
* the value of the flag argument.
|
259
|
+
*
|
260
|
+
* = Parameters
|
261
|
+
* +_flag+:: Set the mouseDown event listening on/off (true/false) for
|
262
|
+
* the component instance.
|
263
|
+
*
|
264
|
+
* = Returns
|
265
|
+
* +self+
|
266
|
+
*
|
267
|
+
**/
|
268
|
+
setMouseDown: function(_flag) {
|
269
|
+
this.events.mouseDown = _flag;
|
270
|
+
this.setEvents();
|
271
|
+
return this;
|
272
|
+
},
|
273
|
+
|
274
|
+
/** = Description
|
275
|
+
* Registers or releases event listening for mouseUp events depending on the
|
276
|
+
* value of the flag argument.
|
277
|
+
*
|
278
|
+
* = Parameters
|
279
|
+
* +_flag+:: Set the mouseUp event listening on/off (true/false) for
|
280
|
+
* the component instance.
|
281
|
+
*
|
282
|
+
* = Returns
|
283
|
+
* +self+
|
284
|
+
*
|
285
|
+
**/
|
286
|
+
setMouseUp: function(_flag) {
|
287
|
+
this.events.mouseUp = _flag;
|
288
|
+
this.setEvents();
|
289
|
+
return this;
|
290
|
+
},
|
291
|
+
|
292
|
+
/** = Description
|
293
|
+
* Alternative flag setter for the mouseWheel event type. If set to true,
|
294
|
+
* starts listening to mouseWheel events when the component has focus.
|
295
|
+
*
|
296
|
+
* = Parameters
|
297
|
+
* +_flag+:: Set the mouseWheel event listening on/off (true/false) for
|
298
|
+
* the component instance.
|
299
|
+
*
|
300
|
+
* = Returns
|
301
|
+
* +self+
|
302
|
+
*
|
303
|
+
**/
|
304
|
+
setMouseWheel: function(_flag) {
|
305
|
+
this.events.mouseWheel = _flag;
|
306
|
+
this.setEvents();
|
307
|
+
return this;
|
308
|
+
},
|
309
|
+
|
310
|
+
/** = Description
|
311
|
+
* Registers or releases event listening for startDrag, drag and
|
312
|
+
* endDrag -events depending on the value of the flag argument.
|
313
|
+
*
|
314
|
+
* = Parameters
|
315
|
+
* +_flag+:: Set the startDrag, drag and endDrag event listening
|
316
|
+
* on/off (true/false) for the component instance.
|
317
|
+
*
|
318
|
+
* = Returns
|
319
|
+
* +self+
|
320
|
+
*
|
321
|
+
**/
|
322
|
+
setDraggable: function(_flag) {
|
323
|
+
this.events.draggable = _flag;
|
324
|
+
this.setEvents();
|
325
|
+
return this;
|
326
|
+
},
|
327
|
+
|
328
|
+
/** = Description
|
329
|
+
* Registers or releases event listening for startHover, drop and
|
330
|
+
* endHover -events depending on the value of the flag argument.
|
331
|
+
*
|
332
|
+
* = Parameters
|
333
|
+
* +_flag+:: Set the startHover, drop and endHover event listening
|
334
|
+
* on/off (true/false) for the component instance.
|
335
|
+
*
|
336
|
+
* = Returns
|
337
|
+
* +self+
|
338
|
+
*
|
339
|
+
**/
|
340
|
+
setDroppable: function(_flag) {
|
341
|
+
this.events.droppable = _flag;
|
342
|
+
this.setEvents();
|
343
|
+
return this;
|
344
|
+
},
|
345
|
+
|
346
|
+
|
347
|
+
/** = Description
|
348
|
+
* Registers or releases event listening for keyDown events depending on the
|
349
|
+
* value of the flag argument.
|
350
|
+
*
|
351
|
+
* = Parameters
|
352
|
+
* +_flag+:: Set the keyDown event listening on/off (true/false) for
|
353
|
+
* the component instance.
|
354
|
+
*
|
355
|
+
* = Returns
|
356
|
+
* +self+
|
357
|
+
*
|
358
|
+
**/
|
359
|
+
setKeyDown: function(_flag) {
|
360
|
+
this.events.keyDown = _flag;
|
361
|
+
this.setEvents();
|
362
|
+
return this;
|
363
|
+
},
|
364
|
+
|
365
|
+
|
366
|
+
/** = Description
|
367
|
+
* Registers or releases event listening for keyUp events depending on
|
368
|
+
* the value of the flag argument.
|
369
|
+
*
|
370
|
+
* = Parameters
|
371
|
+
* +_flag+:: Set the keyUp event listening on/off (true/false) for
|
372
|
+
* the component instance.
|
373
|
+
*
|
374
|
+
* = Returns
|
375
|
+
* +self+
|
376
|
+
*
|
377
|
+
**/
|
378
|
+
setKeyUp: function(_flag) {
|
379
|
+
this.events.keyUp = _flag;
|
380
|
+
this.setEvents();
|
381
|
+
return this;
|
382
|
+
},
|
383
|
+
|
384
|
+
/** = Description
|
385
|
+
* Registers or releases event listening for textEnter events
|
386
|
+
* depending on the value of the flag argument.
|
387
|
+
*
|
388
|
+
* = Returns
|
389
|
+
* +self+
|
390
|
+
*
|
391
|
+
**/
|
392
|
+
setTextEnter: function(_flag) {
|
393
|
+
this.events.textEnter = _flag;
|
394
|
+
this.setEvents();
|
395
|
+
return this;
|
396
|
+
},
|
397
|
+
|
398
|
+
/** Same as +setClickable+
|
399
|
+
**/
|
400
|
+
setClick: function(_flag) {
|
401
|
+
return this.setClickable(_flag);
|
402
|
+
},
|
403
|
+
|
404
|
+
/** = Description
|
405
|
+
* Default focus event responder method. Does nothing by default.
|
406
|
+
* Called when the component gets focus.
|
407
|
+
*
|
408
|
+
**/
|
409
|
+
focus: function() {},
|
410
|
+
|
411
|
+
/** = Description
|
412
|
+
* Default blur event responder method. Does nothing by default.
|
413
|
+
* Called when the component loses focus.
|
414
|
+
*
|
415
|
+
**/
|
416
|
+
blur: function() {},
|
417
|
+
|
418
|
+
|
419
|
+
/** = Description
|
420
|
+
* Default gainedActiveStatus event responder method. Does nothing by default.
|
421
|
+
* Called when the component gains active status; both focused and clicked.
|
422
|
+
*
|
423
|
+
* = Parameters
|
424
|
+
* +_lastActiveControl+:: A reference to the control that was active
|
425
|
+
* before this control became active. Can
|
426
|
+
* be null if there was no active control.
|
427
|
+
*
|
428
|
+
**/
|
429
|
+
gainedActiveStatus: function(_lastActiveControl) {
|
430
|
+
|
431
|
+
if ( (HSystem.windowFocusBehaviour === 1) && ( this.parents.length > 2 ) ) {
|
432
|
+
if ( this.parents[2].componentBehaviour.indexOf('window') !== -1 ) {
|
433
|
+
this.parents[2].gainedActiveStatus();
|
434
|
+
}
|
435
|
+
}
|
436
|
+
|
437
|
+
},
|
438
|
+
|
439
|
+
// A low-level handler for active status, don't extend this.
|
440
|
+
_gainedActiveStatus: function(_lastActiveControl) {
|
441
|
+
if(this.enabled) {
|
442
|
+
this.toggleCSSClass(this.elemId, HControl.CSS_ACTIVE, true);
|
443
|
+
}
|
444
|
+
this.gainedActiveStatus(_lastActiveControl);
|
445
|
+
},
|
446
|
+
|
447
|
+
|
448
|
+
/** = Description
|
449
|
+
* Default lostActiveStatus event responder method. Does nothing by default.
|
450
|
+
* Called when the component loses active status; another component was
|
451
|
+
* focused and clicked.
|
452
|
+
*
|
453
|
+
* = Parameters
|
454
|
+
* +_newActiveControl+:: A reference to the control that became the currently
|
455
|
+
* active control. Can be null if there is no active
|
456
|
+
* control.
|
457
|
+
*
|
458
|
+
**/
|
459
|
+
lostActiveStatus: function(_newActiveControl) {
|
460
|
+
|
461
|
+
},
|
462
|
+
|
463
|
+
// --A low-level handler for lost active status, don't extend this.++
|
464
|
+
_lostActiveStatus: function(_newActiveControl) {
|
465
|
+
if(this.enabled) {
|
466
|
+
this.toggleCSSClass(this.elemId, HControl.CSS_ACTIVE, false);
|
467
|
+
}
|
468
|
+
this.lostActiveStatus(_newActiveControl);
|
469
|
+
},
|
470
|
+
|
471
|
+
|
472
|
+
/** = Description
|
473
|
+
* Default mouseMove event responder method. Does nothing by default.
|
474
|
+
* Called whenever the mouse cursor is moved regardless if the
|
475
|
+
* component is active or has focus.
|
476
|
+
*
|
477
|
+
* = Parameters
|
478
|
+
* +x+:: The horizontal coordinate units (px) of the mouse cursor position.
|
479
|
+
* +y+:: The vertical coordinate units (px) of the mouse cursor position.
|
480
|
+
*
|
481
|
+
**/
|
482
|
+
mouseMove: function(x,y) {},
|
483
|
+
|
484
|
+
|
485
|
+
/** = Description
|
486
|
+
* Default click event responder method. Does nothing by default.
|
487
|
+
*
|
488
|
+
* = Parameters
|
489
|
+
* +x+:: The horizontal coordinate units (px) of the
|
490
|
+
* mouse cursor position.
|
491
|
+
* +y+:: The vertical coordinate units (px) of the
|
492
|
+
* mouse cursor position.
|
493
|
+
* +_isRightButton+:: Boolean flag; true if the right(context) mouse
|
494
|
+
* button is pressed.
|
495
|
+
*
|
496
|
+
**/
|
497
|
+
click: function(x,y,_isRightButton){},
|
498
|
+
|
499
|
+
/** = Description
|
500
|
+
* Default mouseDown event responder method. Does nothing by default.
|
501
|
+
*
|
502
|
+
* = Parameters
|
503
|
+
* +x+:: The horizontal coordinate units (px) of the
|
504
|
+
* mouse cursor position.
|
505
|
+
* +y+:: The vertical coordinate units (px) of the
|
506
|
+
* mouse cursor position.
|
507
|
+
* +_isRightButton+:: Boolean flag; true if the right(context) mouse
|
508
|
+
* button is pressed.
|
509
|
+
*
|
510
|
+
**/
|
511
|
+
mouseDown: function(x,y,_isRightButton) {},
|
512
|
+
|
513
|
+
|
514
|
+
/** = Description
|
515
|
+
* Default mouseDown event responder method. Does nothing by default.
|
516
|
+
*
|
517
|
+
* = Parameters
|
518
|
+
* +x+:: The horizontal coordinate units (px) of the
|
519
|
+
* mouse cursor position.
|
520
|
+
* +y+:: The vertical coordinate units (px) of the
|
521
|
+
* mouse cursor position.
|
522
|
+
* +_isRightButton+:: Boolean flag; true if the right(context) mouse
|
523
|
+
* button is pressed.
|
524
|
+
*
|
525
|
+
**/
|
526
|
+
mouseUp: function(x,y,_isRightButton) {},
|
527
|
+
|
528
|
+
/** = Description
|
529
|
+
* Default mouseWheel event responder method. Does nothing by default.
|
530
|
+
*
|
531
|
+
* = Parameters
|
532
|
+
* +_delta+:: Scrolling delta, the wheel angle change. If delta is positive,
|
533
|
+
* wheel was scrolled up. Otherwise, it was scrolled down.
|
534
|
+
*
|
535
|
+
**/
|
536
|
+
mouseWheel: function(_delta) {},
|
537
|
+
|
538
|
+
/** = Description
|
539
|
+
* Default startDrag event responder method. Sets internal flags by default.
|
540
|
+
* This is the preferred method to extend if you want to do something
|
541
|
+
* when a drag event starts. If you extend, remember to call +this.base();+
|
542
|
+
*
|
543
|
+
* = Parameters
|
544
|
+
* +x+:: The horizontal coordinate units (px) of the mouse cursor position.
|
545
|
+
* +y+:: The vertical coordinate units (px) of the mouse cursor position.
|
546
|
+
*
|
547
|
+
**/
|
548
|
+
startDrag: function(x, y) {},
|
549
|
+
|
550
|
+
/** = Description
|
551
|
+
* Default drag event responder method. Does nothing by default.
|
552
|
+
* This is the preferred method to extend while a drag method is ongoing.
|
553
|
+
* Called whenever the mouse cursor moves and a drag event has been started.
|
554
|
+
*
|
555
|
+
* = Parameters
|
556
|
+
* +x+:: The horizontal coordinate units (px) of the mouse cursor position.
|
557
|
+
* +y+:: The vertical coordinate units (px) of the mouse cursor position.
|
558
|
+
*
|
559
|
+
**/
|
560
|
+
drag: function(x,y){
|
561
|
+
this.doDrag(x,y);
|
562
|
+
},
|
563
|
+
doDrag: function(x, y) {},
|
564
|
+
|
565
|
+
|
566
|
+
/** = Description
|
567
|
+
* Default endDrag event responder method. Sets internal flags by default.
|
568
|
+
* This is the preferred method to extend if you want to do something
|
569
|
+
* when a drag event ends. If you extend, remember to call +this.base();+
|
570
|
+
*
|
571
|
+
* = Parameters
|
572
|
+
* +x+:: The horizontal coordinate units (px) of the mouse cursor position.
|
573
|
+
* +y+:: The vertical coordinate units (px) of the mouse cursor position.
|
574
|
+
*
|
575
|
+
**/
|
576
|
+
endDrag: function(x, y) {
|
577
|
+
this.invalidatePositionCache();
|
578
|
+
},
|
579
|
+
|
580
|
+
/** = Description
|
581
|
+
* Default drop event responder method. Does nothing by default.
|
582
|
+
* Extend the drop method, if you want to do something
|
583
|
+
* when this instance is the target of another instance's endDrag event.
|
584
|
+
* Called when a dragged component instance is dropped on the target instance.
|
585
|
+
*
|
586
|
+
* = Parameters
|
587
|
+
* +obj+:: The dragged component object.
|
588
|
+
*
|
589
|
+
**/
|
590
|
+
drop: function(obj) {
|
591
|
+
this.onDrop(obj);
|
592
|
+
},
|
593
|
+
onDrop: function(obj) {},
|
594
|
+
|
595
|
+
/** = Description
|
596
|
+
* Default startHover event responder method. Does nothing by default.
|
597
|
+
* Extend the startHover method, if you want to do something
|
598
|
+
* when this instance is the target of another instance's drag event.
|
599
|
+
* Called when a dragged component instance is dragged over
|
600
|
+
* the target instance.
|
601
|
+
*
|
602
|
+
* = Parameters
|
603
|
+
* +obj+:: The dragged component object.
|
604
|
+
*
|
605
|
+
**/
|
606
|
+
startHover: function(obj) {
|
607
|
+
this.onHoverStart(obj);
|
608
|
+
},
|
609
|
+
onHoverStart: function(obj) {},
|
610
|
+
|
611
|
+
/** = Description
|
612
|
+
* Default endHover event responder method. Does nothing by default.
|
613
|
+
* Extend the endHover method, if you want to do something
|
614
|
+
* when this instance is no longer the target of another instance's
|
615
|
+
* drag event. Called when a dragged component instance is dragged
|
616
|
+
* away from the target instance.
|
617
|
+
*
|
618
|
+
* = Parameters
|
619
|
+
* +obj+:: The dragged component object.
|
620
|
+
*
|
621
|
+
**/
|
622
|
+
endHover: function(obj) {
|
623
|
+
this.onHoverEnd(obj);
|
624
|
+
},
|
625
|
+
onHoverEnd: function(obj) {},
|
626
|
+
|
627
|
+
/** = Description
|
628
|
+
* Default keyDown event responder method. Does nothing by default.
|
629
|
+
* Extend the keyDown method, if you want to do something
|
630
|
+
* when a key is pressed and the component is active.
|
631
|
+
*
|
632
|
+
* = Parameters
|
633
|
+
* +_keycode+:: The ascii key code of the key that was pressed.
|
634
|
+
*
|
635
|
+
**/
|
636
|
+
keyDown: function(_keycode) {},
|
637
|
+
|
638
|
+
/** = Description
|
639
|
+
* Default keyUp event responder method. Does nothing by default.
|
640
|
+
* Extend the keyUp method, if you want to do something
|
641
|
+
* when a key is released and the component is active.
|
642
|
+
*
|
643
|
+
* = Parameters
|
644
|
+
* +_keycode+:: The ascii key code of the key that was released.
|
645
|
+
*
|
646
|
+
**/
|
647
|
+
keyUp: function(_keycode) {},
|
648
|
+
|
649
|
+
/** = Description
|
650
|
+
* Default textEnter event responder method. Does nothing by default.
|
651
|
+
* Extend the textEnter method, if you want to do something
|
652
|
+
* when a key is released regardless if the component is active,
|
653
|
+
* has focus or not.
|
654
|
+
*
|
655
|
+
* = Parameters
|
656
|
+
* +_keycode+:: The ascii key code of the key that was released.
|
657
|
+
*
|
658
|
+
**/
|
659
|
+
textEnter: function() {},
|
660
|
+
|
661
|
+
/** -- DON'T TOUCH _mouseOver, IT IS A LOW-LEVEL HANDLER, use focus() instead ++ **/
|
662
|
+
_mouseOver: function(e) {
|
663
|
+
if (!Event.element) {
|
664
|
+
return;
|
665
|
+
}
|
666
|
+
var _that = Event.element(e);
|
667
|
+
while(_that && _that.ctrl === undefined) {
|
668
|
+
_that = _that.parentNode;
|
669
|
+
}
|
670
|
+
if (!_that) {
|
671
|
+
return;
|
672
|
+
}
|
673
|
+
var _this = _that.ctrl;
|
674
|
+
|
675
|
+
EVENT.focus(_this);
|
676
|
+
Event.stop(e);
|
677
|
+
},
|
678
|
+
|
679
|
+
/** -- DON'T TOUCH _mouseOut, IT IS A LOW-LEVEL HANDLER, use blur() instead ++ **/
|
680
|
+
_mouseOut: function(e) {
|
681
|
+
if (!Event.element) {
|
682
|
+
return;
|
683
|
+
}
|
684
|
+
var _that = Event.element(e);
|
685
|
+
while(_that && _that.ctrl === undefined) {
|
686
|
+
_that = _that.parentNode;
|
687
|
+
}
|
688
|
+
if (!_that) {
|
689
|
+
return;
|
690
|
+
}
|
691
|
+
var _this = _that.owner;
|
692
|
+
|
693
|
+
EVENT.blur(_this);
|
694
|
+
Event.stop(e);
|
695
|
+
},
|
696
|
+
|
697
|
+
|
698
|
+
/** = Description
|
699
|
+
* Forces retrieving this control's DOM element position directly rather than
|
700
|
+
* using the cached version when the position is needed by +EVENT+.
|
701
|
+
* Child controls are invalidated recursively by +HView+.
|
702
|
+
*
|
703
|
+
* = Returns
|
704
|
+
* +self+
|
705
|
+
*
|
706
|
+
**/
|
707
|
+
invalidatePositionCache: function() {
|
708
|
+
this.base();
|
709
|
+
EVENT.coordCacheFlush(this.elemId);
|
710
|
+
return this;
|
711
|
+
}
|
712
|
+
|
713
|
+
});
|