Squeak Class Documentation category index | class index  
 
BitEditor
  category: ST80-Editors
  superclass: MouseMenuController
  subclasses:

I am a bit-magnifying tool for editing small Forms directly on the display screen. I continue to be active until the user points outside of my viewing area.

instance methods
  basic control sequence
  controlInitialize
controlTerminate

  control defaults
  isControlActive
redButtonActivity

  initialize-release
  release

  menu messages
  accept
cancel
fileOut
setColor:
setTransparentColor
test

  pluggable menus
  getPluggableYellowButtonMenu:

  private
 

  view access
  view:

class methods
  class initialization
  initialize

  examples
  magnifyOnScreen
magnifyWithSmall

  instance creation
  openOnForm:
openOnForm:at:
openOnForm:at:scale:
openScreenViewOnForm:at:magnifiedAt:scale:

  private
  bitEdit:at:scale:remoteView:
buildColorMenu:colorCount:
locateMagnifiedView:scale:

instance methods
  basic control sequence top  
 

controlInitialize

Sent by Controller|startUp as part of the standard control sequence, it
provides a place in the standard control sequence for initializing the
receiver (taking into account the current state of its model and view). It
should be redefined in subclasses to perform some specific action.


 

controlTerminate

Provide a place in the standard control sequence for terminating the
receiver (taking into account the current state of its model and view). It
should be redefined in subclasses to perform some specific action.


  control defaults top  
 

isControlActive

In contrast to class Controller, only blue button but not yellow button
events will end the receiver's control loop.


 

redButtonActivity

Determine which item in the red button pop-up menu is selected. If one
is selected, then send the corresponding message to the object designated
as the menu message receiver.


  initialize-release top  
 

release

Breaks the cycle between the receiver and its view. It is usually not
necessary to send release provided the receiver's view has been properly
released independently.


  menu messages top  
 

accept

The edited information should now be accepted by the view.


 

cancel

The edited informatin should be forgotten by the view.


 

fileOut


 

setColor:

Set the color that the next edited dots of the model to be the argument,
aSymbol. aSymbol can be any color changing message understood by a
Form, such as white or black.


 

setTransparentColor


 

test


  pluggable menus top  
 

getPluggableYellowButtonMenu:


  private top  

  view access top  
 

view:

Controller|view: and Controller|model: are sent by View|controller: in
order to coordinate the links between the model, view, and controller. In
ordinary usage, the receiver is created and passed as the parameter to
View|controller: and the receiver's model and view links are set up
automatically by the view.


class methods
  class initialization top  
 

initialize

The Bit Editor is the only controller to override the use of the blue
button with a different pop-up menu. Initialize this menu.


  examples top  
 

magnifyOnScreen

Bit editing of an area of the display screen. User designates a
rectangular area that is magnified by 8 to allow individual screens dots to
be modified. red button is used to set a bit to black and yellow button is
used to set a bit to white. Editor is not scheduled in a view. Original
screen location is updated immediately. This is the same as FormEditor
magnify.


 

magnifyWithSmall

Also try:
BitEditor openOnForm:
(Form extent: 32@32 depth: Display depth)
BitEditor openOnForm:
((MaskedForm extent: 32@32 depth: Display depth)
withTransparentPixelValue: -1)


  instance creation top  
 

openOnForm:

Create and schedule a BitEditor on the form aForm at its top left corner.
Show the small and magnified view of aForm.


 

openOnForm:at:

Create and schedule a BitEditor on the form aForm at magnifiedLocation.
Show the small and magnified view of aForm.


 

openOnForm:at:scale:

Create and schedule a BitEditor on the form aForm. Show the small and
magnified view of aForm.


 

openScreenViewOnForm:at:magnifiedAt:scale:

Create and schedule a BitEditor on the form aForm. Show the magnified
view of aForm in a scheduled window.


  private top  
 

bitEdit:at:scale:remoteView:

Create a BitEditor on aForm. That is, aForm is a small image that will
change as a result of the BitEditor changing a second and magnified
view of me. magnifiedFormLocation is where the magnified form is to be
located on the screen. scaleFactor is the amount of magnification. This
method implements a scheduled view containing both a small and
magnified view of aForm. Upon accept, aForm is updated.


 

buildColorMenu:colorCount:

See BitEditor magnifyWithSmall.


 

locateMagnifiedView:scale:

Answer a rectangle at the location where the scaled view of the form,
aForm, should be displayed.