globalVariables.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*******************************************************************************
  2. AToMPM - A Tool for Multi-Paradigm Modelling
  3. Copyright (c) 2012 Conner Hansen (chansen@crimson.ua.edu)
  4. This file is part of AToMPM.
  5. AToMPM is free software: you can redistribute it and/or modify it under the
  6. terms of the GNU Lesser General Public License as published by the Free Software
  7. Foundation, either version 3 of the License, or (at your option) any later
  8. version.
  9. AToMPM is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  11. PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public License along
  13. with AToMPM. If not, see <http://www.gnu.org/licenses/>.
  14. *******************************************************************************/
  15. /**
  16. * The purpose of this file is to insert the needed global variables
  17. * into the namespace. This allows for functions that require access
  18. * to the global objects that would otherwise be defined after that
  19. * objects creation to still be accessible
  20. */
  21. var WindowManagement; /* The Window Management object. This handles management of the display, such as the popup dialogs. Could be merged with GUIUtils */
  22. var WindowEventHelper; /* The Window Event Helper object. This processes window events. */
  23. var HttpUtils; /* The HTTP Utilities object. This handles communication with the server. */
  24. var UserManagement; /* User Management object. This handles user operations, such as log in, log out, and registration. */
  25. var AtomPMClient; /* The AToMPM client object. This handles many core operations of the client. */
  26. var InputBarStateChart; /* The Input Bar state chart object. To be removed */
  27. var InputBarUtils; /* The Input Bar Utilities object. To be removed. */
  28. var GUIUtils; /* The GUI Utilities object. This handles GUI manipulation and display. Could be merged with WindowManagement. */
  29. var Collaboration; /* The Collaboration object. This handles the chat windows */
  30. var BehaviorManager; /* The Behavior Manager object. This drives the original state charts */
  31. var CompileUtils; /* The Compile Utilities object. This handles the compilation of the model into a metamodel */
  32. var ConnectionUtils; /* The Connection Utilities object. This handles edges, connections, control points, etc. */
  33. var DataUtils; /* The Data Utilities object. Handles the loaded objects, edges, toolbars, etc */
  34. var EditUtils; /* Handles the Copy, Paste, Undo, and Redo options. Consider merging this with GUIUtils */
  35. var GeometryUtils; /* Handles transformations and translations. */
  36. var MMMUtils;
  37. var currentKeys = [];
  38. // Command Keys
  39. var KEY_TAB = 9,
  40. KEY_ENTER = 13,
  41. KEY_SHIFT = 16,
  42. KEY_CTRL = 17,
  43. KEY_ALT = 18,
  44. KEY_ESC = 27,
  45. KEY_INS = 45,
  46. KEY_DEL = 46,
  47. KEY_CMD1 = 91,
  48. KEY_CMD2 = 92,
  49. KEY_CMD3 = 224;
  50. // Arrow Keys
  51. var KEY_RIGHT_ARROW = 39,
  52. KEY_LEFT_ARROW = 37,
  53. KEY_UP_ARROW = 38,
  54. KEY_DOWN_ARROW = 40;
  55. // Mouse Buttons
  56. var MOUSE_RIGHT = 2,
  57. MOUSE_LEFT = 0,
  58. MOUSE_MIDDLE = 1;