--- a/StandardSystemView.st Tue Sep 08 12:01:34 1998 +0200
+++ b/StandardSystemView.st Tue Sep 08 12:02:25 1998 +0200
@@ -49,18 +49,18 @@
in the past (for example: FileBrowser, ChangesBrowser etc.).
Although this worked, it may lead to the following
problems and inconveniences:
- - applications inherit a big number of methods through the
- SimpleView->View->TopView->StandardSystemView hierarchy.
- There is quite a danger that by accident, some method gets
- redefined which is required by one of those classes.
- (typical candidates are: terminate, destroy, open ...)
- This may lead to strange effects, which may not be obvious to
- non experts ...
+ - applications inherit a big number of methods through the
+ SimpleView->View->TopView->StandardSystemView hierarchy.
+ There is quite a danger that by accident, some method gets
+ redefined which is required by one of those classes.
+ (typical candidates are: terminate, destroy, open ...)
+ This may lead to strange effects, which may not be obvious to
+ non experts ...
- - applications with multiple topViews are difficult to implement
- and manage.
+ - applications with multiple topViews are difficult to implement
+ and manage.
- - use of a windowBuilder is difficult.
+ - use of a windowBuilder is difficult.
For all those reasons, we HIGHLY recommend to NOT define applications
as subclasses of StandardSystemView, but instead base them on
@@ -68,61 +68,61 @@
if (if at all).
[instance variables:]
- label <String> the label in the windows title
+ label <String> the label in the windows title
- icon <Form> the icon
- [ignored if the display does not
- support icons]
+ icon <Form> the icon
+ [ignored if the display does not
+ support icons]
- iconView <View> an optional icon-view (for animated icons)
- [ignored if the display does not
- supports this]
+ iconView <View> an optional icon-view (for animated icons)
+ [ignored if the display does not
+ supports this]
- iconLabel <String> the label in the icon
- [ignored if the display does not
- support label-tabs with icons]
+ iconLabel <String> the label in the icon
+ [ignored if the display does not
+ support label-tabs with icons]
- minExtent <Point> the minimum size
- No limit, if nil
- [the window manager may have its own
- limit; typically some small area]
+ minExtent <Point> the minimum size
+ No limit, if nil
+ [the window manager may have its own
+ limit; typically some small area]
- maxExtent <Point> the maximum size
- No limit, if nil.
- [the window manager may have its own
- limit; typically the screen size]
+ maxExtent <Point> the maximum size
+ No limit, if nil.
+ [the window manager may have its own
+ limit; typically the screen size]
- sizeFixed <Boolean> prevents the view from resizing itself
- (especially to freeze a dialogs size)
+ sizeFixed <Boolean> prevents the view from resizing itself
+ (especially to freeze a dialogs size)
- application <AppModel> if nonNil, thats the application
- Many requests (such as open/close etc.
- are forwarded to it, if present.
+ application <AppModel> if nonNil, thats the application
+ Many requests (such as open/close etc.
+ are forwarded to it, if present.
[class variables:]
- DefaultIcon <Form> cached default icon
+ DefaultIcon <Form> cached default icon
- TakeFocusWhenMapped <Boolean> if true, views grab the keyboard
- focus (convenient with some stupid
- windowManagers)
+ TakeFocusWhenMapped <Boolean> if true, views grab the keyboard
+ focus (convenient with some stupid
+ windowManagers)
- IncludeHostNameInLabel <Boolean> if true, the windows title shall
- include the hostname.
- (convenient if you have many remote
- views open simultaneously)
+ IncludeHostNameInLabel <Boolean> if true, the windows title shall
+ include the hostname.
+ (convenient if you have many remote
+ views open simultaneously)
- WindowLabelFormat <Boolean> specifies the format for windowLabels
+ WindowLabelFormat <Boolean> specifies the format for windowLabels
[author:]
- Claus Gittinger
+ Claus Gittinger
[see also:]
- WindowGroup
- ApplicationModel
+ WindowGroup
+ ApplicationModel
"
!
@@ -344,7 +344,7 @@
"return a standardSystemViews default window extent"
DefaultExtent notNil ifTrue:[
- ^ DefaultExtent
+ ^ DefaultExtent
].
^ super defaultExtent
@@ -697,14 +697,14 @@
|newLabel|
(newLabel := aString string) ~= iconLabel ifTrue:[
- iconLabel := newLabel.
- drawableId notNil ifTrue:[
- device setIconName:newLabel in:drawableId.
- "
- unbuffered - to make it visible right NOW
- "
- device flush.
- ]
+ iconLabel := newLabel.
+ drawableId notNil ifTrue:[
+ device setIconName:newLabel in:drawableId.
+ "
+ unbuffered - to make it visible right NOW
+ "
+ device flush.
+ ]
]
!
@@ -769,16 +769,16 @@
|newLabel|
(newLabel := aString string) ~= label ifTrue:[
- label := newLabel.
- drawableId notNil ifTrue: [
- device setWindowName:(self windowLabelFor:newLabel) in:drawableId.
- shown ifTrue:[
- "
- unbuffered - to make it visible right NOW
- "
- device flush.
- ]
- ]
+ label := newLabel.
+ drawableId notNil ifTrue: [
+ device setWindowName:(self windowLabelFor:newLabel) in:drawableId.
+ shown ifTrue:[
+ "
+ unbuffered - to make it visible right NOW
+ "
+ device flush.
+ ]
+ ]
]
"Created: / 8.9.1995 / 19:37:06 / claus"
@@ -832,9 +832,9 @@
to send this request; some simply distroy the view."
application notNil ifTrue:[
- application closeRequestFor:self
+ application closeRequestFor:self
] ifFalse:[
- self closeRequest.
+ self closeRequest.
]
"Modified: / 3.8.1998 / 19:49:45 / cg"
@@ -935,7 +935,7 @@
borderWidth := 2. "- notice: many window managers ignore this"
minExtent := 10 @ 10.
- maxExtent := device usableExtent.
+ maxExtent := device usableExtent "- (0 @ device captionHeight)".
label isNil ifTrue:[label := self class defaultLabel].
icon isNil ifTrue:[icon := self class defaultIcon].
@@ -1070,46 +1070,46 @@
d := icon depth.
device supportsDeepIcons ifFalse:[
- (d ~~ 1 or:[icon isImage]) ifTrue:[
- "
- dither to monochrome
- "
- toMono := true.
- ]
+ (d ~~ 1 or:[icon isImage]) ifTrue:[
+ "
+ dither to monochrome
+ "
+ toMono := true.
+ ]
] ifTrue:[
- d == 1 ifTrue:[
- icon colorMap notNil ifTrue:[
- icon isImage ifFalse:[
- toMono := true.
- ] ifTrue:[
- toDeep := true.
- ]
- ]
- ] ifFalse:[
- d ~~ device depth ifTrue:[
- icon isImage ifFalse:[
- toMono := true.
- ] ifTrue:[
- toDeep := true.
- ]
- ]
- ]
+ d == 1 ifTrue:[
+ icon colorMap notNil ifTrue:[
+ icon isImage ifFalse:[
+ toMono := true.
+ ] ifTrue:[
+ toDeep := true.
+ ]
+ ]
+ ] ifFalse:[
+ d ~~ device depth ifTrue:[
+ icon isImage ifFalse:[
+ toMono := true.
+ ] ifTrue:[
+ toDeep := true.
+ ]
+ ]
+ ]
].
deviceIcon := icon.
toMono ifTrue:[
- deviceIcon := icon asMonochromeFormOn:device.
+ deviceIcon := icon asMonochromeFormOn:device.
].
toDeep ifTrue:[
- deviceIcon := (Image implementorForDepth:device depth)
- fromImage:icon.
+ deviceIcon := (Image implementorForDepth:device depth)
+ fromImage:icon.
].
deviceIcon notNil ifTrue:[
- "
- get device pixmap (i.e. allocate colors & resource)
- "
- deviceIcon := deviceIcon onDevice:device
+ "
+ get device pixmap (i.e. allocate colors & resource)
+ "
+ deviceIcon := deviceIcon onDevice:device
].
^ deviceIcon
@@ -1151,7 +1151,7 @@
(IncludeHostNameInLabel == true
and:[WindowLabelFormat notNil]) ifTrue:[
- ^ WindowLabelFormat bindWith:labelString with:(OperatingSystem getHostName)
+ ^ WindowLabelFormat bindWith:labelString with:(OperatingSystem getHostName)
].
^ labelString
@@ -1178,7 +1178,7 @@
"/ know about the focusSequence
"/
application notNil ifTrue:[
- ^ application focusSequence
+ ^ application focusSequence
].
"/ is that really a good idea ?
@@ -1186,7 +1186,7 @@
(model notNil
and:[(model respondsTo:#focusSequence)
and:[model ~~ self]]) ifTrue:[
- ^ model focusSequence
+ ^ model focusSequence
].
^ nil
@@ -1223,14 +1223,14 @@
"iconify the receiver"
shown ifTrue:[
- self unmap.
+ self unmap.
- "if it was iconified, try to remap iconified"
- device
+ "if it was iconified, try to remap iconified"
+ device
mapView:self id:drawableId iconified:true
- atX:left y:top width:width height:height
+ atX:left y:top width:width height:height
minExtent:minExtent maxExtent:maxExtent.
- shown := false.
+ shown := false.
].
"
@@ -1254,12 +1254,12 @@
super create.
iconView notNil ifTrue:[
- iconView create.
- device setWindowIconWindow:iconView in:drawableId.
- iconView setRealized:true.
+ iconView create.
+ device setWindowIconWindow:iconView in:drawableId.
+ iconView setRealized:true.
].
iconLabel notNil ifTrue:[
- device setIconName:iconLabel string in:drawableId
+ device setIconName:iconLabel string in:drawableId
]
"Modified: 10.6.1996 / 20:14:50 / cg"
@@ -1269,12 +1269,12 @@
"de-iconify the receiver at its old position"
shown ifFalse:[
- self unmap.
+ self unmap.
- "if it was iconified, try to remap iconified"
- device
+ "if it was iconified, try to remap iconified"
+ device
mapView:self id:drawableId iconified:false
- atX:left y:top width:width height:height
+ atX:left y:top width:width height:height
minExtent:minExtent maxExtent:maxExtent.
].
@@ -1300,10 +1300,10 @@
l := self windowLabelFor:label.
icon notNil ifTrue:[
- icn := self convertedIcon:icon.
- (icnMask := icon mask) notNil ifTrue:[
- icnMask := self convertedIconMask:icnMask
- ]
+ icn := self convertedIcon:icon.
+ (icnMask := icon mask) notNil ifTrue:[
+ icnMask := self convertedIconMask:icnMask
+ ]
].
org := left @ top.
@@ -1313,27 +1313,27 @@
"/ and provide another origin.
(listener := WindowSensor eventListener) notNil ifTrue:[
- ret := listener preCreateView:self origin:org.
- ret isPoint ifTrue:[
- org := ret
- ]
+ ret := listener preCreateView:self origin:org.
+ ret isPoint ifTrue:[
+ org := ret
+ ]
].
drawableId := device
- createWindowFor:self
- type:nil
- origin:org
- extent:(width @ height)
- minExtent:minExtent
- maxExtent:maxExtent
- borderWidth:borderWidth
- subViewOf:nil
- style:(self windowStyle)
- inputOnly:(self isInputOnly)
- label:l
- owner:nil
- icon:icn iconMask:icnMask
- iconView:iconView.
+ createWindowFor:self
+ type:nil
+ origin:org
+ extent:(width @ height)
+ minExtent:minExtent
+ maxExtent:maxExtent
+ borderWidth:borderWidth
+ subViewOf:nil
+ style:(self windowStyle)
+ inputOnly:(self isInputOnly)
+ label:l
+ owner:nil
+ icon:icn iconMask:icnMask
+ iconView:iconView.
Lobby registerChange:self.
@@ -1341,14 +1341,14 @@
"/ give it a chance to track views
listener notNil ifTrue:[
- listener postCreateView:self.
+ listener postCreateView:self.
].
extentChanged := false.
originChanged := false.
(borderColor notNil and:[borderColor ~= Black]) ifTrue:[
- self setBorderColor
+ self setBorderColor
].
"/ (viewGravity notNil "and:[viewGravity ~~ #NorthWest]") ifTrue:[
@@ -1360,14 +1360,14 @@
"/ ].
viewShape notNil ifTrue:[
- self setViewShape
+ self setViewShape
].
(backed notNil and:[backed ~~ false]) ifTrue:[
- device setBackingStore:backed in:drawableId
+ device setBackingStore:backed in:drawableId
].
saveUnder ifTrue:[
- device setSaveUnder:true in:drawableId
+ device setSaveUnder:true in:drawableId
].
cursor notNil ifTrue:[
self setCursor
@@ -1385,9 +1385,9 @@
"/ let the application add its views to the current project
"/
application notNil ifTrue:[
- application opened:self.
+ application opened:self.
] ifFalse:[
- self addToCurrentProject.
+ self addToCurrentProject.
].
"Created: 24.7.1997 / 18:11:26 / cg"
@@ -1426,6 +1426,6 @@
!StandardSystemView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.104 1998-08-24 18:28:09 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.105 1998-09-08 10:02:25 cg Exp $'
! !
StandardSystemView initialize!