8 be provided or otherwise made available to, or used by, any |
8 be provided or otherwise made available to, or used by, any |
9 other person. No title to or ownership of the software is |
9 other person. No title to or ownership of the software is |
10 hereby transferred. |
10 hereby transferred. |
11 " |
11 " |
12 "{ Package: 'stx:libtool2' }" |
12 "{ Package: 'stx:libtool2' }" |
|
13 |
|
14 "{ NameSpace: Smalltalk }" |
13 |
15 |
14 NoteBookView subclass:#UIGalleryView |
16 NoteBookView subclass:#UIGalleryView |
15 instanceVariableNames:'majorKey minorKeys minorKeysHolder' |
17 instanceVariableNames:'majorKey minorKeys minorKeysHolder' |
16 classVariableNames:'' |
18 classVariableNames:'' |
17 poolDictionaries:'' |
19 poolDictionaries:'' |
733 !UIGalleryView::Palette::DropSpec class methodsFor:'instance creation'! |
735 !UIGalleryView::Palette::DropSpec class methodsFor:'instance creation'! |
734 |
736 |
735 for:aWidget specification:aSpec |
737 for:aWidget specification:aSpec |
736 "create drop object for a widget derived from a specification" |
738 "create drop object for a widget derived from a specification" |
737 |
739 |
738 |point extent rootView device inst displayObject view| |
740 |point extent rootView widgetsDevice inst displayObject view| |
739 |
741 |
740 device := aWidget device. |
742 widgetsDevice := aWidget device. |
741 rootView := device rootView. |
743 rootView := widgetsDevice rootView. |
742 extent := aWidget extent. |
744 extent := aWidget extent. |
743 aWidget isView ifTrue:[ |
745 aWidget isView ifTrue:[ |
744 view := aWidget. |
746 view := aWidget. |
745 point := device translatePoint:0@0 fromView:aWidget toView:rootView. |
747 point := widgetsDevice translatePoint:0@0 fromView:aWidget toView:rootView. |
746 ] ifFalse:[ |
748 ] ifFalse:[ |
747 view := aWidget container. |
749 view := aWidget container. |
748 point := device translatePoint:(aWidget origin) fromView:view toView:rootView. |
750 point := widgetsDevice translatePoint:(aWidget origin) fromView:view toView:rootView. |
749 ]. |
751 ]. |
750 (point x > 0 and:[point y > 0]) ifTrue:[ |
752 (point x > 0 and:[point y > 0]) ifTrue:[ |
751 point := point + extent. |
753 point := point + extent. |
752 (point x < rootView width and:[point y < rootView height]) ifTrue:[ |
754 (point x < rootView width and:[point y < rootView height]) ifTrue:[ |
753 aWidget topView raise. |
755 aWidget topView raise. |
754 device flush. |
756 widgetsDevice flush. |
755 aWidget invalidate. |
757 aWidget invalidate. |
756 aWidget windowGroup processExposeEvents. |
758 aWidget windowGroup processExposeEvents. |
757 displayObject := Image fromView:aWidget grab:false. |
759 displayObject := Image fromView:aWidget grab:false. |
758 ] |
760 ] |
759 ]. |
761 ]. |