home *** CD-ROM | disk | FTP | other *** search
/ BURKS 2 / BURKS_AUG97.ISO / BURKS / LANGUAGE / SMALTALK / TEXTBOOK / PAPVW25 (.txt) < prev    next >
Text File  |  1997-04-22  |  16KB  |  783 lines

  1. 'From VisualWorks(R), Release 2.5 of September 26, 1995 on January 9, 1996 at 9:48:29 pm'!
  2.  
  3.  
  4. EngiLauncherIcon comment:
  5. '
  6.  
  7. Engi 010 (January 9, 1996)
  8. Copyright (C) 1994-1996 by Atsushi Aoki
  9.  
  10. '!
  11.  
  12. EngiMenuMaker comment:
  13. '
  14.  
  15. Engi 010 (January 9, 1996)
  16. Copyright (C) 1994-1996 by Atsushi Aoki
  17.  
  18. '!
  19.  
  20. EngiCalendarController comment:
  21. '
  22.  
  23. Engi 010 (January 9, 1996)
  24. Copyright (C) 1994-1996 by Atsushi Aoki
  25.  
  26. '!
  27.  
  28. EngiViewBuilderController comment:
  29. '
  30.  
  31. Engi 010 (January 9, 1996)
  32. Copyright (C) 1994-1996 by Atsushi Aoki
  33.  
  34. '!
  35.  
  36. EngiDisplayView comment:
  37. '
  38.  
  39. Engi 010 (January 9, 1996)
  40. Copyright (C) 1994-1996 by Atsushi Aoki
  41.  
  42. '!
  43.  
  44. EngiClockView comment:
  45. '
  46.  
  47. Engi 010 (January 9, 1996)
  48. Copyright (C) 1994-1996 by Atsushi Aoki
  49.  
  50. '!
  51.  
  52. EngiPuzzleController comment:
  53. '
  54.  
  55. Engi 010 (January 9, 1996)
  56. Copyright (C) 1994-1996 by Atsushi Aoki
  57.  
  58. '!
  59.  
  60. EngiDisplayController comment:
  61. '
  62.  
  63. Engi 010 (January 9, 1996)
  64. Copyright (C) 1994-1996 by Atsushi Aoki
  65.  
  66. '!
  67.  
  68. EngiPuzzleView comment:
  69. '
  70.  
  71. Engi 010 (January 9, 1996)
  72. Copyright (C) 1994-1996 by Atsushi Aoki
  73.  
  74. '!
  75.  
  76. EngiBrowser comment:
  77. '
  78.  
  79. Engi 010 (January 9, 1996)
  80. Copyright (C) 1994-1996 by Atsushi Aoki
  81.  
  82. '!
  83.  
  84.  
  85. !EngiBrowser methodsFor: 'initialize-release'!
  86.  
  87. initialize
  88.     organization := Smalltalk organization.
  89.     meta := false.
  90.     categoryList := SelectionInList with: self getCategoryList.
  91.     classList := SelectionInList with: List new.
  92.     protocolList := SelectionInList with: List new.
  93.     selectorList := SelectionInList with: List new.
  94.     textValue := Text new asValue.
  95.     categoryList selectionIndexHolder onChangeSend: #changedCategory to: self.
  96.     classList selectionIndexHolder onChangeSend: #changedClass to: self.
  97.     protocolList selectionIndexHolder onChangeSend: #changedProtocol to: self.
  98.     selectorList selectionIndexHolder onChangeSend: #changedSelector to: self.
  99.     metaHolder := AspectAdaptor subject: self sendsUpdates: true.
  100.     metaHolder accessWith: #meta assignWith: #meta:! !
  101.  
  102. !EngiBrowser methodsFor: 'category list'!
  103.  
  104. getCategoryList
  105.     | engiCategories |
  106.     engiCategories := self engiClasses collect: [:each | each category].
  107.     ^(organization categories select: [:each | (engiCategories includes: each)
  108.             or: [EngiSystem system , '*' match: each]]) asList! !
  109.  
  110. !EngiBrowser methodsFor: 'class list'!
  111.  
  112. getClassList
  113.     | engiClassNames |
  114.     category == nil ifTrue: [^List new].
  115.     engiClassNames := self engiClassNames asSet.
  116.     ^((organization listAtCategoryNamed: category)
  117.         select: [:each | engiClassNames includes: each]) asList! !
  118.  
  119. EngiBrowser removeSelector: #categoryList!
  120.  
  121. EngiBrowser removeSelector: #classList!
  122.  
  123. EngiBrowser reorganizeFromString: '(''initialize-release'' #initialize)
  124. (''copying'' #postCopy)
  125. (''category list'' #categoryMenu #getCategoryList)
  126. (''class list'' #classMenu #getClassList)
  127. (''private-category functions'' #addCategory #editCategories #pickAClass: #removeCategory #renameCategory #updateCategories)
  128. (''private-class functions'' #acceptClass:from: #removeClass #renameClass)
  129. (''private-engi system'' #engiCategoryMenu #engiClasses #engiClassMenu #engiClassNames #flushEngiClasses)
  130. '!
  131.  
  132.  
  133.  
  134. !EngiBrowser class methodsFor: 'interface specs'!
  135.  
  136. windowSpec
  137.     "UIPainter new openOnClass: self andSelector: #windowSpec"
  138.  
  139.     ^#(#FullSpec 
  140.         #window: 
  141.         #(#WindowSpec 
  142.             #label: 'Engi System Browser' 
  143.             #min: #(#Point 400 250 ) 
  144.             #bounds: #(#Rectangle 50 50 450 300 ) ) 
  145.         #component: 
  146.         #(#SpecCollection 
  147.             #collection: #(
  148.                 #(#SequenceViewSpec 
  149.                     #layout: #(#LayoutFrame 1 0 1 0 -1 0.25 -1 0.35 ) 
  150.                     #name: #categoryList 
  151.                     #flags: 15 
  152.                     #model: #categoryList 
  153.                     #callbacksSpec: 
  154.                     #(#UIEventCallbackSubSpec 
  155.                         #doubleClickSelector: #spawnCategory 
  156.                         #requestValueChangeSelector: #changeRequest ) 
  157.                     #menu: #categoryMenuHolder ) 
  158.                 #(#SequenceViewSpec 
  159.                     #layout: #(#LayoutFrame 1 0.25 1 0 -1 0.5 -25 0.35 ) 
  160.                     #name: #classList 
  161.                     #flags: 15 
  162.                     #model: #classList 
  163.                     #callbacksSpec: 
  164.                     #(#UIEventCallbackSubSpec 
  165.                         #doubleClickSelector: #spawnClassOrHierarchy 
  166.                         #requestValueChangeSelector: #changeRequest ) 
  167.                     #menu: #classMenuHolder ) 
  168.                 #(#SubCanvasSpec 
  169.                     #layout: #(#LayoutFrame 0 0.25 -24 0.35 0 0.5 0 0.35 ) 
  170.                     #flags: 0 
  171.                     #majorKey: #Browser 
  172.                     #minorKey: #metaSpec ) 
  173.                 #(#SequenceViewSpec 
  174.                     #layout: #(#LayoutFrame 1 0.5 1 0 -1 0.75 -1 0.35 ) 
  175.                     #name: #protocolList 
  176.                     #flags: 15 
  177.                     #model: #protocolList 
  178.                     #callbacksSpec: 
  179.                     #(#UIEventCallbackSubSpec 
  180.                         #doubleClickSelector: #spawnProtocol 
  181.                         #requestValueChangeSelector: #changeRequest ) 
  182.                     #menu: #protocolMenuHolder ) 
  183.                 #(#SequenceViewSpec 
  184.                     #layout: #(#LayoutFrame 1 0.75 1 0 -1 1 -1 0.35 ) 
  185.                     #name: #selectorList 
  186.                     #flags: 15 
  187.                     #model: #selectorList 
  188.                     #callbacksSpec: 
  189.                     #(#UIEventCallbackSubSpec 
  190.                         #doubleClickSelector: #spawnMethod 
  191.                         #requestValueChangeSelector: #changeRequest ) 
  192.                     #menu: #selectorMenuHolder ) 
  193.                 #(#TextEditorSpec 
  194.                     #layout: #(#LayoutFrame 1 0 1 0.35 -1 1 -1 1 ) 
  195.                     #name: #textValue 
  196.                     #model: #textValue 
  197.                     #callbacksSpec: 
  198.                     #(#UIEventCallbackSubSpec 
  199.                         #valueChangeSelector: 
  200.                         #textAccepted: ) 
  201.                     #tabable: true 
  202.                     #menu: #textMenuHolder ) ) ) )! !
  203.  
  204. EngiBrowser class removeSelector: #openOn:withTextState:!
  205.  
  206. EngiBrowser class reorganizeFromString: '(''class initialization'' #flushMenus)
  207. (''interface specs'' #windowSpec)
  208. (''examples'' #example1)
  209. '!
  210.  
  211.  
  212. EngiVariable comment:
  213. '
  214.  
  215. Engi 010 (January 9, 1996)
  216. Copyright (C) 1994-1996 by Atsushi Aoki
  217.  
  218. '!
  219.  
  220. EngiFontModel comment:
  221. '
  222.  
  223. Engi 010 (January 9, 1996)
  224. Copyright (C) 1994-1996 by Atsushi Aoki
  225.  
  226. '!
  227.  
  228. EngiVisualTransporter comment:
  229. '
  230.  
  231. Engi 010 (January 9, 1996)
  232. Copyright (C) 1994-1996 by Atsushi Aoki
  233.  
  234. '!
  235.  
  236. EngiEncapsulator comment:
  237. '
  238.  
  239. Engi 010 (January 9, 1996)
  240. Copyright (C) 1994-1996 by Atsushi Aoki
  241.  
  242. '!
  243.  
  244. EngiColorView comment:
  245. '
  246.  
  247. Engi 010 (January 9, 1996)
  248. Copyright (C) 1994-1996 by Atsushi Aoki
  249.  
  250. '!
  251.  
  252. EngiCalendarModel comment:
  253. '
  254.  
  255. Engi 010 (January 9, 1996)
  256. Copyright (C) 1994-1996 by Atsushi Aoki
  257.  
  258. '!
  259.  
  260. EngiGeometric comment:
  261. '
  262.  
  263. Engi 010 (January 9, 1996)
  264. Copyright (C) 1994-1996 by Atsushi Aoki
  265.  
  266. '!
  267.  
  268. EngiBranch comment:
  269. '
  270.  
  271. Engi 010 (January 9, 1996)
  272. Copyright (C) 1994-1996 by Atsushi Aoki
  273.  
  274. '!
  275.  
  276. EngiMultipleChoiceModel comment:
  277. '
  278.  
  279. Engi 010 (January 9, 1996)
  280. Copyright (C) 1994-1996 by Atsushi Aoki
  281.  
  282. '!
  283.  
  284. EngiSingleChoiceModel comment:
  285. '
  286.  
  287. Engi 010 (January 9, 1996)
  288. Copyright (C) 1994-1996 by Atsushi Aoki
  289.  
  290. '!
  291.  
  292. EngiFileChoiceModel comment:
  293. '
  294.  
  295. Engi 010 (January 9, 1996)
  296. Copyright (C) 1994-1996 by Atsushi Aoki
  297.  
  298. '!
  299.  
  300.  
  301. !EngiFileChoiceModel methodsFor: 'initialize-release'!
  302.  
  303. initialize
  304.     super initialize.
  305.     autoRead := false asValue! !
  306.  
  307. !EngiFileChoiceModel methodsFor: 'change messages'!
  308.  
  309. changeRequest
  310.     builder notNil
  311.         ifTrue: 
  312.             [| text |
  313.             text := builder componentAt: #text.
  314.             ^super changeRequest and: [text == nil or: [text widget updateRequest]]]
  315.         ifFalse: [^true]! !
  316.  
  317. !EngiFileChoiceModel methodsFor: 'private'!
  318.  
  319. isEditor
  320.     builder notNil
  321.         ifTrue: [^(builder componentAt: #list)
  322.                 == nil]
  323.         ifFalse: [^false]! !
  324.  
  325. EngiClassBranch comment:
  326. '
  327.  
  328. Engi 010 (January 9, 1996)
  329. Copyright (C) 1994-1996 by Atsushi Aoki
  330.  
  331. '!
  332.  
  333. EngiPuzzleModel comment:
  334. '
  335.  
  336. Engi 010 (January 9, 1996)
  337. Copyright (C) 1994-1996 by Atsushi Aoki
  338.  
  339. '!
  340.  
  341. EngiCalculatorController comment:
  342. '
  343.  
  344. Engi 010 (January 9, 1996)
  345. Copyright (C) 1994-1996 by Atsushi Aoki
  346.  
  347. '!
  348.  
  349. EngiColorController comment:
  350. '
  351.  
  352. Engi 010 (January 9, 1996)
  353. Copyright (C) 1994-1996 by Atsushi Aoki
  354.  
  355. '!
  356.  
  357. EngiLauncherView comment:
  358. '
  359.  
  360. Engi 010 (January 9, 1996)
  361. Copyright (C) 1994-1996 by Atsushi Aoki
  362.  
  363. '!
  364.  
  365. EngiClockModel comment:
  366. '
  367.  
  368. Engi 010 (January 9, 1996)
  369. Copyright (C) 1994-1996 by Atsushi Aoki
  370.  
  371. '!
  372.  
  373. EngiTurtle comment:
  374. '
  375.  
  376. Engi 010 (January 9, 1996)
  377. Copyright (C) 1994-1996 by Atsushi Aoki
  378.  
  379. '!
  380.  
  381. EngiClockController comment:
  382. '
  383.  
  384. Engi 010 (January 9, 1996)
  385. Copyright (C) 1994-1996 by Atsushi Aoki
  386.  
  387. '!
  388.  
  389. EngiCalendarView comment:
  390. '
  391.  
  392. Engi 010 (January 9, 1996)
  393. Copyright (C) 1994-1996 by Atsushi Aoki
  394.  
  395. '!
  396.  
  397. EngiTextModel comment:
  398. '
  399.  
  400. Engi 010 (January 9, 1996)
  401. Copyright (C) 1994-1996 by Atsushi Aoki
  402.  
  403. '!
  404.  
  405. EngiTopPreemptor comment:
  406. '
  407.  
  408. Engi 010 (January 9, 1996)
  409. Copyright (C) 1994-1996 by Atsushi Aoki
  410.  
  411. '!
  412.  
  413. EngiViewBuilderModel comment:
  414. '
  415.  
  416. Engi 010 (January 9, 1996)
  417. Copyright (C) 1994-1996 by Atsushi Aoki
  418.  
  419. '!