SimpleView.st
changeset 754 a50c0b52aa82
parent 753 cb2c6ba6f4d5
child 756 5358dbd9d4be
equal deleted inserted replaced
753:cb2c6ba6f4d5 754:a50c0b52aa82
  1325      colors - this means, that a red view will get light-red and dark-red
  1325      colors - this means, that a red view will get light-red and dark-red
  1326      edges."
  1326      edges."
  1327 
  1327 
  1328     something isColor ifTrue:[
  1328     something isColor ifTrue:[
  1329         device hasGrayscales ifTrue:[
  1329         device hasGrayscales ifTrue:[
  1330             shadowColor := something darkened.
  1330             shadowColor := something darkened "on:device".
  1331             lightColor := something lightened
  1331             lightColor := something lightened "on:device".
  1332         ]
  1332         ]
  1333     ].
  1333     ].
  1334     super viewBackground:something
  1334     super viewBackground:something
  1335 
  1335 
  1336     "Modified: 28.5.1996 / 21:14:01 / cg"
  1336     "Modified: 28.5.1996 / 22:33:03 / cg"
  1337 !
  1337 !
  1338 
  1338 
  1339 viewShape:aForm
  1339 viewShape:aForm
  1340     "set the viewShape to aForm"
  1340     "set the viewShape to aForm"
  1341 
  1341 
  2393     ]
  2393     ]
  2394 !
  2394 !
  2395 
  2395 
  2396 clippingRectangle:aRectangle
  2396 clippingRectangle:aRectangle
  2397     "set the clipping rectangle for drawing (in logical coordinates);
  2397     "set the clipping rectangle for drawing (in logical coordinates);
  2398      a nil argument turn off clipping (i.e. whole view is drawable).
  2398      a nil argument turns off clipping (i.e. whole view is drawable).
  2399      Redefined to care for any margin."
  2399      Redefined to care for any margin."
  2400 
  2400 
  2401     |x y w h|
  2401     |x y w h|
  2402 
  2402 
  2403     aRectangle isNil ifTrue:[
  2403     aRectangle isNil ifTrue:[
  2450         ]
  2450         ]
  2451     ].
  2451     ].
  2452     clipRect := aRectangle
  2452     clipRect := aRectangle
  2453 
  2453 
  2454     "Created: 28.5.1996 / 19:50:03 / cg"
  2454     "Created: 28.5.1996 / 19:50:03 / cg"
       
  2455     "Modified: 28.5.1996 / 22:32:15 / cg"
  2455 !
  2456 !
  2456 
  2457 
  2457 fullName
  2458 fullName
  2458     "return my full name to be used for resource-access"
  2459     "return my full name to be used for resource-access"
  2459 
  2460 
  3467 
  3468 
  3468 exposeX:x y:y width:w height:h
  3469 exposeX:x y:y width:w height:h
  3469     "a low level redraw event from device
  3470     "a low level redraw event from device
  3470       - let subclass handle the redraw and take care of edges here"
  3471       - let subclass handle the redraw and take care of edges here"
  3471 
  3472 
  3472     |leftEdge topEdge rightEdge botEdge anyEdge nx ny nw nh old oldClip|
  3473     |leftEdge topEdge rightEdge botEdge anyEdge nx ny nw nh old|
  3473 
  3474 
  3474     nw := w.
  3475     nw := w.
  3475     nh := h.
  3476     nh := h.
  3476     nx := x.
  3477     nx := x.
  3477     ny := y.
  3478     ny := y.
  3555 
  3556 
  3556     "
  3557     "
  3557      redraw edge(s)
  3558      redraw edge(s)
  3558     "
  3559     "
  3559     anyEdge ifTrue:[
  3560     anyEdge ifTrue:[
  3560         oldClip := innerClipRect.
       
  3561         self clippingRectangle:nil.
  3561         self clippingRectangle:nil.
  3562         (topEdge and:[leftEdge and:[botEdge and:[rightEdge]]]) ifTrue:[
  3562         (topEdge and:[leftEdge and:[botEdge and:[rightEdge]]]) ifTrue:[
  3563             self drawEdges
  3563             self drawEdges
  3564         ] ifFalse:[
  3564         ] ifFalse:[
  3565             topEdge ifTrue:[
  3565             topEdge ifTrue:[
  3573             ].
  3573             ].
  3574             rightEdge ifTrue:[
  3574             rightEdge ifTrue:[
  3575                 self drawRightEdge
  3575                 self drawRightEdge
  3576             ]
  3576             ]
  3577         ].
  3577         ].
  3578         self clippingRectangle:oldClip
  3578         self clippingRectangle:innerClipRect
  3579     ]
  3579     ]
  3580 
  3580 
  3581     "Modified: 28.5.1996 / 19:59:49 / cg"
  3581     "Modified: 28.5.1996 / 22:31:49 / cg"
  3582 !
  3582 !
  3583 
  3583 
  3584 focusIn
  3584 focusIn
  3585     "got keyboard focus (via the window manager)"
  3585     "got keyboard focus (via the window manager)"
  3586 
  3586 
  6128 ! !
  6128 ! !
  6129 
  6129 
  6130 !SimpleView class methodsFor:'documentation'!
  6130 !SimpleView class methodsFor:'documentation'!
  6131 
  6131 
  6132 version
  6132 version
  6133     ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.109 1996-05-28 20:16:20 cg Exp $'
  6133     ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.110 1996-05-28 20:33:30 cg Exp $'
  6134 ! !
  6134 ! !
  6135 SimpleView initialize!
  6135 SimpleView initialize!