globalVariables.js 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* This file is part of AToMPM - A Tool for Multi-Paradigm Modelling
  2. * Copyright 2011 by the AToMPM team and licensed under the LGPL
  3. * See COPYING.lesser and README.md in the root of this project for full details
  4. */
  5. /**
  6. * The purpose of this file is to insert the needed global variables
  7. * into the namespace. This allows for functions that require access
  8. * to the global objects that would otherwise be defined after that
  9. * objects creation to still be accessible
  10. */
  11. var WindowManagement; /* The Window Management object. This handles management of the display, such as the popup dialogs. Could be merged with GUIUtils */
  12. var WindowEventHelper; /* The Window Event Helper object. This processes window events. */
  13. var HttpUtils; /* The HTTP Utilities object. This handles communication with the server. */
  14. var UserManagement; /* User Management object. This handles user operations, such as log in, log out, and registration. */
  15. var AtomPMClient; /* The AToMPM client object. This handles many core operations of the client. */
  16. var InputBarStateChart; /* The Input Bar state chart object. To be removed */
  17. var InputBarUtils; /* The Input Bar Utilities object. To be removed. */
  18. var GUIUtils; /* The GUI Utilities object. This handles GUI manipulation and display. Could be merged with WindowManagement. */
  19. var Collaboration; /* The Collaboration object. This handles the chat windows */
  20. var BehaviorManager; /* The Behavior Manager object. This drives the original state charts */
  21. var CompileUtils; /* The Compile Utilities object. This handles the compilation of the model into a metamodel */
  22. var ConnectionUtils; /* The Connection Utilities object. This handles edges, connections, control points, etc. */
  23. var DataUtils; /* The Data Utilities object. Handles the loaded objects, edges, toolbars, etc */
  24. var EditUtils; /* Handles the Copy, Paste, Undo, and Redo options. Consider merging this with GUIUtils */
  25. var GeometryUtils; /* Handles transformations and translations. */
  26. var MMMUtils;
  27. var Layout; /*For auto-layout capabilities. */
  28. var currentKeys = [];
  29. // Command Keys
  30. var KEY_TAB = 9,
  31. KEY_ENTER = 13,
  32. KEY_SHIFT = 16,
  33. KEY_CTRL = 17,
  34. KEY_ALT = 18,
  35. KEY_ESC = 27,
  36. KEY_INS = 45,
  37. KEY_DEL = 46,
  38. KEY_CMD1 = 91,
  39. KEY_CMD2 = 92,
  40. KEY_CMD3 = 224;
  41. // Arrow Keys
  42. var KEY_RIGHT_ARROW = 39,
  43. KEY_LEFT_ARROW = 37,
  44. KEY_UP_ARROW = 38,
  45. KEY_DOWN_ARROW = 40;
  46. // Mouse Buttons
  47. var MOUSE_RIGHT = 2,
  48. MOUSE_LEFT = 0,
  49. MOUSE_MIDDLE = 1;