simViewDlg.ed.gui 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. //--- OBJECT WRITE BEGIN ---
  2. %guiContent = new GuiControl(simViewDlg, EditorGuiGroup) {
  3. canSaveDynamicFields = "0";
  4. Profile = "ToolsGuiDefaultProfile";
  5. HorizSizing = "right";
  6. VertSizing = "bottom";
  7. position = "0 0";
  8. Extent = "800 600";
  9. MinExtent = "8 8";
  10. canSave = "1";
  11. Visible = "1";
  12. hovertime = "1000";
  13. new GuiWindowCtrl() {
  14. canSaveDynamicFields = "0";
  15. Profile = "ToolsGuiWindowProfile";
  16. HorizSizing = "center";
  17. VertSizing = "center";
  18. position = "70 43";
  19. Extent = "685 489";
  20. MinExtent = "602 440";
  21. canSave = "1";
  22. Visible = "1";
  23. hovertime = "1000";
  24. text = "Torque SimView";
  25. maxLength = "1024";
  26. resizeWidth = "1";
  27. resizeHeight = "1";
  28. canMove = "1";
  29. canClose = "1";
  30. canMinimize = "1";
  31. canMaximize = "1";
  32. minSize = "50 50";
  33. closeCommand = "Canvas.popDialog(simViewDlg);";
  34. new GuiScrollCtrl() {
  35. canSaveDynamicFields = "0";
  36. Profile = "ToolsGuiScrollProfile";
  37. HorizSizing = "width";
  38. VertSizing = "height";
  39. position = "10 28";
  40. Extent = "255 448";
  41. MinExtent = "8 8";
  42. canSave = "1";
  43. Visible = "1";
  44. hovertime = "1000";
  45. willFirstRespond = "1";
  46. hScrollBar = "dynamic";
  47. vScrollBar = "alwaysOn";
  48. lockHorizScroll = "false";
  49. lockVertScroll = "false";
  50. constantThumbHeight = "0";
  51. childMargin = "0 0";
  52. new GuiTreeViewCtrl(InspectTreeView) {
  53. canSaveDynamicFields = "0";
  54. Profile = "ToolsGuiTreeViewProfile";
  55. HorizSizing = "right";
  56. VertSizing = "bottom";
  57. position = "2 2";
  58. Extent = "212 21";
  59. MinExtent = "8 8";
  60. canSave = "1";
  61. Visible = "1";
  62. hovertime = "1000";
  63. tabSize = "16";
  64. textOffset = "2";
  65. fullRowSelect = "0";
  66. itemHeight = "21";
  67. destroyTreeOnSleep = "1";
  68. MouseDragging = "1";
  69. MultipleSelections = "1";
  70. DeleteObjectAllowed = "1";
  71. DragToItemAllowed = "1";
  72. };
  73. };
  74. new GuiScrollCtrl() {
  75. canSaveDynamicFields = "0";
  76. Profile = "ToolsGuiScrollProfile";
  77. HorizSizing = "left";
  78. VertSizing = "height";
  79. position = "272 96";
  80. Extent = "404 380";
  81. MinExtent = "8 8";
  82. canSave = "1";
  83. Visible = "1";
  84. hovertime = "1000";
  85. willFirstRespond = "1";
  86. hScrollBar = "alwaysOff";
  87. vScrollBar = "alwaysOn";
  88. lockHorizScroll = "true";
  89. lockVertScroll = "false";
  90. constantThumbHeight = "0";
  91. childMargin = "0 0";
  92. new GuiInspector(InspectFields) {
  93. StackingType = "Vertical";
  94. HorizStacking = "Left to Right";
  95. VertStacking = "Top to Bottom";
  96. Padding = "1";
  97. canSaveDynamicFields = "0";
  98. Profile = "ToolsGuiTransparentProfile";
  99. HorizSizing = "width";
  100. VertSizing = "bottom";
  101. position = "2 2";
  102. Extent = "382 8";
  103. MinExtent = "8 8";
  104. canSave = "1";
  105. Visible = "1";
  106. hovertime = "1000";
  107. };
  108. };
  109. new GuiControl() {
  110. canSaveDynamicFields = "0";
  111. Profile = "ToolsGuiButtonProfile";
  112. HorizSizing = "left";
  113. VertSizing = "bottom";
  114. position = "272 28";
  115. Extent = "403 61";
  116. MinExtent = "8 2";
  117. canSave = "1";
  118. Visible = "1";
  119. hovertime = "1000";
  120. new GuiTextEditCtrl(InspectObjectName) {
  121. canSaveDynamicFields = "0";
  122. Profile = "ToolsGuiTextEditProfile";
  123. HorizSizing = "right";
  124. VertSizing = "bottom";
  125. position = "121 8";
  126. Extent = "195 18";
  127. MinExtent = "8 8";
  128. canSave = "1";
  129. Visible = "1";
  130. hovertime = "1000";
  131. maxLength = "1024";
  132. historySize = "0";
  133. password = "0";
  134. tabComplete = "0";
  135. sinkAllKeyEvents = "0";
  136. password = "0";
  137. passwordMask = "*";
  138. };
  139. new GuiTextCtrl() {
  140. canSaveDynamicFields = "0";
  141. Profile = "EditorTextHLRight";
  142. HorizSizing = "right";
  143. VertSizing = "bottom";
  144. position = "217 35";
  145. Extent = "44 18";
  146. MinExtent = "8 8";
  147. canSave = "1";
  148. Visible = "1";
  149. hovertime = "1000";
  150. text = "Sim ID:";
  151. maxLength = "1024";
  152. };
  153. new GuiTextCtrl() {
  154. canSaveDynamicFields = "0";
  155. Profile = "EditorTextHLRight";
  156. HorizSizing = "right";
  157. VertSizing = "bottom";
  158. position = "10 35";
  159. Extent = "106 18";
  160. MinExtent = "8 8";
  161. canSave = "1";
  162. Visible = "1";
  163. hovertime = "1000";
  164. text = "Internal Name:";
  165. maxLength = "1024";
  166. };
  167. new GuiTextEditCtrl(InspectObjectInternalName) {
  168. canSaveDynamicFields = "0";
  169. Profile = "ToolsGuiTextEditProfile";
  170. HorizSizing = "right";
  171. VertSizing = "bottom";
  172. position = "121 35";
  173. Extent = "93 18";
  174. MinExtent = "8 8";
  175. canSave = "1";
  176. Visible = "1";
  177. hovertime = "1000";
  178. maxLength = "1024";
  179. historySize = "0";
  180. password = "0";
  181. tabComplete = "0";
  182. sinkAllKeyEvents = "0";
  183. password = "0";
  184. passwordMask = "*";
  185. };
  186. new GuiTextCtrl() {
  187. canSaveDynamicFields = "0";
  188. Profile = "EditorTextHLBoldRight";
  189. HorizSizing = "right";
  190. VertSizing = "bottom";
  191. position = "10 8";
  192. Extent = "106 18";
  193. MinExtent = "8 8";
  194. canSave = "1";
  195. Visible = "1";
  196. hovertime = "1000";
  197. text = "Selected Object:";
  198. maxLength = "1024";
  199. };
  200. new GuiIconButtonCtrl() {
  201. canSaveDynamicFields = "0";
  202. Profile = "ToolsGuiButtonProfile";
  203. HorizSizing = "right";
  204. VertSizing = "bottom";
  205. position = "321 33";
  206. Extent = "76 22";
  207. MinExtent = "8 2";
  208. canSave = "1";
  209. Visible = "1";
  210. Command = "InspectApply();";
  211. hovertime = "1000";
  212. text = "Refresh";
  213. groupNum = "-1";
  214. buttonType = "PushButton";
  215. iconBitmap = "./images/iconRefresh.png";
  216. sizeIconToButton = "0";
  217. textLocation = "Right";
  218. textMargin = "4";
  219. buttonMargin = "4 4";
  220. };
  221. new GuiTextCtrl(InspectObjectSimID) {
  222. canSaveDynamicFields = "0";
  223. Profile = "EditorTextHLBoldCenter";
  224. HorizSizing = "right";
  225. VertSizing = "bottom";
  226. position = "265 35";
  227. Extent = "51 18";
  228. MinExtent = "8 8";
  229. canSave = "1";
  230. Visible = "1";
  231. hovertime = "1000";
  232. text = "0";
  233. maxLength = "1024";
  234. };
  235. new GuiIconButtonCtrl() {
  236. canSaveDynamicFields = "0";
  237. Profile = "ToolsGuiButtonProfile";
  238. HorizSizing = "right";
  239. VertSizing = "bottom";
  240. position = "321 6";
  241. Extent = "76 22";
  242. MinExtent = "8 2";
  243. canSave = "1";
  244. Visible = "1";
  245. Command = "InspectDelete();";
  246. hovertime = "1000";
  247. text = "Delete";
  248. groupNum = "-1";
  249. buttonType = "PushButton";
  250. iconBitmap = "./images/iconDelete.png";
  251. sizeIconToButton = "0";
  252. textLocation = "Right";
  253. textMargin = "4";
  254. buttonMargin = "4 4";
  255. };
  256. };
  257. };
  258. };
  259. //--- OBJECT WRITE END ---
  260. function Inspect(%obj)
  261. {
  262. // Don't inspect the root group.
  263. if( %obj == -1 )
  264. return;
  265. InspectFields.inspect(%obj);
  266. // Update selected object properties
  267. InspectObjectName.setValue(%obj.getName());
  268. InspectObjectInternalName.setValue( %obj.getInternalName() );
  269. InspectObjectSimID.setValue( %obj.getId() );
  270. // Store Object Reference
  271. InspectObjectName.refObj = %obj;
  272. }
  273. function InspectApply()
  274. {
  275. %obj = InspectObjectName.refObj;
  276. if( !isObject( %obj ) )
  277. return;
  278. // Update name and internal name
  279. %obj.setName( InspectObjectName.getValue() );
  280. %obj.setInternalName( InspectObjectInternalName.getValue() );
  281. // Update inspected object information.
  282. InspectFields.inspect( %obj );
  283. }
  284. function InspectDelete()
  285. {
  286. %obj = InspectObjectName.refObj;
  287. if( !isObject( %obj ) )
  288. return;
  289. %obj.delete();
  290. // Update inspected object information.
  291. InspectFields.inspect( 0 );
  292. // Update selected object properties
  293. InspectObjectName.setValue("");
  294. InspectObjectInternalName.setValue( "" );
  295. InspectObjectSimID.setValue( 0 );
  296. }
  297. function InspectTreeView::onSelect(%this, %obj)
  298. {
  299. Inspect(%obj);
  300. }
  301. function Tree(%obj)
  302. {
  303. Canvas.popDialog("simViewDlg");
  304. Canvas.pushDialog("simViewDlg", 20);
  305. InspectTreeView.open(%obj);
  306. }
  307. // MM: Added Dynamic group toggle support.
  308. function GuiInspector::toggleDynamicGroupScript(%this, %obj)
  309. {
  310. %this.toggleDynamicGroupExpand();
  311. %this.inspect(%obj);
  312. }
  313. // MM: Added group toggle support.
  314. function GuiInspector::toggleGroupScript(%this, %obj, %fieldName)
  315. {
  316. %this.toggleGroupExpand(%obj, %fieldName);
  317. %this.inspect(%obj);
  318. }
  319. // MM: Set All Group State support.
  320. function GuiInspector::setAllGroupStateScript(%this, %obj, %groupState)
  321. {
  322. %this.setAllGroupState(%groupState);
  323. %this.inspect(%obj);
  324. }