'From Squeakland 3.8-05 of 1 September 2005 [latest update: #527] on 23 September 2007 at 5:34:39 pm'! "Change Set: KotodamaOnSqueak-1.1.7-b Date: 23 September 2007 Author: Manabu Sugiura ことだま on Squeak 1.1.7b 論理思考とプログラミング用に少し改変 ワールドメニューを1.1.6のバージョンに戻した(テキストとの整合性を保つため) スタンプする をデフォルトで表示されるように変更 カーソル位置のものの数 を カーソル位置のものの数値 に変更 "!]lang[(92 4 18 18 2 9 5 26 1 6 1 17 1 11 1 1 1 12 1 3 2)0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0! !DamaMethodInterface class methodsFor: 'variable' stamp: 'ms 9/23/2007 17:01'! getNumberAtCursor | dama | dama _ DamaVariableInterface new. dama initialize: #getNumberAtCursor variableName: 'カーソル位置にあるものの数値'. ^dama!]lang[(116 14 10)0,5,0! ! !KotodamaDefaultVocabulary methodsFor: 'kotodama' stamp: 'ms 9/13/2007 21:17'! additionsToViewerCategory: aCategorySymbol | | (aCategorySymbol = #基本 ) ifTrue: [ ^#( #基本  ( (command forward: 'Moves the object forward in the direction it is heading' Number) (command turn: 'Change the heading of the object by the specified amount' Number) (slot colorSees 'whether the given color sees the given color' Boolean readOnly Player color:sees: unused unused) (slot penDown 'whether the pen is currently down' Boolean readWrite Player getPenDown Player setPenDown:) (command clearOwnersPenTrails 'clear all pen trails in my containing playfield') (command beep: 'Make the specified sound' Sound) ) ) ]. (aCategorySymbol = #色と輪郭) ifTrue: [ ^#( 色と輪郭 ( (slot color 'The color of the object' Color readWrite Player getColor Player setColor:) (slot gradientFill 'Whether a gradient fill should be used' Boolean readWrite Player getUseGradientFill Player setUseGradientFill:) (slot secondColor 'The second color used when gradientFill is in effect' Color readWrite Player getSecondColor Player setSecondColor:) (slot radialFill 'Whether the gradient fill, if used, should be radial' Boolean readWrite Player getRadialGradientFill Player setRadialGradientFill:) (slot borderStyle 'The style of the object''s border' BorderStyle readWrite Player getBorderStyle player setBorderStyle:) (slot borderColor 'The color of the object''s border' Color readWrite Player getBorderColor Player setBorderColor:) (slot borderWidth 'The width of the object''s border' Number readWrite Player getBorderWidth Player setBorderWidth:) (slot roundedCorners 'Whether corners should be rounded' Boolean readWrite Player getRoundedCorners Player setRoundedCorners:) ) ) ]. (aCategorySymbol = #幾何1(座標)) ifTrue: [ ^#( 幾何1(座標) ( (slot x 'The x coordinate' Number readWrite Player getX Player setX:) (slot y 'The y coordinate' Number readWrite Player getY Player setY:) (slot top 'The top edge' Number readWrite Player getTop Player setTop:) (slot bottom 'The bottom edge' Number readWrite Player getBottom Player setBottom:) (slot left 'The left edge' Number readWrite Player getLeft Player setLeft:) (slot right 'The right edge' Number readWrite Player getRight Player setRight:) ) ) ]. (aCategorySymbol = #幾何2(向きと大きさ)) ifTrue: [ ^#( 幾何2(向きと大きさ) ( (slot heading 'Which direction the object is facing. 0 is straight up' Number readWrite Player getHeading Player setHeading:) (slot scaleFactor 'The factor by which the object is magnified' Number readWrite Player getScaleFactor Player setScaleFactor:) (slot length 'The length' Number readWrite Player getLength Player setLength:) (slot width 'The width' Number readWrite Player getWidth Player setWidth:) ) ) ]. (aCategorySymbol = #幾何3(極座標) ) ifTrue: [ ^#( 幾何3(極座標) ( (slot distance 'The length of the vector connecting the origin to the object''s position' Number readWrite Player getDistance Player setDistance:) (slot theta 'The angle between the positive x-axis and the vector connecting the origin to the object''s position' Number readWrite Player getTheta Player setTheta: ) ) ) ]. (aCategorySymbol = #センサー ) ifTrue: [ ^#( #センサー ( (slot isOverColor 'whether any part of the object is over the given color' Boolean readOnly Player seesColor: unused unused) (slot isUnderMouse 'whether the object is under the current mouse position' Boolean readOnly Player getIsUnderMouse unused unused) (slot colorSees 'whether the given color sees the given color' Boolean readOnly Player color:sees: unused unused) ) ) ]. (aCategorySymbol = #リモートスクリプティング) ifTrue: [ ^#( スクリプトの操作 ( (command startScript: 'start the given script ticking' ScriptName) (command pauseScript: 'make the given script be ' ScriptName) (command stopScript: 'make the given script be ' ScriptName) ) ) ]. (aCategorySymbol = #表示) ifTrue: [ ^#( 表示 ( (command wearCostumeOf: 'wear the costume of...' Player) (command show 'make the object visible') (command hide 'make the object invisible') ) ) ]. (aCategorySymbol = #動き) ifTrue: [ ^#( 動き ( (command forward: 'Moves the object forward in the direction it is heading' Number) (command turn: 'Change the heading of the object by the specified amount' Number) ) ) ]. (aCategorySymbol = #その他) ifTrue: [ ^#( その他 ( (command doMenuItem: 'do the menu item' Menu) (slot copy 'returns a copy of this object' Player readOnly Player getNewClone unused unused) (command erase 'remove this object from the screen') (command stamp '') ) ) ]. (aCategorySymbol = #動き) ifTrue: [ ^ Morph additionsToViewerCategoryMotion ]. (aCategorySymbol = #ペン) ifTrue: [ ^ Morph additionsToViewerCategoryPenUse ]. (aCategorySymbol = #レイアウト) ifTrue: [ ^ Morph additionsToViewerCategoryLayout ]. (aCategorySymbol = #背後の観察) ifTrue: [ ^ Morph additionsToViewerCategoryObservation ]. ^ OrderedCollection new.!]lang[(71 3 20 3 574 4 19 4 1052 7 19 7 538 11 19 11 470 8 22 8 361 4 23 4 424 12 21 8 244 2 21 2 195 2 21 2 216 3 21 3 271 2 76 2 76 5 76 5 88)0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0! ! !KotodamaPreference class methodsFor: 'initialize' stamp: 'ms 9/13/2007 21:19'! setDefaultParameters parameters at: #TestTileDropable put: true. parameters at: #worldMenuType put: #default.! ! !PasteUpMorph methodsFor: 'world menu' stamp: 'ms 9/13/2007 21:22'! buildWorldMenu: t1 ((KotodamaPreference at: #worldMenuType) = #kotodama) ifTrue: [ ^ (TheWorldMenu new world: self project: (self project ifNil: [Project current]) hand: t1 hand) buildKotodamaWorldMenu ]. ((KotodamaPreference at: #worldMenuType) = #default) ifTrue: [ ^ (TheWorldMenu new world: self project: (self project ifNil: [Project current]) hand: t1 hand) buildWorldMenu ]. ! ! !TheWorldMenu methodsFor: 'construction' stamp: 'ms 9/13/2007 21:26'! buildWorldMenu | t1 | t1 := MenuMorph new defaultTarget: self. t1 commandKeyHandler: self. self colorForDebugging: t1. t1 addStayUpItem. self fillIn: t1 from: {{'previous project'. {#myWorld. #goBack}. 'return to the most-recently-visited project'}. {'jump to project...'. {#myWorld. #jumpToProject}. 'put up a list of all projects, letting me choose one to go to'}. {'save project on file...'. {#myWorld. #saveOnFile}. 'save this project on a file'}. {'load project from file...'. {self. #loadProject}. 'load a project from a file'}. nil}. myWorld addUndoItemsTo: t1. self fillIn: t1 from: {{'restore display (r)'. {World. #restoreMorphicDisplay}. 'repaint the screen -- useful for removing unwanted display artifacts, lingering cursors, etc.'}. nil}. Preferences simpleMenus ifFalse: [self fillIn: t1 from: {{'open...'. {self. #openWindow}}. {'windows...'. {self. #windowsDo}}. {'changes...'. {self. #changesDo}}}]. self fillIn: t1 from: {{'help...'. {self. #helpDo}. 'puts up a menu of useful items for updating the system, determining what version you are running, and much else'}. {'appearance...'. {self. #appearanceDo}. 'put up a menu offering many controls over appearance.'}}. Preferences simpleMenus ifFalse: [self fillIn: t1 from: {{'do...'. {Utilities. #offerCommonRequests}. 'put up an editible list of convenient expressions, and evaluate the one selected.'}}]. self fillIn: t1 from: {nil. {'objects (o)'. {#myWorld. #activateObjectsTool}. 'A tool for finding and obtaining many kinds of objects'}. {'new morph...'. {self. #newMorph}. 'Offers a variety of ways to create new objects'}. nil. {'authoring tools...'. {self. #scriptingDo}. 'A menu of choices useful for authoring'}. {'playfield options...'. {self. #playfieldDo}. 'A menu of options pertaining to this object as viewed as a playfield'}. {'flaps...'. {self. #flapsDo}. 'A menu relating to use of flaps. For best results, use "keep this menu up"'}. {'projects...'. {self. #projectDo}. 'A menu of commands relating to use of projects'}}. Preferences simpleMenus ifFalse: [self fillIn: t1 from: {{'print PS to file...'. {self. #printWorldOnFile}. 'write the world into a postscript file'}. {'debug...'. {self. #debugDo}. 'a menu of debugging items'}}]. self fillIn: t1 from: {nil. {'save'. {SmalltalkImage current. #saveSession}. 'save the current version of the image on disk'}. {'save as...'. {SmalltalkImage current. #saveAs}. 'save the current version of the image on disk under a new name.'}. {'save as new version'. {SmalltalkImage current. #saveAsNewVersion}. 'give the current image a new version-stamped name and save it under that name on disk.'}. {'save and quit'. {self. #saveAndQuit}. 'save the current image on disk, and quit out of Squeak.'}. {'quit'. {self. #quitSession}. 'quit out of Squeak.'}}. ^ t1! ! !TheWorldMenu methodsFor: 'construction' stamp: 'ms 9/13/2007 21:29'! helpMenu "Build the help menu for the world." | menu | menu := self menu: 'help...'. self fillIn: menu from: { {'about this system...'. {SmalltalkImage current. #aboutThisSystem}. 'current version information.'}. {'update code from server'. {Utilities. #updateFromServer}. 'load latest code updates via the internet'}. {'preferences...'. {Preferences. #openPreferencesInspector}. 'view and change various options.'}. {'set language...' . {Project. #chooseNaturalLanguage}. 'choose the language in which tiles should be displayed.'} . nil. {'カテゴリレベルを変更...' . { KotodamaCategoryMenu . #chooseCategoryLevel}. 'change Kotodama Category Level'}. {'ことだまonSqueakのバージョン表示...' . { KotodamaVersion . #showVersion } . 'show Kotodama Version' }. nil. {'部品フラップ初期化...'. {DamaUtil. #resetSupplyFlap}. 'SupplyFlap reset'}. {'部品フラップ編集...'. {DamaUtil. #editSupplyFlap}. 'SupplyFlap edit'}. {'ナビゲータフラップ初期化...'. {DamaUtil. #resetNavigatorFlap}. 'NavigatorFlap reset'}. {'ナビゲータフラップ編集...'. {DamaUtil. #editNavigatorFlap}. 'NavigatorFlap edit'}. nil. {'テスト系タイルをドロップ可能にする' . { KotodamaPreference . #setTestTileDropable }. '...' }. {'テスト系タイルをドロップ不可能にする' . { KotodamaPreference . #setTestTileDropunable }. '...' }. nil. {'command-key help'. { Utilities . #openCommandKeyHelp}. 'summary of keyboard shortcuts.'} }. self addGestureHelpItemsTo: menu. self fillIn: menu from: { {'world menu help'. { self . #worldMenuHelp}. 'helps find menu items buried in submenus.'}. "{'info about flaps' . { Utilities . #explainFlaps}. 'describes how to enable and use flaps.'}." {'font size summary' . { TextStyle . #fontSizeSummary}. 'summary of names and sizes of available fonts.'}. {'useful expressions' . { Utilities . #openStandardWorkspace}. 'a window full of useful expressions.'}. {'annotation setup...' . { Preferences . #editAnnotations}. 'Click here to get a little window that will allow you to specify which types of annotations, in which order, you wish to see in the annotation panes of browsers and other tools'}. nil. {'graphical imports' . { Imports default . #viewImages}. 'view the global repository called ImageImports; you can easily import external graphics into ImageImports via the FileList'}. {'standard graphics library' . { ScriptingSystem . #inspectFormDictionary}. 'lets you view and change the system''s standard library of graphics.'}. nil. {'telemorphic...' . {self. #remoteDo}. 'commands for doing multi-machine "telemorphic" experiments'}. {#soundEnablingString . { Preferences . #toggleSoundEnabling}. 'turning sound off will completely disable Squeak''s use of sound.'}. {'definition for...' . { Utilities . #lookUpDefinition}. 'if connected to the internet, use this to look up the definition of an English word.'}. nil. {'set author initials...' . { Utilities . #setAuthorInitials }. 'supply initials to be used to identify the author of code and other content.'}. {'vm statistics' . { self . #vmStatistics}. 'obtain some intriguing data about the vm.'}. nil. {'purge undo records' . { CommandHistory . #resetAllHistory }. 'save space by removing all the undo information remembered in all projects.'}. {'space left' . { self . #garbageCollect}. 'perform a full garbage-collection and report how many bytes of space remain in the image.'}. }. ^menu !]lang[(637 10 95 4 8 8 97 9 62 8 60 12 68 11 74 17 65 18 2412)0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0,5,0! ! "Postscript:" KotodamaVersion version: '1.1.7-b'. KotodamaCategoryMenu switchCategory: 1. KotodamaPreference setDefaultParameters. !