UIObjectView.st
changeset 1100 bf884041701f
parent 1048 d6d4b7abfdd0
child 1102 abcdd3d5a67b
equal deleted inserted replaced
1099:965cfbbf4bf2 1100:bf884041701f
    11 "
    11 "
    12 
    12 
    13 
    13 
    14 
    14 
    15 ObjectView subclass:#UIObjectView
    15 ObjectView subclass:#UIObjectView
    16 	instanceVariableNames:'saveSelection inputView enableChannel undoHistory copiedExtent
    16 	instanceVariableNames:'saveSelection inputView undoHistory copiedExtent copiedLayout
    17 		copiedLayout resizeData clipChildren selectionHiddenLevel
    17 		resizeData clipChildren selectionHiddenLevel gridParameters
    18 		gridParameters setOfSuperViewsSizeChanged'
    18 		setOfSuperViewsSizeChanged'
    19 	classVariableNames:''
    19 	classVariableNames:''
    20 	poolDictionaries:''
    20 	poolDictionaries:''
    21 	category:'Interface-UIPainter'
    21 	category:'Interface-UIPainter'
    22 !
    22 !
    23 
    23 
   295     "Modified: 28.2.1997 / 13:02:16 / cg"
   295     "Modified: 28.2.1997 / 13:02:16 / cg"
   296 ! !
   296 ! !
   297 
   297 
   298 !UIObjectView methodsFor:'accessing'!
   298 !UIObjectView methodsFor:'accessing'!
   299 
   299 
   300 enableChannel
       
   301     "returns the channel which keeps false if running test otherwise true
       
   302     "
       
   303   ^ enableChannel
       
   304 !
       
   305 
       
   306 gridAlign
   300 gridAlign
   307     "returns state of aligning to grid
   301     "returns state of aligning to grid
   308     "
   302     "
   309     ^ aligning
   303     ^ aligning
   310 
   304 
   390     self withSelectionHiddenDo:[super showGrid]
   384     self withSelectionHiddenDo:[super showGrid]
   391 ! !
   385 ! !
   392 
   386 
   393 !UIObjectView methodsFor:'accessing behavior'!
   387 !UIObjectView methodsFor:'accessing behavior'!
   394 
   388 
   395 enabled
   389 enableStateChanged
   396     ^ enableChannel value
       
   397 !
       
   398 
       
   399 enabled:aState
       
   400     "set the modification / test mode
   390     "set the modification / test mode
   401     "
   391     "
   402     (aState == enableChannel value) ifFalse:[
   392     |aState|
       
   393 
       
   394     (aState := enableChannel value) ifFalse:[
   403         aState ifFalse:[
   395         aState ifFalse:[
   404             saveSelection := self selection.
   396             saveSelection := self selection.
   405             self select:nil.
   397             self select:nil.
   406             enableChannel value:aState.
       
   407             inputView unmap.
   398             inputView unmap.
   408         ] ifTrue:[
   399         ] ifTrue:[
   409             inputView raise.
   400             inputView raise.
   410             inputView realize.
   401             inputView realize.
   411             enableChannel value:aState.
       
   412             self select:saveSelection.
   402             self select:saveSelection.
   413         ]
   403         ]
   414     ]
   404     ]
   415 
   405 
   416 
   406     "Created: / 30.3.1999 / 16:17:24 / stefan"
   417 
   407 !
       
   408 
       
   409 enabled
       
   410     ^ enableChannel value
       
   411 !
       
   412 
       
   413 enabled:aState
       
   414     "set the modification / test mode
       
   415     "
       
   416 
       
   417     enableChannel value:aState
       
   418 
       
   419     "Modified: / 30.3.1999 / 16:18:12 / stefan"
   418 !
   420 !
   419 
   421 
   420 resetModification
   422 resetModification
   421     "set modification state to false
   423     "set modification state to false
   422     "
   424     "
   565     inputView enableButtonMotionEvents.
   567     inputView enableButtonMotionEvents.
   566 
   568 
   567     self setDefaultActions.
   569     self setDefaultActions.
   568 
   570 
   569     undoHistory          := UndoHistory on:self.
   571     undoHistory          := UndoHistory on:self.
   570     enableChannel        := true asValue.
   572     self enableChannel:(true asValue).
   571     clipChildren         := true.
   573     clipChildren         := true.
   572     selectionHiddenLevel := 0.
   574     selectionHiddenLevel := 0.
   573 
   575 
   574     (self class gridShown) ifTrue:[
   576     (self class gridShown) ifTrue:[
   575         super showGrid
   577         super showGrid
   576     ].
   578     ].
   577 
   579 
   578     "Modified: / 20.7.1998 / 18:14:51 / cg"
   580     "Modified: / 20.7.1998 / 18:14:51 / cg"
       
   581     "Modified: / 30.3.1999 / 16:19:15 / stefan"
   579 !
   582 !
   580 
   583 
   581 map
   584 map
   582     "make the view visible on the screen and in case of a none empty
   585     "make the view visible on the screen and in case of a none empty
   583      selection the selection will be shown.
   586      selection the selection will be shown.