Squeak Class Documentation category index | class index  
 
SystemWindow
  category: Morphic-Windows
  superclass: MorphicModel
  subclasses: IRCMorph PreDebugWindow FlashPlayerWindow SystemWindowWithButton PartsWindow WorldWindow CollapsedMorph NewWorldWindow PDAMorph ArchiveViewer

SystemWindow is the Morphic equivalent of StandardSystemView -- a labelled container for rectangular views, with iconic facilities for close, collapse/expand, and resizing.

The attribute onlyActiveOnTop, if set to true (and any call to activate will set this), determines that only the top member of a collection of such windows on the screen shall be active. To be not active means that a mouse click in any region will only result in bringing the window to the top and then making it active.

instance methods
  drawing
  areasRemainingToFill:
colorForInsets
makeMeVisible
raisedColor
wantsRoundedCorners

  events
  doFastFrameDrag
handleListenEvent:
handlesMouseDown:
handlesMouseOverDragging:
isCandidateForAutomaticViewing
mouseDown:
mouseEnterDragging:
mouseLeaveDragging:
mouseMove:
mouseUp:
paneTransition:
secondaryPaneTransition:divider:
wantsHalo
wantsHaloFromClick
wantsToBeDroppedInto:

  geometry
  borderWidthForRounding
extent:
justDroppedInto:event:
labelRect
paneMorphs
panelRect
position:
removeMenuBox
setPaneRectsFromBounds

  initialization
  addCloseBox
addExpandBox
addLabelArea
addMenuControl
applyModelExtent
initialize
maximumExtent
maximumExtent:
model:
setFramesForLabelArea

  label
  externalName
getRawLabel
label
labelHeight
labelWidgetAllowance
relabel
relabelEvent:
setLabel:
setLabelWidgetAllowance
setStripeColorsFrom:
tryToRenameTo:
update:
wantsLabel
widthOfFullLabelText

  layout
  convertAlignment
layoutBounds
putLabelItemsInLabelArea

  menu
  addCustomMenuItems:hand:
buildWindowMenu
changeColor
deleteCloseBox
fullScreen
fullScreenMaximumExtent
makeClosable
makeSecondTopmost
makeUnclosable
offerWindowMenu
sendToBack
setWindowColor
setWindowColor:
takeOutOfWindow

  object fileIn
  convertToCurrentVersion:refStream:

  open/close
  closeBoxHit
delete
initialExtent
mustNotClose
openAsIs
openAsIsIn:
openInMVC
openInMVCExtent:
openInWorld:
openInWorld:extent:
openInWorldExtent:
positionSubmorphs

  panes
  addMorph:frame:
addMorph:fullFrame:
existingPaneColor
holdsTranscript
paneColor
paneColor:
paneColorToUse
paneMorphSatisfying:
replacePane:with:
restoreDefaultPaneColor
setUpdatablePanesFrom:
titleAndPaneText
updatablePanes
updatePaneColors

  resize/collapse
  addExpandBoxIfMissingAndWanted
allowReframeHandles
allowReframeHandles:
collapse
collapseOrExpand
collapsedFrame
doFastWindowReframe:
expand
expandBoxHit
fastFramingOn
fullFrame
getBoundsWithFlex
getCollapsedFrame
isCollapsed
mouseLeaveEvent:fromPane:
paneWithLongestSide:near:
reframePanesAdjoining:along:to:
setBoundsWithFlex:
spawnOffsetReframeHandle:divider:
spawnPaneFrameHandle:
spawnReframeHandle:
unexpandedFrame
unexpandedFrame:
wantsExpandBox

  stepping
  amendSteppingStatus
stepAt:
stepTime
wantsSteps
wantsStepsWhenCollapsed

  testing
  shouldDropOnMouseUp
wantsToBeCachedByHand

  top window
  activate
activateAndForceLabelToShow
activeOnlyOnTop
activeOnlyOnTop:
adjustBorderUponActivationWhenLabeless
adjustBorderUponDeactivationWhenLabeless
extantSketchEditor
isActive
lockInactivePortions
passivate

class methods
  fileIn/Out
  classVersion

  instance creation
  includeInNewMorphMenu
labelled:
newWithoutLabel

  top window
  clearTopWindow
closeTopWindow
noteTopWindowIn:
sendTopWindowToBack
wakeUpTopWindowUponStartup
windowsIn:satisfying:

instance methods
  drawing top  
 

areasRemainingToFill:

May be overridden by any subclasses with opaque regions


 

colorForInsets

Return the color to be used for shading inset borders. The default is my own color, but it might want to be, eg, my owner's color. Whoever's color ends up prevailing, the color itself gets the last chance to determine, so that when, for example, an InfiniteForm serves as the color, callers won't choke on some non-Color object being returned


 

makeMeVisible


 

raisedColor

Return the color to be used for shading raised borders. The default is my own color, but it might want to be, eg, my owner's color. Whoever's color ends up prevailing, the color itself gets the last chance to determine, so that when, for example, an InfiniteForm serves as the color, callers won't choke on some non-Color object being returned


 

wantsRoundedCorners

Default response is simple, fast, and false.
May be overridden to allow almost any morph to be rounded.


  events top  
 

doFastFrameDrag


 

handleListenEvent:

Make sure we lock our contents after DnD has finished


 

handlesMouseDown:

If I am not the topWindow, then I will only respond to dragging by the title bar.
Any other click will only bring me to the top


 

handlesMouseOverDragging:

Return true if I want to receive mouseEnterDragging: and mouseLeaveDragging: when the hand drags something over me (button up or button down), or when the mouse button is down but there is no mouseDown recipient. The default response is false, except if you have added sensitivity to mouseEnterLaden: or mouseLeaveLaden:, using the on:send:to: mechanism.


 

isCandidateForAutomaticViewing


 

mouseDown:

Handle a mouse down event. The default response is to let my eventHandler, if any, handle it.


 

mouseEnterDragging:

unlock children for drop operations


 

mouseLeaveDragging:

lock children after drop operations


 

mouseMove:

Handle a mouse move event. The default response is to let my eventHandler, if any, handle it.


 

mouseUp:

Handle a mouse up event. The default response is to let my eventHandler, if any, handle it.


 

paneTransition:

Mouse has entered or left a pane


 

secondaryPaneTransition:divider:

Mouse has entered or left a pane


 

wantsHalo


 

wantsHaloFromClick


 

wantsToBeDroppedInto:

Return true if it's okay to drop the receiver into aMorph


  geometry top  
 

borderWidthForRounding

Pane borders effectively increase the border size.
This is a hack, but it usually looks good.


 

extent:

Set the receiver's extent to value provided. Respect my minimumExtent.


 

justDroppedInto:event:

This message is sent to a dropped morph after it has been dropped on -- and been accepted by -- a drop-sensitive morph


 

labelRect


 

paneMorphs

Nominally private but a need for obtaining this from the outside arose


 

panelRect

Answer the area below the title bar which is devoted to panes.


 

position:

Change the position of this morph and and all of its submorphs.


 

removeMenuBox


 

setPaneRectsFromBounds

Reset proportional specs from actual bounds, eg, after reframing panes


  initialization top  
 

addCloseBox

If I have a labelArea, add a close box to it


 

addExpandBox

If I have a labelArea, add a close box to it


 

addLabelArea


 

addMenuControl

If I have a label area, add a menu control to it.


 

applyModelExtent


 

initialize

Initialize a system window. Add label, stripes, etc., if desired


 

maximumExtent

This returns the maximum extent that the morph may be expanded to.
Return nil if this property has not been set.


 

maximumExtent:

This returns the maximum extent that the morph may be expanded to.
Return nil if this property has not been set.


 

model:

Set my model and make me me a dependent of the given object.


 

setFramesForLabelArea

an aid to converting old instances, but then I found convertAlignment (jesse welton's note)


  label top  
 

externalName

Answer the name by which the receiver is known in the UI


 

getRawLabel


 

label


 

labelHeight

Answer the height for the window label. The standard behavior is at bottom; a hook is provided so that models can stipulate other heights, in support of various less-window-looking demos.


 

labelWidgetAllowance


 

relabel


 

relabelEvent:

No longer used, but may be referred to by old eventHandlers


 

setLabel:


 

setLabelWidgetAllowance


 

setStripeColorsFrom:

Set the stripe color based on the given paneColor


 

tryToRenameTo:

Triggered eg by typing a new name in the halo


 

update:

Receive a change notice from an object of whom the receiver is a
dependent. The default behavior is to do nothing; a subclass might want
to change itself in some way.


 

wantsLabel

Answer whether the receiver wants a label. At the moment, the only way to suppress this at initialization is to call SystemWindow newWithoutLabel


 

widthOfFullLabelText


  layout top  
 

convertAlignment

Primarily Jesse Welton's code to convert old system windows to ones with modern layout scheme


 

layoutBounds

Bounds of pane area only.


 

putLabelItemsInLabelArea

Put label items into the label area, if there is one


  menu top  
 

addCustomMenuItems:hand:

Add morph-specific items to the given menu which was invoked by the given hand. This method provides is invoked both from the halo-menu and from the control-menu regimes.


 

buildWindowMenu


 

changeColor

Change the color of the receiver -- triggered, e.g. from a menu. This variant allows the recolor triggered from the window's halo recolor handle to have the same result as choosing change-window-color from the window-title menu


 

deleteCloseBox


 

fullScreen

Zoom Window to Full World size with possible DeskMargins


 

fullScreenMaximumExtent

Zoom Window to Full World size with possible DeskMargins
obey the maximum extent rules


 

makeClosable


 

makeSecondTopmost


 

makeUnclosable


 

offerWindowMenu


 

sendToBack


 

setWindowColor

Allow the user to select a new basic color for the window


 

setWindowColor:


 

takeOutOfWindow

Take the receiver's pane morph out the window and place it, naked, where once the window was


  object fileIn top  
 

convertToCurrentVersion:refStream:

subclasses should implement if they wish to convert old instances to modern ones


  open/close top  
 

closeBoxHit

The user clicked on the close-box control in the window title. For Mac users only, the Mac convention of option-click-on-close-box is obeyed if the mac option key is down.


 

delete

Remove the receiver as a submorph of its owner and make its new owner be nil.


 

initialExtent

Answer the desired extent for the receiver when a view on it is first opened on the screen.
5/22/96 sw: in the absence of any override, obtain from RealEstateAgent


 

mustNotClose


 

openAsIs


 

openAsIsIn:

This msg and its callees result in the window being activeOnlyOnTop


 

openInMVC


 

openInMVCExtent:


 

openInWorld:

This msg and its callees result in the window being activeOnlyOnTop


 

openInWorld:extent:

This msg and its callees result in the window being activeOnlyOnTop


 

openInWorldExtent:

This msg and its callees result in the window being activeOnlyOnTop


 

positionSubmorphs

Feels like overkill, but effect needed


  panes top  
 

addMorph:frame:


 

addMorph:fullFrame:


 

existingPaneColor

Answer the existing pane color for the window, obtaining it from the first paneMorph if any, and fall back on using the second stripe color if necessary.


 

holdsTranscript

ugh


 

paneColor


 

paneColor:


 

paneColorToUse


 

paneMorphSatisfying:


 

replacePane:with:

Make newPane exactly occupy the position and extent of oldPane


 

restoreDefaultPaneColor

Useful when changing from monochrome to color display


 

setUpdatablePanesFrom:

Set my updatablePanes inst var to the list of panes which are list panes with the given get-list selectors. Order is important here! Note that the method is robust in the face of panes not found, but a warning is printed in the transcript in each such case


 

titleAndPaneText

If the receiver represents a workspace, return an Association between the title and that text, else return nil


 

updatablePanes

Answer the list of panes, in order, which should be sent the #verifyContents message


 

updatePaneColors

Useful when changing from monochrome to color display


  resize/collapse top  
 

addExpandBoxIfMissingAndWanted

Add an expand box if I don't have one and yet would like one


 

allowReframeHandles


 

allowReframeHandles:


 

collapse


 

collapseOrExpand

Collapse or expand the window, depending on existing state


 

collapsedFrame


 

doFastWindowReframe:

For fast display, only higlight the rectangle during loop


 

expand


 

expandBoxHit

The full screen expand box has been hit


 

fastFramingOn


 

fullFrame


 

getBoundsWithFlex

Return the lastest bounds rectangle with origin forced to global coordinates


 

getCollapsedFrame


 

isCollapsed


 

mouseLeaveEvent:fromPane:

For backward compatibility only. Not used by any newly created window


 

paneWithLongestSide:near:


 

reframePanesAdjoining:along:to:


 

setBoundsWithFlex:

Set bounds from newFrame with origin preserved from global coordinates


 

spawnOffsetReframeHandle:divider:

The mouse has crossed a secondary (fixed-height) pane divider. Spawn a reframe handle.


 

spawnPaneFrameHandle:


 

spawnReframeHandle:

The mouse has crossed a pane border. Spawn a reframe handle.


 

unexpandedFrame

Return the frame size of an unexpanded window


 

unexpandedFrame:

Set the frame size of an unexpanded window


 

wantsExpandBox

Answer whether I'd like an expand box


  stepping top  
 

amendSteppingStatus

Circumstances having changed, find out whether stepping is wanted and assure that the new policy is carried out


 

stepAt:

If the receiver is not collapsed, step it, after first stepping the model.


 

stepTime

Answer the desired time between steps in milliseconds. This default implementation requests that the 'step' method be called once every second.


 

wantsSteps

Return true if the model wants its view to be stepped. For an open system window, we give the model to offer an opinion


 

wantsStepsWhenCollapsed

Default is not to bother updating collapsed windows


  testing top  
 

shouldDropOnMouseUp

Return true for consistency with fastdrag


 

wantsToBeCachedByHand

Return true if the receiver wants to be cached by the hand when it is dragged around.


  top window top  
 

activate

Bring me to the front and make me able to respond to mouse and keyboard


 

activateAndForceLabelToShow


 

activeOnlyOnTop


 

activeOnlyOnTop:


 

adjustBorderUponActivationWhenLabeless

Adjust the border upon, um, activation when, um, labelless


 

adjustBorderUponDeactivationWhenLabeless

Adjust the border upon deactivation when, labelless


 

extantSketchEditor

If my world has an extant SketchEditorMorph associated with anything
in this window, return that SketchEditor, else return nil


 

isActive


 

lockInactivePortions

Make me unable to respond to mouse and keyboard. Control boxes remain active, except in novice mode


 

passivate

Make me unable to respond to mouse and keyboard


class methods
  fileIn/Out top  
 

classVersion

Changed to 1 for SystemWindow Dec 2000 - see if this helps loading old ones


  instance creation top  
 

includeInNewMorphMenu

Include my subclasses but not me


 

labelled:


 

newWithoutLabel

Answer an instance of me without a label


  top window top  
 

clearTopWindow


 

closeTopWindow

Try to close the top window. It may of course decline


 

noteTopWindowIn:

TopWindow must be nil or point to the top window in this project.


 

sendTopWindowToBack

Send the top window of the world to the back, activating the one just beneath it


 

wakeUpTopWindowUponStartup


 

windowsIn:satisfying: