|
Smalltalk/X WebserverDocumentation of class 'DisplayRootView': |
|
|
Class: DisplayRootViewInheritance:Object | +--GraphicsContext | +--DeviceGraphicsContext | +--GraphicsMedium | +--DisplaySurface | +--DisplayRootView
Description:
this class describes the rootWindow (which is the background window or
desktop and can be used for drawing outside of Views
i.e. for dragging between Views).
For historic and compatibility reasons, there is a global variable
called 'RootView', which is bound to the default displays ('Display')
rootview. We recommend, not to access this variable, instead, get a
displays rootView via the #rootView message (sent to the device).
Otherwise, your application will not work in a multiScreen environment.
Instances of myself (i.e. these rootViews) are light-weight views;
they do not support events, models etc.
They are pure drawing canvases and should be only used for special
applications (i.e. dragging).
There may be display systems in which rootViews are not
supported/allowed implemented. So be VERY careful when using them.
Be aware, that the rootView is not always visible - some
windowManagers install another (pseudoRoot), into which icons and
windowManager menus are drawn. If that is the case, your paining
into the rootView may not be visible, unless you set the #noClipByChildren
option (see below).
Also, it is not guaranteed, that all devices support drawing in the
root window - especially if the device is a simulated one, such as
a remote webBrowser ...
In general, you should never use the rootView for normal applications.
To draw in the (Displays) root window:
|rootView|
rootView := Screen current rootView.
rootView paint:(Color red).
rootView fillRectangleX:10 y:10 width:100 height:100.
of course, all stuff from View and its superclasses can be used:
|rootView|
rootView := Screen current rootView.
rootView paint:(Color red).
rootView noClipByChildren.
rootView fillRectangleX:10 y:10 width:100 height:100.
Class protocol:instance creation
Instance protocol:accessing
|
|
|
ST/X 6.1.1; WebServer 1.620 at exept:8081; Wed, 23 May 2012 08:55:58 GMT
|