Styler/2 (Smart Windows)



[Application logo]





License agreement

The use of the program implies acceptance of the conditions stated above!

Alessandro Cantatore
alexcant@tin.it
alexcant@pandora.it
FIDONET: 2:335/705.2
http://acsoft.ghostbbs.cx

Introduction

Styler/2, previously known as Smart Windows, is an user interface enhancer for OS/2 warp 3 and 4. Both the aesthetics and the behaviour of various OS/2 Presentation manager windows and controls can be easily modified to meet your needs.
You wiil be able to use bitmaps or shades as titlebar background, choose any bitmap (of appropriate size) for the window buttons and force all dialog windows to use your favourite font.

Other features include window rolling, titlebar hiding, overriding the default size and position of maximized windows, moving windows by dragging their frame, pushing windows behind the other windows, selection of the entry fields contents, autofocus, mouse pointer hiding, mouse button double click emulation and automatically moving the mouse pointer to the focus window.
This beta version is fully functional and will work for 90 days since installation or for 600 reboots whichever comes first.
I'm still working on version 0.9 which will be the first shareware (registrable) version and will be renamed Styler/2.

What's new

This version (0.82 - smw082.zip) corrects the following problems:
  1. In systems running at 256 colors, after the system palette was changed by some applications, the titlebar bitmaps weren't able to reset their colors. Now the bitmaps are refreshed and properly displayed as soon as the default system palette is reloaded and the window owning the titlebar gets the focus.
  2. In some cases, moving windows in rolled state, was preventing them to be unrolled later.
  3. In some cases, OS/2 and DOS command windows were disappearing from the screen when rolled and then unrolled.
  4. Titlebar and window controls were misplaced when unrolling maximized windows previously rolled, when the Override default size and position  was set.
  5. The Automatic focus  feature was preventing drop down menus to work correctly in seamless winOS/2 windows.
  6. The Move the pointer to the focus window feature  has been improved.
  7. The Enable  checkbox in the Functions controlled by the mouse dialog and in the Mouse mapping  page now work as expected.
  8. The bug which prevented to set permanently negative positions for maximized windows has been removed.

Installation-uninstallation

The program can be installed over a previous installation of Smart Windows V. 0.81 (any patch level) without any need to disable the application or to uninstall it. If you installed a version older than V.0.81 you must delete the SMARTWIN.INI file from the installation path before installing this version.

The archive smw082.zip must be unzipped in a temporary directory preserving the path of the archive content.
If you are using the free GNU Info-UNZIP this will be made by default: open a an OS/2 command window, move to the temporary directory and type:

UNZIP SMW082.ZIP
If you are using a different program read the program documentation for the appropriate parameters.

Styler/2 (Smart Windows) installerOnce unzipped the archive you must run INSTALL.EXE and click on the Install  button for a new installation or for updating your previous installation.
To save users' download time smw082.zip doesn't contain all the bitmap files included in the previous versions. If you are installing over a previous installation, you will already have all the bitmap files in the right palces. If you are performing a new installation and still have smw081.zip you can drag its \BITMAPS directory into the temporary directory where you unpacked smw082.zip overwriting the folder with the same name. Before doing that modify your system configuration (System  object, Confirmations  page) checking to Confirm on copy, move, create shadow . So you will be able to confirm file overwriting just once for all files reather than many times for each individual file.
If you do not have smw081.zip, you can get smwb082.zip and install the enclosed \BITMAPS tree as described above.
If you modified some bitmap files leaving their name unchanged, rename them or backup them before installing to prevent them to be overwritten. (The next version of the installer will check for the file date stamps to avoid that).
The other program buttons have the following functions:

  1. The Refresh  button works only if the program is currently installed and allow to re-create the Smart Windows folder and desktop objects.
  2. The Uninstall  button completely removes all files from the installation path and other paths and clean the CONFIG.SYS and the OS2.INI files.
  3. The Help  button displays this documentation in plain text format.
  4. The Exit  button terminates the the application.
As you move the mouse pointer around a short information message will be shown in the application status bar.

Installation details

This is, step by step, what the happens when you click on the Install button. Please refer to this section if you cannot properly install the program on your system.

  1. The installation program first looks for the flag file SMARTWIN.@ to enable the Install button, then looks in the \OS2\DLL directory and the OS2.INI file for any item from a previous installation.

  2. If any trace of a previous installation is found (or if you run the Smart Windows Installer  object later) the Refresh  and Uninstall  button will be enabled as well.
  3. During initialization the program checks if SMARTWIN.DLL is loaded in memory. In same case this will make a message box to pop-up with the text Registration error #5 . Please ignore it and go on with the installation.

  4. In any case if the DLL is found in the \OS2\DLL directory a message box asks your confirmation for overwriting it. Click on Yes  and go to the next step.
  5. A dialog box allows you to select the drive and path where to install the files. The default drive is your boot drive and the default path is \SMARTWIN unless you are upgrading a previous installation, in which case the previous installation path will be the default.

  6. Although, during uninstallation, once deleted the program files, a message box will ask your permission before removing the installation path and all its contents it is advisable not to install the program files in a directory which contains other files.
    If the selected path doesn't exist, the program will create all the necessary directories. For instance if you selected to install the program files in C:\APPS\TEST\SMW and none of the directories in the path exist the installation program will create all of them.
  7. The next step consists in updating the OS2.INI file:
  8. After that, if this is a new installation rather than an upgrade, the installer asks if you want that, the first time, Smart Windows be started with the default options (click on the "Yes" button) or with all the options disabled (click on the "No" button).
  9. The following files are then copied to the selected installation path:
  10. Later the BITMAPS directory, all its subdirectories and their contents are copied in the same path.
  11. If a previous version of the program is installed and SMARTWIN.DLL is loaded in memory it is unlocked. In any case the new SMARTWIN.DLL is copied in \OS2\DLL. A future version of the installer will allow you to choose any directory mentioned in your CONFIG.SYS LIBPATH statement.
  12. The SMWERROR.MSG file is copied in \OS2. A future version of the installer will allow you to choose any directory mentioned in your CONFIG.SYS DPATH statement.
  13. Your CONFIG.SYS file is checked and, if necessary it will be modified to include the lines:

  14. REM --- Smart Windows environment --- LEAVE IT AS THE FIRST \"SET\" STATEMENT!!!
    SET SMWENV=AAAAAAAA
  15. A Smart Windows  folder with the Smart Windows Properties  ,Readme  and Smart Windows Installer  objects is created on the Desktop.
  16. All operations performed by the installation procedure will be reported in the SMWSETUP.LOG file in the installation path.
  17. After installation you must reboot in order to load the new SMARTWIN.DLL.
Uninstallation details

The uninstallation procedure undoes all the above described operations. Besides that it will delete any new bitmap files you added in the \BITMAPS subdirectories. Anyway a message box asks you to confirm the deletion of the installation path and other files which can still be there (SMARTWIN.INI which is created by the application or any other files you put there).
At the end of the uninstallation procedure the SMWSETUP.LOG file will be written in the root of the boot drive.

Features and settings

The program consists in a DLL which is loaded by the system every time a new process is started and in a preferences notebook which allows to let the DLL use your favourite settings.
The notebook pages share a common area with a statusbar which provide contextual help and a five buttons toolbar. The preferences window is resizeable! If you cannot read some help message because it doesn't fit the statusbar control, you can resize the window making it wider.
The toolbar buttons have the following functions:
Enable/disable button The first button enables/disables all Smart Windows features.
Apply button This button is required to apply the settings of the current page. Most pages do not need it since the settings are effective as soon as they are changed. When required, the button is enabled as soon as a setting is modified.
Undo button The third button is an undo button. It will set the settings of the current page to the values they held when the Preferences application  was started.
Default button The forth button is the default button and it resets the current page preferences to the default values.
Help button The fifth button is the help button. There is no SMARTWIN.HLP file yet so it doesn't work.
There are still a lot of features not yet implemented though the corresponding buttons/checkboxes are in the Preferences application.

The Smart Windows Preferences notebook consists of the following pages:

Other dialogs used by the application are:
Smart Windows - General
The settings in this page affect the behaviour of the preferences notebook itself:
Apply on exit
All new settings will be automatically applied when the program window is closed.
Save on exit
if not checked the current settings are not saved in SMARTWIN.INI so when you reboot you'll get back the previous settings.
Remeber last viewed page
this option works when the program is started and brings to the the top the page which was the topmost page when the program was closed.

Apply all
simulates clicking on the Apply  button in all pages which require that to make the current prefrences the active ones.
Undo all
simulates clicking on the Undo  button in all pages where some settings have been modified.
Default all
simulates clicking on the Default   button in all pages.

Exceptions and Exceptions pages 
Although the program integrates seamlessly with the system, generally  with no problem for all the other programs, there are still some applications which cannot properly cooperate with it and which won't work properly when some Smart Windows features have been set.
In order to avoid this kind of problems each page grouping a category of features is followed by a an Exceptions  page which will allow you to enter the name of the programs for which that particular group of options causes conflicts.
In some cases you would find more confortable just to completely disable Smart Windows enhancements for a given program. For this purpose you should use the Exception page inserted under the Smart Windows  main tab.
To add a program to the exception list either type its full name (i.e. including the program path) in the entry field and click on the Add  button or get it from the file dialog clicking on the Find  button. The Remove  button will delete a file name from the list.

Note: currently it is not possible to specify the name of programs whose windows are executed as a PMSHELL process. These are: all text mode programs (DOS and OS/2), all Win-OS/2 programs, all fodlers and all WPS applications (like the System clock, the color and font palettes, etc.).

In future all this scattered Exceptions pages will be grouped in a unique dialog and will be possible to add program names by darg and drop or directly by the system menu of a running application and to detect the various windows belonging to the PMSHELL process.


Dialogs
Usually, when no other kind of font has been explicitly specified by the programmer, all dialog windows will use the ugly System Proportional  font.
Smart Windows allows to override this system behaviour and force all dialog windows to use your favourite font. Just check Use Smart Windows font  to enable this function.
This will work in all dialog windows which use the system default font. If you want to force all windows to use the font you selected then check Override Presentation Parameters .
The Font  button brings to the top the Dialog font  dialog.
Note: dialog controls inherit the font attribute (presentation parameter) from the dialog unless they have been explicitly set to use a different font. In this latter case the Use Smart Windows font  feature won't work.

Titlebar - Active window/Inactive window 
Through this page it is possible to change completely the look of titlebars.

You can use any bitmap for the titlebar background or the window controls with the following limitations:

  • all bitmaps must be in warp 2.x format not RLE packed.
  • the titlebar bitmap file size must be less than 8 KB.
  • the titlebar bitmap must be at least 22 pixels high for screen resolutions of 1024x768 pixels or better or 18 pixel for screen resolutions fo 800x600 pixels or less.
  • the window controls bitmaps must be 16 colors bitmaps, 22x22 pixels for high resolution screens and 18x18 pixels for low resolution screens.
The settings in this page must be applied through the Apply  button to become active.
Enable titlebar enhancements
enables/disables all the controls in the page and the corresponding settings. When it is checked a titlebar sample will be displayed.
Context menu
a context menu event (right or left button click according to what you set in the system mouse preferences) on the titlebar will make the system menu popup next to the mouse pointer.
Titlebar sample
it is interactive! By clicking on the titlebar buttons you can modify the default buttons bitmaps or the close button position. By clicking on the titlebar you'll be able to select a different background color, shade direction or bitmap according to the selected background mode.

Background group:

Solid color
replicates the default titlebar style. The Background button allows to select the background color. The titlebar sample can be used like the color selection button.
Shade
allow the use of a shade as titlebar background. When selected will display four buttons to select the two different colors, swap them or change the shade direction. The titlebar sample can be used like the shade direction button.
Bitmap
allow to use a bitmap as titlebar background. When selected a bitmap selection button will be displayed. The titlebar sample can be used like the bitmap selection button.
Override Presentation Parameters
when unchecked titlebars which do not use default colors for the active or inactive state, won't use the Smart Windows titlebar background settings.

3D border group:

This setting allows to surround the titlebar with a 3D border. The buttons allow to select and swap the colors.

Text style group

3D text
when checked gives a 3D effect to the text. By selecting the colors you can get a raised or depressed effect.
Font
the Font  button allow to set the titlebar font. The same effect can be attained by dragging a font from the font palette and dropping it on the titlebar sample.
Note:
  1. in titlebar buttons the same bitmap is used both for the button in ordinary state and for the button in depressed state. The bitmap is shifted one pixel left and down for user feedback when the button is depressed. In a future version I'll try to use icons i.e. transparent bitmaps so to extend the titlebar background on the buttons bottom and different images for the different states of the buttons.
  2. when moved to the left side the close buttons replicates the system menu icon if present. The problem will be solved in a future version.
  3. next version will allow more control on the titlebar settings:
    • 3 colors shades, with some dithering and settable to any direction (even oblique)
    • pattern overlay for titlebar background
    • text formatting (left, center, right)
    • opaque text background etc.
 



 

 

 

 


The bitmap selection dialog 
This dialog will popup when you click on the titlebar sample buttons, in the titlebar background bitmap button or in the buttons in the Titlebar hiding  and Window rolling  pages.
This dialog is resizeable and its last size and position is saved in SMARTWIN.INI.
The dialogs used for selecting the bitmaps for the close button, window roll/unroll and titlebar hide/unhide has the Disable  check box which allows to remove the button from the titlebar controls.
Besides that, the Close button bitmap  dialog has a combobox for selecting the button position.

The Edit  button opens the Icon editor with the bitmap currently selected.
The Import...  button copies the bitmap file selected through a file dialog into the appropriate path and refresh the bitmap listbox contents.
The functions of the OK  and Cancel  buttons are usual, while the Help  button doesn't work yet.

Note: 
Currently it is necessary to dismiss the dialog in order  to update the titlebar sample. In a future release the bitmap sample will be updated as soon as a new bitmap is selected.


Titlebar - Titlebar hiding 
The options in this page allow to hide the titlebar and controls (optionally including the actionbar menu) of any window. The titlebar pops up again as soon as the mouse pointer moves on the upper window border and is hidden when the mouse pointer is moved away from the titlebar area downwards.
Enable titlebar hiding
enable/disable all the titlebar hiding options.

Hide by:
System menu
add a "Titlebar hiding" item to the window system menu.
Mouse
select which mouse event, performed on the titlebar, toggles titlebar hiding on/off.
Keyboard
(not working yet) will allow to set a keyboard accelerator for toggling titlebar hiding on/off.
Titlebar-hide/unhide button
allows to use a titlebar button for toggling titlebar hiding on/off. Two different bitmaps are used for hiding/unhiding.
Exclude dialog windows 
disable titlebar hiding for dialog windows. Dialog windows without a sizing border are treated as OS/2-DOS command windows: the titlebar is removed by reducing the size of the window.
Include menu
hide the actionbar menu alongside the titlebar and window controls.
Pop up delay
sets how long (hunredths of second) the mouse must stay on the upper window border to make the hidden titlebar be displayed.
Hide delay
sets how long the mouse pointer must stay away from the titlebar area before the titlebar is hidden again.
Note: 
Titlebars in hidden state are hidden again only when the mouse pointer moves downwards inside the window! 
There is no reason to hide the titlebar of rolled windows so you get just a system warning sound if you try to do so.

Window rolling 
Enable window rolling
enable/disable all the window rolling options.

Roll by:
System menu
add a "Roll/unroll" item to the window system menu.
Mouse
select which mouse event, performed on the titlebar,toggles window rolling on/off.
Keyboard
(not working yet) will allow to set a keyboardaccelerator for toggling window rolling on/off.
Titlebar-roll/unroll button
allow to use a titlebarbutton for toggling window rolling on/off. Two different bitmaps are used for rolling/unrolling.
 
Auto-unroll when getting focus
rolled windows are automatically unrolled when getting focus.
Auto-roll when losing focus
windows whose rolled state has been previously set, are rolled as they lose focus.
Allow vertical resizing of rolled windows
disables window resizing for windows in rolled state.
Auto-unroll windows vertically resized
rolled windows are automatically unrolled if resized along the y-axis.
Roll to the bottom
makes window roll downwards: i.e. the left bottom corner of the window won't move.
Auto-unroll when closing window
Rolled windows are unrolled when they are closed or when the system is closed through the default shutdown dialog.

Note: 
The Auto-roll when losing focus  feature is a sub-option of Auto unroll when getting focus  feature. When both of these features are enabled, the first roll command (through the titlebar, system menu or roll titlebar button) sets the window in an auto-roll state  : windows in this state are rolled/unrolled as they get/lose focus.
Untill the roll state is active, the titlebar button will use the unroll bitmap even if the window is currently unrolled (because it is the focus window).
If a window in auto-roll state has got the focus it is automatically unrolled. At this point, if you want to roll it again, while it is still the focus window, (this is likely to happen only when you are dealing with maximized windows) two consecutive toggle-roll-state commands are required: the first will reset the auto-roll state, the second one will set again the window in auto-roll state rolling it.
In order to avoid to repeat the roll command twice, you can keep the Shift key pressed while performing the roll command.


Maximized windows 
These settings allow to change the behaviour of maximized windows.
Override default size and position
This option allows to set the position and size of windows when they are maximized. It doesn't work for OS/2 and DOS command windows.

The window position can be a negative number.
Don't allow moving
This option prevents maximized windows to be moved from their default position.
Don't allow sizing
This options prevents maximized windows to be resized.

Note: 
The options not mentioned here do not work yet.


Sizing/moving 
These options control how windows are moved or resized.
Frame drag
This option allows to move windows by moving the mouse pointer on the window border and dragging it holding down the mouse button and optionally some keys you can set according to your needs by the Drag by:  button.
Push behind all other windows
This option allows to move windows along the z-axis, i.e. move the topmost windows behind all other windows. The Push by:  button sets your favourite combination of mouse and keyboard event to start the operation.

Note: 
The options not mentioned here do not work yet.


Text controls 
The only working option, at the moment is the Entry field automatic text selection . This allows to select the whole contents of any entryfield at once.
The Select by:  button sets your favourite combination of mouse and keyboard event to perform the operation.

VIO windows 
No options is working yet.

Mouse 
The options of this page are related to the mouse events.
Automatic focus
the window (desktop child), under the mouse pointer is automatically made active. The Delay  spinbox allows to set how long the mouse must stay on a window before it becomes the active window. This option work for seamless WinOS2 windows as well.
Ignore desktop
when checked the desktop window is not made active when the mouse pointer moves on it.
Don't bring to top
the activated window is not made the topmost window. This feature is disabled when moving to or from a seamless WinOS2 window.
Ignore new windows
the autofocus feature is suspendend when a new window is opened and is re-enabled only after the mouse has been moved on the new window.

Pointer hiding
the pointer is hidden when it stop moving. The Delay spinbox allow to set how long it must be still before it is hidden.
Exclude buttons
disables pointer hiding when it is over a button.
Exclude menu
disables pointer hiding when it is over a menu.

Remap button 3 click as button 1 double click
works with most PM windows and applications but still works randomly with seamless WinOS2 windows.

Move the mouse pointer to the focus window
This group of features allows to automatically move the mouse pointer to the window which gets the focus. It still doesn't always work correctly. The two sub-options: Only on window creation  and Only on dialog windows  work with an OR logic.

The mouse/keyboard functions dialog
This dialog is present both as a notebook page and as an independent dialog window which will popup every time you click on a button to select the keyboard or mouse event to perform a given feature (for instance the Mouse  and Keyboard  buttons of the Window rolling page).
As an indipendent Dialog it has the ordinary OK , Cancel  and Help  buttons to dismiss the dialog.
Its purpose is to give the user a sort of summary of all the mouse and keyboard event which have been selected.
It is not yet so useful since most of the listed features have not yet been implemented.

The Function:  list box shows all the features (that will be) available.
The statusbar shows the control which should detect the chosen mouse/keyboard event.
The checkbox Enable  is disabled when a given feature has another Enable checkbox in its own page.
When the radiobuttons Click  and Double click  are not visible the selected mouse button event means which mouse button is held down (like in the Frame drag  feature).
Ctrl , Alt  and Shift  are additional keyboard keys which may be associated with a mouse event.

The Keyboard Mappings page (and the Functions controlled by the keyboard  dialog) allows to associate a function key (F1-F12) plus Insert , Delete  and Backspace  with one of the modifier keys (Ctrl , Alt  and Shift ).
Since the keyboard accelerators have not yet been implemented it is of no use at the moment.

 

Known problems

 

Planned features

The first planned feature is a registrable version. Since the next registrable version I'll remove the time expiration and replace it with some other kind limitation for not registered users.
Other planned features (I do not grant that all of them will be in version 1.0) are:  

Registration

Please be patient. I'll make the registrable version available as soon as possible.





Alessandro Cantatore