StandardSystemView.st
changeset 3408 42384f123133
parent 3393 a7f33744dd82
child 3435 3364a7082bdd
equal deleted inserted replaced
3407:4099e88bcab1 3408:42384f123133
    12 
    12 
    13 "{ Package: 'stx:libview' }"
    13 "{ Package: 'stx:libview' }"
    14 
    14 
    15 TopView subclass:#StandardSystemView
    15 TopView subclass:#StandardSystemView
    16 	instanceVariableNames:'label icon iconView iconLabel minExtent maxExtent sizeFixed
    16 	instanceVariableNames:'label icon iconView iconLabel minExtent maxExtent sizeFixed
    17 		application windowEventsForApplication deviceIcon'
    17 		application windowEventsForApplication deviceIcon labelChannel'
    18 	classVariableNames:'DefaultIcon IncludeHostNameInLabel DefaultExtent
    18 	classVariableNames:'DefaultIcon IncludeHostNameInLabel DefaultExtent
    19 		WindowLabelFormat DefaultMinExtent'
    19 		WindowLabelFormat DefaultMinExtent'
    20 	poolDictionaries:''
    20 	poolDictionaries:''
    21 	category:'Views-Basic'
    21 	category:'Views-Basic'
    22 !
    22 !
   537     ]
   537     ]
   538 
   538 
   539     "Modified: 18.4.1996 / 14:55:44 / cg"
   539     "Modified: 18.4.1996 / 14:55:44 / cg"
   540 ! !
   540 ! !
   541 
   541 
       
   542 !StandardSystemView methodsFor:'accessing - channels'!
       
   543 
       
   544 labelChannel
       
   545     "return the labelChannel - or nil"
       
   546 
       
   547     ^ labelChannel.
       
   548 !
       
   549 
       
   550 labelChannel:aValueHolder
       
   551     "set the labelChannel - a valueHolder holding a string
       
   552      which is shown as title bar"
       
   553 
       
   554     |prev|
       
   555 
       
   556     prev := labelChannel.
       
   557     labelChannel := aValueHolder.
       
   558     self setupChannel:aValueHolder for:nil withOld:prev.
       
   559 ! !
       
   560 
   542 !StandardSystemView methodsFor:'accessing-behavior'!
   561 !StandardSystemView methodsFor:'accessing-behavior'!
   543 
   562 
   544 bePartner
   563 bePartner
   545     "define me as a partner-View.
   564     "define me as a partner-View.
   546      All partners within the applications windowGroup iconify/deiconify together."
   565      All partners within the applications windowGroup iconify/deiconify together."
   765 !
   784 !
   766 
   785 
   767 iconName:aString
   786 iconName:aString
   768     "this method will vanish soon ... - for backward compatibility"
   787     "this method will vanish soon ... - for backward compatibility"
   769 
   788 
       
   789     self obsoleteMethodWarning:'use #iconLabel:'.
   770     self iconLabel:aString
   790     self iconLabel:aString
   771 !
   791 !
   772 
   792 
   773 iconView
   793 iconView
   774     "return the view used as icon-view"
   794     "return the view used as icon-view"
   827 
   847 
   828     self label:labelString.
   848     self label:labelString.
   829     self iconLabel:iconLabelString
   849     self iconLabel:iconLabelString
   830 ! !
   850 ! !
   831 
   851 
       
   852 !StandardSystemView methodsFor:'change & update'!
       
   853 
       
   854 update:something with:aParameter from:changedObject
       
   855     "the MVC way of changing the label ..."
       
   856 
       
   857     changedObject notNil ifTrue:[
       
   858         changedObject == labelChannel ifTrue:[
       
   859             self label:labelChannel value.
       
   860             ^ self
       
   861         ].
       
   862     ].
       
   863     ^ super update:something with:aParameter from:changedObject
       
   864 ! !
       
   865 
   832 !StandardSystemView methodsFor:'destroying'!
   866 !StandardSystemView methodsFor:'destroying'!
   833 
   867 
   834 destroy
   868 destroy
   835     "destroy the view."
   869     "destroy the view."
   836 
   870 
   837     self removeFromCurrentProject.
   871     self removeFromCurrentProject.
       
   872     labelChannel notNil ifTrue:[
       
   873         labelChannel removeDependent:self.
       
   874         labelChannel := nil.
       
   875     ].
   838     windowGroup notNil ifTrue:[
   876     windowGroup notNil ifTrue:[
   839         windowGroup focusSequence:nil.
   877         windowGroup focusSequence:nil.
   840     ].
   878     ].
   841     super destroy.
   879     super destroy.
   842 !
   880 !
  1425 !
  1463 !
  1426 
  1464 
  1427 recreate
  1465 recreate
  1428     "recreate the view after a snap-in or a migration"
  1466     "recreate the view after a snap-in or a migration"
  1429 
  1467 
  1430     |i m|
       
  1431 
       
  1432     super recreate.
  1468     super recreate.
  1433 
  1469 
  1434     iconView notNil ifTrue:[
  1470     iconView notNil ifTrue:[
  1435 	iconView recreate.
  1471         iconView recreate.
  1436 	device setWindowIconWindow:iconView in:drawableId.
  1472         device setWindowIconWindow:iconView in:drawableId.
  1437 	iconView setRealized:true.
  1473         iconView setRealized:true.
  1438     ] ifFalse:[
  1474     ] ifFalse:[
  1439 	icon notNil ifTrue:[
  1475         icon notNil ifTrue:[
  1440 	    i := self convertedIcon:icon.
  1476             self icon:icon.
  1441 	    (i notNil and:[i id notNil]) ifTrue:[
  1477         ].
  1442 		(m := icon mask) notNil ifTrue:[
       
  1443 		    m := self convertedIconMask:m.
       
  1444 		].
       
  1445 		device setWindowIcon:i mask:m in:drawableId
       
  1446 	    ]
       
  1447 	].
       
  1448     ].
  1478     ].
  1449 
  1479 
  1450     iconLabel notNil ifTrue:[
  1480     iconLabel notNil ifTrue:[
  1451 	device setIconName:iconLabel in:drawableId
  1481         device setIconName:iconLabel in:drawableId
  1452     ]
  1482     ]
  1453 
  1483 
  1454     "Modified: 4.4.1997 / 16:16:40 / cg"
  1484     "Modified: 4.4.1997 / 16:16:40 / cg"
  1455 ! !
  1485 ! !
  1456 
  1486 
  1457 !StandardSystemView class methodsFor:'documentation'!
  1487 !StandardSystemView class methodsFor:'documentation'!
  1458 
  1488 
  1459 version
  1489 version
  1460     ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.137 2000-12-21 13:07:47 cg Exp $'
  1490     ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.138 2001-04-02 08:59:54 stefan Exp $'
  1461 ! !
  1491 ! !
  1462 StandardSystemView initialize!
  1492 StandardSystemView initialize!