Squeak Class Documentation category index | class index  
 
ColorPickerMorph
  category: Morphic-Widgets
  superclass: SketchMorph
  subclasses:

No comment. Sorry.

instance methods
  accessing
  argument
argument:
deleteOnMouseUp
deleteOnMouseUp:
locationIndicator
originalColor:
selectedColor
selector
selector:
sourceHand
sourceHand:
target
target:
updateContinuously
updateContinuously:

  event handling
  handlesMouseDown:
inhibitDragging
mouseDown:
mouseUp:

  initialization
  buildChartForm
choseModalityFromPreference
initialize
initializeForPropertiesPanel
initializeModal:
updateSelectorDisplay

  menu
  addCustomMenuItems:hand:
pickUpColorFor:
toggleDeleteOnMouseUp
toggleUpdateContinuously

  object fileIn
 

  other
  addToWorld:near:
bestPositionNear:inWorld:
containsPoint:
delete
drawOn:
indicateColorUnderMouse
isCandidateForAutomaticViewing
isLikelyRecipientForMouseOverHalos
putUpFor:near:
trackColorUnderMouse

  private
  anchorAndRunModeless:
argumentsWith:
deleteAllBalloons
modalBalloonHelpAtPoint:
pickColorAt:
positionOfColor:
trackColorAt:
updateAlpha:
updateColor:feedbackColor:
updateTargetColor
updateTargetColorWith:

  stepping
  step
stepTime

class methods
  as yet unclassified
  initialize
perniciousBorderColor

instance methods
  accessing top  
 

argument


 

argument:


 

deleteOnMouseUp


 

deleteOnMouseUp:


 

locationIndicator


 

originalColor:

Set the receiver's original color. It is at this point that a command is launched to represent the action of the picker, in support of Undo.


 

selectedColor


 

selector


 

selector:

Set the selector to be associated with the receiver. Store it in the receiver's command, if appropriate


 

sourceHand


 

sourceHand:


 

target


 

target:


 

updateContinuously


 

updateContinuously:


  event handling top  
 

handlesMouseDown:

Do I want to receive mouseDown events (mouseDown:, mouseMove:, mouseUp:)?


 

inhibitDragging


 

mouseDown:

Handle a mouse down event. The default response is to let my eventHandler, if any, handle it.


 

mouseUp:

Handle a mouse up event. The default response is to let my eventHandler, if any, handle it.


  initialization top  
 

buildChartForm


 

choseModalityFromPreference

Decide whether to be modal or not by consulting the prevailing preference


 

initialize

Initialize the receiver. Obey the modalColorPickers preference when deciding how to configure myself. This is not quite satisfactory -- we'd like to have explicit calls tell us things like whether whether to be modal, whether to allow transparency, but for the moment, in grand Morphic fashion, this is rather inflexibly all housed right here


 

initializeForPropertiesPanel

Initialize the receiver. If beModal is true, it will be a modal color picker, else not


 

initializeModal:

Initialize the receiver. If beModal is true, it will be a modal color picker, else not


 

updateSelectorDisplay


  menu top  
 

addCustomMenuItems:hand:

Add custom menu items


 

pickUpColorFor:

Show the eyedropper cursor, and modally track the mouse through a mouse-down and mouse-up cycle


 

toggleDeleteOnMouseUp


 

toggleUpdateContinuously


  object fileIn top  

  other top  
 

addToWorld:near:


 

bestPositionNear:inWorld:


 

containsPoint:


 

delete

The moment of departure has come. If the receiver has an affiliated command, finalize it and have the system remember it. In any case, delete the receiver


 

drawOn:


 

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.


 

isCandidateForAutomaticViewing


 

isLikelyRecipientForMouseOverHalos


 

putUpFor:near:

Put the receiver up on the screen. Note highly variant behavior depending on the setting of the #modalColorPickers preference


 

trackColorUnderMouse

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.


  private top  
 

anchorAndRunModeless:

If user clicks on the drag-dot of a modal picker,
anchor it, and change to modeless operation.


 

argumentsWith:

Return an argument array appropriate to this action selector


 

deleteAllBalloons


 

modalBalloonHelpAtPoint:


 

pickColorAt:


 

positionOfColor:

Compute the position of the given color in the color chart form


 

trackColorAt:

Before the mouse comes down in a modal color picker, track the color under the cursor, and show it in the feedback box, but do not make transparency changes


 

updateAlpha:


 

updateColor:feedbackColor:

Set my selected color to the given color if it is different. Give user feedback. Inform the target of the change if the target and selector are not nil.


 

updateTargetColor


 

updateTargetColorWith:

Update the target so that it reflects aColor as the color choice


  stepping top  
 

step

Do some periodic activity. Use startStepping/stopStepping to start and stop getting sent this message. The time between steps is specified by this morph's answer to the stepTime message. The generic version dispatches control to the player, if any. The nasty circumlocation about owner's transformation is necessitated by the flexing problem that the player remains in the properties dictionary both of the flex and the real morph. In the current architecture, only the top renderer's pointer to the player should actually be honored for the purpose of firing.


 

stepTime

Answer the desired time between steps in milliseconds. This default implementation requests that the 'step' method be called once every second.


class methods
  as yet unclassified top  
 

initialize

ColorPickerMorph initialize


 

perniciousBorderColor

Answer the color of the border lines of a color picker; this color gets reported as you drag the mouse through from the translucent box to the true color area, for example, and can cause some difficulties in some special cases, so it is faithfully reported here in this hard-coded fashion in order that energetic clients wishing to handle it as special-case it can do so.