The information here is intended for Pharo 10, and is not likely to work for previous or subsequent versions.
To display the Pharo Desktop by filling the OS host screen, do the following.
Display fullscreenOn.
Note that the Pharo system may crash under Ubuntu Linux 22.04.
To restore the full-screen display, do the following.
Display fullscreenOff.
Use "Display isFullscreen" to check if it is in full screen.
To disable the close button on a window created with SpPresenter, do the following in the SpPresenter (actually subclass of SpPresenter) object.
self window window makeUnclosable.
This setting is the same as "Make unclosable" in the SystemWindow's window menu (see below).
In Pharo 10, this setting causes the title bar to be displayed incorrectly. Therefore, it is better to set it together with "withoutDecorations" setting.
As explained later, eliminating the window decoration will make the close button inoperable, but Ctrl-W will close the window, so this setting is important.
To restore the window to its original state, do the following.
self window window makeClosable.
To prevent a window created with SpPresenter from being dragged, do the following.
self window window beSticky.
This setting is the same as "Make undraggable" in the SystemWindow window menu.
To restore the window to its original state, do the following.
self window window beUnsticky.
To maximize the window created by SpPresenter to fit the Pharo window, do the following.
self window window fullscreen.
Note: even with this setting, if the host OS window size is changed, the application window will not follow the change. Some additional work is required to make the application respond to the change.
To prevent a window created with SpPresenter from being resized (i.e., not resized by mouse operation), do the following.
self window beNotResizable.
This can be set even if SystemWindow has not been created. So it can also be set in the initializeWindow: method.
For example, To create a window that cannot be resized, create the initializeWindow: method in the subclass of SpPresenter.
initializeWindow: aWindow
aWindow beNotResizable
To enable resizing, do the following.
self window beResizable.
To set a window title, do the following.
initializeWindow: aWindow
aWindow
title: 'a title string'
It may be meaningless because it will disappear if you set "Eliminate Window Decorations" described below.
For some reason, you may want to specify the window size within the SpPresenter object.
For example, if you want to make it 200px x 300px, set as follows.
initializeWindow: aWindow
aWindow
initialExtent: 200 @ 300
"Window decoration" refers to the title bar of a window (SystemWindow) in Pharo. The title bar includes the close button, maximize and minimize buttons, window title, and window menu.
To remove this, do the following.
self window withoutDecorations.
Like beResizable/beNotResizable, this setting can also be done in the initializeWindow: method.
To restore the removed title bar, do the following.
self window withDecorations.
If you want to do something when the window is closed, describe the process in the initializeWindow: method as follows.
initializeWindow: aWindow
aWindow
whenClosedDo: [ "do something" ]
To add a description of the application, do the following.
initializeWindow: aWindow
aWindow
aboutText: 'a description'
The text set here can be displayed by selecting About from the Window menu, or from the SpPresenter object as shown below.
self window showAbout.
MenubarMorph showMenubar: false.
TaskbarMorph showTaskbar: false.
Do not show the World menu when clicking on Pharo's desktop.
PasteUpMorph shouldShowWorldMenu: false.