Squeak Class Documentation category index | class index  
 
PaintBoxMorph
  category: Morphic-Support
  superclass: ImageMorph
  subclasses:

No comment. Sorry.

instance methods
  actions
  action
actionCursor
brush:action:nib:evt:
brushable
clear:with:evt:
colorable
currentColor:evt:
cursorFor:oldCursor:currentNib:color:
deleteCurrentStamp:
eyedropper:action:cursor:evt:
getColor
getNib
getSpecial
grabFromScreen:
indicateColorUnderMouse
keep:with:evt:
mouseUpBalk:
notCurrentlyPainting
pickup:action:cursor:evt:
pickupForm:
pickupForm:evt:
plainCursor
plainCursor:event:
ringColor
ringColorFor:
scrollStamps:action:evt:
setAction:evt:
showColor
showColorPalette:
stampCursorBeCursorFor:
stampDeEmphasize
stampForm
stampHolder
stampHolder:
takeColor:event:
takeColorEvt:from:
toggleShapes
toggleStamps
tool
tool:action:cursor:evt:
toss:with:evt:
undo:with:evt:

  initialization
  addWeakDependent:
beStatic
createButtons
fixupButtons
init3
init4
initialize
loadColorChooser
loadCursors
loadOnImage:
loadPressedImage:
loadoffImage:
moveButtons
noVeneer
notifyWeakDependentsWith:

  object fileIn
 

  other
  addCustomMenuItems:hand:
colorMemory
colorMemory:
colorPatch
focusMorph
focusMorph:
isCandidateForAutomaticViewing
maxBounds
offsetFromMaxBounds
rotationTabForm
scaleTabForm
updateReferencesUsing:

  recent colors
  fixUpColorPicker
fixUpRecentColors
mouseDownRecent:with:
mouseStillDownRecent:with:
mouseUpRecent:with:
recentColor:

class methods
  as yet unclassified
  fixUpPrototype
initialize
initializeColorChart
new
prototype

instance methods
  actions top  
 

action


 

actionCursor

Return the cursor to use with this painting action/tool. Offset of the form must be set.


 

brush:action:nib:evt:

Set the current tool and action for the paintBox.


 

brushable

Return true if the current tool uses a brush.


 

clear:with:evt:


 

colorable

Return true if the current tool uses a color.


 

currentColor:evt:

Accept a color from the outside. (my colorMemoryMorph must call takeColorEvt: evt from: colorPicker instead)


 

cursorFor:oldCursor:currentNib:color:

Return the cursor to use with this painting action/tool. Offset of the
form must be set.


 

deleteCurrentStamp:

The trash is telling us to delete the currently selected stamp


 

eyedropper:action:cursor:evt:

Take total control and pick up a color!!


 

getColor


 

getNib


 

getSpecial


 

grabFromScreen:

Allow the user to grab a picture from the screen OUTSIDE THE PAINTING AREA and install it in a blank stamp. To get a stamp in the painting area, click on the stamp tool in a blank stamp.


 

indicateColorUnderMouse

Track the mouse with the special eyedropper cursor, and accept whatever color is under the mouse as the currently-chosen color; reflect that choice in the feedback box, and return that color.


 

keep:with:evt:

Showing of the corrent palette (viewer or noPalette) is done by the block submitted to the SketchMorphEditor, see (EToyHand makeNewDrawing) and (SketchMorph editDrawingInWorld:forBackground:).


 

mouseUpBalk:

A button I own got a mouseDown, but the user moved out before letting up. Prevent this for the current tool. Some tool must stay selected.


 

notCurrentlyPainting


 

pickup:action:cursor:evt:

Special version for pickup: and stamp:, because of these tests


 

pickupForm:

Install the new picture in this stamp


 

pickupForm:evt:

Install the new picture in this stamp


 

plainCursor

Return the cursor to use with this painting action/tool. Offset of the form must be set.


 

plainCursor:event:

Set the cursor to use with this painting action/tool. Offset of the form must be set.


 

ringColor

Choose a color that contrasts with my current color. If that color isn't redish, return red. Otherwise, return green


 

ringColorFor:

Choose a color that contrasts with my current color. If that color isn't redish, return red. Otherwise, return green


 

scrollStamps:action:evt:

Move the stamps over


 

setAction:evt:

Find this button and turn it on. Does not work for stamps or pickups


 

showColor

Display the current color in all brushes, both on and off.


 

showColorPalette:


 

stampCursorBeCursorFor:

User just chose a stamp. Take that stamp picture and make it be the cursor for the tool named.


 

stampDeEmphasize

Turn off an emphasized stamp. Was turned on in pickup:action:cursor:


 

stampForm

Return the selected stamp


 

stampHolder


 

stampHolder:


 

takeColor:event:

Accept the given color programmatically


 

takeColorEvt:from:

Accept a new color from the colorMemory. Programs use currentColor: instead. Do not do this before the picker has a chance to set its own color!


 

toggleShapes

The sub panel that has the shape tools on it. Rect, line...


 

toggleStamps

The sub panel that has the stamps in it. For saving and moving parts of an image.


 

tool


 

tool:action:cursor:evt:

Set the current tool and action for the paintBox.


 

toss:with:evt:

Reject the painting. Showing noPalette is done by the block submitted to the SketchEditorMorph


 

undo:with:evt:


  initialization top  
 

addWeakDependent:


 

beStatic


 

createButtons

Create buttons one at a time and let the user place them over the background. Later can move them again by turning on AuthorModeOwner in ThreePhaseButtonMorph.
self createButtons.


 

fixupButtons


 

init3

Just a record of how we loaded in the latest paintbox button images


 

init4

Just a record of how Ted loaded in the paintbox button images, Feb 98


 

initialize


 

loadColorChooser

Load Forms for ColorMemoryMorph.


 

loadCursors

Display the form containing the cursors. Transparent is (Color r: 1.0 g: 0 b: 1.0). Grab the forms one at a time, and they are stored away.
self loadCursors.


 

loadOnImage:

Read in and convert the image for the paintBox with the buttons
on. A .bmp 24-bit image. For each button, cut that chunk out and save it.


 

loadPressedImage:

Read in and convert the image for the paintBox with the buttons
on. A .bmp 24-bit image. For each button, cut that chunk out and save it.


 

loadoffImage:

Read in and convert the background image for the paintBox. All
buttons off. A .bmp 24-bit image.


 

moveButtons

Move buttons one at a time and let the user place them over the background. Later can move them again by turning on AuthorModeOwner in ThreePhaseButtonMorph.
self createButtons.


 

noVeneer

For a palette with a background (off) image, clear that image.
But first, for each button, cut that chunk out and save it in the offImage
part.


 

notifyWeakDependentsWith:


  object fileIn top  

  other top  
 

addCustomMenuItems:hand:

super addCustomMenuItems: aCustomMenu hand: aHandMorph.


 

colorMemory


 

colorMemory:


 

colorPatch


 

focusMorph

Note: For backward compatibility we search the world for a SketchEditorMorph if the current focus morph is nil


 

focusMorph:

Set the new focus morph


 

isCandidateForAutomaticViewing


 

maxBounds

fullBounds if all flop-out parts of the paintBox were showing.


 

offsetFromMaxBounds

location of normal PaintBox within maxBounds.


 

rotationTabForm


 

scaleTabForm


 

updateReferencesUsing:

Fix up stampHolder which is a ScrollingToolHolder, which is not a Morph


  recent colors top  
 

fixUpColorPicker


 

fixUpRecentColors


 

mouseDownRecent:with:


 

mouseStillDownRecent:with:


 

mouseUpRecent:with:


 

recentColor:

Remember the color as one of our recent colors


class methods
  as yet unclassified top  
 

fixUpPrototype

PaintBoxMorph fixUpPrototype


 

initialize

PaintBoxMorph initialize


 

initializeColorChart

PaintBoxMorph initializeColorChart


 

new

Answer a new instance of the receiver (which is a class) with no indexable variables. Fail if the class is indexable.


 

prototype

Later we will be a subclass of Model, and it will have a general version of this