|
|
Class: DeviceWorkstation
Object
|
+--GraphicsDevice
|
+--HostGraphicsDevice
|
+--DeviceWorkstation
|
+--NeXTWorkstation
- Package:
- stx:libview
- Category:
- Interface-Graphics
- Version:
- rev:
1.541
date: 2010/02/03 17:22:20
- user: cg
- file: DeviceWorkstation.st directory: libview
- module: stx stc-classLibrary: libview
- Author:
- Claus Gittinger
this abstract class defines common protocol to all Display types.
For compatibility with ST-80, this class (actually a concrete subclass)
is also bound to the global variable Screen.
DeviceWorkstation (and its concrete subclasses) are the central classes
around windowManagement and event processing.
See the documentation in #events and #workstationDevices for more detailed
info.
[instance variables:]
displayId <Number> the device id of the display
visualType <Symbol> one of #StaticGray, #PseudoColor, ... #TrueColor
monitorType <Symbol> one of #monochrome, #color, #unknown
depth <SmallInteger> bits per color
ncells <SmallInteger> number of colors (i.e. colormap size; not always == 2^depth)
bitsPerRGB <SmallInteger> number of valid bits per rgb component
(actual number taken in A/D converter; not all devices report the true value)
bitsRed <SmallInteger> number of red bits (only valid for TrueColor displays)
bitsGreen <SmallInteger> number of green bits (only valid for TrueColor displays)
bitsBlue <SmallInteger> number of blue bits (only valid for TrueColor displays)
redMask <SmallInteger> shifted red mask (only useful for TrueColor displays)
greenMask <SmallInteger> shifted green mask (only useful for TrueColor displays)
blueMask <SmallInteger> shifted blue mask (only useful for TrueColor displays)
shiftRed <SmallInteger> number of bits to shift red bits (only valid for TrueColor displays)
shiftGreen <SmallInteger> number of bits to shift green bits (only valid for TrueColor displays)
shiftBlue <SmallInteger> number of bits to shift blue bits (only valid for TrueColor displays)
hasColors <Boolean> true, if display supports colors
hasGreyscales <Boolean> true, if display supports grey-scales (i.e is not b/w display)
width <SmallInteger> number of horizontal pixels
height <SmallInteger> number of vertical pixels
heightMM <Number> screen height in millimeter
widthMM <Number> screen width in millimeter
resolutionHor <Number> pixels per horizontal millimeter
resolutionVer <Number> pixels per vertical millimeter
idToTableIndexMapping <Dictionary> maps view-ids to views
knownViews <WeakArray> all of my known views
knownIds <Collection> corresponding device-view ids
knownBitmaps <Collection> all known device bitmaps
knownBitmapIds <Collection> corresponding device-bitmap ids
dispatching <Boolean> true, if currently in dispatch loop
exitDispatchOnLastWindowClose
<Boolean> if true, dispatch is finished when the last
window closes (default:true).
ctrlDown <Boolean> true, if control key currently pressed
shiftDown <Boolean> true, if shift key currently pressed
metaDown <Boolean> true, if meta key (cmd-key) is currently pressed
altDown <Boolean> true, if alt key is currently pressed
motionEventCompression
<Boolean> if true motion events are compressed
(obsolete: now done in sensor)
lastId <Number> the id of the last events view (internal)
lastView <View> the last events view (internal, for faster id->view mapping)
keyboardMap <KeyBdMap> mapping for keys
rootView <DisplayRootView> this displays root window
isSlow <Boolean> set/cleared from startup - used to turn off
things like popup-shadows etc.
focusMode <Symbol> nil, #pointer or #activeWindow
activeWindow <View> WINDOWS only: the currently active (foreground) view
clipBoardEncoding
<Symbol> encoding of pasted clipBoard text;
nil means: iso8859.
set this to #shiftJis, if pasting
SJIS text (for example, from netscape)
Some systems pass encoding information
in the clipBoard - there, this is not
needed.
[class variables:]
MultiClickTimeDelta in ms; controls how long of a delay is
required between two clicks, to NOT take
it as a multi-click.
ErrorPrinting controls low-level (X-) error message printing
AllScreens a collectin of known screens
GraphicsContext
DeviceDrawable
WindowSensor
WindowGroup
WindowEvent
ProcessorScheduler
PSMedium
Signal constants
-
currentScreenQuerySignal
-
return the signal which can be used to provide a current
screen (if background processes ask for one)
-
deviceErrorSignal
-
return the signal used for device error reporting.
In multi-display configurations, this is the parent of
all per-instance deviceErrorSignals.
-
deviceIOErrorSignal
-
return the signal used for device I/O error reporting.
In multi-display configurations, this is the parent of
all per-instance deviceIOErrorSignals.
-
deviceIOTimeoutErrorSignal
-
return the signal used for device I/O timeout error reporting.
In multi-display configurations, this is the parent of
all per-instance deviceIOTimeoutErrorSignals.
-
deviceOpenErrorSignal
-
return the signal used for reporting of errors while opening a device.
-
drawingOnClosedDeviceSignal
-
accessing
-
default
-
ST-80 compatibility.
Return the default screen. This is typically the first opened
Display screen in a session. Use of the global variable Display
should vanish over time - replace it by Screen default.
-
default: aDevice
-
Set the default screen. This is sent very early during startup,
and assigns the first opened screenDevice to both Display and the default
screen.
defaults
-
defaultButtonPressTimeForMenu
-
-
defaultButtonPressTimeForMenu: seconds
-
error handling
-
errorInterrupt: errID with: aParameter
-
an error in the devices low level code (typically Xlib or XtLib)
This is invoked via
XError->errorInterrupt:#DisplayError->registeredErrorInterruptHandlers
or
XError->errorInterrupt:#DisplayIOError->registeredErrorInterruptHandlers
looks if a signal handler for DeviceErrorSignal is present,
and - if so raises the signal.
If the signal not handled, simply output a message and continue.
This allows for non disrupted error reporting OR to catch and
investigate errors as required.
However, io-errors are always delivered as a signal raise.
-
errorPrinting
-
return the `errorPrinting-is-on' flag
-
errorPrinting: aBoolean
-
set/clear the `errorPrinting-is-on' flag
-
lastErrorString
-
return a string describing the last error
** This method raises an error - it must be redefined in concrete classes **
-
resourceIdOfLastError
-
return the resource id responsible for the last error
** This method raises an error - it must be redefined in concrete classes **
initialization
-
initialize
-
create local error signals; enable errorPrinting
-
initializeConstants
-
initialize some (soft) constants
-
nativeWindows: aBoolean
-
enable / disable use of native windows - dummy here.
instance creation
-
newDispatchingFor: aScreenName
-
create a new instance of mySelf, which serves aDeviceName.
Only useful for device-classes which support multiple devices -
i.e. X-Workstations
-
newFor: aDisplayName
-
Create an new instance for a connection to aDisplayName.
If aDisplayName is nil, a connection to the standard display is opened
-
openDefaultDisplay: aStringOrNil
-
open the default display. aStringOrNil may be the display name,
if nil, the name is extracted from command-line-arguments or the environment.
Raise a signal if open fails.
queries
-
allScreens
-
Return a collection of active display devices.
Typically, there is only one: Display or Screen current.
-
current
-
Return the currently active screen,
that is, the device of the currently executing windowGroup.
It will be used in multi-display operation, to launch views on
the correct device - even if not specified explicitely.
This does not yet work fully satisfying if a background processes
invokes this ... the default display is returned in this case.
In a headless (i.e. non-GUI) application, nil is returned.
-
currentWindow
-
Return the currently active window,
that is, the topView of the currently executing windowGroup
-
defaultDisplayName
-
extract the default display name from command line arguments
and environment. Nil is a valid name which represents the builtin default
-
flushCachedLastScreen
-
-
isAbstract
-
answer true, if I am not a concrete Workstation class
-
platformName
-
ST-80 compatibility.
Return a string describing the display systems platform.
Returns a dummy here. This must be redefined in concrete
Workstation classes, to return somthing like 'X11', 'win32', 'os2' etc.
standalone setup
-
exitOnLastClose: aBoolean
-
set/clear the flag which controls if the
event dispatching should stop when the last view is closed
on the (main) Display connection.
(standAlone applications will set it)
Compatibility-ST80
-
colorDepth
-
alias for depth - for ST-80 compatibility
-
colorPalette
-
alias for colorMap - for ST-80 compatibility
-
stackedWindows
-
supposed to return all topViews in stacking order;
BUGGY: right now, the order is undefined
-
zoom: startRect to: endRect
-
animate a rubber-rectangle from startRect to endRect.
Can be used by buttons, which open some dialog for nicer user feedback.
Notice: since the displays window manager typically allows a topWindow
to be placed by the user, this should not be used for modeless
topViews.
-
zoom: startRect to: endRect duration: milliseconds
-
animate a rubber-rectangle from startRect to endRect.
Can be used by buttons, which open some dialog for nicer user feedback.
Notice: since the displays window manager typically allows a topWindow
to be placed by the user, this should not be used for modeless
topViews.
-
zoom: startRect to: endRect speed: pixelsPerSecond
-
animate a rubber-rectangle from startRect to endRect.
Can be used by buttons, which open some dialog for nicer user feedback.
The speed is computed for the longest edge to run at the given speed.
Notice: since the displays window manager typically allows a topWindow
to be placed by the user, this should not be used for modeless
topViews.
Compatibility-Squeak
-
border: aRectangle width: bw
-
draw a rectangular border on the display with black.
Added to allow for some squeak examples to be evaluated ...
-
cursorPoint
-
-
displayOpaqueString: s x: x y: y
-
draw a string on the display with black.
Added to allow for some squeak examples to be evaluated ...
-
displayString: s x: x y: y
-
draw a string on the display with black.
Added to allow for some squeak examples to be evaluated ...
-
fill: aRectangle fillColor: aColor
-
fill a rectangular area on the display with aColor.
Added to allow for some squeak examples to be evaluated ...
-
fillWhite
-
fill all of the display with white.
Added to allow for some squeak examples to be evaluated ...
-
fillWhite: aRectangle
-
fill a rectangular area on the display with white.
Added to allow for some squeak examples to be evaluated ...
-
primMouseButtons
-
return the current button state
-
restoreAfter: aBlock
-
evaluate aBlock, wait for a buttonPress, then restore the display.
Added to allow for some squeak examples to be evaluated ...
-
supportsDisplayDepth: givenDepth
-
return true, if the given depth is supported by the display.
(Actually, some displays support multiple depths (i.e. visuals),
but for now, we want the displays native depth here.
-
waitButton
-
wait for any button to be pressed
-
waitClickButton
-
wait for any button to be pressed and released again.
Return the screen coordinate of the click.
-
waitNoButton
-
wait for no button to be pressed
Signal constants
-
deviceErrorSignal
-
return the per-device signal, which is used for error reporting.
The default here is the global DeviceErrorSignal
(which is the parent of any per-instance error signals).
-
deviceIOErrorSignal
-
return the signal used for device I/O error reporting.
The default here is the global DeviceIOErrorSignal
(which is the parent of any per-instance I/O error signals).
-
deviceIOTimeoutErrorSignal
-
return the signal used for device I/O timeout error reporting.
The default here is the global DeviceIOTimeoutErrorSignal
(which is the parent of any per-instance I/O timeout signals).
accessing & queries
-
activateOnClick: aBoolean
-
enable/disable raise&activate on click;
return the previous setting.
This may be left unimplemented by a device.
-
activeView
-
-
buttonMotionMask: aMask includesButton: aButton
-
given a device button mask, return true if a logical button
(1 .. 3 for left .. right) is included.
-
colorAt: aPoint
-
-
dispatchProcess
-
-
displayFileDescriptor
-
return the file descriptor associated with the display
if any. If there is no underlying filedescriptor, return nil.
(used for event select/polling)
-
getSystemColor: aKey
-
retrieve a windows system color.
The styleSheet/View classes may use this to setup default colors.
-
id
-
return the displayId
-
isOpen
-
return true, if there is a valid connection to the display.
Added for ST-80 compatibility.
-
isOpenAndDispatching
-
return true, if there is a valid connection to the display and events are dispatched.
-
isPersistentInSnapshot
-
return true, if resources on this device are to be made
persistent in a snapshot image.
-
knownViews
-
return a (non-weak) collection of all known views
-
knownViews: aCollection
-
set the collection of all known views - take care,
bad use of this will create funny results; use only for snapshot support
-
mayOpenDebugger
-
return true, if a debugger may open on this workstation;
if false, the debugger opens on the main display.
This should be made a variable ...
-
mayOpenDebugger: aBoolean
-
set/clear the flag, which controls if a debugger may open on this workstation;
if false, the debugger opens on the main display.
-
multiClickTimeDelta
-
-
multiClickTimeDelta: milliseconds
-
-
nativeDialogs
-
-
nativeWidgets
-
-
rootView
-
return the rootView (i.e. the background window) on the receiver screen.
It is not guaranteed, that a particular display device supports this.
-
suppressDebugger
-
return true, if no debugger should be opened for applications running
on this device (i.e. neither a debugger on the device nor on the
main screen).
If true, the debugger is either opened on the device or on the
main display, depending on the mayOpenDebugger setting.
-
suppressDebugger: aBoolean
-
set/clear the flag, which controls if no debugger should be opened for applications running
on this device (i.e. neither a debugger on the device nor on the
main screen).
If true, the debugger is either opened on the device or on the
main display, depending on the mayOpenDebugger setting.
-
suppressShadowViews
-
return true, if this device wants to suppress shadow views
(i.e. shadows under popups and modalBoxes).
Some (slow) devices may want to return true here
-
translatePoint: aPoint from: windowId1 to: windowId2
-
given a point in window1 (defined by its id), return the coordinate of
aPoint in window2 (defined by its id).
Use to xlate points from a window to rootwindow, mainly for rubber-line
drawing on the displays root window.
** This method raises an error - it must be redefined in concrete classes **
-
translatePoint: aPoint fromView: window1 toView: window2
-
given a point in window1, return the coordinate of aPoint in window2.
Either window argument may be nil to specify the root window (screen)
Use to xlate points from a window to another window (or from a window
to the rootwindow), mainly for rubber-line drawing on the displays root window.
-
translatePointFromRoot: aPoint toView: window
-
given a point as absolute root-window coordinate, return the coordinate within the window.
Use to xlate points from the rootWindow to a window.
-
translatePointToRoot: aPoint fromView: window1
-
given a point in window1, return the absolute root-window coordinate.
Use to xlate points from a window to the rootwindow,
mainly for rubber-line drawing on the displays root window.
-
viewFromPoint: aScreenPoint
-
given a point on the screen, return the ST/X view in which that
point is (this may be a subview).
Return nil, if its not an ST/X view or if the point is on the background
-
viewIdFromPoint: aScreenPoint
-
given a point on the screen, return the id of the ST/X view in which that
point is (this may be a subview). Return nil, if its not an ST/X view
or if the point is on the background
-
viewIdFromPoint: aPoint in: windowId
-
given a point in rootWindow, return the viewId of the subview of windowId
hit by this coordinate. Return nil if no view was hit.
- use to find window to drop objects after a cross-view drag
-
windowAt: aScreenPoint
-
given a point on the screen, return the ST/X topview in which that
point is.
Return nil, if its not an ST/X view or if the point is on the background.
Alias for viewFromPoint: for ST-80 compatibility
accessing-display attributes
-
bitsBlue
-
return the number of valid bits in the blue component.
-
bitsGreen
-
return the number of valid bits in the green component.
-
bitsPerRGB
-
return the number of valid bits per rgb component;
Currently, assume that r/g/b all have the same precision,
which is a stupid assumption (there may be some, where less
resolution is available in the blue component).
Therefore, this may be changed to return a 3-element vector.
In the meantime, use bitsRed/bitsGreen/bitsBlue to get this information.
-
bitsRed
-
return the number of valid bits in the red component.
-
blackColor
-
return the black color on this device.
This is the same as 'Color black on:device', but much faster.
-
blackpixel
-
return the colorId of black
** This method raises an error - it must be redefined in concrete classes **
-
blueMask
-
return a mask, which extracts the blueBits from a color id.
This only makes sense with trueColor displays;
therefore, 0 is returned on all others.
-
depth
-
return the depth in pixels of the display
-
focusMode
-
-
greenMask
-
return a mask, which extracts the greenBits from a color id.
This only makes sense with trueColor displays;
therefore, 0 is returned on all others.
-
hasColors
-
return true, if its a color display
-
hasGrayscales
-
return true, if this workstation supports grayscales
(also true for color displays)
-
hasGreyscales
-
OBSOLETE english version; please use #hasGrayScales.
Return true, if this workstation supports greyscales
(also true for color displays)
-
redMask
-
return a mask, which extracts the redBits from a color id.
This only makes sense with trueColor displays;
therefore, 0 is returned on all others.
-
shiftBlue
-
return the count by which the blue bits are to be shifted
when forming a color index.
This only makes sense with trueColor displays; therefore,
nil is returned on all others.
-
shiftGreen
-
return the count by which the green bits are to be shifted
when forming a color index.
This only makes sense with trueColor displays; therefore,
nil is returned on all others.
-
shiftRed
-
return the count by which the red bits are to be shifted
when forming a color index.
This only makes sense with trueColor displays; therefore,
nil is returned on all others.
-
visualType
-
return a symbol representing the visual type of the display
-
visualType: aSymbol
-
set the visual type.
The only situation, where setting the visual makes sense,
is with my plasma-display, which ignores the palette and spits out
grey scales, independent of color LUT definitions.
(of which the server knows nothing).
So, this should be used from a display-specific startup file only.
-
whiteColor
-
return the white color on this device.
This is the same as 'Color white on:device', but much faster.
-
whitepixel
-
return the colorId of white
** This method raises an error - it must be redefined in concrete classes **
accessing-display capabilities
-
hasColors: aBoolean
-
set the hasColors flag - needed since some servers dont tell the
truth if a monochrome monitor is connected to a color server.
Clearing the hasColors flag in the rc file will force use of grey
colors (which might make a difference, since some colors are hard to
distinguish on a greyscale monitor).
-
hasDPS
-
return true, if this workstation supports postscript output into views.
Should be reimplemented in concrete classes which do support this.
-
hasExtension: extensionString
-
query for an X extension. The method here is provide for XWorkstation
protocol compatibility only.
-
hasGrayscales: aBoolean
-
set the hasGrayscales flag - can be used to simulate b&w behavior
on greyScale and color monitors.
(You may want to check if your application looks ok if displayed on
a b&w monitor - even if you have a color display. To do so, clear
the hasGreyscales flag from your .rc file)
-
hasGreyscales: aBoolean
-
OBSOLETE english version - please use #hasGrayscales:
Set the hasGreyscales flag - can be used to simulate b&w behavior
on greyScale and color monitors.
(You may want to check if your application looks ok if displayed on
a b&w monitor - even if you have a color display. To do so, clear
the hasGreyscales flag from your .rc file)
-
hasImageExtension
-
return true, if this workstation supports the X Image extension
-
hasInputExtension
-
return true, if this workstation supports the X Input extension
-
hasMultibuffer
-
return true, if this workstation supports the X multibuffer extension
-
hasPEX
-
return true, if this workstation supports PEX graphics.
Should be reimplemented in concrete classes which do support this.
-
hasShape
-
return true, if this workstation supports arbitrary shaped windows.
This is obsolete - use #supportsArbitraryShapedViews.
-
hasShm
-
return true, if this workstation supports shared memory pixmaps.
Should be reimplemented in concrete classes which do support this.
-
hasStereoExtension
-
return true, if this workstation supports stereo GL drawing.
Both the server must support it, and the feature must have been
enabled in the smalltalk system, for true to be returned.
-
hasXVideo
-
return true, if this workstation supports the XVideo extension
-
iconSizes
-
Get the supported icon sizes. These are typically set by the window manager.
We return nil here (as if there are no special size preferences).
-
ignoreBackingStore: aBoolean
-
if the argument is true, the views backingStore setting will be ignored, and
no backing store used - this can be used on servers where backing store is
very slow (from rc-file)
-
isSlow
-
return true, if this is a relatively slow device -
used to turn off things like popup-shadows
-
isSlow: aBoolean
-
set/clear the slow flag.
The slow-flag has no semantic meaning by itself;
however, it can be set via the display.rc file and tested at various
other places to turn off some bells&whistles which might slow down
the drawing. For example, shadows under popUps are suppressed if isSlow
is set.
-
monitorType
-
return a symbol representing the monitor type of the display.
It is usually set to #unknown, #color or #monochrome.
But it can be set to any value from the startup file, for later
testing from anywhere. For example the startup for plasma-displays
can set it to #plasma to later influence the colors used in widgets
(indirectly through the resource file).
-
monitorType: aSymbol
-
set the monitorType - see comment in DeviceWorkstation>>montorType
-
ncells
-
return the number of usable color cells, the display has
- this is not always 2 to the power of depth
(for example, on 6bit displays, ncells is 64 while depth is 8)
-
preferredIconSize
-
Get the preferrered icon size. These are typically set by the window manager.
We return nil here (as if there are no special size preferences).
-
preferredIconSize: anExtentPoint
-
set the preferrered icon size.
By default, the preferredIconSize is queried from the display,
however, some windowManagers return stupid values.
This methods allows overriding thngs from a startup file
-
scrollsAsynchronous
-
return true, if this display asynchronously sends expose events after a
scroll operation. False otherwise. Asynchronous expose events are an X
speciality, which affects a few methods outside of the display class (sorry)
-
supportedImageFormatForDepth: aDepth
-
given a depth, return the devices image format info,
which provides padding info. If the given depth is not
supported, return nil.
-
supportedImageFormats
-
return an array with supported image formats; each array entry
is another array, consisting of depth and bitsPerPixel values.
Here, we return a single format only; every graphics device must
support b&w single bit images.
-
supportsAnyViewBackgroundPixmaps
-
return true, if the device allows any pixmap as
viewBackground. False returned here - redefined in some
device classes.
-
supportsArbitraryShapedViews
-
return true, if this workstation supports arbitrary shaped
windows.
Should be reimplemented in concrete classes which do support this.
-
supportsDeepIcons
-
return true, if this device supports non b&w (i.e. greyScale
or colored icons). Many Xservers (and/or windowManagers) crash,
if you pass them a deep form as icon; therefore, the default is false.
It may be a good idea to check for the server vendor/release and
return true sometimes.
This flag can be set with #supportsDeepIcons:
-
supportsDeepIcons: yesOrNo
-
set/clear the supportsDeepIcons flag.
Many Xservers (and/or windowManagers) crash,
if you pass them a deep form as icon; therefore, the default is false.
-
supportsGLDrawing
-
return true, if this device supports 3D GL drawing.
We do not depend on that being implemented.
-
supportsIconMasks
-
return true, if this device supports masked icons.
Assume true here - to be redefined in concrete classes.
-
supportsIconViews
-
return true, if this device supports views as icons.
Only Xservers (currently) support this.
-
supportsMaskedDrawingWith: aForm
-
return true, if the device allows the given form pixmap
to be used as paint color.
False returned here, which forces higher level code to
perform the filling manually (by copying the form)
- redefined in most device classes.
-
supportsRoundShapedViews
-
return true, if this workstation supports round shaped
(elliptical & circular) windows.
Should be reimplemented in concrete classes which do support this.
-
supportsViewBackgroundPixmap: aForm
-
return true, if the device allows the given pixmap as
viewBackground. If false is returned,
drawing is done by (possibly) slower smalltalk code.
False returned here - redefined in some concrete device classes.
-
supportsViewGravity
-
return true, if this device supports gravity attributes.
We do not depend on the being implemented, but some resizing operations
are faster, it is is.
-
supportsWindowBorder: aNumber
-
return true, if this device supports bordered windows with the given borderWidth.
Right now, some drawing stuff depends on (at least) a border of 1 pixel
to be supported by the device.
ST/X's views are being rewritten to draw the border manually in the
future, since some systems do not support arbitrary borders (i.e. Windows).
accessing-display geometry
-
boundingBox
-
return a rectangle representing the displays bounding box.
For Smalltalk-80 2.x compatibility
-
bounds
-
return a rectangle representing the displays bounding box.
For Smalltalk-80 4.x compatibility
-
captionHeight
-
return the height in pixels of the caption
(i.e. title bar) of topWindows.
Fallback of 0 (i.e. unknown) is returned here.
Applications should not depend on that returned value
to be exact - on some systems (windowManagers),
its value cannot be retrieved
-
center
-
return the centerpoint in pixels of the display
-
drawingResolution
-
return a point consisting of the actual drawing resolution
in pixel-per-inch horizontally and vertically.
On screen devices, this is the same as resolution; on postscript
devices, this is usually higher than the coordinate systems unit.
This method is provided for compatibility with postscript media,
to query the device if sub-pixel-coordinate drawing is possible.
(there are a few situations, in which resolution-independ drawing
leads to ugly looking output ... knowing about subPixel resolution
may help there.)
-
extent
-
return the extent of the display (in pixels)
-
height
-
return the height of the display (in pixels)
-
heightInMillimeter
-
return the height in millimeter of the display
-
heightInMillimeter: aNumber
-
set the height in millimeter of the display
- needed since some displays do not tell the truth or do not know it
-
horizontalPixelPerInch
-
return the number of horizontal pixels per inch of the display
-
horizontalPixelPerMillimeter
-
return the number of horizontal pixels per millimeter of the display
-
pixelPerInch
-
return the number of horizontal/vertical pixels per inch of the display as Point
-
pixelPerMillimeter
-
return the number of horizontal/vertical pixels per millimeter of the display as Point
-
resolution
-
return a point consisting of pixel-per-inch horizontally and vertically.
This is an ST-80 compatibility method
-
usableExtent
-
return the usable extent of the display (in pixels).
Normally, the same as extent, but may be smaller, in
case some menu space is taken up by the window manager (windows)
-
usableHeight
-
returns the usable height of the display (in pixels)
Normally, the same as height, but may be smaller, in
case some menu space is taken up by the window manager (windows)
-
usableHeightAt: aPoint
-
returns the usable height of the display (in pixels) at a given point
Normally, the same as height, but may be smaller, in
case some menu space is taken up by the window manager (windows).
On multi-display systems with different sized screens, this should care for
which display is at the given x-position
-
usableWidth
-
returns the usable width of the display (in pixels)
Normally, the same as width, but may be smaller, in
case some menu space is taken up by the window manager (windows)
-
verticalPixelPerInch
-
return the number of vertical pixels per inch of the display
-
verticalPixelPerMillimeter
-
return the number of vertical pixels per millimeter of the display
-
virtualExtent
-
return the virtual extent of the display (in pixels).
On most systems, this is the same as the physical width;
except, if a window manager with a virtual desktop like olvwm
(simulating a bigger screen) is running.
-
virtualHeight
-
return the virtual height of the display (in pixels).
On most systems, this is the same as the physical height;
except, if a window manager with a virtual desktop like olvwm
(simulating a bigger screen) is running.
-
virtualWidth
-
return the virtual width of the display (in pixels).
On most systems, this is the same as the physical width;
except, if a window manager with a virtual desktop like olvwm
(simulating a bigger screen) is running.
-
width
-
return the width of the display (in pixels)
-
widthInMillimeter
-
return the width in millimeter of the display
-
widthInMillimeter: aNumber
-
set the width in millimeter of the display
- needed since some displays do not tell the truth or do not know it
accessing-keyboard mappings
-
buttonTranslation
-
return the buttonTranslation (for lefthanders)
-
buttonTranslation: anArray
-
set the buttonTranslation (for lefthanders)
-
keyboardMap
-
return the keyboard map
-
keyboardMap: aMap
-
set the keyboard map
-
shortKeyStringFor: aSymbolicKey
-
accessing-misc
-
defaultEventMask
-
return a mask to enable some events by default.
** This method raises an error - it must be redefined in concrete classes **
-
displayName
-
return the display name - that is the name of the display connection
or nil, for default display. For example, in X, this returns a string
like 'hostname:0' for remote connections, and nil for a default local
connection.
- nothing known here, but maybe redefined in subclasses.
-
glVersion
-
return a string describing the GL version.
Since the generic display does not support 3D GL graphics,
a dummy is returned here.
-
numberOfMonitors
-
-
platformName
-
return a string describing the display systems platform.
Returns a dummy here.
-
protocolVersion
-
return the display systems protocol version number.
Returns a dummy here
-
serverVendor
-
return a string describing the display systems server vendor.
Returns a dummy here
-
vendorRelease
-
return the display systems release number.
Returns a dummy here.
bitmap/window creation
-
convertedIcon: iconArg
-
make certain, that the image argument is compatible with myself;
this means converting it to a format (typically: monochrome) which I support.
Return a compatible version of the icon.
-
convertedIconMask: aMask
-
return a version of the argument which can be used as an iconMask on myself.
Typically, this means conversion to a monochrome mask -
future versions may add alpha channel masks, if I support them ...
-
createBitmapFromArray: anArray width: w height: h
-
create a monochrome, depth1 bitmap from a given (byte-)array.
The rows are aligned to a multiple of 8
** This method raises an error - it must be redefined in concrete classes **
-
createBitmapFromFile: aString for: aForm
-
-
createBitmapWidth: w height: h
-
allocate a bitmap on the Xserver, the contents is undefined
(i.e. random). Return a bitmap id or nil
** This method raises an error - it must be redefined in concrete classes **
-
createPixmapWidth: w height: h depth: d
-
allocate a pixmap on the Xserver, the contents is undefined
(i.e. random). Return a bitmap id or nil
** This method raises an error - it must be redefined in concrete classes **
-
createWindowFor: aView type: typeSymbol origin: org extent: ext minExtent: minE maxExtent: maxE borderWidth: bw subViewOf: sv style: styleSymbol inputOnly: inp label: label cursor: curs icon: icn iconMask: icnM iconView: icnV
-
must be implemented by a concrete class
** This method raises an error - it must be redefined in concrete classes **
-
createWindowFor: aView type: typeSymbol origin: org extent: ext minExtent: minE maxExtent: maxE borderWidth: bw subViewOf: sv style: styleSymbol inputOnly: inp label: label owner: owner icon: icn iconMask: icnM iconView: icnV
-
must be implemented by a concrete class
** This method raises an error - it must be redefined in concrete classes **
-
destroyGC: aGCId
-
destroy a GC
** This method raises an error - it must be redefined in concrete classes **
-
destroyPixmap: aDrawableId
-
** This method raises an error - it must be redefined in concrete classes **
-
destroyView: aView withId: aWindowId
-
** This method raises an error - it must be redefined in concrete classes **
-
gcFor: aDrawableId
-
create a GC for drawing into aDrawable
** This method raises an error - it must be redefined in concrete classes **
-
gcForBitmap: aDrawableId
-
create a GC for drawing into a bitmap drawable
** This method raises an error - it must be redefined in concrete classes **
-
realRootWindowFor: aView
-
the name of this method is historic;
- it will vanish
-
realRootWindowId
-
return the id of the real root window.
This may or may not be the view you see as background,
since some window managers install a virtual root window on top
of the real one. In this case, this method returns the id of the
covered real-root
(in contrast, rootWindowId returns the id of the visible one).
With most window systems, the realRoot is the same as the root window.
The real root is only seldom of any interest.
-
rootWindowFor: aView
-
-
rootWindowId
-
return the id of the root window.
This is the window you see as background,
however, it may or may not be the real physical root window,
since some window managers install a virtual root window on top
of the real one. If this is the case, that views id is returned here.
** This method raises an error - it must be redefined in concrete classes **
clipboard
-
clipboardEncoding
-
return the assumed default clibBoards encoding
if a raw string (i.e. without encoding information) is pasted.
Useful on X11, if a sjis or euc string is pasted from a netscape
or other program.
-
clipboardEncoding: aSymbol
-
set the assumed default clipBoard's encoding
if a raw string (i.e. without encoding information) is pasted.
Useful on X11, if a sjis or euc string is pasted from a netscape
or other program.
-
copyBufferAsString
-
return my current selection as a string
-
getClipboardObjectFor: drawableId
-
Retrieve the common per-display selection object.
For clipBoard mechanisms to work (into ST/X),
this must be redefined in a concrete subclass
-
getClipboardText: selectionBufferSymbol for: drawableId
-
Retrieve the common per-display selection text.
For clipBoard mechanisms to work (into ST/X),
this must be redefined in a concrete subclass
-
getCopyBuffer
-
return the copyBuffers contents.
This is an ST/X internal buffer (i.e. its not visible to alien views).
-
getCopyBufferHistory
-
return the copyBufferHistory.
This is an ST/X internal buffer (i.e. its not visible to alien views).
-
rememberCopyBuffer
-
-
setClipboardObject: anObject owner: aWindowId
-
set the common per-display object selection.
This can be used by other Smalltalk(X) applications only.
For clipBoard mechanisms to work (out of ST/X),
this must be redefined in a concrete subclass to copy
anObject to the devices clipBoard.
-
setClipboardObject: something ownerView: aView
-
set the object selection - both the local one, and tell the display
that we have changed it (i.e. place it into the clipBoard).
-
setClipboardText: aString owner: aView
-
Set the common per-display selection text.
For clipBoard mechanisms to work (out of ST/X),
this must be redefined in a concrete subclass to copy
aString to the devices clipBoard.
-
setClipboardText: aString ownerView: aView
-
set the text selection - both the local one, and tell the display
that we have changed it (i.e. place it into the clipBoard).
-
setCopyBuffer: something
-
set the copyBuffers contents.
This is an ST/X internal buffer (i.e. its not visible to alien views).
-
setSelection: anObject owner: aWindowId
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
setSelection: something ownerView: aView
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
setTextSelection: aString owner: aWindowId
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
setTextSelection: aString ownerView: aView
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
color stuff
-
availableDitherColors
-
return the table of preallocated emergency ditherColors
plus possibly available fixColors.
-
blueComponentOfColor: colorId
-
get blue component (0..100) of color in map at:index
-
colorCell
-
allocate a color - return index or nil, if no color cell
can be allocated (out of colors or trueColor device)
-
colorMap
-
return my displays colormap, or nil, if the display is not colorMap based
(i.e. not PseudoColor)
-
colorNamed: aString
-
allocate a color with color name - return the color index (i.e. colorID).
Only a subset of the colorNames are available on all displays;
therefore, dont use this method; at least only for the common names such as red, green, blue etc.
-
colorRed: redVal green: greenVal blue: blueVal
-
allocate a color with rgb values (0..100) - return the color index (i.e. colorID).
This method is obsoleted by #colorScaledRed:scaledGreen:scaledBlue:
-
colorScaledRed: red scaledGreen: green scaledBlue: blue
-
** This method raises an error - it must be redefined in concrete classes **
-
deviceColorValueToPercent: deviceColorValue
-
** This method raises an error - it must be redefined in concrete classes **
-
ditherColors
-
return the table of preallocated emergency ditherColors
-
fixColors
-
return the table of preallocated fix colors (a colorCube),
or nil if no fix colors were preallocated.
-
fixGrayColors
-
return the table of preallocated fix grayScale colors,
or nil if no fix gray colors were preallocated.
-
freeColor: colorIndex
-
free a color on the display, when its no longer needed
** This method raises an error - it must be redefined in concrete classes **
-
getRGBFrom: index
-
get rgb components (0..100) of color in map at:index,
and evaluate the 3-arg block, aBlock with them
-
getRGBFrom: index into: aBlock
-
get rgb components (0..100) of color in map at:index,
and evaluate the 3-arg block, aBlock with them
-
getRGBFromName: colorName
-
get rgb components (0..100) of color named colorName,
and return a 3-element array, containing them.
The method here only handles some often used colors;
getRGBFromName should not be used, since colorNames other
than those below are X specific.
-
getRGBFromName: colorName into: aBlock
-
get rgb components (0..100) of color named colorName,
and evaluate the 3-arg block, aBlock with them
-
getScaledRGBFrom: index
-
get rgb components (0..devicesMaxColorVal) of color in map at:index,
and return a 3-element array containing them
** This method raises an error - it must be redefined in concrete classes **
-
getScaledRGBFrom: index into: aBlock
-
get rgb components (0..devicesMaxColorVal) of color in map at:index,
and evaluate the 3-arg block, aBlock with them
-
getScaledRGBFromName: colorName
-
get rgb components (0..devicesMaxColorVal) of color named colorName,
and return a 3-element array containing them
-
getScaledRGBFromName: colorName into: aBlock
-
get rgb components (0..devicesMaxColorVal) of color named colorName,
and evaluate the 3-arg block, aBlock with them.
Return nil for unknown color names.
-
greenComponentOfColor: colorId
-
get green component (0..100) of color in map at:index
-
listOfAvailableColors
-
return a list of all available colornames;
This method should not be used, since colornames are
very X specific. However, the names defined here are pretty common
-
numFixBlue
-
return the number of blue shades in the
preallocated fix color cube (or 0 if there is none)
-
numFixGreen
-
return the number of green shades in the
preallocated fix color cube (or 0 if there is none)
-
numFixRed
-
return the number of red shades in the
preallocated fix color cube (or 0 if there is none)
-
percentToDeviceColorValue: percent
-
** This method raises an error - it must be redefined in concrete classes **
-
redComponentOfColor: colorId
-
get red component (0..100) of color in map at:index
-
releaseFixColors
-
release the fix colorMap
-
releaseFixGrayColors
-
release the fix colorMap
-
setColor: index red: redVal green: greenVal blue: blueVal
-
change color in map at:index to rgb (0..100).
This is a no-op on TrueColor systems.
-
setDitherColors: colors
-
set the table of preallocated emergency dither fix colors
These preallocated colors
(white, black, red, green, blue and a few grayScales) prevent
running out of colors later, when images have to be dithered or
pen colors must be approximated.
((Although, with such a small number of colors, the result will
definitely look poor))
-
setFixColors: colors numRed: nR numGreen: nG numBlue: nB
-
set the table of preallocated fix colors (a colorCube),
and the number of r/g/b entries in each dimension.
-
setFixGrayColors: colors
-
set the table of preallocated fix gray colors
copying
-
deepCopyUsing: aDictionary postCopySelector: postCopySelector
-
cursor stuff
-
builtInCursorShapes
-
return a collection of standard cursor names.
Hre none is assumed - so all cursors are created as user cursors
(see Cursor>>initializeNewCursors)
-
colorCursor: aCursorId foreground: fgColor background: bgColor
-
change a cursors colors.
Ignored on systems which do not support colored cursors.
-
createCursorShape: aShapeSymbol
-
create a cursor given a shape-symbol; return a cursorID or nil.
This only works for a few standard cursors, and returns nil
if no such cursor exists.
Always care for a fallBack, in case of a nil return.
-
createCursorSourceForm: sourceForm maskForm: maskForm hotX: hx hotY: hy width: w height: h
-
create a cursor given 2 bitmaps (source, mask) and a hotspot.
Returns nil, if no cursor can be created (for any reason)
** This method raises an error - it must be redefined in concrete classes **
-
destroyCursor: aCursorId
-
free a cursor
** This method raises an error - it must be redefined in concrete classes **
-
needDeviceFormsForCursor
-
return true, if this device requires device-forms as opposed
to a simple bitmap-byteArray for creation.
Redefined in X- and Win- Workstation classes.
** This method raises an error - it must be redefined in concrete classes **
-
shapeNumberFromSymbol: shape
-
given a shape-symbol, return the corresponding cursor-number,
or nil if no such standard cursor exists.
drag & drop
-
dragFinish: dropHandle
-
-
drop: aCollectionOfDropObjects inWindowID: destinationId position: destinationPoint rootPosition: rootPoint
-
device specific drop here
drawing
-
copyFromId: sourceId x: srcX y: srcY gc: srcGCId to: destId x: dstX y: dstY gc: dstGCId width: w height: h
-
do a bit-blt
** This method raises an error - it must be redefined in concrete classes **
-
copyFromPixmapId: sourceId x: srcX y: srcY gc: srcGCId to: destId x: dstX y: dstY gc: dstGCId width: w height: h
-
do a bit-blt from a pix- or bitmap.
Here, fall back into copyFromId:, which should also work.
Subclasses may redefine this for more performance or if required
-
copyPlaneFromId: sourceId x: srcX y: srcY gc: srcGCId to: destId x: dstX y: dstY gc: dstGCId width: w height: h
-
do a bit-blt, using the low-bit plane of the source only
** This method raises an error - it must be redefined in concrete classes **
-
copyPlaneFromPixmapId: sourceId x: srcX y: srcY gc: srcGCId to: destId x: dstX y: dstY gc: dstGCId width: w height: h
-
do a bit-blt from a pix- or bitmap, using the low-bit plane of the source only.
Here, fall back into copyPlaneFromId:, which should also work.
Subclasses may redefine this for more performance or if required
-
displayArcX: x y: y width: width height: height from: startAngle angle: angle in: aDrawableId with: aGCId
-
draw an arc
** This method raises an error - it must be redefined in concrete classes **
-
displayLineFromX: x0 y: y0 toX: x1 y: y1 in: aDrawableId with: aGCId
-
draw a line
** This method raises an error - it must be redefined in concrete classes **
-
displayLinesFromX: xStart step: xStep yValues: ydata scaleY: yScale transY: yTrans in: drawableId with: gcId
-
draw a polygon starting at x; the y values derives from the collection yValues.
The associated x is a multiple of step. Each y value will be scaled and translated.
The implementation here is a fallback, using the line-draw primitive;
devices which support fast drawing of a polygon may redefine this for more performance.
-
displayOpaqueString: aString from: index1 to: index2 x: x y: y in: aDrawableId with: aGCId
-
draw a sub-string - draw foreground on background.
If the coordinates are not integers, retry with rounded.
-
displayOpaqueString: aString x: x y: y in: aDrawableId with: aGCId
-
draw a string - draw foreground on background.
If the coordinates are not integers, retry with rounded.
-
displayPointX: x y: y in: aDrawableId with: aGCId
-
draw a point
** This method raises an error - it must be redefined in concrete classes **
-
displayPolygon: aPolygon in: aDrawableId with: aGCId
-
draw a polygon
** This method raises an error - it must be redefined in concrete classes **
-
displayPolylines: arrayOfPoints in: aDrawableId with: aGCId
-
draw a bunch of lines
-
displayRectangleX: x y: y width: width height: height in: aDrawableId with: aGCId
-
draw a rectangle
** This method raises an error - it must be redefined in concrete classes **
-
displayString: aString from: index1 to: index2 x: x y: y in: aDrawableId with: aGCId
-
draw a sub-string - draw foreground only.
If the coordinates are not integers, retry with rounded.
-
displayString: aString from: i1 to: i2 x: x y: y in: aDrawableId with: aGCId opaque: opaque
-
draw part of a string
** This method raises an error - it must be redefined in concrete classes **
-
displayString: aString x: x y: y in: aDrawableId with: aGCId
-
draw a string - draw foreground only.
If the coordinates are not integers, retry with rounded.
-
displayString: aString x: x y: y in: aDrawableId with: aGCId opaque: opaque
-
draw a string
-
drawBits: imageBits bitsPerPixel: bitsPerPixel depth: imageDepth padding: pad width: imageWidth height: imageHeight x: srcx y: srcy into: aDrawableId x: dstx y: dsty width: w height: h with: aGCId
-
draw a bitimage which has depth id, width iw and height ih into
the drawable. draw a region of w/h pixels from srcx/srcy to dstx/dsty.
It has to be checked elsewhere, that server can do it with the given
depth; also it is assumed, that the colormap is setup correctly.
The actual bits per pixel may be different from the depth (for example,
on a depth-15 device, 16 bits/pixel may be used; also, many depth-24
systems actually use 32 bits/pixel)
** This method raises an error - it must be redefined in concrete classes **
-
drawBits: imageBits bitsPerPixel: bitsPerPixel depth: imageDepth width: imageWidth height: imageHeight x: srcx y: srcy into: aDrawableId x: dstx y: dsty width: w height: h with: aGCId
-
draw a bitimage which has depth id, width iw and height ih into
the drawable. draw a region of w/h pixels from srcx/srcy to dstx/dsty.
It has to be checked elsewhere, that server can do it with the given
depth; also it is assumed, that the colormap is setup correctly.
The actual bits per pixel may be different from the depth (for example,
on a depth-15 device, 16 bits/pixel may be used; also, many depth-24
systems actually use 32 bits/pixel).
This assumes a padding of 8-bits (i.e. byte-boundary),
which is the natural padding within ST/X.
-
drawBits: imageBits depth: imageDepth padding: pad width: imageWidth height: imageHeight x: srcx y: srcy into: aDrawableId x: dstx y: dsty width: w height: h with: aGCId
-
draw a bitimage which has depth id, width iw and height ih into
the drawable. draw a region of w/h pixels from srcx/srcy to dstx/dsty.
It has to be checked elsewhere, that server can do it with the given
depth; also it is assumed, that the colormap is setup correctly
-
drawBits: imageBits depth: imageDepth width: imageWidth height: imageHeight x: srcx y: srcy into: aDrawableId x: dstx y: dsty width: w height: h with: aGCId
-
draw a bitimage which has depth id, width iw and height ih into
the drawable. draw a region of w/h pixels from srcx/srcy to dstx/dsty.
It has to be checked elsewhere, that server can do it with the given
depth; also it is assumed, that the colormap is setup correctly.
This assumes a padding of 8-bits (i.e. byte-boundary),
which is the natural padding within ST/X.
-
fillArcX: x y: y width: width height: height from: startAngle angle: angle in: aDrawableId with: aGCId
-
fill an arc
** This method raises an error - it must be redefined in concrete classes **
-
fillPolygon: aPolygon in: aDrawableId with: aGCId
-
fill a polygon
** This method raises an error - it must be redefined in concrete classes **
-
fillRectangleX: x y: y width: width height: height in: aDrawableId with: aGCId
-
fill a rectangle
** This method raises an error - it must be redefined in concrete classes **
enumerating
-
allTopViews
-
return a collection of all my known top views
-
allViews
-
return a collection of all my known views
-
allViewsDo: aBlock
-
evaluate the argument, aBlock for all of my known views.
Warning do not use this to remove view
(never remove elements from an enumerated collection)
error handling
-
primitiveFailedOrClosedConnection
-
-
resourceOfId: id
-
search thru all device stuff for a resource.
Needed for error handling.
Since id may be an ExternalAddress, do not compare with ==
event forwarding
-
buttonMotion: buttonAndModifierState x: x y: y view: aView
-
forward a button-motion for some view
-
buttonMultiPress: button x: x y: y view: aView
-
forward a button-multi-press event for some view
-
buttonPress: buttonArg x: x y: y view: aView
-
forward a button-press event for some view
-
buttonRelease: button x: x y: y view: aView
-
forward a button-release event for some view
-
configureX: x y: y width: w height: h view: aView
-
forward a configure for some view
-
coveredBy: otherView view: aView
-
forward a covered for some view
(aView has been covered by otherView)
-
destroyedView: aView
-
forward a destroyed event for some view
-
exposeX: x y: y width: w height: h view: aView
-
forward an expose for some view
-
focusInView: aView
-
forward a focusIn event for some view
-
focusOutView: aView
-
forward a focusOut event for some view
-
graphicsExposeX: x y: y width: w height: h final: final view: aView
-
forward a graphic expose for some view
-
keyPress: untranslatedKeyArg x: x y: y view: aView
-
forward a key-press event for some view
-
keyRelease: untranslatedKeyArg x: x y: y view: aView
-
forward a key-release event for some view
-
mappedView: aView
-
forward a mapped event for some view
-
mouseWheelMotion: buttonState x: x y: y amount: amount deltaTime: dTime view: aView
-
the mousewheel was moved by some amount (signed).
This event is sent to the current pointer view (like keyPress/release).
-
noExposeView: aView
-
forward a noExpose event for some view
-
pointerEnter: buttonState x: x y: y view: aView
-
forward a pointer enter for some view
-
pointerLeave: buttonState view: aView
-
forward a pointer leave for some view
-
saveAndTerminateView: aView
-
forward a saveAndTerminate event for some view
-
terminateView: aView
-
forward a terminate event for some view
-
unmappedView: aView
-
forward an unmapped event for some view
event handling
-
checkForEndOfDispatch
-
return true, if there are still any views of interest -
if not, stop dispatch.
This ends the dispatcher process when the last view is closed on that device.
We only do this for displays other that the default Display.
-
cleanupAfterDispatch
-
-
dispatchEvent
-
get and process the next pending event - for any view
-
dispatchEventFor: aViewIdOrNil withMask: eventMask
-
central event handling method:
get next event and send an appropriate message to the views sensor,
or to the view directly (if the view has none).
If the argument aViewIdOrNil is nil, events for any view are processed,
otherwise only events for the view with given id are processed
(in this case, nothing is done if no events are pending);
if the argument aMask is nonNil, only events for this eventMask are
handled. The mask is a device dependent event mask.
** This method raises an error - it must be redefined in concrete classes **
-
dispatchLoop
-
the actual event dispatching loop.
-
dispatchModalWhile: aBlock
-
get and process next event for any view as long as the
argument-block evaluates to true.
This is a modal loop, not switching to other processes,
effectively polling the device in a (nice) busy loop.
This should only be (and is only) used for emergency cases.
(such as a graphical debugger, debugging the event-dispatcher itself)
-
dispatchPendingEvents
-
go dispatch events as long as there is one.
This is only used with modal operation.
(i.e. when in the modal debugger)
-
disposeButtonEventsFor: aViewIdOrNil
-
dispose (i.e. forget) all pending button events on this display
-
disposeEvents
-
dispose (i.e. forget) all events pending on this display
-
disposeEventsWithMask: aMask for: aWindowId
-
dispose (throw away) specific events
** This method raises an error - it must be redefined in concrete classes **
-
eventMaskFor: anEventSymbol
-
** This method raises an error - it must be redefined in concrete classes **
-
eventPending
-
return true, if any event is pending
** This method raises an error - it must be redefined in concrete classes **
-
eventPending: anEventSymbol for: aWindowId
-
return true, if a specific event is pending for a specific window.
This expects device independent event symbols (such as #buttonPress,
#buttonRelease etc.) as first argument.
** This method raises an error - it must be redefined in concrete classes **
-
eventPending: anEventMask for: aWindowId withSync: doSync
-
return true, if any of the masked events is pending
for a specific window.
This expects a device dependent event mask as first argument.
** This method raises an error - it must be redefined in concrete classes **
-
eventPendingWithSync: doSync
-
return true, if any event is pending
** This method raises an error - it must be redefined in concrete classes **
-
eventQueued
-
return true, if any event is pending in some internal queue.
The fallBack here returns true if events are pending on the display connection;
only devices which use internal queues (i.e. Xlib) need to redefine this.
-
eventQueuedAlready
-
return true, if any event is pending in some internal queue.
The fallBack here returns true if events are pending on the display connection;
only devices which use internal queues (i.e. Xlib) need to redefine this.
-
eventsPending: anEventMask for: aWindowId withSync: doSync
-
obsolete - will vanish.
-
setEventMask: aMask in: aWindowId
-
arrange that only events from aMask are reported to a view.
Highly device specific, to be defined in concrete subclasses
** This method raises an error - it must be redefined in concrete classes **
-
setupDispatchLoop
-
create & start the display event dispatch process.
-
startDispatch
-
create & start the display event dispatch process.
-
stopDispatch
-
stop the dispatch process
event sending
-
sendKeyOrButtonEvent: typeSymbol x: xPos y: yPos keyOrButton: keySymCodeOrButtonNr state: stateMask toViewId: targetId
-
send a keyPress/Release or buttonPress/Release event to some (possibly alien) view.
TypeSymbol must be one of: #keyPress, #keyRelease, #buttonPress , #buttonRelease.
For buttonEvents, the keySymCodeOrButtonNr must be the buttons number (1, 2 ...);
for key events, it can be either a symbol (as listen in X's keySyms)
or a numeric keysym code. If state is nil, the modifier bits (shift & control)
are computed from the keyboardMap - if non-nil, these are passed as modifierbits.
The non-nil case is the lowlevel entry, where state must include any shift/ctrl information
(not very user friendly)
** This method raises an error - it must be redefined in concrete classes **
-
simulateKeyboardInput: aCharacterOrString inViewId: viewId
-
send input to some other view, by simulating keyPress/keyRelease
events.
Only a few control characters are supported.
Notice: not all alien views allow this kind of synthetic input;
some simply ignore it.
font helpers
-
ascentOf: aFontId
-
return the number of pixels above the base line of a font
** This method raises an error - it must be redefined in concrete classes **
-
descentOf: aFontId
-
return the number of pixels below the base line of a font
** This method raises an error - it must be redefined in concrete classes **
-
encodingOf: aFontId
-
return the characterEncoding of a font.
Here, we assume an iso8859-1 encoding
-
maxAscentOf: aFontId
-
return the number of pixels above the base line of the tallest character
in a font
** This method raises an error - it must be redefined in concrete classes **
-
maxDescentOf: aFontId
-
return the number of pixels below the base line of the tallest character
in a font
** This method raises an error - it must be redefined in concrete classes **
-
maxWidthOfFont: aFontId
-
return the width in pixels of the widest character a specific font
** This method raises an error - it must be redefined in concrete classes **
-
minWidthOfFont: aFontId
-
return the width in pixels of the smallest character a specific font
** This method raises an error - it must be redefined in concrete classes **
font stuff
-
facesInFamily: aFamilyName
-
return a set of all available font faces in aFamily on this display
-
facesInFamily: aFamilyName filtering: filterBlock
-
return a set of all available font faces in aFamily on this display.
But only those matching filterBlock (if nonNil).
-
flushListOfAvailableFonts
-
flush any cached font information - dummy here,
but should be implemented in subclasses, which keep
a list of available device fonts.
This should be flushed, to allow update whenever new fonts
are installed or the system-font-path changes.
-
fontFamilies
-
return a set of all available font families on this display
-
fontFamiliesFiltering: aFilterBlock
-
return a set of all available font families on this display,
but only those matching aFilterBlock (if nonNil).
-
fontMetricsOf: fontId
-
return a fonts metrics info object
-
fontResolutionOf: fontId
-
return the resolution (as dpiX @ dpiY) of the font - this is usually the displays resolution,
but due to errors in some XServer installations, some use 75dpi fonts on higher
resolution displays and vice/versa.
-
fontsFiltering: aFilterBlock
-
return a set of all available font on this display,
but only those matching aFilterBlock (if nonNil).
-
fontsInFamily: aFamilyName face: aFaceName filtering: filter
-
return a set of all available fonts in aFamily/aFace on this display.
But only thise matching filter (if nonNil).
-
fontsInFamily: aFamilyName face: aFaceName style: aStyleName filtering: filter
-
return a set of all available font in aFamily/aFace/aStyle
on this display.
But only those matching filter (if nonNIl).
-
fontsInFamily: aFamilyName filtering: filter
-
return a set of all available font in aFamily on this display.
But only those matching filterBlock (if nonNil).
-
fullFontNameOf: aFontId
-
return the full name of a font.
Here, we return nil, not knowing anything about fonts
-
getDefaultFont
-
return a default font id
- used when class Font cannot find anything usable
** This method raises an error - it must be redefined in concrete classes **
-
getFontWithFamily: familyString face: faceString style: styleString pixelSize: sizeArg encoding: encodingSym
-
try to get the specified font, return id.
If not available, try next smaller font.
If no font fits, return nil
-
getFontWithFamily: familyString face: faceString style: styleString size: sizeArg encoding: encodingSym
-
try to get the specified font, return id.
If not available, try next smaller font.
If no font fits, return nil
-
getFontWithFamily: familyString face: faceString style: styleString size: sizeArg sizeUnit: sizeUnit encoding: encodingSym
-
try to get the specified font, return id.
If not available, try next smaller font.
If no font fits, return nil
** This method raises an error - it must be redefined in concrete classes **
-
listOfAvailableFonts
-
return a list containing all fonts on this display.
The returned list is an array of FontDescriptions.
** This method raises an error - it must be redefined in concrete classes **
-
pixelSizesInFamily: aFamilyName face: aFaceName style: aStyleName filtering: filterBlock
-
return a set of all available pixel sizes in aFamily/aFace/aStyle on this display.
But only those matching filterBlock (if notNil).
-
releaseFont: aFontId
-
free a font
** This method raises an error - it must be redefined in concrete classes **
-
sizesInFamily: aFamilyName face: aFaceName style: aStyleName
-
return a set of all available font sizes in aFamily/aFace/aStyle
on this display
-
sizesInFamily: aFamilyName face: aFaceName style: aStyleName filtering: filterBlock
-
return a set of all available font sizes in aFamily/aFace/aStyle
on this display.
But only those matching filterBlock (if notNil).
-
stylesInFamily: aFamilyName face: aFaceName
-
return a set of all available font styles in aFamily/aFace on this display
-
stylesInFamily: aFamilyName face: aFaceName filtering: filterBlock
-
return a set of all available font styles in aFamily/aFace on this display.
But only thise matching filterBlock (if notNil).
-
widthOf: aString from: index1 to: index2 inFont: aFontId
-
return the width in pixels of a substring in a specific font
** This method raises an error - it must be redefined in concrete classes **
-
widthOf: aString inFont: aFontId
-
return the width in pixels of a string in a specific font
grabbing
-
activeKeyboardGrab
-
return the view, which currently has the keyboard grabbed,
or nil, if there is none
-
activePointerGrab
-
return the view, which currently has the pointer grabbed,
or nil, if there is none
-
grabKeyboardIn: aWindowId
-
grab the keyboard - all keyboard input will be sent to the view
with id aWindowId
** This method raises an error - it must be redefined in concrete classes **
-
grabKeyboardInView: aView
-
grab the keyboard - all keyboard input will be sent to aView.
Return true if ok, false if it failed for some reason.
-
grabPointerIn: aWindowId
-
grap the pointer; all pointer events will be reported to the view
with id aWindowId. Return true if ok, false if it failed for some reason.
-
grabPointerIn: aWindowId withCursor: cursorId pointerMode: pMode keyboardMode: kMode confineTo: confineId
-
grap the pointer - all pointer events will be reported to aWindowId. The cursor will be set to cursorId
for the duration of the grab. For pMode/kMode, see X documentation. The pointer is restricted to
confineId - if non-nil.
** This method raises an error - it must be redefined in concrete classes **
-
grabPointerIn: aWindowId withCursorId: aCursorIdOrNil
-
grap the pointer; all pointer events will be reported to the view
with id aWindowId. Return true if ok, false if it failed for some reason.
-
grabPointerInView: aView
-
grap the pointer; all pointer events will be reported to
aView. Return true if ok, false if it failed for some reason.
-
grabPointerInView: aView withCursor: aCursorOrNil
-
grap the pointer; all pointer events will be reported to
aView. Return true if ok, false if it failed for some reason.
-
setActivePointerGrab: aView
-
DO NOT USE. private kludge - will vanish
-
ungrabKeyboard
-
release the keyboard
** This method raises an error - it must be redefined in concrete classes **
-
ungrabPointer
-
release the pointer
** This method raises an error - it must be redefined in concrete classes **
graphic context stuff
-
noClipIn: aDrawableId gc: aGCId
-
disable clipping rectangle
** This method raises an error - it must be redefined in concrete classes **
-
setBackground: bgColorIndex in: aGCId
-
set background color-index to be drawn with
** This method raises an error - it must be redefined in concrete classes **
-
setBackgroundColor: color in: aGCId
-
set background color to be drawn with
-
setBitmapMask: aBitmapId in: aGCId
-
set or clear the drawing mask - a bitmap mask using current fg/bg
** This method raises an error - it must be redefined in concrete classes **
-
setClipByChildren: aBool in: aDrawableID gc: aGCId
-
enable/disable drawing into child views
** This method raises an error - it must be redefined in concrete classes **
-
setClipX: clipX y: clipY width: clipWidth height: clipHeight in: drawableId gc: aGCId
-
clip to a rectangle
** This method raises an error - it must be redefined in concrete classes **
-
setDashes: dashList dashOffset: offset in: aGCId
-
set dash attributes.
Ignored here - it may be left unimplemented by some devices.
** This method raises an error - it must be redefined in concrete classes **
-
setFont: aFontId in: aGCId
-
set font to be drawn in
** This method raises an error - it must be redefined in concrete classes **
-
setForeground: fgColorIndex background: bgColorIndex in: aGCId
-
set foreground and background color-indices to be drawn with
-
setForeground: fgColorIndex in: aGCId
-
set the foreground color-index to be drawn with
** This method raises an error - it must be redefined in concrete classes **
-
setForegroundColor: fgColor backgroundColor: bgColor in: aGCId
-
set foreground and background colors to be drawn with
-
setForegroundColor: color in: aGCId
-
set the foreground color to be drawn with
-
setFunction: aFunctionSymbol in: aGCId
-
set alu function to be drawn with
** This method raises an error - it must be redefined in concrete classes **
-
setGraphicsExposures: aBoolean in: aGCId
-
set or clear the graphics exposures flag
** This method raises an error - it must be redefined in concrete classes **
-
setLineWidth: aNumber style: lineStyle cap: capStyle join: joinStyle in: aGCId
-
set line attributes
** This method raises an error - it must be redefined in concrete classes **
-
setMaskOriginX: orgX y: orgY in: aGCid
-
set the mask origin
** This method raises an error - it must be redefined in concrete classes **
-
setPixmapMask: aPixmapId in: aGCId
-
set or clear the drawing mask - a pixmap mask providing full color
** This method raises an error - it must be redefined in concrete classes **
initialization & release
-
brokenConnection
-
the connection to the display device was lost.
-
close
-
close down connection to Display - usually never done for the main screen
-
closeConnection
-
close down connection to Display - usually never done
** This method raises an error - it must be redefined in concrete classes **
-
emergencyCloseConnection
-
close down connection to the Display in case of emergency;
this is usually invoked after an error and should not try to flush
any outstanding graphics requests - usually never done
-
exitOnLastClose: aBoolean
-
set/clear the flag which controls if the
event dispatching should stop when the last view is closed.
-
initializeDefaultKeyboardMappingsIn: aKeyboardMap
-
-
initializeDefaultValues
-
-
initializeDeviceResources
-
initialize heavily used device resources - to avoid looking them up later
-
initializeDeviceSignals
-
-
initializeFor: aDisplayOrNilForAny
-
initialize the receiver for a connection to a display. If the
argument is non-nil, it should specify which workstation should be
connected to (in a device specific manner). For X displays, this is
to be the display-string i.e. hostname:displayNr.
If the argument is nil, connect to the default display.
** This method raises an error - it must be redefined in concrete classes **
-
initializeKeyboardMap
-
keystrokes from the server are translated via the keyboard map.
Untranslated keystrokes arrive either as characters, or symbols
(which are the keySyms as symbol). The mapping table which is
setup here, is used in sendKeyPress:... later.
Here, an empty (no-translation) keyboard map is setup initially;
this is usually filled via the keyboard.rc startup file.
-
initializeModifierMappings
-
-
initializeScreenProperties
-
setup screen specific properties.
-
initializeViewStyle
-
late viewStyle init - if no viewStyle has been read yet.
-
invalidateConnection
-
clear my connection handle - sent after an imageRestart to
forget about our previous life
-
reinitialize
-
historic leftover (old subclasses call super reinitialize)
-
reinitializeFor: aDisplayName
-
reinit after snapin
-
releaseDeviceResources
-
release any cached device resources.
This is invoked when closed or when the display connection is broken
(i.e. be prepared to not be able to release resources regularily)
interactive queries
-
colorFromUser
-
let user specify a point on the screen (by pressing the left button),
return the color of that pixel.
-
originFromUser: extent
-
let user specify a rectangles origin on the screen, return the rectangle.
Start with initialRectangle.
Can be used for dragging operations.
-
pointFromUser
-
let user specify a point on the screen (by pressing the left button)
-
pointFromUserShowing: aCursor
-
let user specify a point on the screen (by pressing leftButton).
Show aCursor while waiting.
-
pointFromUserShowing: aCursor positionFeedback: feedbackBlockOrNil
-
let user specify a point on the screen (by pressing leftButton).
Show aCursor while waiting.
-
rectangleFromUser
-
let user specify a rectangle in the screen, return the rectangle
-
rectangleFromUser: initialRectangle
-
let user specify a rectangle on the screen, return the rectangle.
Start with initialRectangle.
A helper for rectangleFromUser; can also be used for resizing operations.
-
rectangleFromUser: initialRectangle keepExtent: keepExtent
-
let user specify a rectangle on the screen, return the rectangle.
Start with initialRectangle.
A helper for rectangleFromUser; can also be used for resizing operations.
-
topviewFromUser
-
let user specify a view on the screen; if the selected view is
not an ST/X view, nil is returned.
Otherwise, the topview is returned.
-
viewFromUser
-
let user specify a view on the screen; if the selected view is
not an ST/X view, nil is returned.
This returns the view being clicked in, which is not always a topView.
(send topView to the returned view or use topviewFromUser,
to get the topview)
-
viewIdFromUser
-
let user specify a view on the screen, return its window id.
This works even for non smalltalk views.
This returns the id of the view being clicked in,
which is not always a topView.
keyboard mapping
-
altModifiers
-
Return the set of keys which are treated as Alt-keys.
This set is initialized at startup from what the server thinks
are alt-keys.
-
altModifiers: arrayOfAltModifierKeys
-
Change the set of keys which are treated as Alt-keys.
-
metaModifiers
-
Return the set of keys which are treated as Meta-keys (i.e. Cmd-keys).
This set is initialized at startup from what the server thinks
are meta-keys.
-
metaModifiers: arrayOfMetaModifierKeys
-
Change the set of keys which are treated as Meta-keys (i.e. Cmd keys).
-
modifierKeyProcessing: key down: pressed
-
internal, private method.
Called with every keyPress/keyRelease to update the xxxDown flags.
-
modifierKeyTopFor: key
-
reverse translation for a modifier key
(i.e. to get the keyTop from a modifier)
-
modifierKeyTranslationFor: untranslatedKey
-
map possible modifiers to a smaller set of common symbols.
Especially, left/right keys are mapped to a common one.
-
prependModifierToKey: untranslatedKey
-
-
translateKey: untranslatedKey forView: aView
-
Return the key translated via the translation table.
Your application program should never depend on the values returned
by this method, but instead use symbolic keys (such as #FindNext).
Doing so allows easier reconfiguration by changing the translation map
in the 'smalltalk.rc' or 'display.rc' startup files.
First, the modifier is prepended, making character X into
AltX, CtrlX or CmdX (on many systems, no separate Cmd (or Meta)
key exists; on those we always get AltX if the metaModifiers are not set correctly).
If multiple modifiers are active, the symbol becoms the concatenation
as in AltCtrlq (for control-alt-q). Shift will affect the last component,
thus the above with shift becoms: AltCtrlQ instead.
Some keyboards offer both Alt and Meta keys - on those, the first has a
prefix of Alt, the second has Cmd as prefix. Keyboards with only an Alt
key will will create prefix codes of Cmd for that.
For symbolic keys (i.e.Tab, Backspace etc, shift is ignored).
Then the result is used as a key into the translation keyboardMap
to get the final return value.
keyboard queries
-
altDown
-
return true, if the alt-key is currently pressed.
-
altModifierMask
-
return the mask bit for the alt modifier key
** This method raises an error - it must be redefined in concrete classes **
-
ctrlDown
-
return true, if the control-key is currently pressed.
-
ctrlModifierMask
-
return the mask bit for the ctrl modifier key
** This method raises an error - it must be redefined in concrete classes **
-
leftShiftDown
-
return true, if the left shift-key is currently pressed.
Here, we dont differentiate between left and right shift keys.
-
metaDown
-
return true, if the meta-key (alt-key on systems without meta)
is currently pressed.
-
metaModifierMask
-
return the mask bit for the meta modifier key
** This method raises an error - it must be redefined in concrete classes **
-
rightShiftDown
-
return true, if the right shift-key is currently pressed.
Here, we dont differentiate between left and right shift keys.
-
shiftDown
-
return true, if the shift-key is currently pressed.
-
shiftModifierMask
-
return the mask bit for the shift modifier key
** This method raises an error - it must be redefined in concrete classes **
misc
-
beep
-
output an audible beep or bell
-
buffered
-
buffer drawing - do not send it immediately to the display.
This is the default; see comment in #unBuffered.
-
buttonLongPressedHandlerProcess
-
-
buttonLongPressedHandlerProcess: aProcess
-
-
buttonPressTimeForMenu
-
-
buttonPressTimeForMenu: seconds
-
-
compressMotionEvents: aBoolean
-
turn on/off motion event compression
- compressions makes always sense except in free-hand drawing of curves
-
flush
-
send all buffered drawing to the display.
This used to be called #synchronizeOutput, but has been renamed
for ST-80 compatibility.
-
focusView
-
-
focusView: aView
-
-
redrawAllWindows
-
-
repadBits: givenBits width: imageWidth height: imageHeight depth: imageDepth from: givenPadding to: wantedPadding
-
repadding support - required for some devices when drawing images
-
restoreWindows
-
restore the display.
Here, a view is popped over all of the screen temporarily
-
ringBell
-
alias for beep; for ST-80 compatibility
-
setInputFocusTo: aWindowId
-
** This method raises an error - it must be redefined in concrete classes **
-
sync
-
send all buffered drawing to the display and wait until its processed/drawn.
See also #flush, which does not wait.
ST-80 seems to only support flush.
-
synchronizeOutput
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
unBuffered
-
make all drawing be sent immediately to the display.
This may horribly slow down your drawings, but will result
in any errors to be delivered right after the bad operation
(in X only). Only useful for debugging.
pointer stuff
-
anyButtonMotionMask
-
return an integer for masking out any button from a motion
buttonStates value. This is very device specific and to
be redefined by concrete subclasses.
** This method raises an error - it must be redefined in concrete classes **
-
anyButtonPressed
-
return true, if the any button is currently pressed
-
anyButtonStateMask
-
return an integer for masking out any button from a
buttonStates value. This is very device specific and to
be redefined by concrete subclasses.
** This method raises an error - it must be redefined in concrete classes **
-
button1MotionMask
-
return an integer for masking out the left button from a
motion buttonStates value. This is very device specific and to
be redefined by concrete subclasses.
** This method raises an error - it must be redefined in concrete classes **
-
button2MotionMask
-
return an integer for masking out the middle button from a
motion buttonStates value. This is very device specific and to
be redefined by concrete subclasses.
** This method raises an error - it must be redefined in concrete classes **
-
button3MotionMask
-
return an integer for masking out the right button from a
motion buttonStates value. This is very device specific and to
be redefined by concrete subclasses.
** This method raises an error - it must be redefined in concrete classes **
-
buttonStates
-
return an integer representing the state of the pointer buttons;
a one-bit represents a pressed button. The bit positions are device specific
and to be returned by the *ButtonStateMask methods.
Must be redefined by concrete subclasses.
** This method raises an error - it must be redefined in concrete classes **
-
leftButtonPressed
-
return true, if the left button is currently pressed
-
leftButtonStateMask
-
return an integer for masking out the left button from a
buttonStates value. This is very device specific and to
be redefined by concrete subclasses.
** This method raises an error - it must be redefined in concrete classes **
-
middleButtonPressed
-
return true, if the middle button is currently pressed
-
middleButtonStateMask
-
return an integer for masking out the middle button from a
buttonStates value. This is very device specific and to
be redefined by concrete subclasses.
** This method raises an error - it must be redefined in concrete classes **
-
pointerPosition
-
return the current pointer position in root-window coordinates.
Must be redefined by concrete subclasses.
** This method raises an error - it must be redefined in concrete classes **
-
rightButtonPressed
-
return true, if the right button is currently pressed
-
rightButtonStateMask
-
return an integer for masking out the right button from a
buttonStates value. This is very device specific and to
be redefined by concrete subclasses.
** This method raises an error - it must be redefined in concrete classes **
-
rootPositionOfLastEvent
-
return the position in root-window coordinates
of the last button, key or pointer event.
Must be redefined by concrete subclasses.
** This method raises an error - it must be redefined in concrete classes **
-
setPointerPosition: newPosition
-
change the pointer position in root-window coordinates.
-
setPointerPosition: newPosition in: aWindowID
-
change the pointer position relative to some views origin.
Must be redefined by concrete subclasses.
** This method raises an error - it must be redefined in concrete classes **
printing & storing
-
printOn: aStream
-
for your convenience, add the name of the display connection
or 'default' to the printed representation.
queries
-
supportedClipboards
-
answer a collection of symbols with the supported clipboards..
At least clipboard should be supported on any platform
-
supportsNativeDialogs
-
-
supportsNativeWidgets
-
retrieving pixels
-
getBitsFromId: aDrawableId x: srcx y: srcy width: w height: h into: imageBits
-
get bits from a view drawable into the imageBits. The storage for the bits
must be big enough for the data to fit. If ok, returns an array with some
info and the bits in imageBits. The info contains the depth, bitOrder and
number of bytes per scanline. The number of bytes per scanline is not known
in advance, since the X-server is free to return whatever it thinks is a good padding.
** This method raises an error - it must be redefined in concrete classes **
-
getBitsFromPixmapId: aDrawableId x: srcx y: srcy width: w height: h into: imageBits
-
get bits from a drawable into the imageBits. The storage for the bits
must be big enough for the data to fit. If ok, returns an array with some
info and the bits in imageBits. The info contains the depth, bitOrder and
number of bytes per scanline. The number of bytes per scanline is not known
in advance, since the X-server is free to return whatever it thinks is a good padding.
-
getBitsFromViewId: aDrawableId x: srcx y: srcy width: w height: h into: imageBits
-
get bits from a drawable into the imageBits. The storage for the bits
must be big enough for the data to fit. If ok, returns an array with some
info and the bits in imageBits. The info contains the depth, bitOrder and
number of bytes per scanline. The number of bytes per scanline is not known
in advance, since the X-server is free to return whatever it thinks is a good padding.
-
getPixelX: x y: y from: aDrawableId with: gcId
-
return the pixel value at x/y
** This method raises an error - it must be redefined in concrete classes **
selection fetching
-
addSelectionHandler: someone
-
ignored here
-
removeSelectionHandler: someone
-
ignored here
style defaults
-
defaultStyleValueFor: aKey
-
return a default style value, given a key.
These defaults are used if nothing is specified
in the style sheet
This allows for empty values in style sheets, and defaults
being provided by the display (which makes sense with Windows,
where the systemDefaults are used ...
tray access
-
addTrayIconFor: aView icon: wicon iconMask: wiconMask toolTipMessage: toolTipMessage
-
add an icon to the tray for aView (which will receive tray-events in the future.
intentionally ignored here - only supported by win32 (for now)
-
removeTrayIconFor: aView
-
remove the tray icon.
intentionally ignored here - only supported by win32 (for now)
-
setTrayIconFor: aView icon: wicon iconMask: wiconMaskArg
-
change the tray icon.
intentionally ignored here - only supported by win32 (for now)
-
setTrayIconsToolTipMessageFor: aView to: toolTipMessageArg
-
Change the toolTopText.
intentionally ignored here - only supported by win32 (for now)
view registration
-
addKnownView: aView withId: aWindowID
-
add the View aView with id:aWindowID to the list of known views/id's.
This map is needed later (on event arrival) to get the view from
the views id (which is passed along with the devices event) quickly.
-
initializeTopViewHookFor: aView
-
callBack from topViews initialize method.
empty here, but may be useful ...
-
realizedTopViewHookFor: aView
-
callBack from topViews realize method.
empty here, but may be useful ...
-
removeKnownView: aView withId: aViewId
-
remove aView from the list of known views/id's.
-
viewFromId: aWindowID
-
given an Id, return the corresponding view.
-
viewIdKnown: aWindowID
-
return true, if I still consider a windowId as being valid
window stuff
-
activateWindow: aWindowId
-
make a window active.
Fall back to raiseWindow here
-
clearRectangleX: x y: y width: width height: height in: aWindowId
-
clear a rectangular area of a window to its view background
** This method raises an error - it must be redefined in concrete classes **
-
clearWindow: aWindowId
-
clear a windows to its view background
** This method raises an error - it must be redefined in concrete classes **
-
lowerWindow: aWindowId
-
lower a window
** This method raises an error - it must be redefined in concrete classes **
-
mapView: aView id: aWindowId iconified: aBoolean atX: xPos y: yPos width: w height: h
-
map a window - either as icon or as a real view - needed for restart
-
mapView: aView id: aWindowId iconified: aBoolean atX: xPos y: yPos width: w height: h minExtent: minExt maxExtent: maxExt
-
make a window visible - either as icon or as a real view - needed for restart
** This method raises an error - it must be redefined in concrete classes **
-
mapWindow: aWindowId
-
map a window
** This method raises an error - it must be redefined in concrete classes **
-
mapWindow: aWindowId animation: animationSymbolorNil time: timeInMillisOrNil
-
unmap a window
-
moveResizeWindow: aWindowId x: x y: y width: w height: h
-
move & resize a window
-
moveWindow: aWindowId x: x y: y
-
move a window
** This method raises an error - it must be redefined in concrete classes **
-
raiseWindow: aWindowId
-
raise a window.
In some systems (aka MSWindows), this raises only above all other st/x views,
but not above other-application's views, which have a TOPMOST attribute.
Se raiseWindowToTop for this.
** This method raises an error - it must be redefined in concrete classes **
-
raiseWindowToTop: aWindowId
-
raise a window above all others (even above non-st/x windows)
-
reparentWindow: windowId to: newParentWindowId
-
change a windows parent (an optional interface).
Returns true if successfull.
-
resizeWindow: aWindowId width: w height: h
-
resize a window
** This method raises an error - it must be redefined in concrete classes **
-
restoreCursors
-
restore the cursors of all views to their current cursor.
This undoes the effect of #setCursors:
-
setBackingStore: how in: aWindowId
-
turn on/off backing-store for a window.
A view with backingStore will redraw automatically
from the backing pixmap (without sending expose events).
An implementation may ignore this request.
-
setBitGravity: how in: aWindowId
-
set bit gravity for a window
-
setCursor: aCursorId in: aWindowId
-
set a windows cursor
** This method raises an error - it must be redefined in concrete classes **
-
setCursors: aCursor
-
change the cursor of all views on the receiver device
to aCursorId, without affecting the views idea of what
the cursor is (so that it can be restored from the views
cursor instance variable later).
Use of this is not recommended - its better to change
the cursor of a windowGroup alone.
-
setForegroundWindow: aWindowId
-
make a window active.
Fall back to raiseWindow here
-
setIconName: aString in: aWindowId
-
set a windows icon name
-
setSaveUnder: yesOrNo in: aWindowId
-
turn on/off save-under for a window.
A view with saveUnder will save the pixels of the
area covered by itself and repair from those when
unmapped (therefore, no expose events are generated later).
It is especially useful for popUp menus.
An implementation may ignore this request.
-
setTransient: aWindowId for: aMainWindowId
-
set aWindowId to be a transient of aMainWindow.
This informs the windowManager that those are to
be handled as a group w.r.t. iconification and deiconification.
An implementation may ignore this
(being somewhat inconvenient to the user, though)
-
setWindowBackground: aColorIndex in: aWindowId
-
set a windows background color
** This method raises an error - it must be redefined in concrete classes **
-
setWindowBackgroundPixmap: aPixmapId in: aWindowId
-
set a windows background pattern to be a form.
No need to be implemented in concrete workstation;
if not implemented, its done by (slower) smalltalk code
(must return false from #supportsViewBackgroundPixmap query)
-
setWindowBorderColor: aColorIndex in: aWindowId
-
set a windows border color
-
setWindowBorderPixmap: aPixmapId in: aWindowId
-
set a windows border pattern
-
setWindowBorderShape: aPixmapId in: aWindowId
-
set a windows border shape
-
setWindowBorderWidth: aNumber in: aWindowId
-
set a windows border width
** This method raises an error - it must be redefined in concrete classes **
-
setWindowClass: wClass name: wName in: aWindowId
-
define class and name of a window.
This may be used by the window manager to
select client specific resources.
-
setWindowGravity: how in: aWindowId
-
set window gravity for a window
-
setWindowIcon: aForm in: aWindowId
-
define a bitmap to be used as icon
-
setWindowIcon: aForm mask: aMaskForm in: aWindowId
-
set a windows icon & iconMask
-
setWindowIconWindow: aView in: aWindowId
-
set a windows icon window
-
setWindowMinExtent: minExt maxExtent: maxExt in: aWindowId
-
set a windows minimum & max extents.
nil arguments are ignored.
-
setWindowMinExtentX: minW y: minH maxExtentX: maxW y: maxH in: aWindowId
-
set a windows minimum & max extents.
nil arguments are ignored.
** This method raises an error - it must be redefined in concrete classes **
-
setWindowName: aString in: aWindowId
-
define a windows name (i.e. windowTitle)
** This method raises an error - it must be redefined in concrete classes **
-
setWindowShape: aPixmapId in: aWindowId
-
set a windows visible shape
-
unmapWindow: aWindowId
-
unmap a window
** This method raises an error - it must be redefined in concrete classes **
-
unmapWindow: aWindowId animation: animationSymbolorNil time: timeInMillisOrNil
-
unmap a window
-
windowIsIconified: aWindowId
-
return true, if a window is iconified
** This method raises an error - it must be redefined in concrete classes **
DeviceFontMetrics
|