|
Class: ApplicationModel
Object
|
+--Model
|
+--ApplicationModel
|
+--AbstractFileApplicationNoteBookComponent
|
+--AbstractLauncherApplication::PackageLoadDialog
|
+--AbstractLoggerSettingsApplication
|
+--AbstractSettingsApplication
|
+--AbstractSettingsApplication::ToolboxSettingsAppl::ClassToolSetting
|
+--ApplicationWithFileHistory
|
+--BookmarkBar
|
+--BookmarkListEditor
|
+--DidYouKnowTipViewer
|
+--Dolphin::Shell
|
+--EventMonitor
|
+--FileBrowserV2SettingsDialog
|
+--HTMLDocumentViewerApplication
|
+--MemoryMonitor
|
+--MultipleItemSelectionWidget
|
+--PerforceSourceCodeManagementSettingsAppl::ManagerPerModuleApp
|
+--PrintAbortDialog
|
+--PrintingDialog
|
+--ProcessMonitorV2
|
+--SettingsDialog
|
+--SimpleDialog
|
+--SystemBrowser
|
+--ToolApplicationModel
|
+--Tools::AbstractTestRunner
|
+--Tools::BreakpointBrowser
|
+--Tools::Browslet
|
+--Tools::BrowsletCanvas
|
+--Tools::ChangeSetBrowser2::ChangeEditor
|
+--Tools::ChangeSetDiffTool
|
+--Tools::InlineMessageDialog
|
+--Tools::Inspector2
|
+--Tools::LintRuleDetail
|
+--Tools::MethodRewriter
|
+--Tools::NavigatorModel
|
+--Tools::ProjectCheckerBrowser
|
+--Tools::SmalltalkDiffTool
|
+--Tools::SourceCodeManagerConfigurationTestTool
|
+--Tools::SpecialCodeView
|
+--Tools::StringSearchTool
|
+--Tools::TagsBrowser
|
+--Tools::TestRunner2::ResultList
|
+--Tools::TextDiffTool
|
+--Tools::WebBrowserPage
|
+--URITransmissionServiceAppl
|
+--URITransmissionServiceAppl::URIDialog
|
+--V::ApplicationCoordinator
|
+--VersionDiffBrowser
- Package:
- stx:libview2
- Category:
- Interface-Framework
- Version:
- rev:
1.571
date: 2024/03/11 21:59:03
- user: cg
- file: ApplicationModel.st directory: libview2
- module: stx stc-classLibrary: libview2
Since many ST-80 classes are subclasses of ApplicationModel, this class
is provided here to allow easier porting of ST-80 code.
It does not (currently) provide all functionality and is NOT
compatible to the corresponding ST80 class; therefore, manual
changes have to be made to get those applications to run under ST/X.
(but at least, this enables you to fileIn that code and have a superclass
for them)
As time goes by, ST/X applications are going to be converted to
become subclasses of this abstract class - see Launcher for a
first concrete example.
ApplicationModel is prepared to build a view from a windowSpec, as
created by the windowBuilder. If your subclass does not provide such
a spec, you should at least redefine:
#openInterface - to create a topview and open it
you may want to redefine:
#closeRequest - to catch window closing
#focusSequence - to define a sequence for focus-stepping
Once the interfaceBuilder is finished & released, subclasses can
alternatively provide the spec via a #windowSpec method.
The classResources have been put into this class to allow ST/X
applications (which used to be subclasses of StandardSystemView)
to migrate smoothly into ApplicationModels (which is better design ...).
[Instance variables:]
resources ResourcePack language string translation
builder WindowBuilder a builder who knows how to create
a window hierarchy from a specification
Notice: this class was implemented using protocol information
from alpha testers and PD code - it may not be complete or compatible to
the corresponding ST-80 class. If you encounter any incompatibilities,
please forward a note to the ST/X team.
copyrightCOPYRIGHT (c) 1995 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
howToDealWithMultipleApplicationInstancesThe following relates to StandAlone applications (i.e. compiled exe's) only.
If the user attempts to open another of the application's documents
(after the first instance of the application has already been opened),
it is sometimes required to notify the first application about this
and to ask it to open an extra window on the second-clicked document.
In other words: to get another of the first instances' windows instead of opening a window
by the second application.
This is implemented via the following mechanism (see StandaloneStartup):
the first application instance leaves the information about its existence somewhere
(under win32: in the registry, the window-ID of its main window is remembered;
under unix, its stored into a locked file).
a mutex is created to prevent a race on this informationduring startup
(under win32: a mutex proper; under unix, the above locked file will do)
when the app is started the second time, it will not be able to acquire the mutex (and therefore
knows, that its the second instance). It will then send an event-message (win32: via copyData;
unix. via sendClientEvent), to the first instance and pass the fileName of the document which
is to be opened. The first instance receives this event and opens another window for it.
The second instance simply exits and stops execution.
This guarantees that only one instance of an application is executing (if desired).
The implementation is found in:
StandaloneStartup:
checkForAndExitIfAnotherApplicationInstanceIsRunning
here:
processOpenPathCommand:aFilename
By default, the event is ignored - subclasses which want to support that behavior MUST
redefine processOpenPathCommand: in ApplicationModel and also make sure that
checkForAndExitIfAnotherApplicationInstanceIsRunning is called for in StandaloneStartup.
accessing
-
application
-
-
applicationName
-
the name as shown in an about box or in the deployed package.
If there is an application definition in my package, ask that one.
Otherwise, return my name.
active help
-
flyByHelpSpec
-
obsolete: only provided for backward compatibility.
default is: take the oldStyle help-spec (should be redefined by concrete class).
-
helpSpec
-
default is: no help-spec (should be redefined by concrete class if help is wanted).
-
includeOtherHelpSpecsTo: aDictionary
-
can be redefined to add other help texts
(to avoid text duplications for common strings).
This is called before the helpSpec is evaluated.
The default here is to do nothing
bindings
-
actionFor: aKey
-
sent by the builder to ask for an actionBlock for
a Button. The argument, aKey comes from an UI-spec
for a buttons #action property.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
actionBlocks from a Dictionary or whatever.
Typically, a block is returned there.
-
actionFor: aKey withValue: aValue
-
sent by the builder to ask for an actionBlock for
a Button which passes a value to the actionMethod.
The argument, aKey comes from an UI-spec
for a buttons #action property.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
actionBlocks from a Dictionary or whatever.
Typically, a block is returned there.
-
aspectFor: aKey
-
sent by the builder to ask for an aspect (a data model).
The argument, aKey comes from an UI-spec
for a components #aspect property.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
holders from a Dictionary or whatever.
Typically, a valueHolder is returned there.
-
clientFor: aKey
-
sent by the builder to ask for an application provided
subcanvas's application.
The argument, aKey comes from an UI-spec
for a subcanvas's #client property.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
appModels from a Dictionary or whatever.
Typically, an applicationModel is returned there.
-
colorFor: aSymbol
-
sent by the builder to ask for an application provided color.
The argument, aKey comes from an UI-spec
for a widgets #*Color property.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
holders from a Dictionary or whatever.
Typically, a color is returned there.
-
componentFor: aKey
-
sent by the builder to ask for an application provided
component.
The argument, aKey comes from an UI-spec
for a viewHolders #view property.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
holders from a Dictionary or whatever.
Typically, a view is returned there.
-
fontFor: aSymbol
-
sent by the builder to ask for an application provided font.
The argument, aKey comes from an UI-spec
for a widgets #*Font property.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
holders from a Dictionary or whatever.
Typically, a font is returned there.
-
labelFor: aKey
-
sent by the builder to ask for an application provided
label for a component.
The argument, aKey comes from an UI-spec
for a components #label property.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
labels from a Dictionary or whatever.
Typically, a string is returned there.
-
listFor: aKey
-
sent by the builder to ask for an application provided
holder for a list.
The argument, aKey comes from an UI-spec
for a listWidgets #list property.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
holders from a Dictionary or whatever.
Typically, a list-holding model (SelectionInList) is returned there.
-
menuFor: aKey
-
sent by the builder to ask for an application provided
holder for a menu.
The argument, aKey comes from an UI-spec
for a widgets #menu property.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
holders from a Dictionary or whatever.
Typically, a menu or a menu-holding valueHolder is returned there.
-
specificationFor: aKey
-
sent by the builder to ask for an application provided
specification for a subcanvas or subspecification.
The argument, aKey comes from an UI-spec
for a subcanvases #specification property (minorKey).
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
interfaceSpecifications from a Dictionary or whatever.
Typically, an interfaceSpecification is returned there.
-
specificationFor: aKey application: app onDevice: deviceOrNil
-
sent by the builder to ask for an application provided
specification for a subcanvas or subspecification.
The argument, aKey comes from an UI-spec
for a subcanvases #specification property (minorKey).
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
interfaceSpecifications from a Dictionary or whatever.
Typically, an interfaceSpecification is returned there.
-
subApplicationFor: aKey
-
sent by subCanvas to ask for an application inside itself.
The argument, aKey comes from a TabList-specs majorKey.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
an application from a Dictionary or whatever.
Typically, an ApplicationModel subinstance is returned there.
-
visualFor: aKey
-
sent by the builder to ask for an application provided
image or element for a label.
The argument, aKey comes from an UI-spec
for a widgets #label property, if LabelIsImage is turned on.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
images from a Dictionary or whatever.
Typically, an image is returned there.
change & update
-
update: something with: aParameter from: changedObject
-
flush resources on language changes
defaults
-
defaultHttpServerPort
-
this is only used for web-applications
-
defaultIcon
-
default is: no icon (should be redefined by concrete class if an icon is wanted).
-
defaultIconForAboutBox
-
the icon to be shown in my about-this-app dialog
-
defaultServiceLinkName
-
old web server interface - remove me
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
labelAt: aKey
-
default is: no label (could be redefined by concrete class ).
-
labelAt: aKey ifAbsent: aBlock
-
default is: no label (could be redefined by concrete class ).
-
labelAt: aKey put: aValue
-
not yet implemented
-
labels
-
not yet implemented
-
visualAt: aKey
-
default is: no visual (could be redefined by concrete class ).
-
visualAt: aKey ifAbsent: aBlock
-
default is: no visual (could be redefined by concrete class ).
-
visualAt: aKey put: aValue
-
not yet implemented
-
visuals
-
not yet implemented
font helpers
-
resolveFont: aSelector
-
resolve the font descriobed by aSelector.
Delegate to a WindowBuilder, whuch may forward to self fontOn:
font specs
-
buttonFont
-
that is a symbolic font
-
buttonFontBig
-
that is a symbolic font
-
buttonFontSmall
-
that is a symbolic font
-
buttonFontTiny
-
that is a symbolic font
-
inputFont
-
that is a symbolic font
-
inputFontBig
-
that is a symbolic font
-
inputFontSmall
-
that is a symbolic font
-
inputFontTiny
-
that is a symbolic font
-
labelFont
-
that is a symbolic font
-
labelFontBig
-
that is a symbolic font
-
labelFontSmall
-
that is a symbolic font
-
labelFontTiny
-
that is a symbolic font
-
listFont
-
that is a symbolic font
-
listFontBig
-
that is a symbolic font
-
listFontSmall
-
that is a symbolic font
-
menuFont
-
that is a symbolic font
-
menuFontBig
-
that is a symbolic font
-
menuFontSmall
-
that is a symbolic font
-
menuFontTiny
-
that is a symbolic font
-
textFont
-
that is a symbolic font
-
textFontBig
-
that is a symbolic font
-
textFontSmall
-
that is a symbolic font
-
textFontTiny
-
that is a symbolic font
help
-
aboutImage
-
bitmap image or nil for an about box for this application.
-
aboutThisApplicationLabel
-
label for an about box for this application.
-
aboutThisApplicationText
-
text for an about box for this application.
-
documentationPath
-
history
-
defaultExtentFor: anApplicationClass
-
return a default extent for an app-class or nil.
If the user has the corresponding userPreference set,
previous extents are remembered (at close time)
and used as default for the next opening.
-
forgetDefaultExtentFor: anApplicationClass
-
forget the remembered last extent for some application class.
This is sent by the UIPainter, when a windowspec is saved,
to bring up the application with its possibly changed default extent
-
forgetRecentlyOpenedApplications
-
-
recentlyOpenedApplications
-
-
rememberLastExtentOf: aWindow
-
remember the last extent of aWindow.
This will be used as default extent when the same app is opened the next time
-
rememberLastExtentOf: aWindow for: anApplicationClass
-
remember the last extent for some application class.
This will be used as default extent when the same app is opened the next time
-
rememberRecentlyOpenedApplication
-
support for the launcher's ''open recent...'' menu function.
It is questionable, if dialogs should also be remembered
(although it might be convenient for developers)
initialization
-
initialize
-
ApplicationModel initialize
instance creation
-
new
-
return a new initialized instance
-
onDevice: aDevice
-
return a new initialized instance, which shall open its interface on aDevice.
private
-
bigFontFactor
-
the factor, by which bigFonts are bigger
-
bigFontFor: aFont
-
-
bigFontMagnificationFactor
-
the factor, by which bigFonts are bigger
-
selfResponsibleFor: aKey
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
smallFontFor: aFont
-
-
smallFontMagnificationFactor
-
the factor, by which smallFonts are smaller
-
tinyFontFor: aFont
-
-
tinyFontMagnificationFactor
-
the factor, by which tinyFonts are smaller
queries
-
interfaceSpecFor: aSelector
-
return an interface spec
-
isAbstract
-
self isAbstract
-
isVisualStartable
-
return true, if this application can be started via #open.
The browser will then show a launch icon (rocket) beside the class name.
(and allow for eg. start of a change browser via double-click in the class list)
-
shouldRememberLastExtent
-
to be redefined by concrete applications:
if true is answered, the application's extent is remembered on close
and used as a default when opened the next time
resources
-
classResources
-
if not already loaded, get the classes resourcePack and return it
Usage example(s):
ApplicationModel flushAllClassResources
ApplicationModel classResources
MyApp classResources
WorkspaceApplication classResources
Tools::NewSystemBrowser classResources
|
-
classResources: aResourcePack
-
allow setting of the cached classResources
-
flushAllClassResources
-
flush all classes resource translations.
Needed after a resource file / language setting has changed.
Usage example(s):
ApplicationModel flushAllClassResources
|
-
flushClassResources
-
flush classes resource string translations.
Needed whenever a resource file / language setting has changed
-
resources
-
return the application's resources -
that's a ResourcePack containing national language strings
-
updateClassResources
-
update my classResources
startup
-
open
-
create an instance of the application and open its view.
Sorry, but for visualworks compatibility, the builder is returned,
not the application instance
Usage example(s):
-
open: applicationClass onInitializedDisplayNamed: displayName
-
Smalltalk secureFileIn:'display.rc'.
-
openAt: aLocation
-
create an instance of the application and open its view
at some position.
-
openDialogInterface: anInterfaceSymbol
-
create an instance of the application and open a view as
specified by anInterfaceSymbol.
-
openDialogInterface: anInterfaceSymbolOrSpecOrSpecArray withBindings: bindings
-
create an instance of the application and open a view as
specified by anInterfaceSymbol.
-
openDialogInterfaceSpec: anInterfaceSpec
-
create an instance of the application and open a view as
specified by the given spec.
-
openDialogInterfaceSpec: anInterfaceSpec withBindings: bindings
-
create an instance of the application and open a view as
specified by the given spec.
-
openDialogSpec: aSpec
-
create an instance of the application and open a view as
specified by aSpec.
-
openDialogSpec: aSpec withBindings: bindings
-
create an instance of the application and open a view as
specified by the spec.
-
openInterface: anInterfaceSymbol
-
create an instance of the application and open a view as
specified by anInterfaceSymbol.
-
openInterface: anInterfaceSymbol at: aPoint
-
create an instance of the application and open a view as
specified by anInterfaceSymbol.
-
openLauncherOnInitializedDisplayNamed: displayName
-
-
openModal
-
create an instance of the application and open its view modal
-
openOn: anApplicationModel
-
send an open message to the argument, anApplicationModel.
I don't really understand what this method is useful for ...
-
openOnDevice: aDevice
-
create an instance of the application and open its view
on ANOTHER device.
For more info, read the document on multiple display
support and the documentation of the DeviceWorkstation class.
Usage example(s):
Launcher openOnDevice:Display
|
-
openOnInitializedDisplayNamed: displayName
-
-
openOnXScreenNamed: aScreenName
-
create an instance of the application and open its view
on some X display screen. The argument aScreenName must be
a valid x-display name (i.e. of the form '<host>:<screenNr>' as in 'foo:0').
For more info, read the document on multiple display
support and the documentation of the DeviceWorkstation class.
Usage example(s):
Launcher openOnXScreenNamed:'sgi:0'
Launcher openOnXScreenNamed:'foo:0'
NewLauncher openOnXScreenNamed:'dawn:0'
NewLauncher openOnXScreenNamed:'bitsy:0'
SystemBrowser openOnXScreenNamed:'dawn:0'
SystemBrowser openOnXScreenNamed:'bitsy:0'
SystemBrowser openOnXScreenNamed:'localhost:0'
|
-
openWithSpec: aSpecSymbol
-
ST80 compatibility:
mhmh - what is the difference to #openInterface ?
startup-web applications
-
addRequiredForeignServicesTo: anHTTPServer
-
a hook to allow web apps to register additional services;
typically: file services to deliver bitmaps
-
favIcon
-
this is only called for web-applications
-
initialPageSpec
-
this is only required for web-applications
-
pageSpec
-
this is only used for web-applications
-
pageSpecs
-
this is only required for web-applications
** This method must be redefined in concrete classes (subclassResponsibility) **
-
startAsWebService
-
this is not yet a public interface. For internal exept use only.
Start a web service for myself on the default webService linkURL.
The webService will create new instances of me for incoming sessions.
Answer the webService.
Usage example(s):
-
startAsWebService: linkName
-
this is not yet a public interface. For internal exept use only.
Start a web service for myself on link, an URL.
The webService will create new instances of me for incoming sessions.
Answer the webService.
Start a HTTP server, if not already running
Usage example(s):
self startAsWebService:'hello'
UBS::UBSUsecase startAsWebService:'uuu'
|
-
startAsWebService: linkName inServer: httpServer
-
this is not yet a public interface. For internal exept use only.
Start a web service for myself on the default webService linkURL.
The webService will create new instances of me for incoming sessions.
Answer the webService.
Start a HTTP server, if not already running
Usage example(s):
self startAsWebService:'hello'
UBS::UBSUsecase startAsWebService:'uuu'
|
-
startAsWebService: linkName onPort: httpPort
-
this is not yet a public interface. For internal exept use only.
Start a web service for myself on the default webService linkURL.
The webService will create new instances of me for incoming sessions.
Answer the webService.
Start a HTTP server, if not already running
Usage example(s):
self startAsWebService:'hello'
UBS::UBSUsecase startAsWebService:'uuu'
|
-
startAsWebService_old
-
marked as obsolete by Stefan Vogel at 4-Mrz-2024
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
startInPortalService: aPortalServiceOrSession
-
this is not yet a public interface. For internal exept use only
Usage example(s):
PortalTests::TestApplication1
startInPortalService:
(HTTPPortalService allInstances select:[:s | s httpServer port = 8080]) first
|
-
webServiceLinkName
-
the link name, under which instances of myself are found in the httpServer
Compatibility-VW
-
mainWindow
-
return the main window associated with this application.
May return nil if called before the window is built
-
windowMenuBar
-
return the toolbar menu associated with this application.
May return nil if called before the menu is built
-
wrapperAt: aSymbol
-
Access a widget by name.
ST/X has no wrappers (at least not the way VW has them).
However, this is provided for source code compatibility.
accessing
-
application
-
application knows about interfaceSpecs, menuSpecs etc.
Usually this is my class.
This may be redefined in subclasses
-
builder
-
return the applications builder; this one has more information
about views, components etc.
-
builder: aBuilder
-
set the applications builder. Normally, you should not set it
directly, but depend on the default builder, as created when the application
was created.
-
componentAt: name
-
return a component identified by its name
-
device
-
-
masterApplication
-
return the master application, in which I am embedded, or nil, if I am the topmost application.
Useful for embedded sub applications to access outer windows and/or bindings from the master
-
masterApplication: anApplication
-
set the value of the instance variable masterApplication to anApplication.
anApplication may be the ApplicationModel in which I am embedded,
or nil, if I am the topmost application.
Useful for embedded sub applications to access outer windows and/or bindings from the master
-
resources
-
return the application's resources -
that's a ResourcePack containing national language strings.
If I have a masterApplication, those resources are returned.
The instvar 'resources' can be accessed safely (and faster), once the UI is open
-
resources: aResourcePack
-
set the application's resources - usually this is done automatically,
except for manually built dialogs
-
topMasterApplication
-
return the topmost master application. Useful when nested subapplications are used
-
topView
-
SimpleView compatibility - answer my topWindow
-
widgetAt: aSymbol
-
Access a widget by name.
ST/X has no wrappers (at least not the way VW has them).
However, this is provided for convenience and source code compatibility.
-
window
-
return my topWindow - or nil, if I have no window (yet)
-
window: aTopView
-
set my topWindow.
As a side effect, this creates a dummy builder if non has yet
been built. This prevents non-GUI-Painter apps from failing later,
when the builder is accessed.
-
windowGroup
-
return the application's windowGroup
Usage example(s):
"/ So it lost its windowGroup.
|
Usage example(s):
"/ applications may (and do) run in a separate windowGroup
|
Usage example(s):
-
windowSensor
-
return the application's windowSensor.
Notice: this returns nil if the app's window
has not yet been realized.
DO NOT change this
-
windowTitle: aString
-
if the window is already created, change its title.
Otherwise, remember the title to be set when the window is created later
binding access
-
actionFor: aKey
-
sent by the builder to ask for an actionBlock for
a Button. The argument, aKey comes from an UI-spec
for a buttons #action property.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
actionBlocks from a Dictionary or whatever.
Typically, a block is returned there.
-
actionFor: aKey withValue: aValue
-
sent by the builder to ask for an actionBlock for
a Button which passes a value.
The argument, aKey comes from an UI-spec for a buttons #action property.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
actionBlocks from a Dictionary or whatever.
Typically, a block is returned there.
-
actionFor: aKey withValue: value1 withValue: value2
-
sent by the builder to ask for an actionBlock for a Button which passes two values.
The argument, aKey comes from an UI-spec for a buttons #action property.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
actionBlocks from a Dictionary or whatever.
Typically, a block is returned there.
-
aspectFor: aKey
-
sent by the builder to ask for an aspect (a data model).
The argument, aKey comes from an UI-spec
for a component's #aspect property.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
holders from a Dictionary or whatever.
Typically, a valueHolder is returned there.
-
aspectOrNil: aKey forSubApplication: aSubApp
-
-
aspectValueFor: aspectKeySymbol
-
fetch an aspect's value
same as (self aspectFor:aKey) value
-
aspectValueOr: default for: aspectKeySymbol
-
common helper - fetches the aspect value;
if it is nil, return a default.
-
clientFor: aKey
-
sent by the builder to ask for an application provided
subcanvas's application.
The argument, aKey comes from an UI-spec
for a subcanvas's #client property.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
appModels from a Dictionary or whatever.
Typically, an applicationModel is returned there.
-
colorFor: aKey
-
sent by the builder to ask for an application provided color.
The argument, aKey comes from an UI-spec
for a widgets #*Color property.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
holders from a Dictionary or whatever.
Typically, a color is returned there.
-
componentFor: aKey
-
sent by the builder to ask for a component
provided by the application.
The argument, aKey comes from an UI-spec
for a viewHolder's #view property.
Here, a corresponding message is sent to myself,
which ought to be defined in the concrete application class.
Alternatively, a subclass may redefine this method,
to provide holders from a Dictionary or whatever.
Typically, a view/widget is returned there.
-
fontFor: aKey
-
sent by the builder to ask for an application provided font.
The argument, aKey comes from an UI-spec
for a widgets #*Font property.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
holders from a Dictionary or whatever.
Typically, a font is returned there.
Use #resolveFont:, if you are not a builder!
-
labelFor: aKey
-
sent by the builder to ask for an application provided
label for a component.
The argument, aKey comes from an UI-spec
for a components #label property.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
labels from a Dictionary or whatever.
Typically, a string is returned there.
-
listFor: aKey
-
sent by the builder to ask for an application provided
holder for a list (for example, a popUpLists list).
The argument, aKey comes from an UI-spec
for a listWidgets #list property.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
holders from a Dictionary or whatever.
Typically, a list-holding model (SelectionInList) is returned there.
If the instance does not provide a value, a corresponding aspect
is asked for. If that fails as well, the app class is asked as a last
chance.
-
menuFor: key
-
Sent by the builder to ask for an application provided
holder for a menu. The argument, `key`, comes from an UI-spec
for a widgets #menu property.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
holders from a Dictionary or whatever.
Typically, a menu or a menu-holding valueHolder is returned there.
-
specificationFor: aKey
-
sent by the builder to ask for an application provided
specification for a subcanvas or subspecification.
The argument, aKey comes from an UI-spec
for a subcanvases #specification property (minorKey).
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
interfaceSpecifications from a Dictionary or whatever.
Typically, an interfaceSpecification is returned there.
-
subApplicationFor: aKey
-
sent by subCanvas to ask for an application inside itself.
The argument, aKey comes from a TabList-specs majorKey.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
an application from a Dictionary or whatever.
Typically, an ApplicationModel subinstance is returned there.
-
visualFor: aKey
-
sent by the builder to ask for an application provided
image or element for a label.
The argument, aKey comes from an UI-spec
for a widgets #label property, if LabelIsImage is turned on.
Here, a corresponding message is sent to myself,
which ought to be defined in the application subclass.
Alternatively, a subclass may redefine this method, to provide
images from a Dictionary or whatever.
Typically, an image is returned there.
building
-
allButOpen
-
create my views from the windowSpec, but do not open the main window.
-
allButOpenFrom: aSpec
-
create my views but do not open the main window.
The argument is a spec which defines the interface.
-
allButOpenInterface: aSymbol
-
create my views but do not open the main window.
The argument specifies a selector of a method,
which when sent to myself should return a spec.
Notice, this returns the windowBuilder.
-
buildSpec: specToBuild asSubCanvasWithBuilder: aBuilder
-
build a subcanvases spec into aSubcanvas
-
buildSubCanvas: spec withBuilder: aBuilder
-
build a subcanvases' spec into aSubcanvas
-
buildSubCanvas: spec withMenu: withMenuBoolean withBuilder: aBuilder
-
build a subcanvases' spec into aSubcanvas
-
performPostBuildCallBack: createCallBackSelector widget: aWidget spec: spec builder: builder
-
component manipulations
-
components: aSymbolOrArray do: aBlock
-
evaluate aBlock for all components listed as aSymbolOrArray.
-
disable: aSymbolOrArray
-
disable the components whose id's are aSymbolOrArray.
-
enable: aSymbolOrArray
-
enables the component(s) identified by aSymbolOrArray.
-
invalidate: aSymbolOrArray
-
invalidates the component(s) identified by aSymbolOrArray.
-
makeInvisible: aSymbolOrArray
-
makes the components whose id's are aSymbolOrArray invisible
-
makeReadOnly: aSymbolOrArray
-
make all components identified by aSymbolOrArray read only
(for editText components).
-
makeVisible: aSymbolOrArray
-
makes the components whose id's are aSymbolOrArray visible
-
makeWritable: aSymbolOrArray
-
make all components identified by aSymbolOrArray writable
(for editText components).
copying-private
-
postCopy
-
(comment from inherited method)
release dependents after copying
-
postDeepCopy
-
(comment from inherited method)
allows for cleanup after deep copying.
To be redefined in subclasses.
delayed actions (enqueue)
-
delayedUpdate: something with: aParameter from: changedObject
-
support for delayed updates -
subclasses which invoke #enqueueDelayedUpdate:with:from: (from #update:with:from:)
must also redefine this method, and perform the actual update there.
-
enqueueDelayedAction: aBlock
-
This will enqueue a delayed action - the application-process will
eventually execute aBlock when it handles the next event.
Useful for synchronization
-
enqueueDelayedUpdate: something with: aParameter from: changedObject
-
support for delayed updates - to be invoked from a concrete classes
#update:with:from: method.
This will enqueue a delayed update, and resend #delayedUpdate:with:from:
whenever the receiver is handling events.
Especially useful, if many updates arrive at high frequency, to avoid
multiple redraws.
-
enqueueMessage: selector
-
enqueue a message without arguments to be sent to myself later,
when my process is back in its eventLoop. Also, filter duplicates.
This is useful, to buffer redraws and avoid flicker due to multiple
redraws (especially in browsers, when reacting on changeMessages resulting
from changes made in other browsers)
-
enqueueMessage: selector argument: arg
-
enqueue a message without arguments to be sent to myself later,
when my process is back in its eventLoop. Also, filter duplicates.
This is useful, to buffer redraws and avoid flicker due to multiple
redraws (especially in browsers, when reacting on changeMessages resulting
from changes made in other browsers)
-
enqueueMessage: selector arguments: argumentArray
-
enqueue a message to be sent to myself later,
when my process is back in its eventLoop. Also, filter duplicates.
This is useful, to buffer redraws and avoid flicker due to multiple
redraws (especially in browsers, when reacting on changeMessages resulting
from changes made in other browsers)
-
enqueueMessage: selector for: someone
-
enqueue a message without arguments to be sent to someone later,
when my process is back in its eventLoop. Also, filter duplicates.
This is useful, to buffer redraws and avoid flicker due to multiple
redraws (especially in browsers, when reacting on changeMessages resulting
from changes made in other browsers)
-
enqueueMessage: selector for: someone argument: arg
-
enqueue a message without arguments to be sent to someone later,
when my process is back in its eventLoop. Also, filter duplicates.
This is useful, to buffer redraws and avoid flicker due to multiple
redraws (especially in browsers, when reacting on changeMessages resulting
from changes made in other browsers)
-
enqueueMessage: selector for: someone arguments: argList
-
enqueue a message to be sent to someone later, when my process
is back in its eventLoop. Also, filter duplicates.
This is useful, to buffer redraws and avoid flicker due to multiple
redraws (especially in browsers, when reacting on changeMessages resulting
from changes made in other browsers).
Notice and Warning: this may be called BEFORE I have my own window process spawned;
in that case, the perform is done right now synchronously.
-
enqueueMessage: selector with: argument
-
enqueue a message with one argument to be sent to myself later,
when my process is back in its eventLoop. Also, filter duplicates.
This is useful, to buffer redraws and avoid flicker due to multiple
redraws (especially in browsers, when reacting on changeMessages resulting
from changes made in other browsers)
-
enqueueMessage: selector with: argument1 with: argument2
-
enqueue a message with one argument to be sent to myself later,
when my process is back in its eventLoop. Also, filter duplicates.
This is useful, to buffer redraws and avoid flicker due to multiple
redraws (especially in browsers, when reacting on changeMessages resulting
from changes made in other browsers)
drag & drop
-
canDropObjects: aCollectionOfDropObjects
-
this is invoked for internal (stx->stx) drops.
Drop manager asked if a drop is possible
- should be redefined by apps which can do it, to return true
-
canDropObjects: aCollectionOfDropObjects in: aComponent
-
drop manager asked if a drop is possible
- should be redefined by apps which can do it, to return true
-
canDropObjects: aCollectionOfDropObjects in: aComponent at: position
-
drop manager asked if a drop is possible.
Should be redefined by apps which can do it, to return true
-
dropObjects: aCollectionOfDropObjects
-
drop manager wants to drop.
This is ony sent, if #canDrop: returned true.
Must be redefined in order for drop to work.
** This method must be redefined in concrete classes (subclassResponsibility) **
-
dropObjects: aCollectionOfDropObjects at: aPointOrNil
-
drop manager wants to drop.
This is ony sent, if #canDropObjects: returned true.
Must be redefined in order for drop to work.
-
dropObjects: aCollectionOfDropObjects in: aComponent
-
drop manager wants to drop.
This is ony sent, if #canDrop: returned true.
Must be redefine in order for drop to work.
-
dropObjects: aCollectionOfDropObjects in: aComponent at: aPoint
-
drop manager wants to drop.
This is ony sent, if #canDropObjects:in: returned true.
Can be redefined in apps which return true to #canDropObjects:.
-
droppedFile: aFilename in: aComponent
-
ignored here - only sent by textView components, sometimes
easy bindings
-
registerInterestIn: aValueModel using: aSelectorOrArray
-
Register interest in a change in aValueModel using information in aSelectorOrArray.
aSelectorOrArray can be one of three things:
1) nil in which case no interest is registered
2) a selector in which case the receiver is understood to be self
3) an Array in which case the size is two where the first element is the
message to be sent and the second element is the receiver.
-
valueHolderFor: aSelector initialValue: anObject
-
Return a ValueHolder on anObject.
-
valueHolderFor: aSelector initialValue: anObject changeMessage: aSelectorOrArrayOrNil
-
Return a ValueHolder on anObject. aSelectorOrArrayOrNil is the change information
for the ValueHolder. This argument is either a Symbol or an Array of two elements.
If it is a Symbol, then it is the change message and the interested object is understood
to be the receiver. If it is an Array, then the first element is the change message and
the second element is the interested object.
forced actions
-
close
-
this is sent by my topView when about to be closed
by the program (not by the windowManager).
Notice, that we get a closeRequest message instead if closed by the windowManager,
CloseRequest can be rejected by the app (or confirmed via a dialog).
Could be redefined in subclasses.
-
closeDownViews
-
close down the application's view(s)
-
closeRequest
-
this is sent by my topView when about to be closed by the windowManager.
Could be redefined in subclasses to suppress close or confirm.
Usage example(s):
a closeRequest (although, it is supposed to
|
-
closeRequestFor: aTopView
-
this is sent by any of my topViews when about to be closed by the
windowmanager. For backward compatibility with single-view applications,
this is forwarded here to a simple (non topView-specific) closeRequest,
effectively closing all of my views.
MultiView applications should redefine this method if closing of individual
views closing is to be caught and/or should not close all of them.
-
closeWindow
-
close the application's view
-
doAccept
-
this is invoked by the Return-Key (if returnIsOK) or
the ok-button (if any), IFF the application has been
opened modal (i.e. as a dialog).
-
doAcceptByReturnKey
-
-
doCancel
-
this is invoked by the Escape-Key (if escapeIsCancel) or
the cancel-button (if any), IFF the application has been
opened modal (i.e. as a dialog).
-
doCancelByEscapeKey
-
help
-
aboutImage
-
bitmap image or nil for an about box for this application.
-
aboutThisApplicationLabel
-
label for an about box for this application.
-
aboutThisApplicationText
-
text for an about box for this application.
-
activeHelpViewFor: text onDevice: aDevice
-
redefinable to allow for applications to provide their own active help
(aka tooltip) bubble window
-
flyByHelpDependsOnPositionIn: aView
-
subclasses where the help-text depends upon the pointer position might
want to redefine this. If true is returned, the flyByHelp watcher will
ask for the help text with every button motion.
Otherwise, it will only ask on enter.
-
helpKeyPressed
-
called by <F1>
-
openAboutThisApplication
-
opens an about box for this application.
Can be specialized by redefining #aboutThisApplicationText
and #aboutThisApplicationLabel
-
openDocumentation
-
called by <F1> to open the default documentation.
Empty here.
-
openHelpViewOnFile: pathToHelpText
-
open a help viewer (as opened by the help buttons).
The argument is a relative path within the help directory
(but a file under the current directory is tried first)
-
showActiveHelp: aHelpText for: view
-
This is invoked from the activeHelp event listener, to display some popup-help
for a component.
If false is returned, the help manager will pop up
some active help bubble;
if true is returned, it will assume that the
help text has been already displayed and will not do any further actions.
Here, we accept the help text, and push an event into out own input
queue, so that the help text will be displayed asynchronously by myself,
via the #showHelp:for: method, and return true. Always.
In theory, this can be redefined in concrete classes to handle active help differently.
-
showHelp: aHelpText for: view
-
actual method which is supposed to display the tooltip help text.
Should be redefined in concrete classes, to put the tooltip text
into some info label, or the windows title bar.
Here, the help text is ignored.
-
showingHelp
-
return true, if the activeHelp manager should invoke my #showHelp:for:
method, when the mouse pointer is moved over my widgets.
The default here is true, however, the #showHelp:for: methods are empty.
These should be redefined to put the help text into some info label,
or into the view's title bar.
You may also redefine the showingHelp/showingHelp: methods, to
remember the flag setting.
help - presentations
-
showMeHowItWorks
-
present the default show, from a file named <majorKey>_<lang>.show.
The major key defaults to the classes name.
-
showMeHowItWorks: minorKey
-
present the show, from a file named <majorKey>_<minorKey>_<lang>.show.
Usually, the major key defaults to the classes name,
and the minor key is often emptyOrNil, if there is only one show.
-
showMeHowItWorks: minorKey in: majorKey
-
-
showMeHowItWorks: minorKey inAny: setOfMajorKeys
-
start a ShowMeHowItWorks presentation.
This is controlled by a spec, which is read from the resources/shows folder,
and is named either:
<appClassName>_<lang> - a folder containing a start.show file
or:
<appClassName>_<lang>.show - a show description file
-
showMeHowItWorksDefaultMajorKeys
-
Usually, the major key defaults to the classes name.
The returned keys are tried as filename prefixes in the resources/shows folder
Usage example(s):
Expecco::ProjectDifferenceBrowser basicNew showMeHowItWorksDefaultMajorKeys
Expecco::ProjectDifferenceBrowser basicNew showMeHowItWorks
|
-
showMeHowItWorksPresentationsAvailable
-
true if there are any showMeHowItWorks presentations
help texts
-
basicHelpTextForKey: aKey
-
flyByHelp interface: return some short help text for a key.
key is the symbol associated with some widget or menu item.
Return the original (english) text as written in the helpSpec;
The returned string (if any) needs to be translated as per language,
and also CR-expanded
-
helpSpec
-
activeHelp interface: return some short help text for a widget component
-
helpTextFor: aComponent
-
activeHelp interface: return some help text for a widget component
-
helpTextFor: aComponent at: aPoint
-
if not redefined by subclass, fall back to general method
-
helpTextForKey: aKey
-
flyByHelp interface:
return some short help text for a key.
Key is the symbol associated with some widget or menu item.
(from my helpSpec);
Return a language variant (if available).
Special: with CTRL, show how it is generated (the helpKey or action block)
-
helpTextForKey: aKey row: aRowNr
-
Special interface for DataSet - get the active help text for a specific row
hooks
-
aboutToOpen: whichTopView
-
the topView is about to be opened.
This is sent by whichTopView, right before its really open
(i.e. finally visible)
-
commonPostBuild
-
a common hook called by postBuildWith: and postBuildAsSubcanvasWith:.
I.e. after the view's components where built, either as top-app
or as embedded app, but before the view is made visible (opened).
Can be redefined to perform any adjustments (typically to the window),
before the view is shown.
-
commonPostOpen
-
a common hook for postOpenWith:, postOpenAsSubcanvasWith: and postOpenAsDialogWith:.
Notice: redefined methods should do a super send.
otherwise resources might be undefined.
-
commonPreBuild
-
a common hook for preBuildWith:, preBuildAsSubcanvasWith: and preBuildAsDialogWith:.
-
commonPreOpen
-
A common hook for preOpenWith:, preOpenAsSubcanvasWith: and preOpenAsDialogWith:.
-
opened: whichTopView
-
a topView has been opened.
This is sent by whichTopView, when it's really open
(i.e. finally visible)
-
postApplicationProcessCreate: newProcess windowGroup: newGroup
-
this is sent whenever a new application is launched from this app,
which forks its own windowGroup process. Allows for process group management,
or process-global exception handlers to be installed.
Nothing done here - can be redefined in concrete applications
-
postBuildAsSubcanvasWith: aBuilder
-
this is sent after an interface is built from a spec as subcanvas,
and the appModel is the same as the topWindow's application
(i.e. I am an embedded app).
Can be redefined in subclasses for additional setup after
the subcanvas' view has been built, but not yet opened.
-
postBuildDialogWith: aBuilder
-
this is sent after an interface is built from a spec as dialog with me
as a source (for aspects) i.e. via openDialogInterface:.
Can be redefined in subclasses for additional setup after
the dialog's view has been built, but not yet opened.
-
postBuildWith: aBuilder
-
this is sent after an interface is built from a spec,
but only iff the appModel is not the same as the topView's app
(i.e. if it is not a build for the same appModel again).
In the other case, postBuildAsSubcanvasWith is invoked.
Can be redefined in subclasses for additional setup after
the view has been built, but not yet opened.
-
postOpenAsSubcanvasWith: aBuilder
-
this is sent after the application's window is opened inside another application.
Can be redefined in subclasses for actions after showing the canvas view.
-
postOpenDialogWith: aBuilder
-
this is sent after the applicationÄs window is opened as a dialog with me
as a source (for aspects) i.e. via openDialogInterface:.
Can be redefined in subclasses for actions after opening a dialog view.
-
postOpenWith: aBuilder
-
this is sent after the application's main window is opened.
Can be redefined in subclasses for actions after opening the view.
-
postOpenedWindow: anotherWindow
-
this is sent after another window was opened.
Can be redefined in subclasses for actions after opening additional views.
-
preBuildAsSubcanvasWith: aBuilder
-
this is sent before an interface is built from a spec as a subcanvas,
and the appModel is the same as the topWindow's application.
Can be redefined for apps which need to be informed about that.
-
preBuildDialogWith: aBuilder
-
this is sent before an interface is built from a spec as a dialog with me
as a source (for aspects) i.e. via openDialogInterface:.
Can be redefined for apps which need to be informed about that.
-
preBuildWith: aBuilder
-
this is sent before an interface is built from a spec,
but only iff the appModel is not the same as the topView's app
(i.e. if it is not a build for the same appModel again).
In that case, preBuildAsSubcanvasWith is invoked.
Can be redefined in subclasses.
-
preOpenAsSubcanvasWith: aBuilder
-
this is sent before the applications window is opened inside another application.
Can be redefined in subclasses for actions after showing the canvas view.
-
preOpenDialogWith: aBuilder
-
this is sent after the applications window is opened as a dialog with me
as a source (for aspects) i.e. via openDialogInterface:.
Can be redefined in subclasses for actions after opening a dialog view.
-
preOpenWith: aBuilder
-
this is sent before the applications main window is opened.
Can be redefined in subclasses for actions right before opening the view.
-
processOutsideButtonEventWhileModal: anEvent
-
a button event (press/release) arrived for another view,
while I (a topView) am open as modal view.
Can be redefined to react on clicks outside (eg. CriticsWindow);
if handled, the redefining method should return true.
If not handled, it should return false.
initialization
-
addTopViewsToCurrentProject
-
add all of my topViews to the current project's list of views.
This allows hiding views on a per-project basis.
Applications which do not want to be switched with projects
(such as the Launcher), may redefine this to a noop.
-
basicInitialize
-
initialize the application.
Since ST-80 applications seem commonly to redefine #initialize
without doing a super initialize, the real initialization is
done here ...
-
initialize
-
nothing done here;
but can be redefined in concrete applications
-
initializeDevice
-
-
initializeResources
-
initialize the applications resources (NLS support).
-
initializeScreenDevice
-
-
setDevice: aDevice
-
set the device (i.e. some Screen), where the application shall open its view(s).
The default device (if not set here) will be the current screen.
inspecting
-
inspectorExtraAttributes
( an extension from the stx:libtool package )
-
extra (pseudo instvar) entries to be shown in an inspector.
Answers a dictionary of aString -> aBlock.
aString is name of extra attribute and MUST start with minus ($-).
aBlock returns the object representing extra attribute
opening
-
hideWindows
-
-
open
-
open a standard interface (i.e. my default windowSpec).
Sorry, but for visualworks compatibility, the builder is returned,
not the receiver.
-
openAndWaitUntilVisible
-
open a standard interface (i.e. my default windowSpec),
and wait until my window is visible
-
openAs: windowType
-
open a standard interface (i.e. my default windowSpec)
as slave, partner, dialog, popUp, undecorated etc.
as returned by one of the WindowBuilder windowTypeXXX methods.
Sorry, but for visualworks compatibility, the builder is returned
-
openAsSlave
-
open a standard interface as slave (i.e. my default windowSpec).
Notice: there is still a need to make the current window a master
(see code and comments in WindowBuilder >> openAt:withExtent:andType:)
Usage example(s):
WorkspaceApplication new openAsSlave.
|
-
openAt: aPoint
-
open a standard interface at some point (i.e. my default windowSpec)
-
openAtPointer
-
open a standard interface at the current pointer position.
Sorry, but for visualworks compatibility, the builder is returned
-
openInterface
-
open a standard interface (i.e. my default windowSpec).
Subclasses which do not have an interfaceSpec
should redefine this method and create & open their view(s) there.
(see Launcher as an example).
Sorry, but for visualworks compatibility, the builder is returned
Usage example(s):
ColorEditDialog new openInterface
|
-
openInterface: aSymbol
-
open a specific interface.
The argument, aSymbol specifies which interface.
The concrete application subclass must provide a method with that name,
which must return an interfaceSpec.
This is forwarded to the builder to create the views.
Typically, applications only use one interface, returned by the #windowSpec method.
Sorry, but for visualworks compatibility, the builder is returned
Usage example(s):
ColorEditDialog new openInterface:#windowSpec
|
-
openInterface: aSymbol as: windowType
-
open a specific interface in a special mode.
The argument, aSymbol specifies which interface.
The concrete application subclass must provide a method with that name,
which must return an interfaceSpec.
This is forwarded to the builder to create the views.
Typically, applications only use one interface, returned by the #windowSpec method.
The windowType can be any of #slave, #partner, #dialog, #popUp etc.
as returned by one of the WindowBuilder windowTypeXXX methods.
Sorry, but for visualworks compatibility, the builder is returned
-
openInterface: aSymbol at: aLocation
-
open a specific interface at a location in default mode.
The argument, aSymbol specifies which interface.
The concrete application subclass must provide a method with that name,
which must return an interfaceSpec.
This is forwarded to the builder to create the views.
Most applications only use one interface,
returned by the #windowSpec method,
but an app can easily open additional windows with different specs.
-
openInterfaceAs: windowType
-
open a standard interface in a special mode.
The windowType can be any of #slave, #partner, #dialog, #popUp, #undecorated etc.
-
openInterfaceAt: aLocation
-
open a standard interface (i.e. my default windowSpec).
-
openInterfaceModal
-
open a standard interface as a modal dialog.
Sorry, but for visualworks compatibility, the builder is returned
-
openInterfaceModal: aSymbol
-
open a specific interface as a modal dialog.
The argument, aSymbol specifies which interface. The concrete
application subclass must provide a method with that name,
which must return an interfaceSpec. This is forwarded to
the builder to create the views.
Typically, applications only use one interface,
returned by the #windowSpec method.
-
openInterfaceModal: aSymbol at: location
-
open a specific interface modal at some screen location.
The argument, aSymbol specifies which interface. The concrete
application subclass must provide a method with that name,
which must return an interfaceSpec. This is forwarded to
the builder to create the views.
Typically, applications only use one interface,
returned by the #windowSpec method.
-
openModal
-
open a standard interface as a modal dialog
-
openModalAtPointer
-
open a standard interface modal at the current pointer position.
Sorry, but for visualworks compatibility, the builder is returned
-
openOnDevice: aDevice
-
open a standard interface on some other device
-
openSpec: anInterfaceSpec
-
open a view as specified in anInterfaceSpec.
-
openSpec: anInterfaceSpec withBindings: bindings
-
open a view as specified in anInterfaceSpec.
-
openSpec: anInterfaceSpec withBindings: bindings modal: modal
-
open a view as specified in anInterfaceSpec.
-
openSpecModal: anInterfaceSpec
-
open an interface spec modal
-
openWindow
-
open the window
- assumes that the builder has already setup the interface.
Usage example(s):
-
openWindowAs: windowType
-
open the window - assumes that the builder has already setup the interface.
The windowType can be any of #slave, #partner, #dialog, #popUp etc.
as returned by one of the WindowBuilder windowTypeXXX methods.
-
openWindowAs: windowType at: originOrNil
-
open the window - assumes that the builder has already setup the interface.
The windowType can be any of #slave, #partner, #dialog, #popUp etc.
as returned by one of the WindowBuilder windowTypeXXX methods.
-
openWindowAt: aPoint
-
open the window
- assumes that the builder has already setup the interface.
-
openWindowAtCenter
-
open the window centered on the screen
- assumes that the builder has already setup the interface.
-
openWindowModal
-
open the window as a modal dialog
- assumes that the builder has already setup the interface.
-
openWindowModalAt: aLocation
-
open the window as a modal dialog
- assumes that the builder has already setup the interface.
-
openWithExtent: extPoint
-
open a standard interface with given extent
-
showWindows
-
-
unhideWindows
-
-
waitUntilVisible
-
wait until my window is visible
opening-dialogs
-
openDialog
-
open my window as a modal dialog
- assumes that the builder has already setup the interface.
-
openDialogAt: aPoint
-
open my window as a modal dialog
- assumes that the builder has already setup the interface.
-
openDialogAtPointer
-
open my window as a modal dialog
- assumes that the builder has already setup the interface.
-
openDialogInterface: aSelector
-
open a dialog
-
openDialogInterface: anInterfaceSymbolOrSpecOrSpecArray withBindings: bindings
-
open a dialog, given a spec-selector
-
openDialogInterfaceSpec: aSpec withBindings: bindings
-
open a dialog, given a spec
-
openDialogModeless
-
open my window as a modal dialog
- assumes that the builder has already setup the interface.
-
openDialogSpec: aSpec withBindings: bindings
-
open a dialog
-
openDialogSpecModeless: aSpec withBindings: bindings
-
open a dialog, but without blocking the caller
opening-webInterface
-
addToService
-
add myself to my web service (portal service)
-
createWebBuilder
-
create a Web-UIBuilder if not already present
-
defaultPageSpecName
-
the default spec for a web interface
-
defineInterface
-
marked as obsolete by exept MBP at 01-03-2022
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
defineInterface: aSpecSymbol
-
marked as obsolete by exept MBP at 01-03-2022
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
defineInterfaceFrom: aSpec
-
marked as obsolete by exept MBP at 01-03-2022
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
defineWebInterface
-
define a standard Web interface.
Subclasses which do not have an interfaceSpec
should redefine this method and create their page there.
-
defineWebInterface: aSpecSymbol
-
define a particular web interface.
-
defineWebInterfaceFrom: aSpec
-
define a web interface (setup a page), given a spec.
-
httpServerPort
-
on which port will a HTTP server be started
-
initializeAsWebServiceOnWebDevice: webDevice
-
-
initializeWebServiceDevice
-
no real device here; instead, we need a web service in which I register.
The device is a dummy one, to make the protocol transparent & compatible
-
pageSpecs
-
-
service
-
-
service: aWebService
-
Modified (format): / 24-03-2022 / 11:15:44 / cg
-
serviceLinkName
-
-
startAsWebService
-
self new startInWebService
-
startInPortalService: aPortalServiceOrSession
-
-
webBuilderClass
-
return the UIBuilder class for me.
This method can be redefined if (eventually) there are
spec readers for other UI languages (motif UIL ?)
-
webLink
-
if nil is returned, I will install my page(s) right under the serviceLink (i.e. /portal/nn).
Otherwise, they will be under (i.e. /portal/link/nn)
-
webLink: something
-
private
-
builderClass
-
return the UIBuilder class for me.
This method can be redefined if (eventually) there are
spec readers for other UI languages (motif UIL ?)
-
createBuilder
-
create a WindowBuilder if not already present
queries
-
applicationWindowClass
-
return the class used for my (top-) windows
-
ctrlDown
-
answer true if the control key is currently pressed
Usage example(s):
^ activeGroup sensor ctrlDown.
|
-
defaultWindowExtent
-
return my default window extent or nil.
Return nil if the defaul extent should be computed by other means.
The code here asks for the last extent of an instance of this class.
-
defaultWindowSpecName
-
-
defaultWindowType
-
Applications come up non-modal, by default
-
graphicsDevice
-
return the device I want to open my views on.
The default (if not created with #onDevice:) is the currently
active screen.
-
interfaceSpecFor: aSelectorOrSpec
-
return an interface spec.
Here, the query is forwarded to my class.
Can be refefined in subclasses which want to provide per-instance specs.
-
isEmbeddedApplication
-
true iff I am an embedded subapplication;
useful to disable/hide menu items, if I am used both as top-
and as embedded application (such as the XMLInspector)
-
isNotEmbeddedApplication
-
false iff I am an embedded subapplication;
useful to disable/hide menu items, if I am used both as top-
and as embedded application (such as the XMLInspector)
-
isOpen
-
answer true if the application's window is open
-
isShown
-
answer true if the application's window is shown
-
processName
-
return a string to be shown for my process in the
process monitor. This has no semantic meaning, but exists
for your convenience only.
-
resolveClassNamed: something inClass: aClass
-
return the class from something, a class, symbol, string or nil.
first we are looking in the namespace of the application, then in the
current namespace and finally in Smalltalk
-
resolveFont: something
-
resolve the font. Delegate to windowBuilder
-
resolveName: something
-
return the class from something, a class, symbol, string or nil.
first we are looking in the namespace of the application, then in the
current namespace and finally in Smalltalk
-
resolveName: something inClass: aClass
-
return the class from something, a class, symbol, string or nil.
first we are looking in the namespace of the application,
then in the current namespace and finally in Smalltalk
-
selfResponsibleFor: aKey
-
internal: return true, if I am to provide a value for some aspect.
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
shouldRememberLastExtent
-
to be redefined by concrete applications:
if true is answered, the application's extent is remembered on close
and used as a default when opened the next time
-
topApplication
-
return the top-master application
queries-web sessions
-
isMovingWebSession
-
return true iff:
when started as a web service,
and when another session for the same master URL comes in,
if the second session should take over the app or not.
The default is false.
If false, the second request gets a warning and the app remains connected
to the first session.
Otherwise, the new session will be connected to the app, and the first gets a warning.
-
isSharedWebSession
-
return true iff:
when started as a web service,
and when another session for the same master URL comes in,
if there should now be two sessions working on the same application
(aka a kind of shared working in the same application).
The default is false.
If both isSingleWebApplication AND isSharedWebSession are false,
then either the first such session or the second gets a warning.
-
isSingleWebApplication
-
return true iff:
when started as a web service,
and when another session for the same master URL comes in,
and I am not allowing shared webSessions
if there should now another instance of the application instantiated,
and the second session working on the new instance.
The default is false.
If both isSingleWebApplication AND isSharedWebSession are false,
then either the first such session or the second gets a warning.
-
isWebService
-
true if this app was started as a Web app (accessable via a browser)
startup & release
-
activate
-
Activate my top window (i.e. deiconify & raise and assign focus)
Usage example(s):
|app|
app := WorkspaceApplication new.
app openAndWaitUntilVisible.
app window collapse.
Delay waitForSeconds:3.
app activate.
|
-
releaseAsSubCanvas
-
a subcanvas is closed or switching to a new application.
Can be redefined to perform a self release in this case.
-
rememberLastExtent
-
remember my window's current extent for the next open.
This is sent when closing the window,
so that it will open with that extent as default the next time
-
restarted
-
sent by my topWindow, when restarted from an image.
Nothing done here, but can be redefined to perform any actions
required to reset the application after an image-restart.
(for example: check if application files are still around, restart
subprocesses etc.).
-
saveAndTerminateRequest
-
some windowManagers send this to shut down an application
and have it save its state for restart.
Can be redefined in subclasses
-
saveAndTerminateRequestFor: aTopView
-
some windowManagers send this to shut down an application
and have it save its state for restart.
Can be redefined in subclasses
testing
-
isApplicationModel
-
return true if the receiver is some kind of applicationModel
-
isDialog
-
answer true, if I am an application representing a dialog
translating
-
translateString: aString
-
translate aString to the current language.
We use the resources as default.
Subclasses may redefine this to use another mechanism
-
translateString: aString with: anArgument
-
translate aString to the current language.
We use the resources as default.
Subclasses may redefine this to use another mechanism
-
translateString: aString with: argument1 with: argument2
-
translate aString to the current language.
We use the resources as default.
Subclasses may redefine this to use another mechanism
-
translateString: aString with: argument1 with: argument2 with: argument3
-
translate aString to the current language.
We use the resources as default.
Subclasses may redefine this to use another mechanism
-
translateString: aString withArguments: anArgumentVector
-
translate aString to the current language.
We use the resources as default.
Subclasses may redefine this to use another mechanism
user interaction & notifications
-
beep
-
output an audible beep or bell on my screen device
-
beepInEditor
-
output an audible beep or bell on my screen device, if enabled.
beep to wakeup the user after some error/not found condition in an editor.
Use this ONLY to beep in response to a bad user operation (not system failure beeps).
Can be disabled via the settings if too annoying
-
clearInformation
-
clear the info line at the bottom
(or whereever the app displays informative messages)
-
information: aStringOrNil
-
like Object's information, but translates the string via the
resourcePack, thus giving a translated string automatically
-
information: aStringOrNil fadeAfter: ignoredDeltaTime
-
like Object's information, but translates the string via the
resourcePack, thus giving a translated string automatically
-
information: aStringOrNil translate: aBoolean
-
like Object's information, but translates the string via the
resourcePack, thus giving a translated string automatically
-
information: aString with: anArgument
-
like Object's information, but translates the string via the
resourcePack, thus giving a translated string automatically
-
information: aString with: anArgument translate: aBoolean
-
like Object's information, but translates the string via the
resourcePack, thus giving a translated string automatically
-
information: aString with: argument1 with: argument2
-
like Object's information, but translates the string via the
resourcePack, thus giving a translated string automatically
-
information: aString with: argument1 with: argument2 with: argument3
-
like Object's information, but translates the string via the
resourcePack, thus giving a translated string automatically
-
information: aString withArguments: arguments
-
like Object's information, but translates the string via the
resourcePack, thus giving a translated string automatically
-
informationHolder
-
applications which want to show this in some info-area at the bottom
should redefine this to return a value holder or action-block
-
informationTranslated: aStringOrNil
-
like Object's information, but translates the string via the
resourcePack, thus giving a translated string automatically
-
informationTranslated: aString with: anArgument
-
like Object's information, but translates the string via the
resourcePack, thus giving a translated string automatically
-
informationTranslated: aString with: argument1 with: argument2
-
like Object's information, but translates the string via the
resourcePack, thus giving a translated string automatically
-
informationTranslated: aString with: argument1 with: argument2 with: argument3
-
like Object's information, but translates the string via the
resourcePack, thus giving a translated string automatically
-
informationTranslated: aString withArguments: arguments
-
like Object's information, but translates the string via the
resourcePack, thus giving a translated string automatically
-
informationUntranslated: aStringOrNil
-
applications which want to show this in some info-area at the bottom
may redefine this or the informationHolder message.
-
notify: aString
-
like Object's notify, but translates the string via the
resourcePack, thus giving a translated string automatically
-
openDocumentationFile: aFilename
-
open one of the standard documentation files under the doc folder;
aFilename is a relative filename there (eg. TOP.html or programming/TOP.html)
-
restoreCursors
-
restore the original cursors in all of my views
-
showCursor: aCursor
-
set all of my views cursor to aCursor.
It can be restored with #restoreCursor.
-
showMenuHelp: aStringOrNil
-
sent by a popup menu, when the mouse hovers an item.
Can be redefined if an app wants to show a menu item's tooltip in its info area.
(obviously, the menu item must have an activeHelpKey,
and my helpspec should contain an entry for it)
-
warn: aString
-
like Object's warn, but translates the string via the
resourcePack, thus giving a translated string automatically
-
warn: aString translate: aBoolean
-
like Object's warn, but optionally translates the string via the
resourcePack, thus giving a translated string automatically
-
warn: aString with: arg
-
like Object's warn, but translates the string via the
resourcePack, thus giving a translated string automatically
-
warn: aString with: arg1 with: arg2
-
like Object's warn, but translates the string via the
resourcePack, thus giving a translated string automatically
-
warn: aString with: arg1 with: arg2 with: arg3
-
like Object's warn, but translates the string via the
resourcePack, thus giving a translated string automatically
-
warn: aString with: arg1 with: arg2 with: arg3 with: arg4
-
like Object's warn, but translates the string via the
resourcePack, thus giving a translated string automatically
-
warn: aString withArguments: argArray
-
like Object's warn, but translates the string via the
resourcePack, thus giving a translated string automatically.
Also translates \'s to newLine.
-
warnUntranslated: aString
-
do not translate the string via the resourcePack
-
withCursor: aCursor do: aBlock
-
evaluate aBlock, showing aCursor in my topView and all of its subviews.
Return the value of aBlock.
-
withExecuteCursorDo: aBlock
-
evaluate aBlock, showing an executeCursor in my topView and all of its subviews.
Return the value of aBlock.
-
withReadCursorDo: aBlock
-
evaluate aBlock, showing a readCursor in my topView and all of its subviews.
Return the value of aBlock.
-
withVisibleCursor: aCursor do: aBlock
-
evaluate aBlock, showing a waitCursor in my topView and all of its subviews.
Return the value of aBlock.
Ensure, that the cursor is visible by the user for a minimal amount of time.
-
withWaitCursorDo: aBlock
-
evaluate aBlock, showing a waitCursor in my topView and all of its subviews.
Return the value of aBlock.
-
withWaitCursorVisibleDo: aBlock
-
evaluate aBlock, showing a waitCursor in my topView and all of its subviews.
Return the value of aBlock.
Guarantee, that the cursor is visible by the user for a minimal amount of time.
-
withWriteCursorDo: aBlock
-
evaluate aBlock, showing a writeCursor in my topView and all of its subviews.
Return the value of aBlock.
window events
-
clientMessage: msgType format: msgFormat eventData: msgData
-
a client message - very X-Window specific and only useful for special applications.
Subclasses prepared to receive them should redefine this method
-
copyDataEvent: parameter eventData: msgData
-
a client message - very Win32 specific and only useful for special applications.
Subclasses prepared to receive them should redefine this method
-
delayedAutoRaiseEventFor: oneOfMyViews
-
called with a delay by the focusIn code, iff the userPref setting is active.
Some (a small number only) may want to prevent autoraise in certain situations
- for example, if one view is controlling another.
These get a chance to redefine this method
-
dispatchEvent: event
-
dispatch a user-pushed event.
This allows for events for an appModel to be pushed into the event queue
the same way as events for a view are pushable.
-
dispatchEvent: evType arguments: evArgs withFocusOn: focusView delegate: doDelegate
-
dispatch a user-pushed event.
This allows for events for an appModel to be pushed into the event queue
the same way as events for a view are pushable.
-
dispatchEvent: ev type: evType arguments: evArgs withFocusOn: focusView delegate: doDelegate
-
dispatch a user-pushed event.
This allows for events for an appModel to be pushed into the event queue
the same way as events for a view are pushable.
-
dispatchEvent: event withFocusOn: focusViewOrNil
-
dispatch a user-pushed event.
This allows for events for an appModel to be pushed into the event queue
the same way as events for a view are pushable.
-
dispatchEvent: event withFocusOn: focusViewOrNil delegate: doDelegate
-
dispatch a user-pushed event.
This allows for events for an appModel to be pushed into the event queue
the same way as events for a view are pushable.
-
noticeOfWindowClose: aWindow
-
sent when a topView or applicationSubView has been closed.
Can be redefined in subclasses for cleanup.
-
noticeOfWindowOpen: aWindow
-
sent when a topView or applicationSubView has been opened.
Can be redefined in subclasses.
-
processApplicationCommand: command with: argument
-
a message from a secondary application instance (the exe has been started again).
Typically, the command is one like 'openPath:', as generated in StandaloneStartup.
-
processOpenPathCommand: argument
-
a message from a secondary application instance (the exe has been started again)
to open another window on document as found in the pathName argument.
Left blank (i.e. ignored) here, but can be redefined to open up another application
editor window if supported.
-
processShortcut: aKeyEvent
-
a shortcut key event as forwarded from the keyboardProcessor - if there is the
shortcut key defined, process the shortcut and return true - otherwise false.
-
requestForWindowClose
-
the applicationWindow wants to know, if a close
is ok. Return false if not.
-
showActivity: someMessage
-
some activityNotification shalt be communicated to
the user. Forwarded from the topView and ignored here.
Can be redefined in concrete applications to show the
message either in some infoView (infoLabel as in Windows)
or in the title area (as done in the browsers)
-
windowEvent: anEvent from: anApplicationWindow
-
dummy: windowEvent forwarding is not yet implemented
|