You can view the captured BMP files using the CgImageViewer class of the Smalltalk Programming Examples. To install the Smalltalk examples, load the configuration map ENVY/Image Examples, which loads the applications CommonExamplesFramework, CommonExampleLauncher, CwExamples, and CgExamples. You can open an instance of CgImageViewer by doing the following:
To view a BMP file from CgImageViewer, select Open from the File menu. Then, enter the path and file names of the BMP.
To enable DevelopScreenCapture so it uses CgImageViewer to display BMP files, begin by adding a prerequisite to DevelopScreenCapture:
Next, add a Display Image push button to the screen capture tool. To do this, change the expression for buttons := widgetManager in the method createButtonsRowColumn so it defines three columns using numColumns: 3.
Next, implement the method createDisplayButton in the Window Creation category and display:clientData:callData: in the Event Handlers category:
createDisplayButton "Private - Creates a button." | displayButton | displayButton := buttons createPushButton: 'display' argBlock: [:w | w labelString: ' Display Image ']. displayButton addCallback: XmNactivateCallback receiver: self selector: #display:clientData:callData: clientData: nil. displayButton manageChild.
display: aPushButton clientData: clientData callData: callData "Private - The user pressed the Display Image push button. Use the CgImageViewer to open the BMP file." | name | (name := self promptForFileName ) == nil ifTrue: [^self]. CgImageViewer new viewFile: name; open.
Finally, change createWindow so it references createCaptureButton:
... self createButtonsRowColumn. self createCaptureButton. self createDisplayButton. ...
When you now open an instance of ScreenPMCapture or
ScreenWinCapture, it displays:
Example: Defining application lineups for OS/2 and Windows describes how to enable the class Chooser to open the screen capture tool on images that suit OS/2 and Windows platforms.