# # This file is encoded in (so called) SHIFT-JIS, # line delimitor is CR. # Cursor Animator Goodies for Squeak 2.3 bata Broken English description Cursor Animator Goodies for VisualWorks 2.5 and VisualWave 1.0 Copyright (c) 1995-1998 AOKI Atsushi 1998/01/05 http://www.sra.co.jp/people/aoki/SmalltalkGoodies/VisualWorks/CursAnim.st http://www.sra.co.jp/people/aoki/SmalltalkGoodies/VisualWorks/CursAnim.txt Summary: Here are many cases that notify the condition of progressing such as progress dialog, etc. But in Smalltalk, it is shown by changing mouse cursor conventionally. This mouse cursor animation goodies is based on it. Installing: FileIn this goodies and makes a class "CursorAnimator" in a category "Goodies-Progress". This source adds no change to existing classes or methods. It completes within self. When you want to restore your image, please remove this class "CursorAnimator" from your system, simply. how to use: Here are 2 sample animation for long task. "living watch" | cursorAnimator | cursorAnimator := CursorAnimator clockCursors. cursorAnimator showWhile: ["long task"]. "hand counting" | cursorAnimator | cursorAnimator := CursorAnimator handCursors. cursorAnimator showWhile: ["long task"]. Using is same as Cursor write showWhile: []. But the receiver of it is the instance of CursorAnimator. Here is a sample that shows all cursors in your image with animation. | cursorAnimator cursorCollection | cursorAnimator := CursorAnimator new. cursorCollection := OrderedCollection new. " ***** VisualWorks 2.5 and VisualWave 1.0 ***** #( #blank #bottomLeft #bull #caret #compactMemory #corner #crossHair #database #down #execute #garbage #hand #marker #normal #origin #quickGarbage #read #scroll #square #thumbsDown #thumbsUp #topRight #up #wait #write ) " #( #blank #bottomLeft #bottomRight #corner #crossHair #down #execute #marker #menu #move #normal #origin #read #rightArrow #square #topLeft #topRight #up #wait #write ) do: [:s | cursorCollection add: (Cursor perform: s)]. cursorAnimator cursors: cursorCollection. cursorAnimator tick: 500. cursorAnimator showWhile: [(Delay forSeconds: 20) wait]. See the second line from last. The instance of cursorAnimator knows from "tick:" message when changes its mouse cursor. This unit is milliseconds. ########################################################## 青木さんの http://www.sra.co.jp/people/aoki/SmalltalkGoodies/VisualWorks/CursAnim.st を Squeak 用にいじったものです。 ドキュメントは http://www.sra.co.jp/people/aoki/SmalltalkGoodies/VisualWorks/CursAnim.txt を参照してください。 ---------------------------------------------------------- 西原聡士 (NISHIHARA Satoshi) e-mail: mailto:nishis@zephyr.dti.ne.jp URL: http://www.zephyr.dti.ne.jp/~nishis/ ----------------------------------------------------------