DropObject.st
changeset 3443 d2d6f852797e
parent 3261 6edd75bca965
child 4187 6e1d90c18dc9
equal deleted inserted replaced
3442:341156060a57 3443:d2d6f852797e
     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:libview2' }"
    12 "{ Package: 'stx:libview2' }"
    13 
    13 
       
    14 "{ NameSpace: Smalltalk }"
       
    15 
    14 Object subclass:#DropObject
    16 Object subclass:#DropObject
    15 	instanceVariableNames:'theObject displayObject'
    17 	instanceVariableNames:'theObject displayObject'
    16 	classVariableNames:''
    18 	classVariableNames:''
    17 	poolDictionaries:''
    19 	poolDictionaries:''
    18 	category:'Interface-DragAndDrop'
    20 	category:'Interface-DragAndDrop'
    59 	poolDictionaries:''
    61 	poolDictionaries:''
    60 	privateIn:DropObject
    62 	privateIn:DropObject
    61 !
    63 !
    62 
    64 
    63 DropObject subclass:#Method
    65 DropObject subclass:#Method
       
    66 	instanceVariableNames:''
       
    67 	classVariableNames:''
       
    68 	poolDictionaries:''
       
    69 	privateIn:DropObject
       
    70 !
       
    71 
       
    72 DropObject subclass:#Project
    64 	instanceVariableNames:''
    73 	instanceVariableNames:''
    65 	classVariableNames:''
    74 	classVariableNames:''
    66 	poolDictionaries:''
    75 	poolDictionaries:''
    67 	privateIn:DropObject
    76 	privateIn:DropObject
    68 !
    77 !
   187     "create an instance for a method (dragging a method in a browser)"
   196     "create an instance for a method (dragging a method in a browser)"
   188 
   197 
   189     ^ self newInstanceOf:DropObject::Method for:aMethod
   198     ^ self newInstanceOf:DropObject::Method for:aMethod
   190 !
   199 !
   191 
   200 
       
   201 newProject:aPackageSymbol
       
   202     "create an instance for a package (dragging a package from a browser)"
       
   203 
       
   204     ^ self newInstanceOf:DropObject::Project for:aPackageSymbol
       
   205 !
       
   206 
   192 newText:aTextOrString
   207 newText:aTextOrString
   193     "create an instance for some text (dragging some text from an editor)"
   208     "create an instance for some text (dragging some text from an editor)"
   194 
   209 
   195     ^ self newInstanceOf:DropObject::Text for:aTextOrString
   210     ^ self newInstanceOf:DropObject::Text for:aTextOrString
   196 
   211 
   306     "Modified: 19.4.1997 / 12:52:22 / cg"
   321     "Modified: 19.4.1997 / 12:52:22 / cg"
   307 !
   322 !
   308 
   323 
   309 isMethodObject
   324 isMethodObject
   310     "return true, if the dropObject represents some method"
   325     "return true, if the dropObject represents some method"
       
   326 
       
   327     ^ false
       
   328 !
       
   329 
       
   330 isProjectObject
       
   331     "return true, if the dropObject represents some project"
   311 
   332 
   312     ^ false
   333     ^ false
   313 !
   334 !
   314 
   335 
   315 isTextObject
   336 isTextObject
   555     "return true, if the dropObject represents a method"
   576     "return true, if the dropObject represents a method"
   556 
   577 
   557     ^ true
   578     ^ true
   558 ! !
   579 ! !
   559 
   580 
       
   581 !DropObject::Project class methodsFor:'documentation'!
       
   582 
       
   583 documentation
       
   584 "
       
   585     I represent a project being dragged (from a browser's projectList)
       
   586 "
       
   587 ! !
       
   588 
       
   589 !DropObject::Project methodsFor:'testing'!
       
   590 
       
   591 isProjectObject
       
   592     "return true, if the dropObject represents a project"
       
   593 
       
   594     ^ true
       
   595 ! !
       
   596 
   560 !DropObject::Text class methodsFor:'defaults'!
   597 !DropObject::Text class methodsFor:'defaults'!
   561 
   598 
   562 displayObjectName
   599 displayObjectName
   563     ^ 'bitmaps/xpmBitmaps/document_images/yellow_file_text_grab.xpm'
   600     ^ 'bitmaps/xpmBitmaps/document_images/yellow_file_text_grab.xpm'
   564 
   601 
   584 ! !
   621 ! !
   585 
   622 
   586 !DropObject class methodsFor:'documentation'!
   623 !DropObject class methodsFor:'documentation'!
   587 
   624 
   588 version
   625 version
   589     ^ '$Header: /cvs/stx/stx/libview2/DropObject.st,v 1.23 2013-12-07 10:44:47 cg Exp $'
   626     ^ '$Header: /cvs/stx/stx/libview2/DropObject.st,v 1.24 2015-02-04 23:15:25 cg Exp $'
   590 !
   627 !
   591 
   628 
   592 version_CVS
   629 version_CVS
   593     ^ '$Header: /cvs/stx/stx/libview2/DropObject.st,v 1.23 2013-12-07 10:44:47 cg Exp $'
   630     ^ '$Header: /cvs/stx/stx/libview2/DropObject.st,v 1.24 2015-02-04 23:15:25 cg Exp $'
   594 ! !
   631 ! !
   595 
   632