UIObjectView.st
changeset 360 1a4ec4aa2c67
parent 353 6687441ccd4d
child 374 421f8a3723f1
equal deleted inserted replaced
359:6193ef5b6e74 360:1a4ec4aa2c67
    13 
    13 
    14 
    14 
    15 ObjectView subclass:#UIObjectView
    15 ObjectView subclass:#UIObjectView
    16 	instanceVariableNames:'saveSelection inputView enableChannel undoHistory copiedExtent
    16 	instanceVariableNames:'saveSelection inputView enableChannel undoHistory copiedExtent
    17 		copiedLayout resizeData clipChildren selectionHiddenLevel
    17 		copiedLayout resizeData clipChildren selectionHiddenLevel
    18 		setOfSuperViewsSizeChanged'
    18 		gridParameters setOfSuperViewsSizeChanged'
    19 	classVariableNames:''
    19 	classVariableNames:''
    20 	poolDictionaries:''
    20 	poolDictionaries:''
    21 	category:'Interface-UIPainter'
    21 	category:'Interface-UIPainter'
    22 !
    22 !
    23 
    23 
   326         gridAlignV      number of pixels for vertical grid align (pointer snap)
   326         gridAlignV      number of pixels for vertical grid align (pointer snap)
   327         docBounds       true, if document boundary should be shown
   327         docBounds       true, if document boundary should be shown
   328 
   328 
   329      if littleStepH/V are nil, only bigSteps are drawn.
   329      if littleStepH/V are nil, only bigSteps are drawn.
   330     "
   330     "
   331 
   331     gridParameters isNil ifTrue:[
   332     ^ #(10 10 nil nil 10 10 false)
   332         gridParameters := #(10 10 nil nil 10 10 false)
       
   333     ].
       
   334     ^ gridParameters
       
   335 
       
   336 
       
   337 !
       
   338 
       
   339 gridParameters:newGridParameters
       
   340     "used by defineGrid, and in a separate method for
       
   341      easier redefinition in subclasses. 
       
   342      Returns the grid parameters in an array of 7 elements,
       
   343      which control the appearance of the grid-pattern.
       
   344      the elements are:
       
   345 
       
   346         bigStepH        number of pixels horizontally between 2 major steps
       
   347         bigStepV        number of pixels vertically between 2 major steps
       
   348         littleStepH     number of pixels horizontally between 2 minor steps
       
   349         littleStepV     number of pixels vertically between 2 minor steps
       
   350         gridAlignH      number of pixels for horizontal grid align (pointer snap)
       
   351         gridAlignV      number of pixels for vertical grid align (pointer snap)
       
   352         docBounds       true, if document boundary should be shown
       
   353 
       
   354      if littleStepH/V are nil, only bigSteps are drawn.
       
   355     "
       
   356     newGridParameters size == 7 ifTrue:[
       
   357         gridParameters := newGridParameters
       
   358     ].
   333 
   359 
   334 
   360 
   335 !
   361 !
   336 
   362 
   337 gridShown:aBool
   363 gridShown:aBool
   461 !
   487 !
   462 
   488 
   463 keyPress:key x:x y:y
   489 keyPress:key x:x y:y
   464     "any key pressed
   490     "any key pressed
   465     "
   491     "
   466     <resource: #keyboard ( #Delete #BackSpace #Cut #Copy #Paste ) >
   492     <resource: #keyboard ( #Delete #BackSpace #Cut #Copy #Paste #Cmdu ) >
   467 
   493 
   468     (key == #Cut or:[key == #Delete or:[key == #BackSpace]]) ifTrue: [
   494     (key == #Cut or:[key == #Delete or:[key == #BackSpace]]) ifTrue: [
   469         ^ self deleteSelection
   495         ^ self deleteSelection
   470     ].
   496     ].
   471 
       
   472     key == #Copy  ifTrue:[ ^ self copySelection].
   497     key == #Copy  ifTrue:[ ^ self copySelection].
   473     key == #Paste ifTrue:[ ^ self pasteBuffer].
   498     key == #Paste ifTrue:[ ^ self pasteBuffer].
       
   499     key == #Cmdu  ifTrue:[ ^ self undoLast ].           "/ #Undo
       
   500 
   474 !
   501 !
   475 
   502 
   476 processEvent:anEvent
   503 processEvent:anEvent
   477     "catch expose events for components, and redraw its handles after
   504     "catch expose events for components, and redraw its handles after
   478      the redraw when this happens
   505      the redraw when this happens