[Squeak-fr] encore un look aqua

jean-marie.zajac jean-marie.zajac at laposte.net
Jeu 28 Oct 15:17:42 CEST 2004


Encore un look Aqua Mac pour Squeak, celui que j'utilise à vrai dire.
Quelqu'un pour vérifier un éventuel problème ? C'est un cs, à installer 
avec FileList et toutes les nouvelles fenêtres deviennent belles comme 
dans un Mac (normalement).

-------------- section suivante --------------

'zz'!

"Change Set:		SystemWindowZz
Date:			28 octobre 2004
Author:			Jean-marie Zajac

"


Preferences
	addPreference: #alternativeWindowBoxesLook
	category: #windows
	default: true
	balloonHelp: 'If true, use an alternative look for Window''s boxes.'!


!Preferences class methodsFor: 'standard queries' stamp: 'jmz 3/06/2004 19:23'!
alternativeWindowBoxesLook
	^ self
		valueOfFlag: #alternativeWindowBoxesLook
		ifAbsent: [true]! !


!SystemWindow methodsFor: 'initialization' stamp: 'jmz 3/06/2004 18:52'!
addCloseBox
	"If I have a labelArea, add a close box to it"
	| frame |
	labelArea
		ifNil: [^ self].
	closeBox := self createCloseBox.
	
	frame := LayoutFrame new.
	frame leftFraction: 0;
		 leftOffset: 2;
		 topFraction: 0;
		 topOffset: 0.
	closeBox layoutFrame: frame.
	labelArea addMorph: closeBox! !

!SystemWindow methodsFor: 'initialization' stamp: 'jmz 3/06/2004 18:52'!
addExpandBox
	"If I have a labelArea, add a close box to it"
	| frame |
	labelArea
		ifNil: [^ self].
	expandBox := self createExpandBox.
	frame := LayoutFrame new.
	frame leftFraction: 1;
		 leftOffset: (self boxExtent x * 2 + 5) negated;
		 topFraction: 0;
		 topOffset: 0.
	expandBox layoutFrame: frame.
	labelArea addMorph: expandBox! !

!SystemWindow methodsFor: 'initialization' stamp: 'jmz 3/06/2004 18:52'!
addMenuControl
	"If I have a label area, add a menu control to it."
	| frame |
	labelArea
		ifNil: [^ self].
	"No menu if no label area"
	menuBox
		ifNotNil: [menuBox delete].
	menuBox := self createMenuBox.
	
	frame := LayoutFrame new.
	frame leftFraction: 0;
		 leftOffset: closeBox right + 5;
		 topFraction: 0;
		 topOffset: 0.
	menuBox layoutFrame: frame.
	labelArea addMorph: menuBox! !

!SystemWindow methodsFor: 'initialization' stamp: 'jmz 3/06/2004 19:41'!
boxExtent
	"answer the extent to use in all the buttons. 
	 
	the label height is used to be proportional to the fonts preferences"
	^ (Preferences alternativeWindowBoxesLook
		ifTrue: [18 @ 17]
		ifFalse: [20 @ 20])
		max: label height @ label height ! !

!SystemWindow methodsFor: 'initialization' stamp: 'jmz 3/06/2004 19:26'!
createBox
	"create a button with default to be used in the label area"
	
	| box boxBorderWidth |
	box := IconicButton new.
	 box useRoundedCorners.
	box color: Color transparent;
		 target: self.
""
	
	box borderWidth: 0.
""
	^ box! !

!SystemWindow methodsFor: 'initialization' stamp: 'jmz 3/06/2004 15:23'!
createCloseBox

	

box_ ((ColorForm
	extent: 18 at 17
	depth: 8
	fromArray: #( 0 0 0 0 0 0 515 67371778 0 0 0 33949448 151586823 100794368 0 11 202182159 269487886 218893056 0 4370 320083222 387388949 336794112 0 6169 437984285 505290012 454695192 0 8225 572728100 606348323 589439264 0 9767 673786411 741092138 690497318 0 11823 808530483 875836210 825241390 754974720 13879 943274555 1010580282 959985462 285212672 15935 1078017090 1128481340 1094729534 1023410176 17734 876364615 1212696387 1010058821 0 18998 709576524 1296911431 1261057614 0 80 1364349780 1431655507 1381060608 0 0 1482250843 1549556570 1498939392 0 0 6184800 1633771615 1577058304 0 0 0 0 0 0)
	offset: 0 at 0)
	colorsFromArray: #(#( ) #(0.913 0.913 0.913) #(0.847 0.847 0.847) #(0.788 0.788 0.788) #(0.745 0.745 0.745) #(0.948 0.948 0.948) #(0.658 0.654 0.654) #(0.455 0.419 0.423) #(0.365 0.239 0.242) #(0.349 0.137 0.152) #(0.944 0.944 0.944) #(0.831 0.831 0.831) #(0.552 0.537 0.541) #(0.357 0.156 0.172) #(0.537 0.258 0.27) #(0.729 0.498 0.501) #(0.823 0.615 0.627) #(0.862 0.862 0.862) #(0.568 0.56 0.56) #(0.38 0.098 0.117) #(0.741 0.478 0.478) #(0.913 0.768 0.764) #(0.921 0.78 0.78) #(0.921 0.772 0.764) #(0.706 0.706 0.706) #(0.353 0.125 0.145) #(0.671 0.274 0.289) #(0.893 0.678 0.678) #(0.886 0.638 0.627) #(0.893 0.634 0.623) #(0.893 0.642 0.627) #(0.878 0.878 0.878) #(0.501 0.462 0.466) #(0.474 0.055 0.035) #(0.729 0.242 0.246) #(0.847 0.498 0.478) #(0.858 0.498 0.474) #(0.85 0.85 0.85) #(0.419 0.258 0.266) #(0.599 0.07 0.07) #(0.714 0.117 0.117) #(0.792 0.258 0.235) #(0.835 0.337 0.301) #(0.823 0.372 0.325) #(0.839 0.38 0.349) #(0.843 0.843 0.843) #(0.408 0.156 0.164) #(0.667 0.098 0.094) #(0.761 0.18 0.16) #(0.8 0.227 0.199) #(0.827 0.27 0.242) #(0.847 0.313 0.278) #(0.862 0.337 0.301) #(0.858 0.858 0.858) #(0.419 0.16 0.168) #(0.702 0.137 0.125) #(0.804 0.242 0.211) #(0.839 0.305 0.27) #(0.866 0.357 0.321) #(0.89 0.404 0.365) #(0.897 0.427 0.388) #(0.89 0.893 0.893) #(0.439 0.262 0.274) #(0.714 0.164 0.149) #(0.827 0.289 0.25) #(0.866 0.361 0.328) #(0.929 0.494 0.455) #(0.944 0.525 0.474) #(0.921 0.925 0.925) #(0.548 0.498 0.505) #(0.615 0.133 0.129) #(0.964 0.568 0.517) #(0.968 0.595 0.552) #(0.94 0.94 0.944) #(0.811 0.807 0.807) #(0.933 0.49 0.439) #(0.976 0.611 0.568) #(0.979 0.634 0.591) #(0.811 0.811 0.807) #(0.933 0.933 0.933) #(0.667 0.646 0.65) #(0.49 0.164 0.156) #(0.905 0.49 0.447) #(0.987 0.638 0.584) #(0.979 0.654 0.607) #(0.983 0.662 0.619) #(0.921 0.921 0.925) #(0.94 0.94 0.94) #(0.667 0.646 0.642) #(0.435 0.235 0.223) #(0.717 0.423 0.372) #(0.847 0.587 0.541) #(0.893 0.642 0.599) #(0.909 0.913 0.913) #(0.827 0.815 0.815) #(0.56 0.513 0.513) #(0.455 0.337 0.325) #(0.458 0.313 0.293) #(0.901 0.901 0.905) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004)  )).

	^ self createBox labelGraphic: box;
		 extent:self boxExtent;
		 actionSelector: #closeBoxHit;
		 setBalloonText: 'close this window'! !

!SystemWindow methodsFor: 'initialization' stamp: 'jmz 3/06/2004 15:22'!
createCollapseBox
box_ ((ColorForm
	extent: 17 at 17
	depth: 8
	fromArray: #( 1751672936 1751672936 1751672936 1751672936 1744830464 1751672936 1744962308 67306088 1751672936 1744830464 1751672936 84281096 134809093 1751672936 1744830464 1751672843 202182159 252579084 185231464 1744830464 1751650578 320083222 370480147 303523944 1744830464 1746475547 471670303 522067228 454695272 1744830464 1746936098 589571366 639968291 572596328 1744830464 1747396649 707472429 757869354 690499176 1744830464 1747922993 842216501 892613426 825243240 1744830464 1748515130 993803582 1044200507 976828520 1744830464 1748975681 1111704645 1162101570 1094729576 1744830464 1749436232 1229605708 1280002633 1212632424 1744830464 1751666512 1364349780 1414746705 1347762024 1744830464 1751668568 1499093852 1549490777 1482123368 1744830464 1751672926 1600151906 1650548831 1583900776 1744830464 1751672936 1751410022 1717920872 1751672936 1744830464 1751672936 1751672936 1751672936 1751672936 1744830464)
	offset: 0 at 0)
	colorsFromArray: #(#(1.0 1.0 1.0) #(0.913 0.913 0.913) #(0.847 0.847 0.847) #(0.788 0.788 0.788) #(0.745 0.745 0.745) #(0.658 0.65 0.658) #(0.482 0.415 0.419) #(0.435 0.227 0.223) #(0.451 0.172 0.152) #(0.439 0.231 0.223) #(0.831 0.831 0.831) #(0.564 0.537 0.544) #(0.427 0.172 0.152) #(0.65 0.328 0.254) #(0.831 0.607 0.513) #(0.905 0.741 0.634) #(0.858 0.862 0.862) #(0.58 0.564 0.564) #(0.462 0.152 0.113) #(0.835 0.584 0.458) #(0.964 0.878 0.764) #(0.96 0.878 0.768) #(0.956 0.858 0.757) #(0.576 0.564 0.564) #(0.862 0.862 0.862) #(0.71 0.71 0.706) #(0.408 0.196 0.16) #(0.796 0.462 0.258) #(0.956 0.831 0.667) #(0.929 0.78 0.607) #(0.925 0.772 0.599) #(0.929 0.776 0.599) #(0.509 0.482 0.482) #(0.587 0.227 0.039) #(0.874 0.552 0.223) #(0.905 0.698 0.443) #(0.897 0.694 0.431) #(0.901 0.706 0.435) #(0.905 0.706 0.435) #(0.439 0.325 0.305) #(0.733 0.38 0.059) #(0.862 0.494 0.074) #(0.866 0.544 0.164) #(0.882 0.615 0.246) #(0.886 0.646 0.274) #(0.89 0.662 0.289) #(0.435 0.325 0.301) #(0.427 0.258 0.188) #(0.8 0.47 0.078) #(0.87 0.525 0.102) #(0.862 0.556 0.125) #(0.874 0.619 0.176) #(0.886 0.658 0.215) #(0.89 0.69 0.242) #(0.427 0.258 0.184) #(0.882 0.882 0.882) #(0.431 0.278 0.196) #(0.811 0.513 0.117) #(0.882 0.587 0.156) #(0.878 0.634 0.196) #(0.893 0.706 0.25) #(0.905 0.757 0.289) #(0.913 0.788 0.317) #(0.462 0.372 0.328) #(0.772 0.513 0.117) #(0.893 0.662 0.203) #(0.893 0.702 0.25) #(0.909 0.792 0.321) #(0.929 0.847 0.369) #(0.94 0.882 0.396) #(0.568 0.544 0.541) #(0.619 0.427 0.117) #(0.901 0.749 0.258) #(0.913 0.78 0.309) #(0.929 0.866 0.384) #(0.948 0.917 0.435) #(0.96 0.948 0.462) #(0.568 0.544 0.537) #(0.94 0.94 0.944) #(0.462 0.361 0.246) #(0.804 0.698 0.231) #(0.925 0.854 0.372) #(0.956 0.929 0.439) #(0.96 0.952 0.478) #(0.968 0.972 0.498) #(0.458 0.361 0.25) #(0.933 0.933 0.933) #(0.702 0.694 0.69) #(0.521 0.419 0.168) #(0.827 0.788 0.349) #(0.944 0.94 0.478) #(0.956 0.96 0.509) #(0.964 0.976 0.529) #(0.921 0.921 0.925) #(0.717 0.71 0.702) #(0.521 0.474 0.27) #(0.714 0.706 0.328) #(0.823 0.831 0.466) #(0.866 0.874 0.505) #(0.909 0.913 0.913) #(0.65 0.638 0.587) #(0.56 0.56 0.38) #(0.556 0.564 0.309) #(0.878 0.878 0.878) #( ) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004)  )).
	
	^ self createBox labelGraphic: box;
		 extent: self boxExtent;
		 actionSelector: #collapseOrExpand;
		 setBalloonText: 'collapse this window'! !

!SystemWindow methodsFor: 'initialization' stamp: 'jmz 3/06/2004 15:22'!
createExpandBox

	
	box_ ((ColorForm
	extent: 18 at 17
	depth: 8
	fromArray: #( 0 0 0 0 0 0 66051 67371778 0 0 0 33883655 134743814 84017152 0 9 168496141 235801868 185207040 0 3856 286397204 353702931 303109647 0 5912 421141276 454761499 437852183 0 7454 522199330 589505057 538910237 0 9253 640100393 707406120 656811300 0 11052 758001456 825307183 774712363 0 13108 892745528 960051255 909456435 0 14907 1010646591 1077952318 1027357505 0 16963 1145390663 1212696390 1162101577 1241513984 76 1296977744 1364283471 1313688626 0 83 1414878807 1482184534 1431591250 0 0 1532779870 1600085597 1549490688 0 0 6316386 1667457633 1677721600 0 0 0 6644992 0 0)
	offset: 0 at 0)
	colorsFromArray: #(#( ) #(0.913 0.913 0.913) #(0.847 0.847 0.847) #(0.788 0.788 0.788) #(0.745 0.745 0.745) #(0.65 0.654 0.646) #(0.392 0.431 0.404) #(0.188 0.301 0.215) #(0.106 0.278 0.145) #(0.831 0.831 0.831) #(0.529 0.537 0.529) #(0.106 0.266 0.141) #(0.246 0.466 0.27) #(0.533 0.71 0.533) #(0.667 0.819 0.642) #(0.862 0.862 0.862) #(0.548 0.56 0.552) #(0.063 0.278 0.102) #(0.525 0.714 0.49) #(0.823 0.925 0.761) #(0.835 0.925 0.764) #(0.807 0.913 0.749) #(0.544 0.56 0.552) #(0.702 0.702 0.702) #(0.082 0.262 0.137) #(0.341 0.619 0.317) #(0.761 0.905 0.658) #(0.698 0.85 0.595) #(0.694 0.847 0.587) #(0.455 0.478 0.458) #(0.0 0.372 0.066) #(0.396 0.714 0.282) #(0.576 0.804 0.431) #(0.568 0.796 0.427) #(0.572 0.807 0.435) #(0.576 0.811 0.431) #(0.25 0.349 0.274) #(0.121 0.533 0.121) #(0.289 0.658 0.172) #(0.365 0.698 0.203) #(0.423 0.757 0.231) #(0.458 0.768 0.266) #(0.478 0.776 0.285) #(0.137 0.301 0.152) #(0.242 0.623 0.164) #(0.321 0.698 0.16) #(0.328 0.702 0.145) #(0.369 0.749 0.164) #(0.415 0.776 0.203) #(0.443 0.792 0.231) #(0.882 0.882 0.882) #(0.16 0.313 0.164) #(0.293 0.65 0.164) #(0.376 0.745 0.156) #(0.404 0.757 0.192) #(0.462 0.8 0.262) #(0.509 0.827 0.301) #(0.537 0.843 0.328) #(0.282 0.384 0.297) #(0.278 0.611 0.145) #(0.455 0.772 0.203) #(0.47 0.788 0.25) #(0.541 0.839 0.341) #(0.603 0.874 0.392) #(0.638 0.893 0.423) #(0.285 0.388 0.297) #(0.517 0.544 0.521) #(0.199 0.49 0.117) #(0.517 0.792 0.266) #(0.541 0.823 0.313) #(0.634 0.886 0.415) #(0.686 0.909 0.462) #(0.717 0.929 0.49) #(0.517 0.548 0.521) #(0.921 0.921 0.921) #(0.94 0.94 0.944) #(0.231 0.388 0.215) #(0.435 0.71 0.227) #(0.671 0.882 0.423) #(0.682 0.901 0.455) #(0.737 0.925 0.505) #(0.761 0.94 0.525) #(0.929 0.933 0.933) #(0.682 0.694 0.69) #(0.239 0.443 0.156) #(0.587 0.784 0.337) #(0.8 0.94 0.564) #(0.792 0.936 0.552) #(0.788 0.944 0.552) #(0.682 0.694 0.686) #(0.921 0.921 0.925) #(0.694 0.71 0.694) #(0.341 0.474 0.258) #(0.521 0.682 0.309) #(0.702 0.819 0.49) #(0.761 0.874 0.552) #(0.909 0.913 0.913) #(0.611 0.638 0.584) #(0.466 0.548 0.372) #(0.439 0.548 0.313) #(0.878 0.878 0.878) #(0.901 0.901 0.905) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004)  )).
	^ self createBox 
		
		labelGraphic: box;
	
		 extent: self boxExtent;
		 actWhen: #buttonUp;
		 actionSelector: #expandBoxHit;

		 setBalloonText: 'expand to full screen'! !

!SystemWindow methodsFor: 'initialization' stamp: 'jmz 3/06/2004 15:23'!
createMenuBox

	box_((ColorForm
	extent: 25 at 14
	depth: 8
	fromArray: #( 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 197637 101124105 168495372 219025168 50331648 0 0 286397204 353769240 421141276 488513312 555876352 0 35 606414375 673786410 724249130 741158438 623128320 0 48 825373492 892745528 960051255 909456435 842084352 0 58 993803582 1061175618 1044267585 1077886525 1010514432 0 67 1145390663 1212762699 1229540170 1229473606 1162101504 0 76 1296977744 1364349267 1414812497 1381060687 1313688576 0 85 1448564825 1515936604 1566399579 1532647768 1465277952 0 0 39805025 1650680933 1717986660 1667391840 1594032896 0 0 196967 1751738729 1768515945 1768516203 1812135936 0 0 771 50529027 50529027 50529027 50331648 0 0 0 0 0 0 0 0)
	offset: 0 at 0)
	colorsFromArray: #(#( ) #(0.505 0.505 0.505) #(0.63 0.63 0.63) #(0.599 0.599 0.599) #(0.509 0.541 0.658) #(0.289 0.313 0.4) #(0.106 0.145 0.239) #(0.0 0.031 0.141) #(0.0 0.051 0.156) #(0.0 0.047 0.164) #(0.0 0.039 0.152) #(0.0 0.039 0.149) #(0.02 0.07 0.18) #(0.176 0.211 0.309) #(0.262 0.297 0.388) #(0.376 0.396 0.49) #(0.521 0.544 0.658) #(0.525 0.525 0.525) #(0.051 0.328 0.615) #(0.4 0.603 0.807) #(0.529 0.706 0.858) #(0.576 0.721 0.866) #(0.634 0.764 0.878) #(0.654 0.784 0.882) #(0.654 0.78 0.893) #(0.667 0.78 0.901) #(0.662 0.78 0.905) #(0.662 0.78 0.893) #(0.658 0.784 0.886) #(0.646 0.768 0.878) #(0.634 0.749 0.858) #(0.576 0.706 0.823) #(0.478 0.599 0.729) #(0.455 0.458 0.458) #(0.529 0.529 0.529) #(0.642 0.642 0.642) #(0.0 0.278 0.541) #(0.353 0.58 0.811) #(0.599 0.741 0.886) #(0.619 0.733 0.893) #(0.63 0.741 0.886) #(0.623 0.745 0.893) #(0.623 0.749 0.878) #(0.611 0.741 0.897) #(0.623 0.749 0.893) #(0.63 0.745 0.886) #(0.623 0.733 0.893) #(0.658 0.658 0.658) #(0.0 0.27 0.58) #(0.145 0.419 0.761) #(0.415 0.619 0.827) #(0.498 0.686 0.862) #(0.501 0.69 0.882) #(0.513 0.717 0.862) #(0.525 0.698 0.858) #(0.521 0.694 0.87) #(0.505 0.678 0.854) #(0.513 0.702 0.878) #(0.0 0.289 0.619) #(0.246 0.498 0.784) #(0.313 0.533 0.804) #(0.325 0.568 0.815) #(0.328 0.58 0.835) #(0.325 0.584 0.847) #(0.333 0.58 0.854) #(0.341 0.607 0.831) #(0.341 0.56 0.831) #(0.156 0.392 0.63) #(0.328 0.595 0.819) #(0.392 0.619 0.85) #(0.396 0.638 0.886) #(0.412 0.662 0.917) #(0.423 0.674 0.929) #(0.412 0.662 0.948) #(0.427 0.671 0.917) #(0.431 0.667 0.905) #(0.27 0.384 0.525) #(0.372 0.599 0.831) #(0.431 0.634 0.89) #(0.482 0.717 0.956) #(0.552 0.792 1.0) #(0.599 0.796 1.0) #(0.576 0.784 1.0) #(0.587 0.792 1.0) #(0.587 0.811 1.0) #(0.69 0.69 0.69) #(0.297 0.455 0.615) #(0.451 0.702 0.956) #(0.537 0.784 1.0) #(0.686 0.815 1.0) #(0.749 0.87 1.0) #(0.796 0.89 1.0) #(0.757 0.87 1.0) #(0.764 0.878 1.0) #(0.419 0.451 0.47) #(0.345 0.462 0.595) #(0.443 0.662 0.886) #(0.733 0.87 1.0) #(0.89 0.952 1.0) #(0.89 0.964 1.0) #(0.866 0.944 1.0) #(0.89 0.96 1.0) #(0.882 0.944 1.0) #(0.392 0.388 0.392) #(0.278 0.278 0.278) #(0.235 0.235 0.235) #(0.309 0.309 0.305) #(0.451 0.451 0.451) #(0.443 0.443 0.443) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #(0.0 0.0 0.004) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( )  )).
	
	^ self createBox 
		
		labelGraphic: box;

		 extent: 20 at 20;
		 actWhen: #buttonDown;
		 actionSelector: #offerWindowMenu;
		 setBalloonText: 'window menu'! !

!SystemWindow methodsFor: 'initialization' stamp: 'jmz 3/06/20043 16:03'!
initialize
	"Initialize a system window. Add label, stripes, etc., if desired"
	super initialize.

	allowReframeHandles := true.
	labelString
		ifNil: [labelString := 'Untitled Window'].
	isCollapsed := false.
	activeOnlyOnTop := true.
	paneMorphs := Array new.
	
			borderColor := #raised.
			borderWidth := 2.
			color := Color white.


	self layoutPolicy: ProportionalLayout new.
	self wantsLabel
		ifTrue: [""label := StringMorph new contents: labelString;
						 font: Preferences windowTitleFont emphasis: 1.
			"Add collapse box so #labelHeight will work"
			collapseBox := self createCollapseBox.
			stripes := Array
						with: (RectangleMorph newBounds: bounds)
						with: (RectangleMorph newBounds: bounds).
			"self extent: "
			self addLabelArea.
			labelArea
				addMorph: (stripes first borderWidth: 1).
			labelArea
				addMorph: (stripes second borderWidth: 2).
			self setLabelWidgetAllowance.
			self addCloseBox.
			self addMenuControl.
			labelArea addMorph: label.
			self wantsExpandBox
				ifTrue: [self addExpandBox].
			labelArea addMorph: collapseBox.
			self setFramesForLabelArea.
			Preferences clickOnLabelToEdit
				ifTrue: [label
						on: #mouseDown
						send: #relabel
						to: self].
			Preferences noviceMode
				ifTrue: [closeBox
						ifNotNil: [closeBox setBalloonText: 'close window'].
					menuBox
						ifNotNil: [menuBox setBalloonText: 'window menu'].
					collapseBox
						ifNotNil: [collapseBox setBalloonText: 'collapse/expand window']]].
	self
		on: #mouseEnter
		send: #spawnReframeHandle:
		to: self.
	self
		on: #mouseLeave
		send: #spawnReframeHandle:
		to: self.
	self extent: 300 @ 200.
	mustNotClose := false.
	updatablePanes := Array new! !

!SystemWindow methodsFor: 'initialization' stamp: 'jmz 3/06/2004 18:59'!
setFramesForLabelArea
	"an aid to converting old instances, but then I found  
	convertAlignment (jesse welton's note)"
	| frame |
	labelArea
		ifNil: [^ self].
	frame := LayoutFrame new.
	frame leftFraction: 0.5;
		 topFraction: 0;
		 leftOffset: label width negated // 2;
		 topOffset: 1.
	label layoutFrame: frame.
	frame := LayoutFrame new.
	frame rightFraction: 1;
		 topFraction: 0;
		 rightOffset: -2;
		 topOffset: 0.
	collapseBox
		ifNotNilDo: [:cb | cb layoutFrame: frame].
	stripes isEmptyOrNil
		ifFalse: [frame := LayoutFrame new.
			frame leftFraction: 0;
				 topFraction: 0;
				 rightFraction: 1;
				 leftOffset: 1;
				 topOffset: 1;
				 rightOffset: -1;
				 bottomOffset: -2.
			stripes first layoutFrame: frame.
			stripes first height: self labelHeight - 1.
			stripes first hResizing: #spaceFill.
			frame := LayoutFrame new.
			frame leftFraction: 0;
				 topFraction: 0;
				 rightFraction: 1;
				 leftOffset: 3;
				 topOffset: 3;
				 rightOffset: -3.
			stripes last layoutFrame: frame.
			stripes last height: self labelHeight - 5.
			stripes last hResizing: #spaceFill].
	labelArea
		ifNotNil: [frame := LayoutFrame new.
			frame leftFraction: 0;
				 topFraction: 0;
				 rightFraction: 1;
				 topOffset: self labelHeight negated.
			Preferences alternativeWindowLook
				ifTrue: [frame leftOffset: -1;
						 rightOffset: 1;
						 topOffset: self labelHeight negated - 1;
						 bottomFraction: 0;
						 bottomOffset: 1].
			labelArea layoutFrame: frame]! !

!SystemWindow methodsFor: 'label' stamp: 'jmz 3/06/2004 13:03'!
setLabelWidgetAllowance
	^ labelWidgetAllowance :=  (self boxExtent x * 4) + 19! !

!SystemWindow methodsFor: 'label' stamp: 'dgd 3/21/2003 18:17'!
setStripeColorsFrom: paneColor 
	| fs baseColor gradientColor |
	"Set the stripe color based on the given paneColor"
	labelArea
		ifNotNil: [""
			labelArea
				color: (Preferences alternativeWindowLook
						ifTrue: [paneColor lighter]
						ifFalse: [Color transparent])].
	""
	
	""
	stripes
		ifNil: [^ self].
		
		
		
	""
	
	
	
	
		baseColor := Color white.
		gradientColor := paneColor.
		self isActive ifFalse:[gradientColor := paneColor mixed: 0.5 with: Color white].
		fs := GradientFillStyle colors: {baseColor. gradientColor}.
		fs origin: labelArea bounds origin; direction: 0 @ labelArea height; radial: false.
		self borderStyle baseColor: (paneColor mixed: 0.5 with: Color white).
		labelArea fillStyle: fs.
		self isActive 
				ifTrue:[self addDropShadow; shadowColor: (Color black alpha: 0.3)] 
				ifFalse:[self removeDropShadow].
		stripes first visible: false.
		stripes second visible: false.
		^self.
	! !


-------------- section suivante --------------


Si ça plante, ... c'est triste comme un PC sans cmd-1.

Jean-Marie Zajac


Plus d'informations sur la liste de diffusion Squeak-fr